RE: [SMARTY] SMARTY + Plugins versus JSP + Custom Tags
| From: | Hoffman, Geoffrey | Date: | Fri, 13 Jun 2003 21:06:47 +0000 |
| Subject: | RE: [SMARTY] SMARTY + Plugins versus JSP + Custom Tags | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9714@lists.php.net to get a copy of this message | ||
Horst Tellioglu wrote:
> i am trying to find out what the differences betwenn a SMARTY and a
> JSP bases solutions are.
You mean (uh...) besides the fact that JSP uses Java and Smarty uses PHP?
When the servlet container compiles your JSP, it makes Java byte-code
(binary executable, typically one that extends httpServlet) whereas a smarty
"compiled" template file is simply a more condensed PHP script (still in
plain text). It's not compiled into binary executable like a JSP is. It's
kind of comparing a fast horse to a slow car. They'll both get you across
town, but you have to plan ahead and take a different route. Kind of a lame
analogy I admit - they are both attempts at separating code from
presentation, generally speaking. Very tough to compare when you start
talking specifics.
> Has anyone tried both or could anyone give
> me any pointers to more information about this?
I've done a wee bit of JSP, but mostly PHP & Fusebox & Smarty. There isn't a
ton out there on this topic, probably b/c most Java/JSP gurus would never
stoop to the level of "not a true programming language" like PHP, and the
strict nature of Java coding is way more complex than most PHP programmers
(who probably came from an HTML background) are willing to tackle.
> Is there any disadvantage of using SMARTY with plugins instead of JSP
> with custom actions?
Well... any discussion on this is going to have to address PHP versus JAVA,
not specifically Smarty vs. JSP - like for instance, a J2EE deployment is
much more scalable than a PHP application is - but that has nothing to do
with Smarty or JSP.
I think it's a safe assumption to say that (all other things being equal) in
a contest where a PHP/Smarty GURU was going to race a Java/JSP guru to build
an identical app, the Smarty guy would finish first -- but when 10,000
people browsed the site at the same time, the JSP version would perform
better under the load.
Hope this helps.
Geoff Hoffman