Hi Matteo! Sorry, I was mixing my personal opinion into the discussion: I don't like PHP very much.
In general terms, I understand the merits of your idea, and since the rendering engine is pluggable, adding PHP as a templating language is a gain for Magnolia - if you don't need it, just don't install the module, and if you do need it, it's great if there is a module available. In terms of the implementation, I was trying to indicate that PHP comes with a lot of "Baggage" in the form of built in commands that are not needed for templating. PHP has many commands and extensions, many of which duplicate existing Java functions. Any implementation will devote considerable time getting all this stuff to work, although it isn't really needed. In contrast, integrating Rhino would be comparatively easy - there is very little built in functionality, and it is easy to pass Java Objects to the JavaScript code, or to call Java functions from within JavaScript. It's designed for Java integration. Also, I disagree that the penetration of PHP is greater than that of JavaScript: it's not a matter of comparing Rhino with PHP, but of comparing JavaScript with PHP, and I would assert (though I have no proof) that there are just as many people who know JavaScript as PHP, if not more. Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Matteo Pelucco Gesendet: Montag, 28. März 2011 12:16 An: [email protected] Betreff: [magnolia-user] Re: AW: PHP as Magnolia rendering scripting language On 28.03.2011 10:41, Unger, Richard wrote: > I think PHP comes with a lot of "Baggage" that isn't needed in the Magnolia > rendering engine. > I think in terms of having a "widely known language" that it might be more > interesting to integrate a JavaScript engine like Rhino. I think that if a Java engine already exists for a certain language, it should not be so impossible to support, with all constraints and limits, another templating language. And for a big-company based on PHP development would be really nice to learn that Magnolia can even be used to bring existing PHP application to a new life, with little effort. The same concept is valid for Rhino JS, but the spread of this is *sure* less than PHP.. Matteo ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
