This article contains an assertion that goes unquestioned in a lot of the documentation for templating engines, but it's one that seems incorrect to me.  After showing an example of some HTML code that contains both Struts tags and a Java scriptlet, the author says:
 
It is clear from the Struts example above that the whole strict MVC model has been broken again because a call to java.util.ArrayList and creating an Object is embedding Java code within a template.
 
 
To my way of thinking, MVC isn't broken by simply putting Java code into an HTML page.  Putting business logic into the HTML page (view) breaks MVC, but the presence of Java code--if used only to support the view--does not.
 
Similarly, I'd argue that it's possible to break MVC even using tags, if the tag implements business logic.  (And what is a tag, after all, besides Java code?)
 
Do other people agree?
 
 
======================================
Greg Maletic
Chief Technical Officer
Zero G Software, Inc.
514 Bryant Street
San Francisco, CA 94107
 
tel: +1.415.512.7771 x303
fax: +1.415.723.7244
 
The leading provider of multi-platform software deployment solutions.
======================================
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of suhas
Sent: Friday, July 27, 2001 4:40 AM
To: [EMAIL PROTECTED]
Subject: some comparision between JSP/struts and velocity

 
Suhas

Reply via email to