6 ms·
Discussing PHP Frameworks: What, When, Why and Which?
- jacquesm 17y agothe list he gives is very very short, here is a longer one: http://www.phpframeworks.com/ http://www.phpframeworks.com/
- billclerico 17y agoWe use Kohana, which is a lightweight php5 port of codeigniter. we like it a lot
- Keyframe 17y agoI'm currently looking at kohana - I use Zend FW now (been doing a long time without any of the established frameworks, only my own set of tools). Can you elaborate a bit why Kohana instead of Zend? Even if I end up using Kohana, there are several things in Zend I will keep - PDF for example.
- billclerico 17y agoI don't have any experience with Zend, but I've heard its just a very heavy weight install. Kohana is super light and easily extended, though you lose a lot of the fluffy libraries.
- metachris 17y agoA small mistake: this site is writing "Codelgniter" (with L) instead of "CodeIgniter" (with I).
- cesare 17y agoIf you're a decent enough programmer (web development is really easy compared to other fields) and you really want versatility, coding from scratch without using a framework is still the best decision. This is not necessarily true for non web apps. I love Cocoa for instance and the MVC pattern is great for most kinds of apps. But not for the web, IMHO. It's overkill. There are too many unnecessary abstractions from the protocols. The LAMP stack already gives you everything you need. For instance, PHP with mod_php already is a template processor. There's no need to build another one on top of it. Unless you don't know what you're doing, which is bad anyway. I still prefer to parse the query string myself, to define my SQL queries (and most of the times a single query can replace 4-5 queries generated from a framework so apps are much faster) and to keep the data as clean and separated from the code as I can (data is always much more important than code and it's much better if it is code agnostic). With web frameworks there's a lot of magic and it's faster to have a web app up and running. But it's a pain as soon as you want to modify the default behaviors. At least in my experience.
- habibur 17y agoCouldn't agree with you more.
- edu 17y agoI couldn´t disagree with you both more. I´m sorry, but webapps development can be much, much, much harder than desktopapps developement. Take into account a single parameter: scalability. Note: I expect we are talking about real app programming, and not hobbie programming.
- cesare 17y agoI'm talking about professional development. And scalability is one of the reason for which you may want to avoid frameworks. If you're a professional you want to fully understand your data and how it is generated/modified if you want to solve both functional and load scalability issues.
- edu 17y agoSure, but I don´t want to scatter all the SQL clauses over the code. Also, what would happen when you want to modify the way the data is accessed? I.e, you want a write-through cache in front the DB? I can agree with you if we talk about generic frameworks. I would not take none of them for a big site, or at least I would not take it as is. But I would definetivelty use a framework, either a completely custom one or a modified one.
- sorbits 17y agoAnd desktop development can be much, much, much harder than web development. It really depends on what you are writing. The nature of web apps though tend to be based around CRUD using a database already written, a web server already written, and possibly a caching server, or similar, already written. The challenging part in most web apps, as I see it, is coming up with the idea and implementing a great user experience around it, which means top notch (interaction) designers and really sweating the details. If you contrast that with desktop apps, here my movie player needs to play WMV (via reverse engineering efforts), my browser needs a fast JavaScript interpreter, a cutting edge CSS layout engine, my photo management software needs to handle thousands of pictures in sub-seconds, should group via face recognition etc., my MP3 player needs to do 3D visualizations of the music playing and rip my CDs to a fraction of its original size using state of the art psychoacoustic models, etc. Sure, there is plenty of desktop software which does simple things, but saying the scalability factor of web apps make them harder than writing desktop software is belittling desktop apps to a point which is absurd.
- asnyder 17y agoThere's also NOLOH (http://www.noloh.com http://www.noloh.com), which allows you to create sophisticated web sites and web applications easily and intuitively in a single development language. Disclaimer: I'm a co-founder of NOLOH.
- frwdr 17y agoWow, that's creepy. I've just been building exactly the same thing - i even used the same keywords.
- asnyder 17y agoNOLOH's been around since 2005 and has multiple patents pending. Perhaps you would like to talk sometime, we're always looking for talented developers to join our team.
- frwdr 17y agoThat's very interesting. I never understood why more people haven't made the connection between objects in the front end and PHP objects in the backend, and how it's only natural to unify those into one language instead of messing with seperate html, css, js etc. Anyhow good luck to you guys, it's the way to go, i want to keep working on more features and then maybe i'll give you a shout if i feel i've got something new worth contributing :)
- garnet7 17y agoNo drupal?
- Zak 17y agoThis article could omit the words "PHP" and "web" until it starts listing the specific frameworks and still be valid. I'm inclined to agree with the posts opposing the use of a generic framework for a very scalable or complex application; they're usually not for that. What frameworks ARE for is small to medium applications with low budgets. I do some contract work on projects with budgets in the $500-2000 range. For projects like that, frameworks like Rails or Django save a lot of time over writing it in scratch (even in Lisp, which I've done a couple times).
- cesare 17y agoExactly.
- apinstein 17y agoIt's amazing how all-over the place these comments are on frameworks! Maybe it's because frameworks vary so much in their goals, weight and architecture. There are really 2 kinds of performance; latency and throughput. Latency is how fast a single request is served; throughput how many requests you can serve concurrently. A good framework has a noticeable but negligible effect on latency (which also goes down all the time as the framework improves and hardware gets faster), yet also makes scalability easier by helping you abstract out the parts that make it scalable. If the framework you're using makes it hard to scale horizontally, that's a failure of that framework, not of the concept of frameworks. I also disagree on the size of web sites that frameworks are useful on. I see a lot of comments like "ok for small/medium sites but bad for large sites". Why would frameworks suddenly get bad on a large site? For performance reasons? Architectural reasons? If either of these happen to you then you've simply chosen the wrong framework. The argument that "an organizational system and set of useful libraries for programming web-related tasks" all of the sudden stop working once a site reaches a certain size is bogus. It might be true for a framework, but it won't be true for all of them. I ended up writing a php framework (http://phocoa.com http://phocoa.com) in order to write less code. Frameworks give you leverage. They only box you in or cause scalability problems if they're architected poorly. I have really enjoyed the experience of building a framework as well as using it. I have been writing web apps, mobile apps, and desktop apps of all kinds for nearly 15 years and so I have had broad exposure to a variety of development stacks, from nothing to rich frameworks. Of course it's just my personal opinion, but in my experience a well-written framework is always better than doing it yourself, and a poorly-written one is almost always worse than doing it yourself.