SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    SitePoint Member
    Join Date
    Nov 2010
    Location
    Melbourne, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Favourite PHP Framework Features - have your say

    I wanted to start a little bit of research into what favourite features that people use in their framework of choice. I guess I am interested in understanding what features people expect to see in a modern framework and what features they find attractive about the frameworks they use now.

    The topics I was hoping to discuss was:
    - MVC topics, patterns(?)
    - Command line tools (what is your favourite command/task?)
    - Configuration for different environments (live, stage etc)
    - ORM, scaffolding
    - View/template helpers..
    - Filters, Routing
    - Testing, TDD
    - Utilities
    - Locale, i18n, etc
    - Documentation, examples
    - Community
    - Anything else you like?

    Any suggestions on what features would be cool? I would love it if people could rate their number one feature also - you know - that one that you rely on or couldn't live/develop without (!). :-)

    Suggestions and voting on them:
    Maybe people could vote up features/suggestions by using UserVoice, just a thought, that way you could ensure the best features are identified.
    http://aloiproject.uservoice.com/forums/88759-general

  2. #2
    SitePoint Member
    Join Date
    Nov 2010
    Location
    Melbourne, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have added some of the basic framework features to uservoice, hopefully making it easy for people to indicate what they think is important. Otherwise, discuss the topics here and I will try to ensure they appear on the list also.

    Thanks!

  3. #3
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    989
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    Presumably this is for a framework you're intending to distribute to other developers rather than a bespoke system for your own use?

    If so, by far the most important thing is documentation. You can have the best framework in the world but if people can't understand how to use it, it's pointless. On a related note, although not required it's nice if you include the reasons why certain design decisions were made. One of my biggest gripes with frameworks, especially for developers who are starting out is the constant question "Why is it done like this?". Most framework documentation offers "how" but not "why". I suppose you could argue that it's beyond the scope of the documentation and yes I'd leave it out of the API docs but unless you're able to provide that reasoning and why it's preferrable to other methods used in other frameworks you'll leave the developer confused and wondering why when another method may seem simpler.

    After documentation, it has to be flexibility. Sure providing an ORM and/or template system is nice but people should be able to easily substitute it for Doctrine or Smarty if they desire.

    Next? support. People will inevitably get stuck and need help. This will take time! This is also a big commitment on your part and the reason I rarely release code you will need to be available to answer questions both questioning your methodology and on trivial parse errors.

    Finally you need to explain why people should pick your framework over the others. It has to be something truely unique, there are enough cake clones around. I've actually considered releasing my MVVM framework as there are none. But, as I said, I don't have time to support it.

  4. #4
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,033
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TomB View Post
    After documentation, it has to be flexibility. Sure providing an ORM and/or template system is nice but people should be able to easily substitute it for Doctrine or Smarty if they desire.
    Amen. Example - as much as I hate smarty (nay, loathe) - my new framework has SmartyResponder, which wraps around the base smarty library and let's it work within the framework with minimal fuss (I wrote it because I still have over 300 smarty templates in this legacy project and I'll be darned if I'm going to rewrite them all overnight).

  5. #5
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with everything said by TomB. Frameworks are a dime a dozen, most of which do the same thing as the others, which reallu just convolutes the framework landscape and makes selecting a framework more difficult, thus resulting in many developers re-inventing the wheel.

    If you need to ask what features are most desired, IMO, your off to a bad start. You should know exactly what features you want and implement those. Then hope others find your approach to be a reasonable one and follow you.

    Ignore the easy questions like whether it supports ORM, i18n, template engines like Smarty. Those can be easy tacked on to any framework.

    Don't focus on MVC. Everyone claims MVC but almost all are of some variation of the pattern itself.

    Cheers,
    Alex
    The only constant in software is change itself

  6. #6
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I too will second the opinion that you are already headed in the wrong direction if you're just looking to fill a feature list. Use a few frameworks in some projects, figure out what works for you and what doesn't, and then fill in the gaps. Pretty soon you'll have a good idea of what you want in your own framework.

    I say this with some experience -- I released Alloy Framework after going through this exact process. At the time I started making it, no other framework was native HMVC with modular organization (now Kohana 3 is), and no other popular php framework had a truly REST-centered design -- even making a REST API in most frameworks (like Zend) is much harder than it should be. I created the framework for my needs first, used it in several of my own projects, and then released it once I thought it was at a point where it could be useful to others.

    I can also verify that running a framework project takes a lot of time, and is not for the feint of heart. I am now almost always signed into an IRC channel (#alloy on Freenode), updating documentation, creating code examples, answering emails, and responding to IMs and posts on discussion boards. I am lucky to have a job and work schedule that is flexible enough to accomodate it. If you really want to run a successful framework project, you have to be in it for the long haul, and you absolutely have to be building web applications and other projects with your own code. That's the only way you will see where the deficiencies are and understand where the trouble points are.
    Last edited by Mittineague; Dec 6, 2010 at 16:19. Reason: removing unnecessary link

  7. #7
    SitePoint Member
    Join Date
    Nov 2010
    Location
    Melbourne, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks,

    Funnily enough, I have been working on a framework for a while, and went along to an Agile event last night which was a lot to do with ensuring that you have an audience first (as well as leading with new ideas etc), without getting too far down the road. Our dev team is using this framework and find it useful for our development, this project was to open it up and make it public.

    This is embarrassing, last year I chose the name 'Aloi' as the framework (http://aloi-project.org). I have been working on amalgamates different technologies such as struts, servlet, rails etc with php models/services orm doctrine, propel to make something which had strengths from each (hence the name, a play on alloy). A benefit was to allow other developers from different technologies a comfortable environment, while providing PHP some of the framework concepts and patterns that exist in enterprise. The framework is layered, and tries to promote different patterns to be implemented (MVC, eventually MVVM, PAC etc) built on-top of a host which provides the standard object oriented request/response and filters/interceptor chains, as well as routing functions.

    I really wanted to have a layered architecture that promoted modular reuse as well a way to couple together different smaller components or different patterns side-by-side. A simple hello world not invoking full MVC unless it needed to, or an image resizer being a lean component to be co-existing beside a larger MVC framework. I also feel that there was a need for a basic trivial set of 'request/response' handlers that could connect the object oriented world to PHP, and perform filters before stuff is executed and after (such as implementing a central security, or error/exception handling across the app etc). By providing these basic set of features it could promote different application frameworks to be built ontop of this base layer, that could immediately benefit from handling the basic HTTP management (such as doGet/doPost/doXX interfaces) and URL management allowing applications to own parts of the request. People could develop filters that would do things like security, or compression, etc that could be reused between applications and attached to parts of your framework. You could then develop and structure your PHP OO application using whichever patterns your prefer, with that base underlying set of features taken care of.

    We have also been using a struts like implementation which allowed us to develop complex use cases and build applications that have been really flexible yet organised. There is a bunch of books relating to the framework, and it is still in my opinion a very good framework (but needs some modern structures brought int), but in Java you need specialised hosting, issues of deployment, etc which PHP doesn't really have (and although PHP is not Java, Java has a lot of stuff it can suggest to PHP and vice-versa). Aloi provides "phruts" which is a PHP implementation of struts (working to 1.3 feature complete). Aloi is furthering this and bringing newer cool lightweight ways of approaching these projects, making development faster, while still allowing developers a path to build larger applications where different features people can grow into. It is very pluggable, it can be run with controller configuration or wildcard controller mapping style URL/request to app/module/controller/action.

    I guess what I am looking for is what favourite features people use in their current framework - not for a feature list that I should develop - just wanting to find out what people find most valuable about frameworks they use. This will help me understand more about what people find important for developing documentation or code.

    (also, anyone know of a good name for the project? - thanks Czaries)

    Thanks for peoples feedback so far.
    Last edited by Mittineague; Dec 6, 2010 at 16:21. Reason: OP forgot to turn off auto link

  8. #8
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,033
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    I am building a framework as well. It's a labor of love if it is anything.

  9. #9
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    I'm also building my own and have been for about a year. These days its nothing special. You better be doing so because you enjoy doing so or are using it for business purposes otherwise your probably setting yourself up for disappointment. What ships first wins the fight.

    Regardless of anything that can be done there will always be disadvantages and advantages of one framework over another. There is no way to plan for something so generic to be anything and everything to everyone. Its just not possible. If anything you focus on things important to you or you business goals and degrade from there.

    Anyone who says their framework is the next best thing, is just blowing smoke. Its all "popularity" contest these days. No one is actually doing it for their potential users… give me a break.

    The funny thing is that in most cases the worst software actually wins the war. Most PHP developers are pretty stubborn and seem to gravitate toward their own stuff. So that leaves you with a user base that consist of designers and people who know nothing about programming at all. Those people generally care less how well something is build, or what design patterns it used, rather than how easy it is to use or understand.

    Using a whole bunch of design patterns, to satisfy some imaginable ideal generally makes software more complex for someone who doesn't know those things, than just good ol Wordpress style programming. People will gravitate toward what they know and can understand and the general user base for such platforms is generally on side that don't really understand object -oriented programming, none the less patterns well.

    CakePHP and CodeIgnitor have only survived because they were some of the first, well documented and visual appealing of their kind. A big part of it is making the software look attractive. It could be the best thing ever programmed, but if the doc pages are not well designed, etc that reflects on the software quality. Ironically enough we all know how things like Wordpress, Drupal and Joomla appear increasingly better than their physical quality.

  10. #10
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi...

    I'd like a framework that has next to nothing in it, but it's easy to add stuff (DI is very handy). Basically a micro-framework that does one part well or one domain (e.g. CMSs) well.

    Sinatra is a good example of a small framework.

    When there are enough such small frameworks, I'll be able to pick the one I need. I'll be able to do that because of their small size, and also because the tutorials and docs will concentrate on a small feature set and tight domain.

    I'm fed up with big bloated frameworks that take ages to learn and have 100+ line dispatch loops that I cannot internalise.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  11. #11
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,033
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    For my own part I've been tightening focus to web only and focusing on being a good framework to learn from first. I don't expect it to be the most efficient but if I can come up with something that teaches well I think I'll have something unique just in that way alone.

    But to teach I have to learn and understand what I'm doing - which is why I keep posting here even if I have been pugnacious at times.

  12. #12
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What Lastcraft said
    The only constant in software is change itself

  13. #13
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Documentation. My current project is learning symfony, and it drives me up the wall how much documentation is either out of date, plain wrong, non-explanatory (paste this code and it will work.... sometimes it will work, but I want to know WHY), etc.

  14. #14
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Most of the major projects have horrible docs. They have such a large following through that it really doesn't matter and I don't see it getting any better. CodeIgnitor and CakePHP documentation far surpasses most CMS/F docs such as; Drupal and Joomla, which are both horrendous. Though there really is much less to understand with a framework than a full blown content management framework or system. Most frameworks themselves leave a lot of room or flexibility where as content management software does not.
    The only code I hate more than my own is everyone else's.

  15. #15
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just pretend my name is next to Lastcraft's post

    There's two ways a framework can appeal to a wide audience. It can either provide a solution to every problem, or provide only a very small amount of solutions, to the most common problems, and leave the rest up to the hopefully capable programmer at the other end. I definitely prefer the later, which is why I've warmed so much to Sinatra since moving to Ruby 6 months ago. I started learning rails, but abandoned it a couple of days latter simply because it didn't leave me (the programmer) with enough design flexibility. In essence, it's too opinionated for my style of programming, and my approach to solving problems on a per-problem basis.

    Sinatra is great. I see it as the bare minimum for creating websites using Ruby, in a sane and manageable manner. It leaves the majority of design decisions up to me, which is exactly how I like it (like any enthusiastic programmer). If I'm making a simple personal site, I can opt for a very basic View-Controller structure and serve pages from text files, where as if I'm constructing an online store, I can implement a more fully featured MVC-like structure and leverage appropriate tools of my choice, such as Mongo and ERB templates. In other words, I can create solutions tailored specifically for the problem at hand, and do so in a way that suits my programming style and methodologies. That's how it should be.

    Large frameworks have no place in my artillery. They're either too rigid, or if they're not too rigid, they trade rigidity for complexity. A large framework screws me over either way

    I also whole-heartedly agree with what's been said about documentation. I'm yet to release any of my code into the public domain, but when I do (which will hopefully be soon), I anticipate documenting my creation will be just as joyful as the creation process. The idea of writing about my creation, to help others use it in the way I intended it to be used, should provide me with more than enough motivation to produce some really solid documentation.

    I guess it all depends on the motivating factor behind your project.

  16. #16
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wardrop - In many ways I concur with you, but there is one thing that large frameworks can do, which smaller, more decoupled ones can't. That is interoperability. Rails is a prime example of it working out well. There is an entire ecosystem of plugins that are application level code, but have been generalised. Or in the PHP world - Drupal provides some of the same benefit. This is only possible because the scope of the framework is large.

    Mind you - you have to consider the tradeoff that you're making, but this are some of the things that could make me prefer a large framework for some tasks.

  17. #17
    SitePoint Enthusiast crag's Avatar
    Join Date
    Apr 2003
    Location
    Ft. Lauderdale, FL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Documentation. Documentation. Documentation.

    Current Documentation. The most important thing to me about any framework. I can't tell you how many frameworks I've looked at where the docs are 2+ years old.

    Out of date docs are useless. I remember (in 2010) someone at a users group handing me a book on "some nameless framework" from 2007. I was like, "you've got to be kidding?"

    I'm jealous of rails. You go to rubyonrails.org and you'll find tons of current docs, video's, examples, and active forums. If i didn't have so much time invested with PHP (and the fact that I just like PHP) I'd be doing rails crap.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •