Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Framework vs Code from scratch?

Featured Replies

Just a quick one, I'm wanting to start a little side project, built in PHP with the usual bumff, login/register etc...

 

I wanted to asked the more experienced developers whether it's better to use a pre-built php framework like codeigniter or

Laravel (or something better), or is it better to write everything from scratch?

 

It's been a long while since I've done any custom php work and wondered what the best option is at the moment?

Just a quick one, I'm wanting to start a little side project, built in PHP with the usual bumff, login/register etc...

 

I wanted to asked the more experienced developers whether it's better to use a pre-built php framework like codeigniter or

Laravel (or something better), or is it better to write everything from scratch?

 

It's been a long while since I've done any custom php work and wondered what the best option is at the moment?

 

I wouldn't describe myself as the most experienced php dev but I will give you my opinion anyway:

Every developer shouuld at some point try to create their own CMS/CRUD system from scratch first of all because it is fun and because of the learning experience. Preferable in different languages. Personally I have made a few terrible, but working systems, with PHP and C#/.NET.

 

That said, the most efficient approach would be to use a framework. Especially because you say the application contains very common and usual functionality. A framework would have the required classes/functions for that so there is really no need to reinvent them.

  • Author

Thank you for your response

 

 

I wouldn't describe myself as the most experienced php dev but I will give you my opinion anyway:

Every developer shouuld at some point try to create their own CMS/CRUD system from scratch first of all because it is fun and because of the learning experience. Preferable in different languages. Personally I have made a few terrible, but working systems, with PHP and C#/.NET.

 

That said, the most efficient approach would be to use a framework. Especially because you say the application contains very common and usual functionality. A framework would have the required classes/functions for that so there is really no need to reinvent them.

 

Thank you for your response, I do agree with what you have said, I'm currently undecided which way I want to approach this and was hoping for someone to make a comment that would sway me one way or another.

 

:)

 

I quiet fancy having a play around with a framework so I might do that...

  • Author

Thanks for that CityPaul, I'm definitely going to give it ago using a framework.

 

you'll learn loads about best practices while using them

 

This is certainly what I'm hoping for.

For me to decide I weigh up what % of the project can be easily achieved by using a framework and what parts are way outside the scope of the framework which would require scratch. For example an e-commerce site is 90% of the time better built on a framework, however geo-search, bespoke products etc which would require major butchery to the pre-built framework you would be better to consider scratch IMO.

 

Edit: Forgot to say I write procedural PHP5 as I came from procedural PHP4.

Edited by BrowserBugs

  • 2 weeks later...

 

Procedural php... ouch. The worst code I've ever seen in my life was all procedural php.

 

Yep I've seen some right monsters in my time too ... but to be fair procedural is still valid and can be simple and fast in the right hands, but the same goes for any language, it's the dev who makes the difference. Maybe i'm just stuck in my procedural little ways, I did try looking at OOP but it hurt my brain how it was structured. Maybe a trip to TreeHouse for a guide to transition from procedural to OOP at some point.

  • Author

 

Yep I've seen some right monsters in my time too ... but to be fair procedural is still valid and can be simple and fast in the right hands, but the same goes for any language, it's the dev who makes the difference. Maybe i'm just stuck in my procedural little ways, I did try looking at OOP but it hurt my brain how it was structured. Maybe a trip to TreeHouse for a guide to transition from procedural to OOP at some point.

 

I used to program procedurally, but I was probably one of those monstrous developers, saying that I was never happy with the quality of my code either, I have since moved in the OO direction and my code is looking better, although this was mainly software development rather than web development.

 

I used to program procedurally, but I was probably one of those monstrous developers, saying that I was never happy with the quality of my code either, I have since moved in the OO direction and my code is looking better, although this was mainly software development rather than web development.

 

What was the main things you found tricky coming from procedural? And by 'looking better' do you mean more efficient or easier for someone else to see what you're doing?

  • Author

 

What was the main things you found tricky coming from procedural? And by 'looking better' do you mean more efficient or easier for someone else to see what you're doing?

 

I still find myself writing the odd bit of procedural code when really it should be OO, old habits I suppose.

 

I started learning OO programming in collage but for some reason I but up this fear of it ( don't ask me why, I've no idea ) and tried to just stay away from it, in my last job there was another developer who's skills far surpassed mine and I wouldn't say he encouraged me but inspired me to re-visit it, so I think it was less of a transition for me because in the back of my mind I already knew the concept and how to implement it.

 

"Looking Better" both really, although to a certain point I suppose it you're writing more efficient code ( w/ proper commenting ) then I suppose it should be easier for someone to understand.

  • 4 months later...

I would like to suggest you to start from scratch. As you are a beginner so it is the easiest way to develop anything using php. If you go with a framework, then first you need to understand the features and flow of that.

 

I have started in the same way and I learned a lot from it.

  • 5 months later...

Pros of Laravel:

 

If you like PHP then Laravel is the best framework for you. It has the latest technologies and tools that you can use.

 

It uses MVC framework which separates the HTML and PHP code, making it easier to change the code. In MVC, we can change the UI layer without effecting the functionality.

 

Queue Management: In Laravel, you can abstract the unnecessary tasks and get them queued behind the scenes by making the user response time much faster.

 

Cons of Laravel:

 

Laravel is a new framework and composer is not so strong as compared to npm (for node.js), ruby gems and pip (python).

 

Development in laravel is not so fast as compare to ruby on rails.

 

It has less inbuilt support as compare to django and rails. But we can solve this problem by integrating third party tools, but for large websites it may be a tedious task.

Edited by Claire_Anderson

Pros of Laravel:

 

If you like PHP then Laravel is the best framework for you. It has the latest technologies and tools that you can use.

 

It uses MVC framework which separates the HTML and PHP code, making it easier to change the code. In MVC, we can change the UI layer without effecting the functionality.

 

Queue Management: In Laravel, you can abstract the unnecessary tasks and get them queued behind the scenes by making the user response time much faster.

 

Cons of Laravel:

 

Laravel is a new framework and composer is not so strong as compared to npm (for node.js), ruby gems and pip (python).

 

Development in laravel is not so fast as compare to ruby on rails.

 

It has less inbuilt support as compare to django and rails. But we can solve this problem by integrating third party tools, but for large websites it may be a tedious task.

 

Thanks for enriching this old topic by copying content from your search results:

https://www.quora.com/What-are-the-Pros-and-Cons-of-Laravel

You don't credit the author, you don't provide a link, you don't even use quotes. What you are doing is plagiarism, which is ilegal as well as unethical

Edited by Nillervision

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.