I am using Smarty framework for building websites in PHP. Is this the best one? If not please recommend me the best one. Thank you, Ramesh
Smarty isn't really a "framework" in traditional meaning. Its an template engine meant to separate application logic and content from its presentation. If you are talking about Application frameworks, such as Zend or CodeIgniter, then there is not a really a Best one. All of them have their pro and cons. Zend seems to be favorite or many programmer these days, but personally I feel that Zend is too bulky for small and medium projects.
Found a site that compare all the frameworks. http://www.phpframeworks.com/ You can compare all available frameworks and choose one based on the modules you need.
I recommend you to use Kohana - its easy to start, extremely fast and highly customizable. I'm using it for many years and I'm happy with it.
Personally I think "frameworks" are generally sleazy shortcuts that result in bloated crap code, usually used to cover up the ineptitude of the developer. Rarely if ever have I seen one that offered any legitimate benefit over writing code directly. Though as samyak said, "smarty" isn't a real framework, it's a template engine -- an even DUMBER bit of bloated bullshit that pisses me off every blasted time I come across it. Given that PHP is itself basically a template engine all by itself... I fail to comprehend why the mike foxtrot hotel ANYONE would use it by choice, apart from a complete ignorance on how to use PHP properly. Running an interpeted preprocessor on top of a interpreted preprocessor has to be some of the dumbest foxtrot sierra out there. Forget that crap and learn to do things yourself properly -- you'll quickly find it's less code, less headaches, easier and faster to develop and maintain -- basically ALL the things these stupid 'frameworks' CLAIM to deliver, and provide the exact opposite of.
I think you will find that Symphony2 has a lot of support and is fairly easy to learn. It uses the twig template engine which is also easy to learn. The problem I'm finding with frameworks is that they are incredibly slow. I like the concept of MVC but, in production, it is much slower than using php in your presentation code. Maybe I'm doing something wrong or maybe I'm just old-fashioned. I've written several applications that just use php without a template engine and they are much faster than the ones I have made using a framework and template engine. In fact, I have never even put one of my framework projects into production because they run so slow on a local machine.
That's because the entire MVC concept was created for EVENT DRIVEN software and environments, something PHP is decidedly not. Shoe-horning the MVC concept into a top down executing language like PHP is another halfwit practice, no matter how many so-called 'experts' promote it's use. It's akin to the folks who said use objects for EVERYTHING, which was all the rage four or five years ago. It's a sick fad that in real world practice should be filed alongside all the other sick buzzwords like web 2.0, and idiotic 'new shiny' crap like HTML 5 that offers zero real world improvements.
If you just asking about to manage your design part and Program Part the yes Smarty is best. But if you asking about Design part (HTML), Programming Part and Database part then No Smarty is not Best choice. Try CodeIgniter (codeigniter.com) easiest MVC Framework.
I agree with what deathshadow told about smarty template engine. Its such an redundant idea. It is supposed to free the presentation with the logic, so that designers can work independantly of the programmers who create the application logic. However learning curve of Smarty syntax is way steeper than the learning PHP for designers.
Surprised noone has mentioned Yii yet! Yii used to be the new kid on the block but now they're close to releasing Yii 2.0. They have a great community, wiki, lots of extensions and once you get used to the workflow your project development will be a matter weeks or even days!
Such thing as "Best Framework" - in an absolute meaning - does not exists. It's like asking "What's the best car" or "What's the best CMS" (even if a lot of you will be eager to answer "Wordpress). The real thing to ask first is : for what use ? Depending on what you want to build, you'll be better with different tools. In a more "general" way, let's say you want the jack-of-all-trades PHP framework, you'd be fine with either Symfony, Laravel (which is built on top of Symfony components, btw), or ZendFramework. Actually even CodeIgniter or FatFreePHP would do. In the end it's always about the developer(s).
I think Phalcon is best framework . It is fatest framework among all the framework. Visit this URL for more info http://phalconphp.com/en/
Never heard of it... let's see... "Best for web 2.0 development" -- so they're nothing but market-speak bullshit idiots who don't know enough about the Internet to open their yaps on the subject?!? Sad when I have that reaction JUST from opening their website. ... and if that website is typical of what their framework produces given that it's a complete and utter inaccessible halfwit train-wreck of how NOT to build a website... Let's just say things aren't looking very bright for it. If the front end made by it's dev's is crap, how can what it does under the hood be any good? Of course digging into it by all appearances I see the same bloated useless crap as every other PHP framework I've ever seen. When unpacked the distribution is larger than many forum softwares, that's usually a poor start. When the comments outnumber the actual code in most every file 10:1 or more, it's probably piss-poorly coded with needlessly cryptic names on things... when it's creating a fat bloated object that seems to wrap a PDO object for no good reason instead of *SHOCK* extending the PDO object, put a fork in it, it's done. Even just idiotic little bits of crap like this: foreach($params as $name=>$value) $this->params[$name]=$value; Code (markup): Showing they don't know enough PHP to even be THINKING about writing code for others... (it's called array_merge!)... or worse: return $this; Code (markup): Yup, just another crappy off the shelf framework that people are DUMBER for it even existing.
so much free hate against a framework makes me actually want to test it. Mediocrity can't produce such rancor.
If you could recommend a book or any other suggestion to learn how to properly code without a framework , that would be much appreciated. Thanks
Please don't listen to naysayers. Usually it's people who never tried to really use a framework and feel the need to make up for it - or justify themselves - by detracting them. It's like saying you shouldn't use a car, because you know, it pollutes, uses gas, you have to maintain / repair it, etc. Sure, but it's still pretty damn useful. Still, if you don't know to properly code WITHOUT a framework then yeah, don't use one ! It only serves to provide you "shorcuts" and accelerate your development. But it definitely won't make up for any lack of good practice. Be sure to read all of these resources if you want to know how to properly produce PHP code (i listed them by the order you should read them in): http://net.tutsplus.com/tutorials/php/30-php-best-practices-for-beginners/ http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/ http://net.tutsplus.com/tutorials/php/why-youre-a-bad-php-programmer/ http://net.tutsplus.com/tutorials/php/psr-huh/ http://net.tutsplus.com/tutorials/tools-and-tips/psr-duh/