views:

62

answers:

2

I'm about to embark on a web startup project involving e-commerce. (somewhat similar to eBay). I've decided to use PHP as the programming language.

Is it recommended to use any PHP framework like CakePHP or Zend with MySQL database for this kind of project? Doing it from scratch can cause much pain and it will be time consuming.

What is your opinion about this? How other well known startups have done it?

Thanks.

+3  A: 

I suggest you to use a PHP framwork ONLY after you are proficient with "bare" PHP, you need to have fair knowledge of OOP. Getting into framework without understanding underlying principles will do nothing but complicating the things for you.

If you think you do have fair knowledge of PHP and OOP, you can start using a framework. I would personally go for CodeIgniter or Kohana though.

Sarfraz
I have to agree with Sarfraz, i had 7 php expirence when i started with the Zend Framework mvc, and the task was still daunting. But start out with playing with some classes... you will get a hang of it quickly. Once you are able to work with classes, the a framework a try! i personaly recoment Zend Framework.
DoomStone
Hi, thanks for replying. Before starting working on frameworks and mvc were you following procedural way ? When i first started out I made all my sites using procedural approach( no classes, just using a separate php file that can hold "functions").What is your opinion on NOT using OOP for doing web apps?Thanks
Sara
@Sara: Well it is as simple as that, if you know the OOP, use it, if you don't know it, you need to know that to be able to use it.
Sarfraz
+3  A: 

I would suggest using a framework. If you hand spin your own code, it could cause more headache than you want to deal with. Hand-spun code requires that you build your own "framework" of sorts anyway. Basically, you will be building everything from scratch that a framework already provides. Not to mention, your code will most likely be way less organized (and structured) than a framework. You will also have to deal with security issues that a framework may provide by default. Most frameworks are plug-n-play so to speak. They do all the grunt work for you and you get to focus on writing the application, not having to worry about all of the basics that typically go into every app.

I would advise using a framework and here is why:

  • You will be forced to use good coding practices right out of the gate
  • The code will be organized and provide for easier extensibility in the future
  • Delivery time of the app will be significantly reduced
  • It provides better structure for multiple developers to work simultaneously

While there may be a OOP learning curve, you are better off doing things the proper way from the beginning than trying to reinvent the wheel in a functional way.

cdburgess
What are the popular web startups that have been built upon frameworks?Thanks
Sara
This list is extensive. I use CakePHP and you can see a list of site that use this framework here: http://book.cakephp.org/view/510/Sites-in-the-wild . I once heard someone talk about whether or not to use a framework. He brought up the point, "How far do you go?" Would you build your own webserver (Apache clone) using assembly language? Would you write your own OS to run it on? Probably not. Then why not use a framework that takes care of all of the simple mundane things and provides a great foundation for an application. It doesn't make sense to hand spin code for sites anymore. Not for me.
cdburgess