5

This is slightly different to most questions (trying to avoid duplicates)

When would you consider not using a framework (i'm talking PHP here for websites) when does one choose pure html/css/jquery over a PHP framework

It seems to me that a framework can be a bit bloated in some cases and overkill for certain circumstances, so at what level does a site drop to (in scale, not quality) before its considered OTT to use a PHP framework?

benhowdle89
  • 1,447
  • 2
  • 10
  • 22

3 Answers3

11

Your question should be the other way around. You should start with no frameworks and then ask, does the time saved with framework X's benefits outweigh its implementation/maintenance costs?

There are definitely cases where a framework contains more overhead than it is worth, in those cases (mostly very simple sites), you are find to do things by hand.

jzd
  • 4,166
  • 25
  • 28
4

It is a purely business decision. Using a framework leads generally to less code and faster development. Not using a framework leads generally to more control over what website is doing and better performance.

In practice, the rule doesn't work very well in every circumstance.

  • If your team doesn't know anything about a framework you want to use, you're screwed.
  • If your team doesn't know the language very well, chances are things will be slower then when using a framework.
  • If the website is very small, I'm not sure if using a framework will reduce the quantity of code to write.
  • etc.

In general, I would recommend not using a framework for small-scale websites, use framework for medium-size websites, and write your own framework for large-scale websites.

This said, it might be an exception in PHP. The language is so poor, that it makes sense to use the framework even for small-scale websites to abstract some of the stupidities and lacks of PHP. Also, when developing a small website, you rarely know that it will stay small forever; using a framework from the beginning let you to better manage scalability and to avoid to have to rewrite everything from scratch to migrate from pure PHP to a framework later.

Arseni Mourzenko
  • 134,780
  • 31
  • 343
  • 513
0

Try this mental exercise:

Imagine your system (development, maintenance etc.,) WITH the framework and then WITHOUT. There should be a 'delta':

delta = System With Framework - System WITHOUT Framework

This delta should would be noticeable, quantifiable (w.r.t. to some metrics on the dimensions of development time, ease of use - some related dimensions to the domain/problem). If this delta tends to be 'large' you know you should invest in developing/using one. The 'large' (or small) can usually be judged informally through discussions or actually spending some time and coming up with the relevant metrics (even for intangibles).

Basically the question to ask is - "is developing the framework valuable?" And to quantify the value taking deltas is one approach :)

PhD
  • 2,531
  • 2
  • 18
  • 32