Im looking at creating an application which will allow my customers to complete a number of forms online. These forms will need to have lots of validation, and be very dynamic. The answers or information submitted on 1 section should determine what questions
they get asked next.
Once all the questions have been asked and information provided, the formw should then be made available for their managers to see and authorise or reject. If authorised they form will come to me. If rejeced it would be returned to the original user.
I am at the moment limited to using MVC as it is what my IT section will support.
What i want to know is, is MVC suitable for this project and does anybody have any suggestions as to how i should proceed?
Sounds like you don't have a lot of choice anyway .
I can see how you might implement this with MVC, in fact I would probably opt for it myself. How familiar are you with MVC?
The complexity comes if you need to control the questions from the server dynamically based on a data source of questions, or are the questions concrete and do not require changes?
The second is easier, you can create a controller per question that provides an index view that presents the question, validates and once complete submits it back to the controller for interpretation. The controller can then redirect to the next question
based upon your logic.
The first solution is going to require you to build a business and data layer capable of storing your questions, possible answers, validation requirements and branching logic based on question results - this will have a reduced number of controllers and
views but will require more complex code.
If it helps, mark as answer - your approval helps with my recovery ;)
Not very. I originaly started to look at using Django and Python but it wasnt going to be supported so MVC was suggested. I have only completed the 'movie database' tutorial on here. Looks like ive got a lot of work to do
Has any body seen or got any good examples of projects similar to this? Ive started following a tutorial and changed things to suite what i think i need, but im really starting to struggle....
If you read the tutorials you will understand how easy it is to chain forms, especially in MVC. As for dynamic forms that change depending on the questions answered, you will probably need Jquery...
hoponhiggo
Member
2 Points
15 Posts
Is MVC right for me?
Jan 29, 2013 08:22 AM|LINK
HI All
Im looking at creating an application which will allow my customers to complete a number of forms online. These forms will need to have lots of validation, and be very dynamic. The answers or information submitted on 1 section should determine what questions they get asked next.
Once all the questions have been asked and information provided, the formw should then be made available for their managers to see and authorise or reject. If authorised they form will come to me. If rejeced it would be returned to the original user.
I am at the moment limited to using MVC as it is what my IT section will support.
What i want to know is, is MVC suitable for this project and does anybody have any suggestions as to how i should proceed?
Thanks in advance
ignatandrei
All-Star
134645 Points
21588 Posts
Moderator
MVP
Re: Is MVC right for me?
Jan 29, 2013 08:34 AM|LINK
yes.
Read MVC tutorials
Read http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx
kidshaw
Participant
1158 Points
252 Posts
Re: Is MVC right for me?
Jan 29, 2013 08:36 AM|LINK
Sounds like you don't have a lot of choice anyway
.
I can see how you might implement this with MVC, in fact I would probably opt for it myself. How familiar are you with MVC?
The complexity comes if you need to control the questions from the server dynamically based on a data source of questions, or are the questions concrete and do not require changes?
The second is easier, you can create a controller per question that provides an index view that presents the question, validates and once complete submits it back to the controller for interpretation. The controller can then redirect to the next question based upon your logic.
The first solution is going to require you to build a business and data layer capable of storing your questions, possible answers, validation requirements and branching logic based on question results - this will have a reduced number of controllers and views but will require more complex code.
hoponhiggo
Member
2 Points
15 Posts
Re: Is MVC right for me?
Jan 29, 2013 08:47 AM|LINK
Thanks for the replies
Not very. I originaly started to look at using Django and Python but it wasnt going to be supported so MVC was suggested. I have only completed the 'movie database' tutorial on here. Looks like ive got a lot of work to do
hoponhiggo
Member
2 Points
15 Posts
Re: Is MVC right for me?
Feb 05, 2013 08:02 AM|LINK
Has any body seen or got any good examples of projects similar to this? Ive started following a tutorial and changed things to suite what i think i need, but im really starting to struggle....
ignatandrei
All-Star
134645 Points
21588 Posts
Moderator
MVP
Re: Is MVC right for me?
Feb 05, 2013 08:58 AM|LINK
I have sent to you a link of haacked. Did you read that?
hoponhiggo
Member
2 Points
15 Posts
Re: Is MVC right for me?
Feb 05, 2013 09:17 AM|LINK
Yeah i did but i cant see how it helps me? It doesnt seem relevent to what im looking to do? Unless im missing something?
jp.lima
Member
186 Points
51 Posts
Re: Is MVC right for me?
Feb 05, 2013 09:25 AM|LINK
If you read the tutorials you will understand how easy it is to chain forms, especially in MVC. As for dynamic forms that change depending on the questions answered, you will probably need Jquery...
ignatandrei
All-Star
134645 Points
21588 Posts
Moderator
MVP
Re: Is MVC right for me?
Feb 05, 2013 10:05 AM|LINK
It talks about dynamic adding data.