Page 1 of 1

Change framework (why bother?)

Posted: Wed Oct 10, 2007 2:34 am
by shiznatix
Ok so I started at the company I work with now about 7 months ago and their website was a floating piece of junk that was amazing to see even work. So I spent a few months and rewrote the entire website using my own framework that I have developed over a long time. Everything was ready for launch and the code was much better (MVC framework, templating with PHPTAL, multiple languages available, XHTML valid...)

Then the day before the scheduled launch some old friend of my boss came in for some advice giving or whatever and after he looked at my code he was like "its too simple". I said, "simple is good, why over complicate things just to be complex?" His argument against using my code was that it had not been tested and it's missing features that we would never use like a AJAX writer or whatever garbage that is, some uber-complex database layer, catching, and some other non-features.

My arguments against this is that yes, it certainly has been tested and the older versions of my framework have been running on e-commerce websites for years. As for the features, I don't want some simpler way to write AJAX since we have absolutly no use for AJAX on our website. I don't want a overly complex database layer and query writer (Im looking at you, Zend Framework) since I can just write the queries myself or use my 4 simple, easy to use, and very efficient methods (load, get_list, save, remove). The only thing that I thought was valid was the catching but that one is not necessary yet as the website is not big enough for this to make a difference. Eventually though I was able to change systems using the argument that at least this code is over a thousand times better than what was running so right now my code runs on the site, but with the knowledge that as soon as I get a single fee moment, I will have to start moving to a different framework.


So my problem is that I have been stalling for as long as possible because I have everything right where it needs to be. I can fix bugs incredibly fast and I know what I am doing at all times. If I switch to another framework that I will have to redo a lot of things which would take a lot of time and the end result would not be any different in performance, all it would do would take away my ability to use PHPTAL as my templating engine and make troubleshooting just a bit more difficult. When I tell my boss this he just says "well (the guy who said no to my stuff) says that we should switch" without anything else. How can I convince him that look, this is ridiculous, listen to me. Or am I just being a idiot bent on using my own code when there is much better options out there?

Posted: Wed Oct 10, 2007 3:55 am
by Kieran Huggins
Don't fight your misguided boss, you can only lose. Instead, turn this situation into an advantage for all parties. Why not take this time to learn a new framework? Maybe Symfony or even Rails? There's nothing like being paid to learn, and everyone gets what they want :-)

Then take your new skills and find a better job/boss.

Posted: Wed Oct 10, 2007 4:07 am
by Chris Corbyn
I'd agree with Kieran. I can see your reasoning for not switching to a major player in the framework market, but I can also see your boss' logic for switching. You've argued your point, it got you nowhere and now you've gotta do what employees do and listen to your boss ;)

Like Kieran says, you're basically being paid to learn something new and half of what makes programming fun (at least for me) is the fact you learn new things on the job every day :)

You never know, you may even pick up some ideas for things to incorporate into your own framework. Oh, and don't diss code which puts all the SQL in a separate place ;)

Just out of curiosity, why would you say that using another framework removes your ability to use a template engine of your choice?

Posted: Wed Oct 10, 2007 4:33 am
by Benjamin
I'd ask the boss who he is paying to write the code. Is he paying his friend or you?

Posted: Wed Oct 10, 2007 6:12 am
by Maugrim_The_Reaper
There's two sides to every story ;). One fear your boss may have is what to do if you leave next week. Who's going to fix/change the untestable, custom built framework if needed? Having no automated tests does raise a spectre of whether the framework is truly dependable (a fallacy but it's still a common fear). And both raise the possibility of a future migration being more expensive and time consuming. You boss's friend is probably whipering those ideas ;).

The other side that you have something that works, that you're familiar with, and which you're confident in - why change?

I'd take the boss's road though - make sure you get a schedule for migrating the website, and make it clear that since you're unfamiliar with the chosen framework the work will take longer than it would with a familiar setting (also note once you've gained experience with the framework subsequent projects using it will be more efficiently executed). The biggest curse is changing frameworks every project or two - it removes the learning curve benefits from future work. Knowing and using one framework completely is usually the best path forward.

There's a bonus for you of course - you get paid for learning a new framework, and you can add that to your resume for the future. Just repeating with this, what d11wtq said. Why would you not want to get paid to broaden your technical skills? Take advantage, learn something new.

One thing about frameworks you should keep in mind - they come in two broad types. The Glue and the Stack. The Stack creates a framework you (usually) end up having to work in (Rails/Symfony). The Glue gives you decoupled components you bring into your own space (ezComponents/Zend Framework). The benefits of Glue Frameworks are that any single component is optional - I personally have only used Zend_Db once before replacing it with a lightweight Data Access layer. After that I've never had to look at Zend_Db. I've also replaced Zend_View (back in February before proposing a summary of it as Zend_View Enhanced).

I'd guess a Glue framework would suit you better - just subclass Zend_View to use PHPTAL, use a better DB layer (or one which abstracts away from the complex one), and you can have a very similar cake to what you want. I'm not sure about the AJAX writer reference?

Posted: Wed Oct 10, 2007 6:50 am
by Michael A
I would tell him this:

1. I don't like fixing things that aren't broken.

2. The fact that it's simple means that A, it's less likely to have problems, in the first place, and B, it's easy to diagnose if and when problems do arise.

3. You hired me to write good code for the company and I've done that. If you ask me to make it more complicated, for no other reason than "it's too simple", then I can't be held responsible for problems that arise from overly-complicated software.

You can definitely get away with #1 and #2... #3 is a bit iffy, though. It might work if you take out the "I can't be held responsible" part.

Good Luck!!

Posted: Wed Oct 10, 2007 1:13 pm
by Bill H
My experience is that fighting with the boss eventually winds up getting you fired, no matter how right you are.
He was right, dead right, as he sped along.
But he's just as dead as if he'd been wrong.

Posted: Wed Oct 10, 2007 7:43 pm
by Christopher
Given that you have no requirements and no needs from what I can tell, then work with your boss to develop them. The whole point of development is to involve the stakeholders to produce the most appropriate solution. Guide your boss through the process and you will both learn what is truly needed.

Posted: Thu Oct 11, 2007 7:50 am
by shiznatix
Aye ok thanks for the input everyone. I am going to try to not do a new framework because I have a lot of integration with vBulletin, PHPTAL, and just a bunch of custom functions to draw all my data together. Doing another big rewrite, granted it wouldn't be as big as the one I previously did, just does not sound like something I want to do right now.

If it comes down to it though I guess I can learn something new.