aspose file tools*
The moose likes Struts and the fly likes How many tables and ActionForms and Action classes  required for 5 screens Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How many tables and ActionForms and Action classes  required for 5 screens" Watch "How many tables and ActionForms and Action classes  required for 5 screens" New topic
Author

How many tables and ActionForms and Action classes required for 5 screens

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
I am newbie to struts. consider am having 5 screens(jsp). I am going to use struts and hibernate.
should i use 5 ActionForms and 5 Action classes and 5 pojos and 5 Tables(database) or not.
Karthik Jayachandran
Ranch Hand

Joined: Feb 18, 2009
Posts: 88

It depends on count of forms you are having in those screens. If there is no form, no need for Actionform. Just use a ForwardAction for a jsp.

And yes, having pojos is a good practice even if there are same properties both in ActionForm and pojos.

And the number for table is dependent on your project/domain you are working with. It might take 5 tables.
Fidel Edwards
Ranch Hand

Joined: Mar 19, 2008
Posts: 231
[quote=Rajan Jay]
And the number for table is dependent on your project/domain you are working with. It might take 5 tables.[/quote]

Agree with Rajan. It totally depends on the design you are going to implement. You design should follow more or less standards in terms of Normalization, OO design concepts and other design patterns.

[quote=Rajan Jay]
And yes, having pojos is a good practice even if there are same properties both in ActionForm and pojos.

[/quote]

Try to separate duplicate properties from POJO and ActionForm. I used to (or try to) keep only getter-setter of POJO and some little bit complex code in actionform.
 
Don't get me started about those stupid light bulbs.
 
subject: How many tables and ActionForms and Action classes required for 5 screens