tags:

views:

114

answers:

8

Would creating a custom php mvc framework from scratch be completely pointless for a small digital agency?

I have heard recently from a friend that His colleges are infact spending time on such a project within their agency. Their argument against using another such as cake or zend being that they come with so many unused features and therefore lots of unnecessary code.

I would have thought that such an endevour is completely pointless and indeed a waste of time and money. Surely it would make more sense to pick a framework that matches your needs as close as possible and then customise/extend it. On such frameworks as zend the code is surely going to be of a much better/tested level than that of 1 or 2 programmers could create in a few months.

It just doesn't make sense to me - can anyone pursuade me otherwise?

A: 

For any framework

Pros

  • get exact functionality you want
  • control over small details important to your project
  • familiarity with code

Cons

  • everything that breaks you must fix yourself
  • don't get to learn from the mistakes of the past
  • won't get as many bugs noticed due to smaller audience

Personally I recommend exploring existing frameworks before even considering writing your own. Just remember that it's okay if you don't understand it all in a day!

glowcoder
+1  A: 

I see it pointless. But it's a curse of PHP programmers who tend to invent wheel again and again. I know what I'm talking about. I tried it too.

The best approach seems to be to learn a framework and if it doesn't suit you ask friends who knows other frameworks to learn how is the particular problem solved in other frameworks and if none of them seems good then MAYBE it's time to start work on a new framework.

The point with lots of unused code is not completely valid. Zend contains classes that can be stripped off as far as I know.

EDIT: Performance of PHP can be enhanced via eAccelerator for example. I find it easier than building a brand new framework.

MartyIX
Exactly. Why would someone even consider that they could, alone, build a better framework than these open source frameworks. It really makes me amazed.
David
I don't actually like the presumption that they can't make better framework but the chances are low and competition is high.
MartyIX
A: 

Using an existing, lightweight framework is almost always better than rolling your own. For one thing, other people have used it and found most of the bugs and fixed them. For another, there are features in some of them that you wouldn't even realize would be useful til you need to use them -- at which point you'd either have to roll your own in your custom framework, or call some function that's already built in to the one you decided to use.

cHao
+4  A: 

No, I think you will find most here would agree with you - I certainly feel it is a complete waste of time. Especially given that they are a small agency, their limited resources could be better spent elsewhere.

Since they are concerned about a bloated framework, I suggest that instead they investigate using a lightweight PHP framework such as CodeIgniter and Kohana.

Justin Ethier
A: 

It's a waste of time. Unless they are building a site with the traffic of Facebook, the performance hits they will get using something like Yii vs. their own should matter very little

Eric C C
even then, wouldn't the time and resources be better spent on improving the server etc. Afterall, a custom framework after being completed, if ever, is going to be a constant maintenance issue - bugs, upgrades etc.
David
I completely agree with you.. it's just not a good business decision.
Eric C C
A: 

I stay away from CakePHP and Zend Framework for the very reason that they're just much larger than what I need of a framework.

Also, one of my most significant, and one of my only, reasons for rolling my own framework is that it's my way of learning the MVC concept. In other words, it's little more than for educational purposes. I might release my own framework soon but in no way will it try to compete with any other framework out there. After all, I'm a huge CodeIgniter fan.

BoltClock
Sure, mess around with that in your spare time - but how could and small agency justify one o it's developers spending time on such a project. It sounds to me as if the developer had managed to pursuade management to allow him to mess around on their time - putting strain on other developer to pick up the work from all of the other projects.
David
A: 

MVC FW is less than 5% of average project code base, so I strongly recommend building MVC for every project and adapt it to the project specifications. If someone has enough knowledge about MVC pattern and some experience in using and building MVC frameworks, it can be built in some days.

General arguments are speed and performance given by the custom FW.

codez
A: 

Sometimes when people are afraid of changes and learning new things, they come up with all kinds of silly reasons why somethings is bad and should not be used.

I once worked in company that was determined to write their own web framework instead of using Django. One of the developers that was working on "admin" part of framework said i wanted him to lose his job cos Django has auto generated admin.

Unless is it very specific framework and you have very good reasons and enough fundings for project it is never a good idea to reinvent the wheel specially if you can't make it the same or better quality then what is already out there.

rebus