Re: [SMARTY] using smarty with java or perl?
| From: | Travis Low | Date: | Thu, 15 Aug 2002 03:33:59 +0000 |
| Subject: | Re: [SMARTY] using smarty with java or perl? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5720@lists.php.net to get a copy of this message | ||
PHP has two-way Java integration. You can invoke PHP from Java or vice-versa. To create Java objects within PHP, you have to rebuild PHP with Java support. To integrate PHP into a servlet environment, you have to rebuild the web server with the SAPI module, which makes PHP run as a servlet. Using PHP from within a Java servlet environment is probably more stable than doing it the other way around.
Another approach might be to take an existing Java template engine, such as FreeMarker or Velocity, and modify the parser to use Smarty templates. This would probably work for most templates, but it might be difficult to implement some of the more arcane Smarty functionality. This approach is probably a fair amount of work, though.
Perl integration should be easy, since you can run PHP on the command line (and therefore call it in a script). But unless you're using mod_perl or something similar, it would probably be sloooooow.
cheers,
Travis
Mattia wrote:
Is there a way go use smarty with languages other than php? Mattia-- Travis Low <mailto:travis@dawnstar.org> <http://dawnstar.org/travis>