Is changing PHP framework easy or difficult?
I've decided to go with codeIgniter as my 开发者_如何转开发php framework because I am relatively inexperienced with php (only about 6 months of studying so far), and heard that Zend is for a more advanced level.
So if I work with codeIgniter for a year, and then decide to switch over to Zend (if I decide to), how long would it take to get through the transition between the two frameworks?
Codeigniter is a framework built for usability by programmers such as your self, where you have not a great amount of experience in PHP, and provides a simple API to create websites easily and fast.
Zend on the other hand is not a framework of the same nature, where Code igniter has specifically been constructed to act exactly as you would require to act Zend is more of a component framework, Where everything is provided but you would have to build it yourself.
That being said to work with Zend you would have to understand concepts such as MVC, OOP, Relation Mapping etc to be able to build websites effectively.
Zend is not just a framework for the Web, Its also a gateway in creating applications via the command line. - I know that CI 2.0 Supports CLI but its not built for it!
For instance, I could remove Apache web-server from my system, and build a HTTP Server using just PHP and Zend via CLI, it would use the components to interact with other segments of my server such as services etc,Monitoring port 80 and parsing http headers and perform the correct action such as execute the requested file via PHP CLI.
If i can put it in lamen's terms i would say that Codeignter is Cake that has been backed and is ready to be sliced and shared with the world, Zend on the other hand are the ingredients on the table, Ready for mixing.
You should know that starting to cook a particular cake for the first time never goes right, it takes time and effort, trying new things before you can get it to how you like it.
Starting with Codeigniter would be a wise choice, This will learn you the fundamentals of Objects, Inference, MVC, Database Abstract, Libraries, Directory Structure's and many more things that you would use creating and advance system for your site.
Saying that, Migrating over to Zend would be a little tricky if all you know is Codeigniter as its a totally different platform, Its like jumping from Windows to Apple, they both perform the same job but its never the same.
So its no so much that the transition is measured in units of time, but more units of skill.
Resources:
- Why choose the Zend Framework over other PHP Frameworks? (Kevin @ KillerPHP)
Hope this helps.
It all depends on how much experience you really have as a developer. But it took me a couple of weeks to get to know Zend Framework well enough to use it for real websites.
It depends on how much you are coupling yourself into a framework. By the time a year rolls around you will realize that there is no way you are going to switch a framework(unless you have loads of spare time-- which is never true).
Don't go into it expecting to switch. The more complex your app gets the more work required to switch. You can make the switch, but the tricky part will be things like your ORM, not to mention touching every part of the project to make sure things are working.
I think you have a solid choice in CodeIgniter or Zend Framework. Thanks for using a framework period. Get good at one and maybe try the other on a separate project.
Its all depend on how well you know the php framework really are. Are you familiar with the framework structure, function, API, etc. So if your plan is to change to ZendFramework then this all depend on how you can access the framework's Documentation (Here i assume you don't ever use ZendFramework before), because codeIgniter and ZendFramework are have a different API call. More easy to understand framework's documentation (APIs, reference guide, tutorial, etc) to you then faster for you to do the translation between those two. IMHO ZendFramework have a lack of API's documentation and take long time for me to understand the implementation. Try compare it your self with another php framework documentation.
I work with Zend and have done so for over a year now, it's not a very nice framework (if you can even call it that). It feels to me like a heavier version of Codeigniter, the only difference is Zend has Auth and ACL components, as well as a really powerful ORM component baked in.
Having said that, the things that Codeigniter lacks in comparison to Zend is overshadowed by the awesome and non-convoluted documentation which explains everything a lot easier than the Zend documentation which drowns you.
I had to convert over a small CMS I built in Codeigniter to Zend at work, luckily a colleague helped me (he's really big on Zend) and it was a bit of messing around considering controllers and models are different in Zend than they are in Codeigniter.
If I were you, I would switch over to Kohana from Codeigniter, or perhaps even the new kid on the block FuelPHP which is kind of like a mix between Codeigniter and Kohana. Zend is far more complicated than it should be in my opinion and more suited for enterprise applications and to be honest, they are not a lot of enterprise applications built on Zend that I've encountered.
精彩评论