To framework or not to framework

Posted on 2014-09-30
Last Modified: 2014-10-03

I am writing a fairly large website and my employer has been convinced by someone that he needs a framework.

I do not think he does.

I can use an ORM.

As far as I am aware we are not templating the system and just using one design (if we did template the system can we add this in retrospectively or should this really be done from the start?)

I have always written standard legible code so people could pick up my code and understand my aim. I dont write idiomatic code no-one can understand to look clever. If i look clever i get harder tasks at work!

Is there a reason I'm missing why a framework could help him? I have seen this ( but time is off the esssence and i am a coder not a designer and i worry about how long it will take me to reverse engineer a pre-made template into laravel. A previous post/comment from Ray Paseur suggested i took a week and did a rapid prototype to see how long it takes to reverse engineer a teamplate so i will do that as Ray is god :) . I just wondered how long it took the people who know what they are doing to reverse engineer a template. But i guess that could be like asking how long is a piece of string


I know we shoud all write great code using the latest technologies and the best design patterns but sometimes your boss just wants to make money and wants you get something togethas asap an i think a framework wont help. If we were making loads of websites - perhaps. But it is just one website.

Thanks experts :)

But also, can you get significant speed gains from a framework?
Question by:andieje
  • 6
  • 4
  • 2
LVL 55

Accepted Solution

Julian Hansen earned 250 total points
ID: 40352128
What is a framework? If you develop code on which your site is based - is that not a framework?

I suspect that what is under discussion here is an existing open source framework (Joomla, Drupal, Cake, Symfony, laravel)

Two main benefits I see from using an existing framework are tried and tested pre-existing functionality and continuity (developers knowledgeable about the framework).

Personally for most of my projects I find most of the frameworks out there to be bloated - trying to be everything to everyone and so I developed my own framework.

In terms of speed of site can't see that a framework delivers any significant performance unless it has a good caching function and your custom site does not implement caching - otherwise I usually find that the frameworks out there are quite inefficient in their implementation sacrificing speed for ease of development.

Having said that, if I were in a position of paying someone to implement a site I would insist on a standard framework for the following reasons

a) I could be reasonably sure I am not paying to have the wheel re-invented
b) My site will be based on a code base that will be tried and tested (doesn't say anything for the customisations - but the underlying engine should be reasonably sound)
c) I could be fairly confident that I should be able to find someone to support the site in the event the original developer was no longer available.
d) Popular frameworks have support for plugins and while these pose a potential security risk they also provide functionality out of the box that would have to pay someone to develop.

From a developer perspective I would go with the framework for the following reasons

a) I don't have to re-invent the wheel
b) I am covered if my employer wants to question my work.

Reasons for not going the framework route.

a) Project is really security sensitive
b) Project has functionality or structure that would require to much re-configuring of framework code base
c) Framework is overkill for project

You should get as many different answers as experts out there - so you are going to need to evaluate how to proceed based on your experience and specific situation.
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 40352139
You will not get "speed gains" from frameworks - they are generalized solutions and as such, they contain answers to a lots of questions you may not be asking.  Where you will get value from a framework is in the build-out of the site.  The framework already contains things you need like organization, security, session handlers, data base abstraction, etc.

The article cited in the question dates from 5-6 years ago.  CodeIgniter and Kohana were very popular then, but like all things in technology, the fashions change as technology advances.  Today I  would trust the "Frameworks" section of this site, which seems to be up-to-date.

Here is a good list:

Author Comment

ID: 40353034
Ray - what would you do? I don't feel that one php site would benefit from the learning curve of the framework. If I was a competent designer and wasn't worried about reverse engineering a design templates then I would think definitely framework. The design template is key as that has all the flashy bits that do nothing but attracts customers and that is what my boss wants. I feel I could write a 3 tier extendable website without a framework. It feels the learning curve for the framework is disproportionate.

I hopw it isn't against etiquette to ask a direct question to Ray but we have engaged on many other questions so I think he probably has a better idea of my skill level and personality.

