File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Choosing frameworks etc... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Choosing frameworks etc..." Watch "Choosing frameworks etc..." New topic
Author

Choosing frameworks etc...

Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
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


The secret to creativity is knowing how to hide your sources.
Adnaan Sikandar
Greenhorn

Joined: Feb 05, 2004
Posts: 3
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

Joined: Oct 23, 2003
Posts: 82
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.


Neal Ford<br />Author, <i>Art of Java Web Development: Struts, Tapestry, Commons, Velocity, JUnit, Axis, Cocoon, InternetBeans, WebWork</i><br /><a href="http://www.nealford.com" target="_blank" rel="nofollow">www.nealford.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Choosing frameworks etc...
 
Similar Threads
Lot of lightweight Frameworks !
Does velocity engine supports I18N ?
Head First SCWCD
[Architecture] Frameworks, tools, plugins and etc - What next
Next Book Purchase