4 ms·
I'm a longtime PHP developer who has been flirting with server-side JavaScript frameworks recently, including building a couple production apps in Helma. For m
by midnightmonster 18y ago
I'm a longtime PHP developer who has been flirting with server-side JavaScript frameworks recently, including building a couple production apps in Helma.
For my current RAD project, the client has their own IT staff who don't want to support another environment, so it was back to PHP. On Rasmus' good words, I tried using the CodeIgniter framework (never used a pre-existing PHP framework before) but ran into pain with its many kludges to support PHP 4. Then found Kohana, which is CodeIgniter rebuilt for PHP 5 only. I'm lovin' it.
I was all gung-ho for server-side JS, but Kohana combined with my own ORM is going very nicely. (I don't know about Kohana's ORM--I started working on mine before I had decided to use any framework.) The biggest benefits, of course, are that it runs most everywhere and my long experience with PHP prevents the odd surprises I was always running into with the JS frameworks.
And, hey, first class functions and closure are coming in PHP 5.3!
So the grass isn't always greener--it seems what I was missing was a better way of organizing my code as much as straight language power. So try a good PHP framework--I recommend Kohana. And even though python and js are more powerful languages, having a whole bunch of stuff already built for you and ready to run anywhere beats power and a clean room most of the time.
- jamongkad 18y agoMy day job has me hacking in CI but I always wanted to give Kohana a shot. But you have to admit CI has done a good job in creating a PHP framework that is enjoyable (a word any serious programmer would use to not describe PHP) to work with. PHP 5.3. is exciting stuff yet my worry is that most PHP code monkeys will not give it's feature set a second glance. On a unrelated note I've been working with HaXe to produce PHP apps. So far I'm LOVIN it! Do give it a try.
- midnightmonster 18y agoI thought the straightforward handling of routing in CI and the other basic plumbing was very nice. I really didn't like the way you have to load all the other classes wacky-style to work around PHP 4's deficiencies. So it was as much maddening as helpful for me. Kohana is just like CI, except without the PHP 4 fail. Of course most people won't get into the PHP 5.3 features, but I'm not going to lose sleep over it. And HaXe... I've been thinking about it for a long time, but I always end up thinking no. What's the web framework and view/template story there? It doesn't appeal for writing client-side JS b/c there I have jQuery, and I very much doubt HaXe would end up easier to write.