As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have heard a lot about PHP frameworks like ZEND, CodeIgniter,CakePhp etc and i am also well aware of some advantages of using it i.e. increased productivity,reduced errors etc but doesn't php framework make coding a complex process ? Doesn't coding without framework provides more flexibility ? Some people say you don't need any additional framework, as PHP is itself a framework.
So why there is so much usage of PHP framework ? Are frameworks really necessary in PHP?
This is a broad question and I think an important one. I am in the camp of NOT using frameworks unless absolutely necessary. The question is, when is it necessary?
First off, the thing that I think gave me this strange, allergic reaction to frameworks is that inexperienced coders want to use them for EVERYTHING, even tiny sites.... and it's bizarre. Maybe its through some need to make their resumes bigger by saying they've used codeigniter- but in my experience that doesn't make a damn bit of a difference. Hiring managers want SKILLSETS, not somebody that can read API documentation- which anyone can do. If you have working knowledge about program architecture and OOP principles, you're hired. If you don't, but you're a codeigniter ninja, .... eeehhhh.... ok?
Frameworks have their uses but I think when your mom wants to make a website for her bake sale then you can just slap a page together using a much lighter weight system. I don't sit in the camp of belief that you should include code "in case you need it". Over time, I have developed my own framework that is absolutely tiny, which is why every single web site or application I have ever built has ranked in the top 2% (though usually top 1%) of page load times in the world by google.
This is not to say they are bad- just don't go running off to use a framework because you want to put it on your resume- you're actually shooting yourself in the foot in the long run. Why? Because you won't spend time using the language itself, you'll spend time using the language of the framework. Take jQuery for instance- I avoided it for YEARS because it wasn't JAVASCRIPT. People scoffed at it- but now, when I go to a technical interview and I get asked (inevitably): "What is your experience level with jQuery", and I say "not much", and they for a second look surprised, but then I follow it up with "but I just wrote dependency injection via inversion of control in native JS yesterday"- I get hired ON THE SPOT.
Frameworks are great. Just ask yourself if you really need them. Particularly the question is: are the benefits of coding it yourself outweighed by the time benefits (don't forget about the learning curve of the platform) of the framework or not? On the one hand (non-framework approach), you learn a lot, and perhaps you take more time because you're working out your own kinks- but you learned a ton about the language itself (PHP in this case). On the other hand, you learned a new framework and maybe got a site up quicker that most likely is slower.
Wordpress is a great example of an overused framework in my opinion. Back in my freelancing days I used to take on gigs that needed me to "revamp a wordpress site"- only to find a site that could barely load because somebody plugged in every plugin they could find and made what was a stupid simple site into a tank with ungreased treads. It's OVERKILL in that case.
With my experience in CTO and Tech Lead positions, when somebody puts Wordpress and jQuery as primary points on their resume, to me that says "I don't know a thing about OOP and how to use these languages if required" which, in the real world (and I work on huge projects like windows 8 and other projects of that magnitude) - is OFTEN the case. Microsoft expressly forbids the usage of jQuery in their metro app system for MS released products because they want to show off their system dependency free.
Other companies, however, DO use frameworks. I just got off a project using Foundation and it was AWESOME- but that's because the architect of the project fully researched the framework and we used it RIGHT. The result was a fully responsive pristine code base that went from full monitor glory down to triscuit-sized smartphone screen awesomeness.
IN SHORT:
Frameworks, when used right, can be awesome- particularly for large projects (and I'm talking enterprise large). For smaller projects they aren't necessarily bad- but when they are used without thinking about their implementations, its like using a hatchet for a scalpel.
Just my 2 cents.
Doesn't php framework make coding a complex process?
It depends what you want to do. If all you're doing is creating a basic contact form for a site that is all static HTML, then yes using a framework would make it a more complex process. On the other hand if you're building a large scale app then using a framework would not necessarily make it more complex.
Doesn't coding without framework provides more flexibility ?
This depends on the framework itself, they aren't all the same. Some frameworks such as Slim or Codeigniter are very trimmed down and don't get in the way too much and so don't really impact on flexibility, some are more complex such as Symfony2/Zend.
Some people say you don't need any additional framework, as PHP is itself a framework.
They are right, you technically don't need a framework, you can do anything with plain PHP that you can do with a framework. Frameworks have really evolved from developers personal archives of functions and helper code. PHP can be relatively low level in that it doesn't have a ready made function to do everything you need. Before frameworks, developers tended to have their own set of helper code that would be reused on many projects. Frameworks are still essentially that, except they are collaborative projects that hundreds or thousands of developers contribute to.
One other benefit of frameworks is if you have several developers, and one has developed an application and you want another developer to contribute to it or take over it, then if the developer is familiar with the framework that was used he can get up to speed on the app much quicker than if it was written in plain PHP. Without the framework, the new developer would have to decipher the previous developers system before they even start to look at adding any new functionality.
Are they necessary in PHP?
No they are not, sure it is possible to code anything without frameworks. But it's more work, this is like: Why am I using C when I can do all the same by writing assembler?
So why there is so much usage of PHP framework?
The benefits of using frameworks is, that you can use many predefined things. For example, in most PHP frameworks you can use MVC Pattern. Sure you could also build your own MVC structure with flat PHP, but that is like re-inventing the wheel everytime again. Only thing is, if you have very specific requirements, you may can/should not use a framework, but in most cases the requirements are not that specific.
The point with MVC is only one of a lot benefits. Depending on the framework you want to use, there are specific benefits.
So, it is just like you said. By using a framework you can save time, because you don't have to re-invent everything that already exists.
You can see a framwork as a tool, that helps you to develop better and faster.
Edit: Like Ayesh K mentioned in his comment, it is also a benefits, that a framework is developed by many experts, so it normally is better code, following the principle: 'Four eyes see more than two'.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am building a website, newfutureuniversity.org, and I'm not sure if I should rebuild it under a CMS or not. I can do procedural PHP but not OOP PHP (I could learn it if needed though). I have been struggling with this problem for some time so I decided to ask it here.
My page right now works this way: Every page has an include at the beginning and at the end, and each of them calls other includes. For example, the one on the beginning calls the 'translation.php', 'login.php', 'menu.php', etc.
Requirements
Code management. I'm currently using AjaXplorer. It's great, very complete and the little it cannot do the tools my host ( 000webhost ) provides suffice. The other good side is that it allows multiple users with different permissions. I need this functionality to remain.
Blog. I am using Chyrp for blogging since it's lightweight and accomplish my objectives for the blog bit.
Users. Not using any engine, just build my own in old plain PHP. Users can register, log in etc.
Languages. Also built my own. It allows me to translate every bit of information.
Wiki. Or similar. I need (not done yet) a highly personalized wiki engine for the files in the page. I am not sure yet if finding some lightweight one and personalize it or doing one myself. Also, I should include CKeditor in the wiki engine.
Some more future features that I still have to think about.
As you can see, I need a 'base' and different types of engines running at the same time on different directories.
Problems
If there were no problems I wouldn't be writing this question. These are the main problems I find:
Centralized user. The most important problem. Because I'm mixing different engines, each one uses (and even worse if I include the wiki) different user tables. I want a visitor to only need to register once, and then to be able to surf through the wiki, the blog, submit files or to do anything else with the same user name.
Centralized programmer. Same as the user but with the programmers I plan to add to the project. Also it should work with the permissions. Not needed, but much better if possible.
Style. Instead of having to manually change the engines, to have the same style by default to every one. This is probably not possible but also not really important (nor needed), just time consuming.
Therefore, these engines must be built on the same 'base' (CMS), not individually run on different directories. I was thinking about switching to Drupal for the enormous support out there or Joomla for being 'more' customizable, based in what I have read online.
Question
Will these 2 CMS (or any other you propose) keep all the requirements and solve the problems? Or are CMS modules (wiki one, blog one, etc) still build to be standalone? meaning that each one will build a different user table structure. Are there any other advantages from using a CMS?
Ideally the CMS itself would build the user tables and then the modules access them instead of creating their own. I have never worked with a CMS so I would need to learn about them but that's not a problem if it works.
If I were you, I would invest time in learning how to use frameworks, zend, code igniter, yii, etc. A CMS just ties your hands in terms of new layout features or simple functionality improvements.
Definitely go for PHP/OOP. You will find a lot of easy solutions to many problems you come across when using CMS, also you will improve your programming skills, which is the most important thing of all, right?
CMS is NOT a framework. A CMS allows users/admins who don't have knowledge of php, html, css or any other language you might be using to change the content of your site. In some way, it should not restrict your coding. In other words, a CMS can be part of a framework, or your home-fabric piece of code. I see a response which starts with "When I was using CMS..". When you are making your site interactive in some sort, it is a CMS. You are managing the contents of your site with a form that puts some text into a database. Just like the textarea I am typing in now, I am a user that uses the CMS of stackExchange, but I'm just having less rights than the admin. But I am again using the CMS. But stackexchange is building his sites in a framework of some sort, so you can be using a framework AND implement the CMS functionality.
Also, try to understand OOP, it's hard to get into, but when you get the hang of it, it is great to use. It simplifies your code a lot. I learned it through Flash (ActionScript 3.0). I find it easier to understand the basics of OOP over there because you have direct visual output of what you are doing. It's easier than PHP-OOP since PHP and OOP aren't actually fitting together. It is a OOP look-a-like (which gets better and better every time). So try to learn OOP first.
So as a conclusion you might think that I will say build your own CMS functionality in a framework of your choice. But it's kinda hard to get into a framework AND OOP from scratch. So maybe you should build a few trial-and-error websites with very simple functionality to learn OOP and Frameworks. I am learning CakePHP as we speak and learned OOP a couple of years ago. It's kinda hard. So do it step-by-step and think about what you are trying to accomplish and what you need for that. I think this topic is a very good start.
Just for the record, every programmer who is smart, and I think you are, is using the OOP method, since you don't have to rewrite pieces of code, or have to copy-paste. When your code is good, you will have no repeating code anywhere. Which is nice when you run into a bug on 200 pages of the site and knowing you only have to change one file instead of 200. :)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Now days most of PHP web development companies use PHP frameworks or open source products for developing websites but is that a right approach? If so but what will happen to the PHP programmer skill and knowledge?
Don’t you think using approaches such as “PHP frameworks or open source modification” will kill the programmer skill over the time? Is that really worth it a website developer becomes a better PHP framework writer instead of being a better PHP programmer?
I absolutely have to disagree here. When is started programming, it was PHP and I had no clue what I did. I wrote everything myself and had no will to even look at framework. I spend way too much time in work that repeated again and again.
Frameworks are one of the most useful tools IMO (not only web frameworks)
They speed up development in lots of ways
Looking at the sources, I learnt more about good practices, design decisions, directions to think to
Taking bits and pieces of the framework and use it in other apps where the use of a framework is not possible
They help you focus more on your work (MVC, DRY, KISS, ...) instead of fiddling around with the basic
Most established frameworks have a huge user-base and are very well tested.
I think looking at other code helps you be better and more efficient over time. SO is a very good example of this.
Using a framework doesn't make you a weaker programmer, otherwise I could argue you should write you next web app in assembeler, not much fun.
A framework should be thought of more like an extention to a language, a DSL if you like. For example CakePHP is just PHP with extra cool-stuff that makes handling databases and sessions "cake" - excuse the pun.
By using a framework you take the 'yuk' out of preogramming, and allow yourself to treat data as objects, for example.
If you still feel you shouldn't use a framework, then write one, then use it! By this reasoning you should also go and rewrite the PHP libraries and interpreter, however I don't recomend it.
In my opinion, I don't think frameworks "kills the skills" at all, instead it allows skills and more creative workflows to develop, which ultimately leads to enhanced skill. Also, the understanding of how large scale applications are developed are increased with effective use of well developed frameworks, which is definitely a big plus in the end too.
It allows applications to be developed more quickly and efficiently; and the end result is what matters. If you write PHP and don't know assembly, it doesn't mean you've lost your skill - you've simply focused on a higher level of technological progress in this modern age.
I think it's important to know some of the underlying concepts, such as creating and interacting with databases, OOP, design patterns. Frameworks can introduce you to these concepts without making you learn everything at once. They also have the advantage of several thousand hours of development time already invested, a community of testers and bug fixers, etc.
Anecdotally, you hear stories of people starting with a framework and slowly replacing parts of it as they optimize sections of their site. They distill the framework's operations down to their specific requirements. You can't take this route if you aren't a strong programmer.
Frameworks allow you to do work without reinventing the wheel. And the people working on this framework are probably a lot smarter than you, and they have spent a lot more time thinking about the code.
At the end of the day, it's about getting things done. Any given individual may be more productive with a third-party framework, or without. But a framework is the conclusion of any large project, whether you end up creating it yourself or you rely on the work of others.
To work on PHP based framework, you need to be a better PHP programmer.
so, your skill level will increase and it will not decrease...to tell with an example.
We can start writing all the program in assembly language, why do we use high level language...? If you find the answer for this, then you will get the answer for this problem too. :-)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In the jungle of frameworks out there, I've come to the conclusion that I cannot simply decide on a framework without considering the type of application / site I want to create. I think I need a little help with determining this one.
This site is graphics heavy, with all of the content presented in a small <div> in the centre of the page, surrounded by graphics. The graphics around it should preferably be loaded only once.
The site will allow users to log on with their account and choose from a number of pre-made food recipes, or create their own. Then they can press a button to have the site generate a week or two of dishes.
The users will need their own control panel where they can customize stuff as wallpaper, dishes, labels etc. As well as browsing recipes, adding ingredients, and looking up which dishes they can create with the ingredients.
As mentioned, all of this data is supposed to be presented inside a square in the centre, so we need a system of jQuery panels. I was thinking of dynamically adding content to this square as needed. For example, emptying the content and adding new content to it when clicking links, etc.
We don't need any community per se; the possibility for discussion can be explored in a separate, external site.
I should mention I am more of a designer than a programmer. I get stuff pretty easily, but fear I don't have the capacity to create a framework like this from the ground up. I do know a bit of Visual Basic, but I'm not so good with C# syntax. I've never even touched PHP, but my partner has. He's also somewhat familiar with Java.
Basically, we need a framework that's easy to understand and get up and running.
I rolled my own framework based on http://kissmvc.com/. It allows you to basically do what you need in PHP but gives you an easy MVC framework to do it in. You don't have to learn the specific syntax to Zend, Cake, Code Ingiter or Kohana, all of which I played with before I found kissmvc. Based on a blog post by Rasmus, it was all the direction I needed and I love what I have now for reasons #animuson mentioned.
Rasmus' post: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
From what you write, I would say all "big, famous" frameworks will be able to do this fairly "easy"... So You should really define a few prototype tasks and check out a few of the frameworks. You should be able to solve this using, CakePHP, Symfony, CodeIgniter, Yii, Zend, or any other framework, so it is better to do some real testing.
You might look for a framework that has a tight integration to jquery, but this should not be a showstopper, since you should be able to implement this in almost any framework.
You might also consider footprint and execution time, and find a framework that performes well and is not too cpu heavy (read Yii or CodeIgniter for instance).
Good luck in the search
Ultimately if you want it to fit your needs you need to build your own framework, otherwise there will always be limitations. Keep in mind that there is no framework that you can simply install and tell it to do these things, you are going to need programming knowledge of how the framework works in its entirety and how to program your custom pages to work with those features. I found it easier to just build my own framework. That way I always knew exactly what everything did and if I needed something additional, I could easily add it in the correct spot without doing much thinking on it.
A framework is only the base materials and functions you need. If you're looking for something like a pre-built website such as PHP-Nuke or a forum system, you're looking for a content management system, not a framework. A framework generally comes with absolutely no pre-built pages. Might I add that some content management systems do come with their own framework and some use existing frameworks from elsewhere.
So, we basically need a framework that's easy to understand and get up and running.
well as far as the above statement is concerned you may want to have a look at cakePHP framework.
You will easily find help on cakephp framework on stackoverflow and cakephp google group. Response will be quite fast on both the sites.
You will need to go deeply through the documentation of every framework that you plan to use because with a functionality that you are planning to built would require you to study the framework quite well.
With cakephp you will be able to create CRUD (create, update, delete) operations quite easily with less effort, but for further functionalities you will have to study it's documentation and keep your cool while you learn it :-)
I have always found plain php to be all the framework I need.
PHP itself has all the features provided by the other frameworks
A superb templating engine, database access, parsing, and control logic.
The great thing is all these features implemented in a single unified component called "php".
The main problem is you need discipline to separate presentation, navigation, busines logic and database/persistence handling. You can have sql statements mixed in with your html, you can emit html directly from an sql statement in fact you have complete freedom to implement all the known anti-patterns and invent some of your own.
The "Java" and "Perl" frameworks generally provide things like request handling, template handling etc. which are missing from the basic language, but, these features are built into php. Most of what the "php" based frameworks do is force you into (a very sensible) MVC design pattern and save you a tiny bit of coding.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am refurbishing a big CMS that I have been working on for quite a number of years now. The product itself is great, but some components, the Database and translation classes for example, need urgent replacing - partly self-made as far back as 2002, grown into a bit of a chaos over time, and might have trouble surviving a security audit.
So, I've been looking closely at a number of frameworks (or, more exactly, component Libraries, as I do not intend to change the basic structure of the CMS) and ended up with liking Zend Framework the best. They offer a solid MVC model but don't force you into it, and they offer a lot of professional components that have obviously received a lot of attention (Did you know there are multiple plurals in Russian, and you can't translate them using a simple ($number == 0) or ($number > 1) switch? I didn't, but Zend_Translate can handle it. Just to illustrate the level of thorougness the library seems to have been built with.)
I am now literally at the point of no return, starting to replace key components of the system by the Zend-made ones. I'm not really having second thoughts - and I am surely not looking to incite a flame war - but before going onward, I would like to step back for a moment and look whether there is anything speaking against tying a big system closely to Zend Framework.
What I like about Zend:
As far as I can see, very high quality code
Extremely well documented, at least regarding introductions to how things work (Haven't had to use detailed API documentation yet)
Backed by a company that has an interest in seeing the framework prosper
Well received in the community, has a considerable user base
Employs coding standards I like
Comes with a full set of unit tests
Feels to me like the right choice to make - or at least, one of the right choices - in terms of modern, professional PHP development.
I have been thinking about encapsulating and abstracting ZF's functionality into own classes to be able to switch frameworks more easily, but have come to the conclusion that this would not be a good idea because:
it would be an unnecessary level of abstraction
it could cost performance
the big advantage of using a framework - the existence of a developer base that is familiar with its components - would partly be cancelled out
therefore, the commitment to ZF would be a deep one. Thus my question:
Is there anything substantial speaking against committing to the Zend Framework?
Do you have insider knowledge of plans of Zend Inc.'s to go evil in 2011, and make it a closed source library? Is Zend Inc. run by vampires run by evil vampires that want to take over the earth? (It was established in the comments that Zend is actually run by vampires.) Are there conceptual flaws in the code base you start to notice when you've transitioned all your projects to it? Is the appearance of quality code an illusion? Does the code look good, but run terribly slow on anything below my quad-core workstation?
Accepting answer
Thanks a lot everyone for your detailed feedback. I wish I could set up a bounty and distribute it evenly among all answerers.
Among many opinions favourable towards ZF, there was one very well founded one against. I took that very seriously and had a close look at alternatives, mainly Yii and Kohana. From that comparison and from reading some more opinions regarding ZF and competing products, I can see that Zend can be viewed as bloated in some fields compared to more minimalistic frameworks. (I can also see that this "bloat" is mostly with good reason to provide maximum flexibility. But the question whether you want maximum flexibility and deal with the ensuing complexity, or a simpler approach with clear guidelines, is a valid one.)
Anyway, I will go for Zend for the project at hand, because the main use I have for the framework there is as a component library. I do not want to adopt Zend's MVC model, I just need high-quality components for Internationalization, Session handling and so on. Because I am building a redistributable product, Zend's flexibility (e.g. the support for five different dictionary formats) is welcome to me. Also, ZF seems to be the only framework that allows the degree of freedom I want (No forced use of patters, file structures...) as far as I can see, no other framework offers that.
For future projects in which I want to make use of the actual MVC features, and totally submit to a framework's conventions on application building, naming, style, and procedures, though, I may not necessarily be going for Zend, but for a more minimalistic framework like Yii or Kohana.
Zend Framework is the best choice. Best framework API of them all, readable code, language conventions, good docs, comunity, support et all
My dislikes of it (subjective, mabe people are going to downvote me for it) are:
Zend_Form, has it's use, but in general is too obtrusive, I just want to structure my HTML not fight APIs and decorators.
Zend_Db_Table, powerful, but it needs a lot of work to accomplish your goals, and Rails taught me to be lazy. No, I don't want to write 3 classes for a model, one for the table, one for the rowset, one for the row, then bind them to each other and so on. I might need the table data gateway at some point, but for now I really want to interface this data with a quick active record.
no active record. With the late static binding in php 5.3 this might change ...
I tried really hard to use these two for a couple of months until I finally had it.
I overcame them by (ideas from Ruby on Rails)
use plain view helpers instead of Zend_Form as in:
echo $this->formText('email', 'you#example.com', array('size' => 32));
having my own Active Record like models ( http://www.phpactiverecord.org )
validate and filter on the model
for the really extreme corner cases, one can fall back to Zend_Form + Zend_Db_Table, although I never felt the need.
EDIT
There are some new kids worth checking out, like Laravel
The one thing ZF really wins over other frameworks is the router, controller and views, conventions, clean readable code, process.
Unless you're looking forward for a massive, giant project with 20+ developers, I'd - if I were you - would do anything including sacrificing an arm and/or a leg just to avoid Zend Framework.
The nice option you found out might look handy - to the point where you find other 1k+ setting that just looks like a waste of time and developer effort in the library. You'll soon find yourself in the middle of Customization Ocean, overwhelmed by settings, interfaces and abstract classes.
The documentation is not only detailed, but as a result very lengthy and complicated (similarly to the library itself). I want 3rd part classes to help me and not to get into my way.
The most important factor was the development speed for me, obviously. Without a bunch of colleges around you, Zend Framework should be seriously considered whether to be dropped.
There are too many people making wishes in the Zend issue tracker, too many people implementing code. To date, I've yet to see any serious vision behind those millions of lines.
My two cents really comes to down to one point: despite (or rather, because of?) it is backed by the PHP company, it is far too bloated for personal usage and small- and medium-sized projects.
My team is currently using Yii for a medium-sized project. It's not perfect either, but way more usable and developer-friendly compared to the big brother.
I don't have any big argument against ZF -- on the contrary ; of course, I have not used all the components yet (not sure anybody has), but I've never seen anything that looked "bad" when going through the sources.
When beginning a new project, I would generally go with Zend Framework myself, actually, if I'm the one who has to choose...
There's at least one argument I would like to add to your list :
Zend Framework can integrate with other components : you talked of using components of ZF in your application, but didn't talk about the opposite.
A great example is Doctrine (the default ORM of Symfony), which can be used with ZF quite easily -- and is much better than Zend_Db, in my opinion !
Besides that, I have to say that I agree with everyone of your points.
About the encapsulating ZF classes into your own classes : yes, you could do that (I sometimes do), but I wouldn't recommend doing it for everything : in most cases, it will probably not be necessary.
About the future :
Zend Framework is released under a BSD licence -- which means what exists cannot be closed-sourced.
Closing it would mean its end, anyway -- would be a stupid move, in the context of the PHP community
Work on ZF 2.0 is just starting (With PHP 5.3 as a requirement, btw)
Maybe, depending on your schedule for your application, it could be interesting ?
At least if you don't need to start developping before at least a couple of month...
We've been developing with ZF for almost a year now, and I really have no major qualms with it. Had a bit of a learning curve, but once I understood it, I realized how well put together this framework really is.
Compared to other frameworks, some people might point out the lack of a Model library as being a downside. I actually prefer not being told what to use, and integrating Doctrine with ZF is frictionless. If you're developing in PHP 5.3, and want an ORM, I would highly recommend Doctrine 2 (caveat: it's still in alpha testing).
The other great thing is being able to pick and choose what you want or don't want. I'm not a huge fan of Zend_Form, but I don't have to use it if I don't want to. Also, there's a very loosely structured plugin architecture that lets you really easily hook your own libraries into the framework.
So, I'm a pretty big fan of it.
One thing I am missing in the Zend Framework is a proper OR mapper. Zend_DB is ok but has some shortcomings, especially when dealing with huge databases (many tables) it gets very cumbersome. But there are a couple of OR mappers out there that can be integrated (e.g. zend-framework-orm or Doctrine as mentioned by Pascal MARTIN).
But yes, Zend is excellent, very powerful and I feel it is in some ways what PHP actually should be/should have been in terms of interface and functionality.
What I especially like apart from the obvious is the support for Dojo for rich client applications and the SOAP support.
I used ZF on a project as sole developer. Although the learning curve was quite steep, I didn't encounter too many of the problems described above. In general I found the framework very flexible, and the loose-coupling of the components made it easy to do my own thing when the ZF way of doing it didn't suit my needs.
But having recently started using python, I'd say use python ;)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am wondering why this framework (QCodo) is almost forgotten and totally unpopular.
I've started using it a few years ago and it is the only thing that keeps me with PHP. Yeah ... its development is stuck (that's why there is now more active branch Qcubed) but it is still very good piece of software.
Its main advantages:
Event driven (something like asp.net) no spaghetti code
Powerful code generation
good ORM
follows DRY
very simple AJAX support
is fun to write
Since then I wanted to be trendy and checked Django but I cannot write normal request-based web application (it just doesn't feel right).
Don't believe? chess.com is written with it and surely there are plenty others.
My 2 questions are:
Have you heard of it (PHP people)?
If you are using it what is your opinion about it (show us examples of your work)
Thanks
I've used PHP a lot for many years and never heard of it.
The creator(s) of Qcodo never really promoted the framework, and thus, didn't generate a large following. I believe they created it mostly for their own use, but also offered it up to others. It is awesome if you are looking for a code-generating framework. It does have a learning curve. So to get the most use of it, it's best to spend time studying the examples.
Qcodo has really had no active development for well over a year and there doesn't appear to be much chance that development will continue on Qcodo anytime soon. Qcodo appears to be dying a slow death.
Qcubed, a branch of Qcodo, is under active development and has been since Nov 2008. It was created by users of Qcodo who got frustrated with the lack of Qcodo progress. If you are just getting started, start here and not with Qcodo. But use Qcodo forums to search for problems/questions you may have.
Qcodo and Qcubed are fantastic frameworks. Don't discount or underestimate them just because you've not heard of them.
Emulating ASP.NET or Wicket in PHP is not a good thing to do. Moreover, the code style does not look good to me.
$this->btnSavePage = new QButton($this);
$this->btnSavePage->Text = "Save";
$this->btnSavePage->Visible = false;
$this->btnCancelEdit = new QButton($this);
$this->btnCancelEdit->Text = "Cancel";
$this->btnCancelEdit->Visible = false;
Hungarian notation? OMG. I need to create a big object to create a button? Heavy weight to me.
Yes, we do use it at Chess.com and overall have been very happy with it. It can get problematic trying to figure out how/where to store all those QFormStates when you're getting well over a million pageviews a day. Every page view is its own QFormState! We solved this by putting all of them into memcache! It does have a bit of a learning curve, but once you know it, you never really need documentation any more. I actually have moved away from using QQ entirely, and use all custom sql in our ORM files. QQ is just not powerful enough to do heavily optimized queries and highly tuned queries is more important than database abstraction. After all, the site needs to function and be fast. Here is one example ORM static method in our User class to load a random user from the database (we used to use this to show a random "user spotlight" on our members page). Notice how it uses the slave database, not our master (custom built function). It also uses memcache so that the randomized user only changes every 10 minutes (600s).
public static function LoadRandom($blnAvatarRequired = true, $blnForce = false) {
$strCacheKey = MyMemcache::QueryToKey("User->LoadRandom()");
if($blnForce || false === ($objUser = MyMemcache::G()->GetQuery($strCacheKey))) {
$objDatabase = QApplication::GetSlaveDbConnection();
$DaysAgo = new QDateTime(QDateTime::Now);
$DaysAgo->AddDays(-10); //make sure this is an active member
// Setup the SQL Query
$strAvatarReq = $blnAvatarRequired ? ' and u.has_avatar':'';
$strQuery = "
select
u.*
from
user u
where
u.is_enabled=1 and
u.create_date > '$DaysAgo'
$strAvatarReq
order by
rand()
limit
1
";
// Perform the Query and Instantiate the Result
$objDbResult = $objDatabase->Query($strQuery);
$objUser = User::InstantiateDbRow($objDbResult->GetNextRow());
MyMemcache::G()->SetQuery($strCacheKey, $objUser, null, 600);
}
return $objUser;
}
Qcubed and Qcodo are used by us in 3 projects and these ones are the cleanest and easiest to maintain projects we ever had! This is great stuff and easy to understand.
Just go into the code you won't need much manuals.
Qcubed community is much stronger at the moment so you might want to check in Qcodo forum for your answers on basic problems, but post on the Qcubed forum.
We will continue to stay with this fantastic product and community!
Regards,
tronics
http://www.twitter.com/qcodo
No, I'd never heard of it.
The main ones I've heard of are Zend, CakePHP, Symfony, Code Igniter, and one or two other ones I can't recall the names of right off the bat.
I've been doing PHP work on and off for about 3 years and have never heard of it. Ask anyone to name a PHP frameworks and you're gonna get the usual suspects: Code Igniter, Cake, Zend, etc.
Guess QCodo devs need to work on their marketing a bit!
I've been using QCodo for 2 years and now I'm with QCubed.
This is the nice way to develop and maintain web applications, as well as, the easiest way to deploy code and test it. Remember that QCubed is now growing in acceptance and it's good for all QCodo's Community.
I think that frameworks can save a lot of development time but it many cases it's not recommended for all yours web developments.
I started to use it two years ago. The pro:
code generation from the database
ORM object oriented
simple use of ajax
Cons:
qcubed community is not so skilled to carry on a project with new good ideas
the new code is not at the level of Mike Ho.
bugs in the state of qforms, the forms of qcodo/qcubed.
is not popular.
they do not want to go ahead and use DDD and forward engineering.
the forms only works with js enabled.
is written in PHP.
new plugin system poorly designed.
At the moment, Grails seems to be the best framework, very DDD oriented, with the possibility to use any existing Java code, good template library, possibility to use different js frameworks, built on Hibernate and Spring. With Grails is possible to write simple web app or financial application.
I hope not to use PHP in the future, but since I know Qcubed/Qcodo I will use it if it will be necessary. For newbies, I reccomend Symfony, bigger community, mre plugins, feature rich, it has a more secure future.
Updates:
No database migrations, no way to track database schema changes
No schema reflecting which tables are generated
It is not designed to real TDD, it is not easy to test models, controllers and views. They just added a testing framework to an unfriendly testing web framework
QForms still bugged and can loose status when using several controls and trigger Ajax error and blocking the application.
The ORM is very boring to use in the long term (lots of chatty/redundant code) and cannot be tested with a tool like Rails console, in the end it takes less time to use pure SQL and test it with phpMyAdmin.
Bugs in the ORM too, sometimes I get a string when I declared the field as integer (code-generated queries).
There is not a front controller and a routing system and the framework is inside the public path! The plug-ins are installed in the public path too!
Strange directory structure not similar to other MVC frameworks and they thing that the M stands for ORM only instead of model.
not link_to tag like Rails or Symfony and many other tags.
Over complex metacontrols that are useful to waste time only.
Framework focused in scaffolding when in Rails it is not used a lot since most of the developers use a user centric design instead of data centric one.
The views are full of object->render and JS and custom controls are a pain to be customized, and instead of staying inside a template are inside a class with logic session .. everything.
It does not work with PHP 5.3 (not tested but should be resolved) and on Quercus.
Rails/Grails has ton of plugin doing everything.
I could continue but I think you get the idea. Just learn Rails or Grails for few months then let me know what you think.
I am moving my Qcodo project to Rails and I have a wonderful environment, nice community and most of the innovation in the web is around Ruby and Rails. Rails has been voted several times as best web development tool and is the only one that can substitute Java or .net
While I have heard of it (Qcodo... not this fork) I never looked into using it. There are tons of frameworks and only so much need. PR and mindshare are hugely important in such a situation and Qcodo never really had either. Now that I am settled on a handful I have no time, nor inclination, to start learning a new framework.
This Swim Log uses it mySwimLog
I've been using QCodo since beta 2, and am now a core contributer of QCubed, so yes, I've heard of it.
What initially drew me to the framework was the code generation. I came from asp.net, and codesmith, and was very pleased to find a framework that gave me both the event-driven approach of asp.net and the code generation of codesmith.
I also love that it's all pure OO PHP, which means I don't have to learn a new language to develop my PHP app, and customizing any aspect of the framework that doesn't behave like I want is simple.
All of this has resulted in us being able to produce an easy to maintain and robust Learning Management System that we have sold to and host for numerous Fortune 500 companies.
There are some downsides, such as the runtime overhead of an ORM approach, but the readability and clean layout of the code results in the ability to more easily streamline other aspects of the application, and significantly reduces both development time, and the number of bugs produced.
Since QCubed is a community driven project, anyone is able to submit tickets, suggest improvements or discuss changes, it's very clear where the project is going, and very open to constructive feedback.
In defense of some of the negative things said here, I will simply point out that tickets for most of the supposed "problems" simply have never been created. And I would encourage anyone that does encounter any of them to please create a ticket for us to look at at http://qcu.be.
OK, Here is something I want to tell about this Qcodo / Qcubed thing:
Its brilliant. I just have no words about how great it is. You say CodeIgniter? Symfony? I say Qcubed.
It was when I wanted to start off the project I am working on and I looked into all those and through a Wikipedia article, landed on Qcodo site, and then on Qcubed...and I was surprised.
The features I loved the most:
No SQL queries needed. Of course, it can be done but most things are taken care of!
Speration of Templates from the core functionality.
Creating custom controls is a piece of CAKE (and its not CAKEPHP).
Totally Even driven. Saving states is like..."where does that happen?"
NO LEARNING CURVE. Just look at Yii or Symfony exmaples and then go for Qcubed examples. Its much simpler compared to others.
Full AJAX support. I love this.
No JavaScripting. Ask it to do something as a 'javascript' action, it is done by javascript. Change one word to 'QAjaxAction' and it goes to ajax. Change again, page reloads. What more do you want?
Autocomplete, typecasting (both automated and manual control) and what not!
Inline editing of almost anything!
yeah, there are a few cherries on the ice cream when it comes to Yii. But I think Qcodo has more inside.
You say Authentication support? Well, I created one to integrate with Qcubed in 1 day. It saved a week of lerning headaches with other frameworks. Qcubed rocks.
yes, I hate its slow development. But I think its near to complete! (may be I know too few things but anything I am capable of imagining seems to get solved through Qcubed).
I wish it was more popular...I would have saved me a week of search before landing on their pages.
I have used QCodo/QCubed for 1.5 years now. Started with my own framework, which at some point seemed messy. That's when I started looking for a more mature framework. Luckily I found QCodo. Since then I have never even considered looking for something else. The framework is so flexible and powerful, that you can do everything you want with it.
I had almost no experience with event-driven architecture. So, the beginning was somewhat hard, cause there was few documentation available. But community itself is very active and you probably get answer to your newbie questions in 1-2 days (sometimes even in hours). But currently the documentation level is way better and community is even more active :)
Nothing I can complain about. And if I have some problems/suggestions, I will try to discuss those with core developers. Whining about stuff without constructive discussion is lame imho.
I have used QCodo/QCubed for 3-4 successful projects now. The more I use it, the more I like it :) And also, I'm trying to help developing even better framework whenever I have spare time. And I can say, that I have had more than 10 people, who I have convinced to start using QC now ;) And I hope there will be many more.
QCubed totally rocks!
Never heard of it.
Been doing PHP on and off 4+ years
http://www.piranhamethod.com/2009/04/09/qcodoqcubed/
I have heard of it and I love it.
I also came from a dotNet / Codesmith environment. When I picked up a project that wanted to translate a dotNet site to PHP I looked for a framework that could best emulate the way the original application's logic was set up. What I found was either bloated frameworks or frameworks that did not completely fulfill the projects requirements.
I accidentally found QCodo while researching using the MyGeneration tool for PHP code generation. I have not looked back since. The ease of use, ability to quickly build complex applications and the true OO approach QCodo now QCubed uses makes it the best framework for my purposes.
I've been using QCodo, ZCodo and now QCubed for quite a while now.
I actually picked it as a replacement for CakePHP, which at the time of my need, wasn't mature enough to do the things I wanted.
I'm super happy with it as a framework; it abstracts things just enough, but not too much that you lose sight of the programming.
I plan on using it for any development project I'm responsible for in the future, and I'm looking forward to QCubed being the best community maintained framework for PHP5 out there.
The quick reason is that popularity and success do not generally go with what's technically best. I'm sure any techie can come up with numerous examples. There are numerous things that can promote mediocre solutions, like marketing, first-mover advantage, being a touch better in some area that catches people's attention, being used in some high-profile application, or just plain luck.
The other reason is that what appears technically best to you may not appear so to somebody who's doing something different.
I think that QCubed is great and mainly because of the way you can use Ajax (you dont have to write Jscript and you dont have to use jQuery).
One very useful document: http://www.qcodo.com/demos/QcodoClassLibrary.pdf
I chose QCodo 4 years ago to develop our product. I've never regretted - now we're 3 developpers on the thing, and any non-OOP solution wouldn't work. We have installed almost 50 customers with it - on Apache, IIS, my SQL and SQLServer platforms, Linux or W2003.
F
The design is brilliant, code-generation is great, and it's really easy to develop, extend, and maintain. I can't read any other code now...
Yes, marketing is quite poor, and the project used to depend just on the creator (Mike Ho). All of it moved to Git recently, and marketing should be better soon. And, now Mike Ho is back !!!
I have used it in few projects involving Flash remoting but I only use the ORM in the framework as I don't really like EDP stuffs like .NET. The flow doesn't seems right at all for stateless web. It's great if the ORM can be released as a separate component.
I never heard about it.
I didn't used it.
qcubed community is not so skilled to carry on a project with new good ideas
Nonsense
the new code is not at the level of Mike Ho.
Nonsense
bugs in the state of qforms, the forms of qcodo/qcubed.
??
is not popular.
So what
they do not want to go ahead and use DSL and forward engineering.
Your point? Every framework that doesn't want to go your route is wrong? I for one would not want the suggestions you have made
the forms only works with js enabled.
You have to be kidding right? If users don't have JS enabled, then they're in the stone age...
is written in PHP.
No comment
new plugin system poorly designed.
Based on what do you say that? I would say nonsense to this as well
Clearly there is some hidden agenda with this poster...I've also had a close look at Symphony - and I would go with QCubed over Symphony every single time. For big apps or small