18. Januar 2008

Just commented Cory Ondrejkas blog

http://ondrejka.blogspot.com/2008/01/javascriptreplacejava-c.html#c9010177294114126155

I admire the Netscape people for choosing a prototype language. It just took 10 years for the world to learn how to use it correctly. Today I really wonder why we (me included) programmed such a crappy JS style for years, when everything was already there, just because we did not understand it. On the other hand, despite its beauty, it may be a mistake to design a language such that the world needs an eon to grok it. Slow interpreters mean only that no one put a billion $ into it, as they did for Java and C#. JS could be JITed as well.

I am a fan of PHP and I hate it. I am using PHP for large projects an I love its deterministic nature. Even on 100 web servers with memcache and mysql I understand completely what happens. A Java app server of this size produces more surprises.

The funny thing with Smarty templates is that everyone uses them, although they do not need them. Yes, you need a template engine. Separation of code and design, etc., but PHP IS A TEMPLATE ENGINE. Before you start learning Smarty-script, give this a try: http://phpsavant.com/docs/. Savant engine is not another template engine. It is just a wrapper for PHP's native template engine. You can easily build your own engine in a few hours. The Savant site explains it well. Smarty is only useful in the rare case that you do not trust your template writers. If you are the template writer, then you better use PHP as template script rather than learn another, that will be "compiled" into PHP. Speed: Smarty caching ends where PHP starts. That said, my C++ programmer heart cries comparing PHP/Apache/Linux to a C++ server. PHP speed ends where Java/C# start and they both end where C/C++ start.

Kommentar veröffentlichen