Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC - what comes first?

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when start building a new form, since there are 3 factors to take in mind:

1. Model / bean
3. View / Jsp
When start building a new form, since there are 3 factors to take in mind:

1. Model / bean
3. View / JSP
2. Controller / Action

(Please correct me if I got it wrong)

What is the convention to start building the components? I mean do you list the items of your form, build the design and then implement the action?

Curious

2. Controler / Action

(correct me if I got it wrong)

what is the convention to start building the componenets? I mean do you list the items of your form, buidling the design and then implement the action?

curious
 
Prasanth Pillai
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to a code level approach you can start with
1. the bean. (actionform)
2. action class
3. jsp
4. struts-config.xml

other files if required.

you can download very good pdfs from
http://courses.coreservlets.com/Course-Materials/struts.html
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the tips.
Is there any particular pdf in the site with reference to my question?

Thanks again
 
Prasanth Pillai
Ranch Hand
Posts: 52
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's what happens in the real world:

1. Someone gets an idea. "Hey, we really need a web application that will do ___________". Everyone ignores that person. He is soon fired.

2. Three months later, the pain of doing things the old way starts to grow and lots of people grumble about it, but nobody does anything about it.

3. Another month goes by. The pain can no longer be ignored and the higher-ups decide to get a committe together to work up some requirements.

4. Six months, many hours in meetings, and several gallons of coffee later, still nothing is decided but someone tells the analyst (me) to go ahead and make a prototype, and "we'll tell you if we like it or not".

5. I bribe the one member of the committe who wasn't sleeping to create a use case document based on what the committee wanted.

6. Using the use case document as a guide, I spend hours on DreamWeaver putting together mock-up screens with dummy data, and a little JavaScript thrown in to make the pages seem to navigate. I also design a data model and a Java model and make cute little diagrams of them.

7. When presented with the prototype, the committe argues for hours. Finally when a fist fight breaks out, the committee is adjourned and I am told to make a lot of revisions.

8. Repeat steps 6 and 7 several times.

9. Finally, I am told "We still don't like it, but we're under pressure to do something, so go ahead and build it".

10. I argue with the DBA over the data model, and after I offer him my firstborn child and all my lunch money for the next 6 months, he finally agrees to do it my way.

11. My team creates the model classes from the diagrams. At this point they are mostly properties without many methods. There is also no data access yet.

12. The team creates ActionForm classes from the data in the mock-up screens.

13. The team creates real JSPs from the mock-up screens and replace some of the html tags with Struts tags as needed.

14. We create Action Mappings, forwards etc. We also create Action classes, but at this point they are just empty shells with the correct names.

15. Using the use cases as a guide, we build each use case scenario one by one by creating the Action class logic, and also augmenting the model logic as needed. It is at this point that we add the data access logic.

16. We demo the product to the committe. Another fist fight breaks out.

17. We repeat steps 11 through 16.

18. The site goes live, everyone is happy. World peace is achieved and hunger is eliminated.

(not really, but I had to think of a happy ending!)
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was one of the most hilarious replies I�ve ever read.
Thank Merrill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic