You don’t convince me
April 1st, 2009MVC in current web-frameworks doesn’t convince me. It’s just too simplistic. If I would want something similar at least I want it for components not pages.
Templating languages don’t convince me. Why would I want to use some template specific half-language that in best case “compiles” to real language which just adds to the whole clutter?
ORMs don’t convince me. I can create my own helper functions for simple stuff and for complex queries ORM’s limited replication of elegant SQL DSL in just sad.
//from propel ORM.. why would you write this and a bunch of xml
$c = new Criteria(AuthorPeer::DATABASE_NAME);
$c->addJoin(AuthorPeer::ID, BookPeer::AUTHOR_ID, Criteria::INNER_JOIN);
$c->add(PublisherPeer::NAME, 'Some Name');
$authors = AuthorPeer::doSelect($c);
//to produce this nice sql.... try adding WHERE (COUNT(x) > 0 AND NOT y LIKE "z" OR ( ... )) for example..
"SELECT * FROM author
INNER JOIN book ON book.author_id = author.id
WHERE publisher.name = 'Some Name';"
“Scaffolding” and editing the generated code doesn’t convince me. This is just giving up on what you can model out with your programming language. If you have a common repeating pattern model it out, if you can’t use a better language.
Active Record doesn’t convince me. When I first saw it it reminded me of MSAccess 98.. but it’s not only that..
user = model.Users.get(101) # why would you make db query, map data to an object
user.age += 1 # change object
user.save # make update query
# when you need to do just one call to db #
db.do("update users set age = age + 1 where id = 101;");
Frameworks in most cases don’t convince me. Give me libraries that I can use when I model my code around the problem, not some general case framework where I will try to stick my code in to fit it’s model. If your “thing” for starters requires some predefined folder structure where such and such files should be sorted in – you’ve already lost.
–
this has nothing to do with 1.april

April 1st, 2009 at 4:16 pm
I’d agree with some, but not all. Frameworks and ORMs are true life-savers. They have their drawbacks, but the elegance of programming with objects only, instead of writing error-prone queries and repeating basic code-flow is well above these drawbacks.
April 2nd, 2009 at 9:49 pm
If you agree at least with few you are agreeing with far more than I usually get
.
About ORM-s… I agree SQL as a string (with prepared statements for example) is far from ideal solution also and I haven’t found anything either that would really fit well. It also depends of your other programming directions (like you mention, programming with objects only). But I do reject the view that I often get that ORM is a “given”, and looking/experimenting in other any directions is dumb and naive.
Frameworks is a wide term, and I did use “in most cases”.. sometimes they are usefull if not for else becasue of the bulk of code and knowledge that is already written, tested and somewhat fits together. Other times that bulk is too big or too general and you could get what you need with much much smaller core.
I favor minimalism greatly and I want to experiment with various ways of doing things. So if I am doing something for myself I usually like clean lower level core to build upon.
If I work for others I use whatever is best fit in global (also social) sense and I do for some time now propose clients to go with a web framework. Also for the reasons I wrote about here.