One of the reasons for that may of course be that the framework unlike your simple code knows all the edge cases where strings going in one direction or the other need to be escaped to avoid obvious security errors.
Re:Why I Hate Frameworks
by jamesbritt on Thursday July 21, 2011 @01:35AM
(#2788624)
... and unfortunately for frameworks are very rarely small and simple.
Quite a few start out that way, but for whatever reason feature-creep sets in and soon your off to J2EE land.
If you start seeing more than one or two books covering a framework it's time to find a simpler one.
I think microframeworks like Flask strike a really nice balance with this.
Re:Why I Hate Frameworks
by jamesbritt on Thursday July 21, 2011 @07:47PM
(#2791782)
I like the idea of layered frameworks.
For Ruby, there's Innate, a light-weight framework, and on top of that is built Ramaze, a more developed framework (though still comparatively light). Likewise there is Sinatra, and on top of that was built Padrino.
And both Innate and Sinatra are built on top of Rack. So if you don't care for the direction or feel of a framework you can pop down the layers once or twice and build something you like without having to start completely from scratch.
The code in between those should be as small as possible and as simple as possible, and as obvious as possible given the point of view of someone who knows nothing about your application architecture, to give you the best chance of fixing the bugs in the places that it matters.
A framework tries to occupy the space in between those 2 wires, and unfortunately for frameworks are very rarely small and simple.