Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Big Headache: CodeIgniter or custom made framework, what's your thoughts? [closed]

If you'd like to develop a WebApp which you know that is going to scale and become bigger and bigger over time, would you use CodeIgniter or your custom made framework?

What's your arguments for using an open source framework and what's your arguments against it.

Here are my thoughts: CodeIgniter Pros

  • Great documentation -> Easier to work in a team.
  • All the development time is invested in the business logic.
  • Not reinventing the wheel

CodeIgniter Cons

  • Not sure how scalable it is if I'll want to grow
  • MIT License - not sure what it means, but if I'll want to sell my app on per license basis, I'm not sure I'll be able to do that.

Custom coded Framkework Pros

  • Scalable. I can decide how it will grow.
  • I own the code
  • Flexcible design.

Custom coded Framework Cons

  • Need to document it, so others will be able to collaborate.
  • Need to invest time to maintain the framework
  • Unexpected errors/bugs

What's your take on that? My brain tells me to go with CodeIgniter, my heart tells me to build my own framework.

like image 938
tounano Avatar asked Mar 26 '12 08:03

tounano


1 Answers

Use something that already exists.

Why CI

Why limit your choice to one framework - it makes the choice a near straw man argument your heart doesn't tell you to write your own framework - your ego does. If you eliminate the huge number of other frameworks that exist before starting - you're already on a path to .. lots of work.

And CI is quite a poor one-choice.

Php is, at the time of writing, at 5.4.0 - if you're in a position to choose what framework to use for a new project - seriously consider using a framework that uses 5.3+ features - or is already on the road to do so. Don't choose a framework which has a legacy code base full of php4 style code.

CI Cons

Not sure how scalable it is if I'll want to grow

Most likely (and I don't use or like code igniter) more scalable than a random custom framework.

MIT License

There are practically no restrictions on how to use MIT licensed software. Read MIT as "don't delete or modify the license blocks in the framework files" that's about it.

Custom coded Framework Pros

Scalable. I can decide how it will grow.

Are you sure you know what scalable means :)

I own the code

True in almost all cases - and definitely true if you use an MIT licensed framework.

Flexible design

That's not likely to be a benefit in the long run. For example you achieve explosive success and need to bring on a team of developers. You will have to train each of them in how to use the custom framework on which the app is built. That's instead of simply pointing them at a few tutorials to get over the initial learning curve of using <insert name of chosen framework here>.

Custom coded Framework Cons

Need to document it, so others will be able to collaborate.

Realistically, unless you build a framework capable of competing with the existing frameworks that's not going to happen (even with good documentation).

Need to invest time to maintain the framework

Don't underestimate how much time that'll take.

Unexpected errors/bugs

You'll spend a lot of time here.

In summary

  1. A php framework is a lot of work and a lot to maintain. and by a lot - I mean a lot.
  2. Time you spend on framework-level code is time you won't spend on your own application features.
  3. Using a php framework means you can benefit from the experience of (hopefully) more experienced developers. Without the high cost of learning the hard way why x doesn't work, or why y leaves your application wide open to some security problem.
  4. Whenever something isn't working correctly you won't know for sure if it's in your app code or your framework code (that's true no matter what, but you'll want the confidence to know that the framework "just works" and that your problems are in your app code)
  5. Every time you blink there's a new php framework, and they all suck in some way - do you want to be one of those?

I'd really like to add the existence of unit tests so you can know that your application will work - but code igniter doesn't have that, so if you're rigid on your two choices I guess you're on your own with that either way.

like image 177
AD7six Avatar answered Nov 15 '22 20:11

AD7six