Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use a framework with PHP? [closed]

Tags:

php

frameworks

I'm curious, what are the advantages (and disadvantages) on using a framework with PHP?

I've been using PHP on and off since version 3. I've never used any of the frameworks available for PHP, so what am I missing out on?

like image 808
ste Avatar asked Dec 05 '09 11:12

ste


People also ask

Why should you use a framework for your PHP code?

Why use a PHP framework? A PHP framework provides a basic structure for streamlining the development of web apps. We use them because they speed up the development process. Above all, the responsiveness of websites and applications built using PHP frameworks helps businesses fulfill their performance needs.

Can I use PHP without a framework?

If you didn't start with a framework, you'd end up building one yourself. But today, thanks to all the autoloading and interoperability work done by PHP-FIG, building without a framework doesn't mean building it all by yourself. There are so many excellent, interoperable packages from a wide range of vendors.

Why choose laravel instead of the other PHP frameworks available?

Laravel scores better than other web frameworks because of its advanced features and development tools that facilitate rapid web application development. Laravel also helps website developers simplify their development process with clean and reusable code.

Do I have to use a framework?

Software and web development frameworks like jQuery and Angular can be used to save time when programming, but are they really necessary? The short answer is no, but it's a bit more complex than that. Just because you don't need to use something doesn't mean it's a bad idea.


1 Answers

Framework abstracts you from low level details, makes you more productive, and protects you from low level error ( such as preventing SQL injection attacks).

A good PHP framework forces you to separate your concern and implements the proven architecture, which in the end improves your design, and makes your code much easier to read and maintain and unit test.

Here are some references on why you should use framework

like image 147
Graviton Avatar answered Oct 18 '22 04:10

Graviton