Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When is a PHP project too small for a framework?

Tags:

php

frameworks

I'm about to start on a small, static website project: no database or CMS required. Basically, a brochure website.

I used the CodeIgniter framework recently to develop a full-blown web application, and I'm wondering if it appropriate to also use CI for smaller, simpler sites.

Typically for a static brochure site I would write regular PHP pages with a few includes thrown in to save on repetition (i.e. HTML with a sprinking of PHP), but this time around I'm wondering if my new friend CodeIgniter might be able to streamline the development process.

Is it sensible to consider a framework for such a simple project, or is it overkill? I'm worried that I might be the proverbial carpenter whose only tool is a hammer, and sees every problem as a nail!

like image 725
Jonathan Nicol Avatar asked Apr 13 '10 01:04

Jonathan Nicol


People also ask

When should I use framework PHP?

You can use PHP frameworks to build secure, flexible, high-performance websites and web applications. A modern PHP framework is a beneficial and powerful tool in web development that solves many problems. It can help you save a lot of effort and time by employing the best of PHP along with its unique functionalities.

Is PHP good for large projects?

Maintaining large applications might be difficult since the PHP language is not very extensible compared to other coding languages. Thus, managing a large number of applications can be challenging for PHP developers.

Does PHP need a framework?

A framework provides a basic structure for streamlining web application development. However, a PHP framework is not always the ideal solution for web application development. For projects with unique needs or very small applications, the extra overhead that comes with a framework is not always worth it.


2 Answers

I think almost never, the needs change and come more with time... so it is better to have a good base using a framework to wait the future needs. but if your project will not have a long live time and your needs are reaaally simples then i think is not necesary use a framework.

like image 70
zerofuxor Avatar answered Oct 19 '22 18:10

zerofuxor


I personally would never develop a site outside of a framework for anything more than a single page brocure-ware site. I work so much faster inside the framework.

I'm a Python/Django developer but here's my take.

I've done some small non-framework sites with PHP and I don't know how PHP frameworks compare to DJango, but if they're anything alike the fact remains that I'm far more proficient developing within a framework than to code something from scratch by hand.

It helps me stay organized if nothing more than giving me the VC of the MVC. Django provides me with a lot of built-in tools, like form handling, that make my life much easier even for small sites.

I'm going to presume PHP frameworks provide similar things, maybe not though.

You also can't anticipate how the site will grow over time. It's easier to maintain something built in a framework, and if you ever need to extend the site in the future it's nice to have some structure behind it.

like image 26
digitaldreamer Avatar answered Oct 19 '22 18:10

digitaldreamer