• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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

 
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.
 
Ranch Hand
Posts: 93
Java Python Redhat
  • 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.
 
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
Boost this thread!