Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

To framework or not to framework

Hi

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 (http://www.phpandstuff.com/articles/top-10-reasons-why-you-should-use-a-php-framework) 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

Thank

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?
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje
andieje

ASKER

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
Avatar of andieje

ASKER

@Julian
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.
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.
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 ...
Avatar of andieje

ASKER

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
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.
Avatar of andieje

ASKER

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
Avatar of andieje

ASKER

opops forgot tosay please
Avatar of andieje

ASKER

Do you use a framework Ray?
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.  
http://www.sitepoint.com/best-php-frameworks-2014/

If you want to have some fun without investing too much time in the project, you might take a look at Slim.
http://www.slimframework.com/
http://www.ibm.com/developerworks/library/x-slim-rest/
http://www.youtube.com/watch?v=26CRc89gN10

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.