| 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: 36
|
|
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: 202
|
|
[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.
|
 |
 |
|
|
subject: How many tables and ActionForms and Action classes required for 5 screens
|
|
|