If 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.
I think you are thinking too small. For most small sites I agree that frameworks are overkill but once you get past that they become nearly essential to maintaining your code.
Running a web app with even over 10KLOC without some sort of framework in place sounds like a receipt for disaster. Also frameworks do not mean you have to have code generate all your queries or stick another templating language over php.
If you've never had to write or maintain a complex web application than I can understand your position but once you do I'm certain you'll change your mind.
Also saying web development is easy compared to other fields shows a lack of understanding of the complexity of large web based applications. I've worked in a number of fields and I now focus on web development and for the most part they were all about the same complexity.
I totally disagree. And I've made complex web apps since when CGIs in C where the only way to have dynamic generated content.
In fact I think it is the contrary: for small sites (and small budgets) frameworks can be ok. For big websites custom code is a must.
The idea that using a framework makes code easier to maintain is the complete opposite of my experience.
Big (serious) projects require a lot of custom logic which you should write yourself anyway. And it is a lot more painful since you have to stick to the framework logic if you don't want to break things as soon as you update the framework version or if you don't want to make the code unmaintainable.
I have made my own libraries which are designed in a modular fashion (not OO) that I constantly improve and reuse. Code is clean and you can easily understand the flow of each section.
A MVC framework is not the only way to have clean (modular) code.
Your reasoning would apply if you aren't good at designing software architecture, which is a recipe for disaster especially on big projects.
I'm not saying MVC is the only way. I've not even mentioned MVC. What I gather though is that when you hear someone mention frameworks you assume they are referring to the railish frameworks of recent. A framework to me is a set of libraries and a structure to better layout and facilitate the development of your application.
It also doesn't have to be a premade/3rd party one as you've demonstrated by essentially creating your own framework and just calling it by a different name(collection of libraries).
A recipe for disaster in my opinion would be a large project with no code structure/layout guidelines.
The term framework is almost exclusively used for object oriented designs. That's what I was arguing against.
Of course one should make, use and keep improving his own libraries.
And there's nothing wrong in using other people code either. Provided that it is built in a modular standalone fashion and so it can be easily included / replaced / updated / removed without breaking things.
When me and my buddies are working on new (hobby) projects, we usually do our quick prototyping using something like CodeIgniter. It's fast and lets us have something out within hours vs. days.
A lot of these frameworks have super simple tie-ins to other APIs, so we can easily include the Google Maps API, Twitter, etc within a few seconds. Now the app isn't going to be very efficient or scalable but it's something that we can play with and then build the final product off of.
And 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.
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.
Sure, 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.
This 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).
I'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.
It'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) 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.
There's also NOLOH (http://www.noloh.com), which allows you to create sophisticated web sites and web applications easily and intuitively in a single development language.
NOLOH'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.
That'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 :)
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.