Smarty template engine for Ruby - anyone interested?

R

Ruby Baby

Here's an idea:

There are a lot of HTML-templating systems out there.
Each one uses different syntax in the HTML template itself.

That makes it hard for a company to commit to anything but
the most popular templating system, because while a programmer
may decide to use a Ruby instead of PHP backend, the company
would not want the programmer's decision make them have to
go get their HTML designer to do the templates all over again.

Would anyone be interested in writing a Ruby parser for
Smarty, the most popular templating engine for PHP?

http://smarty.php.net/docs.php

If so, my company might contribute money to help pay for the
effort. (Not a lot, but some "extra money" to make the extra
effort worth it.)
 
R

Ruby Baby

I've used Smarty in my PHP projects. I'm quite familiar with it.
I'm also big fan of Ruby and I like your idea about porting Smarty to
Ruby.
You say that you need parser for Smarty: do you mean you want to use
it for the most common scenario:
- ruby script assigns arbitrary values to Smarty variables, like
Smarty.assign "bla-bla-bla", generate_some_stuff()
- template is very basic and just contains {$variables}
If so that's quite trivial and can be done in a couple of hours.
But Smarty is a lot smarter than that - it supports caching, plugin
system for writing custom functions, some built-in functions, etc.
That's a bigger project - to emulate/port full-blown Smarty.
Which of them do you pursue - tinymarty or Allmarty?


It would have to be full-blown Smarty EXCEPT the implementation would
not matter. Things like caching, I think, are behind-the-scenes
implementation, and the Ruby port could decide to do that or not.

The point would be to let people use their exact same HTML templates
whether using Ruby or PHP as the backend.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top