What kind of framework is easier to get started with when newcomers just touch PHP?

Source: Internet
Author: User
Tags php framework codeigniter yii ruby on rails
Contact PHP soon, but want to understand the next PHP framework, familiar with the idea of MVC, have not touched this kind of framework before, want to ask you what good framework can be recommended, consider the starting point is what. Especially for new people ~

Reply content:

I used to see the framework of English, in StackOverflow and Quora also saw a lot of discussion, in fact, the framework of this thing, is largely a matter of habit. Another point is to choose a framework that is often maintained. If you learn some of the unpopular framework, the result is not maintained, it is actually very wasteful.
Summarize some of the frameworks I've used:
    1. CodeIgniter: I used the 1.7 version, the code is generally efficient, because it is compatible with PHP 4. PHP 4 was discarded after 2.0 and the code was cleaner. The official documentation is very detailed and the community is large, with a lot of people. The disadvantage is that there is no good ORM library, the default model is based on ActiveRecord, but it is actually an extension of SQL.
    2. Zend: The so-called official PHP framework, which is loosely structured, can be used as needed. It's not very good at first, but it's also very efficient if you really understand. Because there are zend in the back, so do not worry about the problem of maintenance. The downside is that the document looks a lot, but it's not easy to read.
    3. Symfony: It should be the old framework of the French, very large, suitable for enterprise-level projects. Many configurations with Yaml, and the requirements of the environment is very troublesome, I simply looked at it and gave up.
    4. Yii: Should be developed by the Chinese, and friends used to develop the time, performance is very good, but the inside of the coding style is not very like, the document is also good.
    5. Kohana: Used to be CI-based, but later rewritten the code, but inherited the CI philosophy. The HMVC architecture is not very easy to learn, but the code is very clean and efficient. The self-brought Orm is also good, the drawback is that the document is not comprehensive.
    6. Editor 1: almost forget cakephp: This is the first frame I've touched, and the most like the framework of Ruby on Rails, Bake script can generate a lot of things automatically, but I'm not very fond of automatic generation. Running slower, probably overhead too much. PHP 4 is supported, but later several core members built a new PHP 5.3 framework called lithium (http//lithify.me/), native support MongoDB, I just looked at the document and it didn't work.

The above is a common frame, also is ComprehensiveThe framework. Here are some of the unpopular, lightweight:
    1. Slim framework: My personal favorite lightweight framework, based on RESTful route organization, compressed package is only 80KB. Inheriting the philosophy of Sinatra and web.py, I have discussed with the author before, he changed from Singleton to instance in 1.5, but I felt no need, I liked the 1.3 version. This is not considered to be a full stack MVC framework, nor is it mandatory to require OO.
    2. LIGHTVC: This lighter (compressed package 24K), only provide VC, do not provide model, do at the same time thanks to an ORM called coughphp, together good.
    3. Flourish Lib: This should not be a framework, but a collection of libraries, many Lib very useful.

Finally recommend an ORM, the general popular is doctrine and propel, my own favorite is Redbean. Now the development is to use slim to do the route, copy some code from flourish, and then use Redbean to do ORM, although it looks very detours, to the time I get used to, easy to be OK. It is strongly not recommended for beginners to get started frame!
In addition, what is the relationship between Yii and CI? I recommend Ci-codeignighter.

Here are a few reasons:
    1. Mature development Community, there are a group of people with you learning this framework, you do not understand when you can ask, in the domestic Chinese community (http/codeigniter.org.cn/) .
    2. Relatively easy learning curve, contrast ZENDFRAMK, its syntax is relatively simple, and there are some matching books can be consulted, although older, but still have reference value.
    3. Detailed help documents, CI's official blog on the Userguide, can help you quickly understand the relevant grammar and functionality, very detailed, and the CI framework itself has made a lot of comments.
Summary: It can be said that CI for beginners, is a very good framework, easy to get started.

NOTES: List of reference books
CodeIgniter for Rapid PHP application development
/ http Book.douban.com/subject /3065901/ If you are new to PHP, I do not recommend touching the frame first. Within the framework there are many refined things in the inside, it is easy to let people know that they do not know why, not conducive to the training of basic skills.

MVC is a programming idea that has little to do with frameworks, and you can be familiar with MVC without being familiar with the framework, and you can also be familiar with frameworks without being familiar with MVC PHP as / http ASP Such an MVC architecture, like CI, is implemented through MVC in a router way, and personal advice is to start with the basics, and then use the framework after a thorough study. When you re-use CI, Zend and other PHP frameworks, you will find that the essence is essentially the same, know it, better know why. Domestic words, English is not very good recommended thinkphp or CI documents are all compared.
English good recommendation Yii recommended or choose to learn PHP basic first, then consider CI, speedphp, thinkphp, the following two Chinese documents relatively complete. PHP new, it is recommended to master PHP, later to learn and consider the framework.
PHP framework, see your favorite bar. My team is using CI

Thinkphp,ci are very good, the relevant Chinese learning documents are also many.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.