Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use pure PHP/MySQL for developing web applications?

I have been dabbling in programming/scripting languages since I was a kid. I started off with HTML and CSS, then went on to PHP (which I got quite good at) and then to Python, Perl, and C(++). I've recently done a lot of work in PHP (along with MySQL).

After spending so much time learning these languages, I now want to do something with them. I'm looking at starting/contributing to an open source project; almost certainly a web application of some sort.

In my experience with writing (admittedly small) web applications, I've found writing "pure" PHP to be an extremely slow and tedious process.

My question is this: if I were to be writing a relatively complex/large web application from scratch, what should I write it in? Should I use pure PHP/MySQL, or use a framework like Django, Rails, or CakePHP?

like image 862
Tim Barnaski Avatar asked Mar 06 '10 21:03

Tim Barnaski


1 Answers

Writing a complex application from scratch, I would definitly not use "bare PHP" : I would certainly use a framework : they provide :

  • a large number of useful classes/methods
  • some set of rules -- like "in which directory should controllers be saved", "how to write a view", ...
  • MVC -- i.e. they help with better structuration of the project

Note that this answer is valid for both personnal projects, and professionnal projects.


There are several great Frameworks in PHP, like :

  • Zend Framework
  • Symfony
  • CakePHP
  • Code Igniter
  • Kohana

One thing to remember : learning how to use a framework well will take some time : starting with a small project, before going for a big one, would probably be a good idea ;-)


Now, when you're asking yourself the question of "which framework should I choose", it's mostly a matter of personnal preferences... And here are a couple of questions/answers that might help a bit :

  • PHP Framework Decision - Analysis paralysis!
  • To use a PHP framework or not?
  • PHP - MVC framework?
  • Which PHP Framework is right for this project?
  • Best PHP framework for an experienced PHP developer?


As you're asking me which Framework I would choose ; well :

  • I really like Zend Framework, and often use Doctrine as ORM (it's the default ORM of Symfony, but can be used very easily with ZF)
  • If I had to choose another one, I would probably go with Symfony, as I've seen it used on a couple of projects at work, and know many people who work with it and like it
like image 122
Pascal MARTIN Avatar answered Sep 29 '22 12:09

Pascal MARTIN