Other Software > Developer's Corner
The Yii PHP Framework
mouser:
Just wanted to post some quick thoughts after spending a few days with the yii PHP Framework.
I have been looking for the "perfect" web development framework for a number of years. I've had quite a bit of experience with a relatively lightweight PHP framework called CodeIgniter, which i quite like, and I have spent quite a bit of time trying to use the Drupal CMS system as a framework for custom web application coding, which i have vocally warned people to avoid.
You could sum up my current thinking about frameworks as highly dubious of anything fancy. My experience is that the more minimalist the better -- less to go wrong, and less exotic code that does some stuff in super-clever ways but makes other stuff insanely convoluted. The more a framework tries to do stuff in some clever automatic way, or enforces some elaborate structure, the more painful it is to use when you inevitably need to do real-world stuff.
I spent quite a bit of time this year looking at Python frameworks -- hoping to switch from php web development to python web development -- but concluded that at the current time, deploying python web applications is a total joke and a catastrophe for anything other than a scenario where you are running a single python web application on a server. I also didn't fall in love with Django, Pylons, or the other major python web frameworks.
So anyway, I decided to experiment a bit with yii. It's much newer than CodeIgniter but shares much of the same focus on being minimalist and fast.
However, it is substantially "heavier" than CodeIgniter in many areas -- providing some very cool form and data handling classes. I'm still unsure about how much of a cost these features will inflict when it comes time to do some non-standard stuff, and i would prefer that it didn't do quite so much "magic" stuff behind the scenes. In this respect I think i still prefer CodeIgniter.
However there is one area in which yii would seem to me to be a really clear win -- and that's what inspired me to post -- the quick construction of scaffolding code (controllers, models, views) automatically from existing database tables.
That is, if you have a legacy database that you want to build a web application around, yii has some absolutely fantastic tools for automatically creating controllers/models/views that will let users browse, view, create, edit entries in the database. Normally I would avoid such features, but there is no denying that for some projects this might represent a huge time savings.
f0dder:
Did you ever take a look at CakePHP?
mouser:
I took a very long look at CakePHP a couple of years ago.. It was a toss up between that and CodeIgniter for a big project. I went with CodeIgniter because I wanted something leaner and more lightweight.
f0dder:
OK, just popped into mind because you mentioned Yii does model/view/controller.
bscott:
We have been down the same road. I looked at CakePHP but went with CodeIgniter because I preferred less magic. I have spent some time with Drupal and am not quite as averse to it as you - but then I haven't tried to use the Forum module.
Recently I have looked at Python frameworks starting with Django which I initially quite liked but then felt it was too heavyweight for me but it does have a good admin feature for rapid CRUD. I then took a brief look at Pylons and Turbogears neither of which were to my taste: Pylons has gone into maintenance mode and Turbogears makes too many decisions for me.
I am currently looking at Pyramid which I am quite taken with - it strikes me as the Codeigniter of the Python world.
I will now add Yii to my list (which never gets any shorter).
Navigation
[0] Message Index
[#] Next page
Go to full version