How my addiction to web frameworks lost me a Playstation 3
Posted on August 14, 2007
Filed Under Code Ghetto, OG: Orginal Geeks, Bling
I have a buddy that is a SEO nut. He has a gizillion domain names that basically pay for his Jigaratti lifestyle. Unfortunately, though most of his sites run on php, he refuses to learn the language, and often IMs me for help when he gets stuck on something LAMP (Linux Apache Mysql PHP) related. Being that it’s not my real mortgage paying job, his stuff usually takes a back seat to real work. 2 weeks ago, he was desperate, he needed 3 CRUD (create retrieve update delete) apps for 3 already existing databases. He did not care what language I used, as long as it worked. No design work was needed, no fancy css, no background colors, just CRUD forms. In exchange for building the apps , I would receive a brand new PS3. A PS3 is not in the “family” budget right now, so I was excited. I set aside that coming weekend to work on the project. That week, the bastard called me from the store to tell me that he was in Walmart picking up my PS3 and did I need an extra controller? We joked about being able to play it before the weekend was over. All I had to do now was decide what platform I was going to build this on. Had this been 1999 , this would have been a no brainer, LAMP : a few html forms , a connection to Mysql (maybe even put that stuff in a fancy dancy include file) and I would have been golden. As far as the PHP platform has come, you can still do sh** like that today , throw up apps in less than a day. This is why you never want to make PHP your 9-5 job. More on that another time. I decided it would be so much cooler if I used this as an excuse to try out a new framework, Jboss Seam.
As far as java based frameworks go I could have easily used the one I make my living off of, Struts (1 and 2), but where was the challenge in that. I decided to give Seam a shot though I’m still not completely sold on JSF, it does hold some appeal for me. Anyway, I plan to do a more in depth post on Ghetto Java as to what went wrong with Seam but long story short: Seam-Gen in 2.0 beta 1 is broked. Badly. So sunday came and went and my buddy said ok, what about next weekend? I apologized and said I would use the tried and true LAMP way of making this ghetto application. Again, instead of just looping a mysql result set in a page , I decided to try yet another framework. This time I picked php based one, Zend Framework. It was PHP, PHP is simple, what could go wrong?
When I read initially that it did not have any scaffolding as of yet, I should have just stopped there. Pushing forward I used it only do discover that key piece I needed in the framework is brain dead crap, the Zend_DB. I should qualify that to say , that it appears that the PDO_MySql adapter to Zend_DB is a turd. Other than doing database operations , Zend Framework (aka ZF) is showing promise. Long story short, wresting with opaque docs, conflicting advice on the web, my crud app got as far as the ‘R’ component. And that only happened because I finlly swapped out the ‘db-neutral’ PDO adapter in favor of the native Mysqli one. So my deadline passed again and I still don’t have my PS3, but I’ve learned enough now to finish this out in ZF. Where are all these frameworks taking us? They are supposed to make things easier but they don’t. Supposed to make us more productive but that’s questionable. Make our development options more flexible but that really is a joke. I’ll go into more depth in later posts on what happened in Seam and ZF. And if I don’t have a PS3 next weeken, you will know why.
Peace,
xaymaca
Comments
16 Responses to “How my addiction to web frameworks lost me a Playstation 3”
Leave a Reply







Why not take it one step further and try Madeam?
www.madeam.com
Hello!
if all you need is a simple CRUD maybe you should take a look at this…. http://testwww.netbeans.org/kb/55/persistence-demo.html
I actually tried to do this in NB 6.0M10 but the JSF part of the persistence demo is currently broken. After using M10 , I can’t go back to NB 5.5. Hopefully that will be working again soon in NB 6.
If you had tried Rails or Django you would have had your PS3 by now.
LOl, it may come to that.
You should have tried http://www.symfony-project.com/ , a real good PHP framework
I don’t have any experience with Java or its frameworks, but I can easily tell you that you should have gone with the solution you knew… Since Struts is what you use on a regular basis and know the quirks of, you should have stuck with it.
In any case, as far as PHP frameworks go, they’re a dime a dozen. If you ask me, ZF isn’t really a “framework” per se, just a huge collection of random convenience classes that you can use if you like. To me, a framework is more like CakePHP or Code Igniter - they actually encapsulate the entire application, while still providing all those convenience classes.
As far as polack’s suggestion to use Symfony, I’d say that’s overkill for something like this. Symfony is less a framework and more of a huge massive CMS-type application in and of itself. While not entirely accurate, I like to compare it to a PHPNuke or PostNuke, which gives you a great deal of built-in functionality and then lets you write “modules” or “blocks” to extend it.
To me, a framework should have no inherent content-related functionality - that’s what I’m using it for: to write that stuff myself.
And finally, if you’d used either CakePHP or Code Igniter, you’d have wrapped up each application in about an hour. Cake can be quirkier to setup and get the hang of, but it can eliminate your need to write any SQL queries - ever. CI is more straight forward because it has very few preconceptions about how you want to do things (and as a result does less for you).
Google around for PHP framework comparisons. There are a lot of sites (including Wikipedia) that have charts and the like comparing some of the pro’s and con’s of each.
http://www.cakephp.org/
mmmm cake!
PS Stick with the stable. While latest-and-greatest is always fun to play with, it’s called “CUTTING edge” for a reason
If you just needed CRUD, using Rails, you could have finished that job in half a day. You didn’t even have to learn Ruby for that.
http://codeigniter.com/
http://www.akelos.org/
THE php on rails!
@Chris Meller
Actually symfony is not a CMS-type framework, its as much as a framework as cakephp and codeigniter, i know, because i’ve coded in all three of them and symfony is by far the easiest and the most flexible of them. given that its speed is not the best because it uses propel as its Model layer.
This was an interesting article, especially re: your relationship with the SEO dude. He doesn’t have to pay you, house you, listen to you bitch about your career - he IMs you for help and when he wants something big he buys you a toy.
Works for you - free toys! and works for him - no staff! No overhead. I am jealous. I need to find me one of these SEO dudes so I can get toyz and keep my day job.
As for frameworks - this is why software guys with > 2-3 years of experience keep a thumb drive/SFTP site handy with reference implementations of their own making. Why wait for Foo 2.1.1.1.2.2 (beta) to break everything you just got to work in Foo 2.1.1.1.2.1 instead of sticking with good old You 1.0?
This might sound like a really brain dead question; but if it was a case of throwing up a simple application, why did you decide to choose a new framework to learn not once, but twice?
The time to learn a framework is not when you’re under pressure to deliver, but when you have time to sit back and experiment.
Putting the blame at the feet of the frameworks for something that you couldn’t implement in a short space of time is ridiculous; do you genuinely believe that the frameworks are broken, or that you just didn’t appreciate how to use them?
The title of the post is not “X framework sucks, so I lost a PS3″. I’m not blaming any framework in particular, like the title says I am blaming “my addiction to web frameworks” for losing the Playstation 3. Yes, I could have used the framework I know the best (Struts) and have gotten the job done but I wanted to artificially put myself in a “do or die” situation as a way to test some of these unfamiliar frameworks under pressure. It was the constraints that made it a challenge, and even though I didn’t get the PS3 , I did learn a lot.
wat is the wire called dat goes at the back of the ps3 n it says av multi