Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

PHP Frameworks vs Custom code

Success and nothing less
Joined
Nov 7, 2011
Messages
866
Reaction score
258
I've been looking into PHP recently, improving my knowledge of the language. What I've come to notice is that PHP frameworks such as Laravel, FuelPHP, CodeIgniter etc are becoming more and more popular when it comes to enterprise software. What are the differences, pros and cons between these frameworks and a custom written codebase?

Thanks in advance.
 
Master Summoner
Joined
May 30, 2008
Messages
559
Reaction score
64
- Ask there
 
Joined
May 23, 2008
Messages
1,071
Reaction score
573
It's far from an easy question to answer. It's a subject that's been asked a lot and covered a lot.

There are lots of questions that you need to ask yourself about the project. Lots of aspects that you need to take into account.

Generally, if a good framework is used in a sizable project, it will allow you to code both faster and better. By better, I mean less lower quality code and more maintainable code.

You should decide on a project-by-project basis whether or not that project would benefit from a framework. Are you able to code it faster without one? How confident are you in your own programming abilities, especially object oriented design (assuming you're using an object oriented language, such as PHP)?

Many programmers, especially PHP programmers, have a poor understanding of object oriented design. Without a good understanding of object oriented design, it is very easy for a sizable application to lack structure and maintainability. Sometimes it may take a bit longer to code with a framework, but it often makes the application more maintainable in the long run. Is it worth it?

I've been working with PHP for seven or eight years. It's a terrible language. But it usually works really well, and it is quite viable for both small and very large applications. One of the benefits that you may get from a framework that is more prevalent in PHP than other languages is that a framework will often try to make up for some of PHP's shortcomings (one of the biggest ones being a terrible API).

Personally, I've created a decoupled library of components that I use when I build applications. I built a loosely coupled MVC framework around them. I trust it and prefer it more than the majority of frameworks available, as it's my opinion that numerous of the popular MVC frameworks for PHP are built with poor object oriented design in mind. But I still have to decide, with each project, whether or not I should use none of it, just some of the decoupled components, or the entire MVC framework. And that's an important decision to make.

My favorite PHP framework is Symfony. Hell, my favorite PHP programmer is Fabien Potencier, who owns SensioLabs, which creates high quality PHP applications and toolsets such as the well known Symfony framework, Doctrine ORM, and Twig templating system. The quality of code in his company's projects surpasses just about everything I've seen outputted by other PHP programmers, whether it's a popular open source script or just a random, supposedly experienced PHP programmer.

My theory as to why is many popular scripts are poorly designed (from an object oriented perspective) is because PHP is not a good language, and thus not a good one to learn with. Don't learn with PHP. Learn elsewhere and use PHP when appropriate. Or else you've got to waste time re-learning many subjects.
 
Google my name...
Joined
Nov 9, 2011
Messages
483
Reaction score
151
Personally, I would go with Zend.

For pros and cons use google.

:dito:​

Zend is by far the best to use on so many levels, people don't realise how much it actually has in it... I wish more people would read documentations...:*:

All the best,
Richard Komakech.
 
Initiate Mage
Joined
Feb 11, 2013
Messages
30
Reaction score
5
I like to code HARD.. i mean do my own "framework".
I actually did a framework to work with MVC that helped me alot.

You can learn and improve your own framework.
I don't really found a reason to use a framework like Zend.
It have many things ready to use and i'd recommend you to learn how things done.

Regards..
 
Google my name...
Joined
Nov 9, 2011
Messages
483
Reaction score
151
I like to code HARD.. i mean do my own "framework".
I actually did a framework to work with MVC that helped me alot.

You can learn and improve your own framework.
I don't really found a reason to use a framework like Zend.
It have many things ready to use and i'd recommend you to learn how things done.

Regards..

So you'd rather spend a long time creating your own framework to do what you want, then keep building on it as you want more stuff to be included. Also you have no knowing of any security exploits or bugs.

Then you have a framework like Zend, which basically has everything you'd ever need for programming, which we know is secure, bugs are reported regularly by users and you never have to build on it.

So basically you waste your time fixing bugs, building parts etc.. to your own framework which is time you could spend making the website using Zend.

Side note: I once made a small framework myself about a year ago, I ended up forgetting what I named functions and such, with Zend I found I could quickly find it in their documentation with ease...

All the best,
Richard Komakech.
 
Initiate Mage
Joined
Feb 11, 2013
Messages
30
Reaction score
5
I didn't said that you were wrong.. I just said that i do prefer make my own framework.
I use it in every project that i do. I've never forgot fuctions, classes, property and so on because i did a little documentation about everything.


A friend of mine that used it once and liked. I just said it because i think important to every programmer to know how things work in any programming language. I didn't mean to be rude, sorry.


Regards. :)
 
Back
Top