Kind regards
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 40353039
I respect your advice completely and don't want to reinvent the wheel and I want to use tried and tested components. However for me speed is the essence and I don't want to spend a month or so trying learning mvc, laravel and how reverse engineer a design  template into it. This may be the preferred and optimal way to produce the site but I have time constraints.
LVL 109

Expert Comment

by:Ray Paseur
ID: 40353064
My candid answer: I would lay out the pros and cons of each approach and your estimate of the timing from start to finish.  Put this into a presentation and meet with the boss, and let the boss decide.  If the boss chooses the framework path, knowing it will take longer, the good news is that you'll get framework experience which will make things better next time.  If the boss chooses organic development, knowing it will go faster, but not add all of the flashy features of the framework, you'll miss out on the framework experience, but the task may be completed more quickly.  If the boss puts the choice back to you, choose the framework approach, explaining that it's an investment in your skill set that will be good for the organization in the future.
LVL 55

Expert Comment

by:Julian Hansen
ID: 40353128
However for me speed is the essence and I don't want to spend a month or so trying learning mvc,
I completely understand this sentiment - I personally am averse to using canned code - but I also know that my way is not necessarily the right way - it works for me because of how I want to work but it is not the way I would advise others to proceed because it is risky on several levels

1. It can actually take longer as you spend time trying to solve problems that are provided out of the box
2. You can find yourself in what I call the Babbage trap - you halfway build your site before realising there is a better way and being a perfectionist you are compelled to re-engineer / refactor the project.

Regarding the time to learn - I like the story of the guy who is always late for work pushing his bicycle. One day an observer asks him why he does not just get on the bike and ride to work - to which he replies he does not have the time to get on the bike. Sometimes it is worth taking the time to learn how to do something because the time lost in learning will be more than made up in gains down the line - not to mention adding a new marketable skill to your skill set.

I use a framework for all my sites - it just happens to be one I have developed and used over the years - but never-the-less it is still a framework. It does all the heavy lifting for me freeing me to focus on the functionality of the site - which is essentially what a framework is designed to do. I do not advocate creating a framework - my reasons for doing so are not good ones to follow - I mention it merely to highlight the benefit of using tried and tested code that takes care of the nitty gritty.

Of course if you decide to go with a framework the next trick is to decide which one ...

Author Comment

ID: 40353192
Thanks Ray = the problem I have with an estimate of timing is that I've not used Laravel before. I will suggest to the client that I do a small prototype as you suggested and see what he says to that idea. Then I will be able to suggest time frames
LVL 109

Expert Comment

by:Ray Paseur
ID: 40353215
I like that idea.  A "Hello World" example will give you a chance to take notes and build a code sample library.  Maybe you can write an article for EE about your experience getting started with Laravel.

Author Comment

ID: 40354339
Hi again Ray

Just drawing up my list of pros and cons as you advised, in this comment here what did you mean by flashier features of frameworks. Having never used one I am assuming they add some really nice touches really easily. I was wondering if you could provide an example

Author Comment

ID: 40354340
opops forgot tosay please

Author Comment

ID: 40354343
Do you use a framework Ray?
LVL 109

Expert Comment

by:Ray Paseur
ID: 40354360
I've used WordPress as a framework, mostly for demonstration purposes.  I rarely produce public-facing web sites; most of my work is internal or in machine-to-machine web services (telephony, APIs, etc) so I'm not the right guy to ask.  My arguments in favor of Laravel are mostly hearsay, but I have great respect for the proponents of Laravel.

If you want to have some fun without investing too much time in the project, you might take a look at Slim.

If you want to tear your hair out in a funhouse maze of mirrors and dead-ends, take a look at Zend, which when compared to Slim might be called the Morbidly Obese Framework.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Installer 5 40
Can't Setup WAMP. Keep Being Told I've Got the Wrong Directory... 3 28
AJAX pass along a variable 3 47
Custom Wordpress Loop 22 39
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question