1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

The best framework

Discussion in 'PHP' started by rmmrj, Aug 15, 2013.

  1. #1
    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
    rmmrj, Aug 15, 2013 IP
  2. DJV

    DJV Greenhorn

    Messages:
    35
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    13
    #2
    Everyone i talk to says Zend? I guess everyone has their preference!
    DJV, Aug 15, 2013 IP
  3. samyak

    samyak Active Member

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    88
    #3
    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.
    samyak, Aug 15, 2013 IP
  4. samyak

    samyak Active Member

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    88
    #4
    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.
    samyak, Aug 15, 2013 IP
  5. Ricardooo

    Ricardooo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    I choose codeigniter, to small and medium projects, but i never try de Zend
    Ricardooo, Aug 15, 2013 IP
  6. livedating

    livedating Active Member

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    83
    #6
    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.
    livedating, Aug 16, 2013 IP
  7. deathshadow

    deathshadow Prominent Member

    Messages:
    5,975
    Likes Received:
    824
    Best Answers:
    144
    Trophy Points:
    395
    #7
    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.
    deathshadow, Aug 17, 2013 IP
  8. ekim941

    ekim941 Member

    Messages:
    74
    Likes Received:
    7
    Best Answers:
    7
    Trophy Points:
    33
    #8
    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.
    ekim941, Aug 17, 2013 IP
  9. deathshadow

    deathshadow Prominent Member

    Messages:
    5,975
    Likes Received:
    824
    Best Answers:
    144
    Trophy Points:
    395
    #9
    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.
    deathshadow, Aug 17, 2013 IP
  10. techinfocomp

    techinfocomp Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #10
    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.
    techinfocomp, Aug 17, 2013 IP
  11. samyak

    samyak Active Member

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    88
    #11
    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.
    samyak, Aug 18, 2013 IP
  12. DeanIM

    DeanIM Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    2
    Trophy Points:
    21
    #12
    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!
    DeanIM, Aug 20, 2013 IP
  13. crazyblogger

    crazyblogger Active Member

    Messages:
    433
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    63
    #13
    If I have to choose, I would say codeignitor or Laravel.
    crazyblogger, Aug 21, 2013 IP
  14. tobalsan

    tobalsan Active Member

    Messages:
    64
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #14
    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).
    tobalsan, Aug 23, 2013 IP
  15. sources68

    sources68 Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #15
    I use Yii Framework, it best performent
    sources68, Aug 23, 2013 IP
  16. ChiragKalani

    ChiragKalani Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    2
    Trophy Points:
    48
    #16
    I think Phalcon is best framework . It is fatest framework among all the framework.
    Visit this URL for more info http://phalconphp.com/en/
    ChiragKalani, Aug 23, 2013 IP
  17. deathshadow

    deathshadow Prominent Member

    Messages:
    5,975
    Likes Received:
    824
    Best Answers:
    144
    Trophy Points:
    395
    #17
    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:
    Code (Text):
    1. foreach($params as $name=>$value)
    2.     $this->params[$name]=$value;
    Showing they don't know enough PHP to even be THINKING about writing code for others... (it's called array_merge!)... or worse:

    Code (Text):
    1. return $this;
    Yup, just another crappy off the shelf framework that people are DUMBER for it even existing.
    deathshadow, Aug 24, 2013 IP
  18. tobalsan

    tobalsan Active Member

    Messages:
    64
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #18
    so much free hate against a framework makes me actually want to test it. Mediocrity can't produce such rancor.
    tobalsan, Aug 24, 2013 IP
  19. kutchbhi

    kutchbhi Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    45
    #19
    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
    kutchbhi, Aug 25, 2013 IP
  20. tobalsan

    tobalsan Active Member

    Messages:
    64
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #20
    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/
    tobalsan, Aug 26, 2013 IP