Recently studied PHP, read two basic books, next want to see good PHP code, we have what open source project code recommendation?

Source: Internet
Author: User
Tags zend framework

Reply content:

I do not know why so many people recommend Discuz, I am more silent. Definitely with the bad guys.

First talk about Discuz why not suitable for study.
    1. Database Redundancy field Many, I know this is to optimize performance, but this makes a novice sentiment.
    2. Architectural issues, who dares to say here, Discuz architecture suitable for two times development?
    3. Community issues, other frameworks have good communities (of course a popular framework), and good communities can be very helpful in future development.
    4. The nature of Discuz, Discuz is not pure open source, the shape of open source, but there is no open source project the core of things-no third party for its core code, plug-ins or something ... Not counted.

If you want to go long on this road, you will start looking for MySQL data to see, the basic SQL must be better, at the same time to master the relationship between each data, 1-n, 1-1,n-n This first basic relationship, how to implement the query, how to design, should have a clear thinking.

Once you've done a few simple projects with php+ Pure SQL, you'll consider how to encapsulate SQL calls and how to manage database connections. This time, you need to understand the framework, then I recommend you start from Yii. The core is still to understand the M layer, because, MVC three things, for M definition most framework is the same, M also contains a more activerecord, many languages can see a similar implementation of many frameworks.

Learning is a gradual process of search, skill class learning to be based on the operation of the field, so, all do not do something, learning and development are bullying. Framework source code.

such as the Zend Framework.

I started from reading Yii framework source, and was impressed by its code style and design pattern. Wordpress, Zendframework, CodeIgniter

Drupal and joomla! are not recommended if the goal is not very clear. With a certain base of PHP, it is recommended that you build a small website to exercise.
Then, you can look at the CI framework and combine your own experience to see how others Jiande the framework.
Then, download some common free system to see what others do, such as phpcms,discuz can look at DZ this process-oriented code, learn how to implement the function and the construction of database structure. The version is a little bit better, 6.0 is enough.
The structure of wordpress,wordpress is rather complicated, the database structure is chaotic, and technically, it is not a good work.
ZF, CI and other frameworks are also best not to look, to get started is not easy. MVC is a design pattern, until the development of a variety of functions are basically handy to learn MVC better (but to have the idea of MVC, write code when the structure must be clear, do not make the HTML mess).
Also, it is not recommended to learn smarty templates. Smarty abruptly in the middle of a layer of things, play a role is not obvious, but also to use the template syntax, very boring. There is a PT source code, nexusphp, write very good, in-page search, peer, Tracker, database index, the function is very full discuz domestic more well-known bar, and the efficiency is very high, you can study the structure of the project, as well as the core code, can also study some community site code, Like Thinksns or something like that. You can also deepen your understanding of the framework and MVC by using some useful framework thinkphp,zendframework.
  • 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.