> From: Mark R. Diggory [mailto:[EMAIL PROTECTED]] > > Is this kinda what you mean? Are you trying to add the > search/edit/remove/add functionality to the jsp page? This could easily > be captured with forms which submit back to the jsp plus a choose block > to designate which operation is being performed. I bet this'll really > irk those Struts/Maveric MVC folks out there with its use of the JSP > page as both the Controller and View. But it is relatively easy to > accomplish using JSTL without such "heavy" MVC frameworks. > > Here is the example: > > [...]
If you plan on using JSTL as a programming language, you're going to run out of rope rather quickly. Yeah, the basic constructs are there - assignment, iteration, conditionals - but Java it is not. What about file access, or image manipulation, or remote procedure calls, or any of the 50 million other things people do in their business logic? After you write custom tags for all of that what you end up with is an ugly, untyped, interpreted programming language. IMHO, in any nontrivial web application, JSTL is best treated as a templating language. Aside from that, the main problem with pages that submit back to themselves is that they confuse the hell out of designers. My designers would be bewildered by all that business logic, whether it be in tags or scriptlets. > If you want to encapsulate the functions for adding/removing/editing > the content and not have them in this "View/Controller", you could > include them from separate JSP's or Servlets. or likewise submit the > forms directly to those JSP's or Servlets and then redirect back to > this jsp once the work was done. ...at which point what you have is a lightweight MVC framework. In fact, this is pretty much exactly what Maverick does. It's what Struts does too, except that Struts does it with 100 times more code... > It stays pretty independent and light without too much dependency on > any particular framework other than the JSP/JSTL tags. Which results in > less research and development effort to accomplish the same task. All > you need to know is JSP/JSTL. Any webapp of a more than trivial nature ends up with a significant amount of "framework"; it's just a question of whether you use existing software or craft your own. That said, I believe frameworks should be minimalist, modular, and focused on a narrow goal - which is why my fellow developers and I gave up on Struts, WebWork, etc and wrote Maverick. Jeff Schnitzer [EMAIL PROTECTED] The Maverick MVC Framework: http://mav.sourceforge.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
