• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Choosing frameworks etc...

 
Faisal Khan
Ranch Hand
Posts: 285
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Neal,
I actually find it difficult at times to ascertain the level of reliance upon various frameworks and technologies, for example, when should one decide to use Velocity and not the JSP pages with JSTL.
I tend to prefer a path where I try to use the most basic technologies and scale up as required, is that a good approach. I am currently developing an app using Struts (started with my own controller but moved to strust as that started to become complicated) and incorporated Tiles (after seeing their power and flexibility) - HTML and JSP views are being used and Java Beans backend.
One of the questions, I am trying to address at the moment is whether to use Strust validation or Filters. Also had to question whether to use EJB, Velocity etc and do we really need them.
I hope you can shed some light on this.
Regards
Faisal
 
Adnaan Sikandar
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fasial,
I've been working with Struts for almost a year now. For validation, i use struts validator as well as client side javascript. I make sure that server side validation works fine before implementing client side validation. One of the advantages of this approach is that validation errors are caught at the client without requiring a round trip to the server. The application scales better because you have less validation round trips to the server.
In the JSP, i define a <DIV> tag and i use javascript to populate that <DIV> with the appropiate validation error message and then make it visible. If there are no validation errors, i hide the <DIV>.
I think that using <DIV>'s to show validation error messages on the client side and implementing server side validation as a backup works very well.
Adnaan
[ February 10, 2004: Message edited by: adnaan sikandar ]
 
Neal Ford
Author
Ranch Hand
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Faisal -


One of the questions, I am trying to address at the moment is whether to use Strust validation or Filters. Also had to question whether to use EJB, Velocity etc and do we really need them.

Struts validation is very nice because you can use declarative validations to handle simple stuff on both the client and server, and more robust ActionForm validation for business rules. I highly recommend that you use Struts, not roll-your-own filters.
As for Velocity and EJB, you probably don't need them, certainly not yet. Get comfortable with all that Struts has to offer, then branch out.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic