Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 91
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic