Different PHP framework? - Smarty / Cake / Zend etc

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
thoro
Forum Newbie
Posts: 7
Joined: Sun Jun 21, 2009 4:40 pm

Different PHP framework? - Smarty / Cake / Zend etc

Post by thoro »

Hi all...

If I hire two php developers... that will be interchanging projects....would the framework be an issue?
Is it difficult to swap from one to another... will a developer struggle to understand a different framework to what they are used to?

Many thanks,
Tom
BornForCode
Forum Contributor
Posts: 147
Joined: Mon Feb 11, 2008 1:56 am

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by BornForCode »

Smarty is not a framework as far as i know, but Cake, Symphony and Zend Framework are.

My first option is Zend_Framework since it is developed by Zend people. Unfortunatelly you will have to hire senior developers because ZF is quite complex if you would like to develop advanced applications.

So if you want something nice, fast and not very complex i would go for Symphony.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by alex.barylski »

I think Zend and Symphony are pretty much on par in terms of complexity...both are loosely coupled and highly configurable -- which makes them harder to use/learn.

CakePHP and CodeIgnitor make more assumptions for you and lack some advanced features -- for instance a while back reading the CI forums someone asked if CI supported forwarding() and the amdin replied "Yes, of course, but we call it redirecting" or something to that effect... :P

CakePHP and CI also might get you building web apps a little quicker because they make assumptions for you, albeit poor ones at times.

If you are a total newbie, I would suggest building some scripts by hand, the experience will be invaluable. Then when maintaining HTML between a dozen pages or so becomes tedious for you, begin learning Smarty and separate the HTML and presentation logic from the rest of the code. This will clean up your programming ten fold (and should be undisputedly the most important seperation).

Now you would have a series of script files which look like:

Code: Select all

$smarty = new Smarty();
$smarty->assign('title', 'This is the about script/page');
 
// Business logic goes here -- pull contents from an INI file, XML or DB table
 
echo $smarty->build('master_template.tpl');
When these script begin to make you feel as though you are reinventing the wheel each time you introduce a new script, at this point you should begin lookiing into using a 'model 2' MVC framework (ie: one with a front controller).

This will again make a significant enhancement to your codebase as duplication will be reduced.

After some exposure to this, you will begin abstracting your SQL and possibly business logic (validations, calculations, etc) -- this will eventually become your model and before you know it, you'll be implementing applications following MVC.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by Christopher »

thoro wrote:If I hire two php developers... that will be interchanging projects....would the framework be an issue?
You will be better off using a framework because the two programmers will have a fixed standard to program to. And, if you lose one or both of the programmers, you can find another programmer who knows that framework to continue the work.
thoro wrote:Is it difficult to swap from one to another... will a developer struggle to understand a different framework to what they are used to?
It is a lot of work to switch from one framework to another. A developer may struggle a little, but they should have no problem learning a framework -- if they are any good.
(#10850)
SeaJones
Forum Commoner
Posts: 48
Joined: Tue Jun 30, 2009 5:40 pm

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by SeaJones »

(Whoa! First Post...)

Pick a framework with advice from people who know them, then recruit either developers who already know it or those adept enough to pick it up quickly.

I'd use CI, but that's cause I like it, if you find a specific need that a framework addresses, go for it.

Basically, find developers to fit the task, not the other way around. Plenny o'projects are ruined by inadequate or generally incompetent coders. In this sense Zend is a good way to go, just because you can actually find certified coders for that framework.

(and now off to the intros board)
User avatar
volomike
Forum Regular
Posts: 633
Joined: Wed Jan 16, 2008 9:04 am
Location: Myrtle Beach, South Carolina, USA

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by volomike »

Just be aware -- a new PHP framework arrives on the scene every 6 months. I can count about 20 MVC-based PHP frameworks at this point. The older ones are the ones that have more traction. They get boosted if they have company backing or are working on PHP MVC framework standards with another framework team for interoperability. (Evidently, this interoperability and standards discussion is going on now.)

So, if they understand MVC, then yeah, they might be able to grasp things eventually, but there is a learning curve with every way MVC is implemented in the variety of frameworks, many of which are remarkably different in approach.
SeaJones
Forum Commoner
Posts: 48
Joined: Tue Jun 30, 2009 5:40 pm

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by SeaJones »

Volo makes a good point. In this sense by far the most "good bet"/"Safe bet" framework is Zend, but CI and Cake are probably fairly safe plans too.
thoro
Forum Newbie
Posts: 7
Joined: Sun Jun 21, 2009 4:40 pm

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by thoro »

Thanks for all your input. So in my search for a developer I should check that both work in the same framework. This should assist both developers as/when they have to work together.

Zend is looking like the preferred route based on the fact that a qualification/certification is available, thus helping to reduce the amount of freelancers I am looking at.
User avatar
volomike
Forum Regular
Posts: 633
Joined: Wed Jan 16, 2008 9:04 am
Location: Myrtle Beach, South Carolina, USA

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by volomike »

Zend cert is brutal, from what I hear. You might only get like 2 freelancers out of that, and also a cert is no guarantee that the guy is the right mix for a job. There's more than just the technology in doing a project. You need a guy with a personality you can work with as well, and a few other factors.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Different PHP framework? - Smarty / Cake / Zend etc

Post by alex.barylski »

You need a guy with a personality you can work with as well, and a few other factors.
Communication and being able to articulate requirements clearly and concisely is mission critical to any project, so I agree with Mike on this one.

Not only that but having actual experience building enterprise applications and developing the long term discipline is also critical.

It's one thing to pass a test, it's quite another to build a large scale application. Big things are inherently complex and when inexperienced (despite being knowledgable) people are given a task, it can often before overwhelming very quickly and your project will suffer from that second on, probalby failing a slow painful death when you both realize the idea is not to come to fruition.
Post Reply