I recently learned php and read two Basic Books. next I want to read some excellent php code. do you have any suggestions for the code of open-source projects?

Source: Internet
Author: User
Tags smarty template
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply: I don't know why so many people recommend discuz. I'm speechless. Is it definitely a bad guy.

Let's talk about why discuz is not suitable for learning.
  1. There are many redundant fields in the database. I know this is to optimize the performance, but it makes a beginner feel embarrassed.
  2. Who can say that the discuz architecture is suitable for secondary development?
  3. Community problems and other frameworks all have good communities (of course popular frameworks). good communities will be of great help in future development.
  4. Discuz is not purely open-source. it looks like open-source, but does not have the core of open-source projects-no third parties provide them with core code or plug-ins... It cannot be counted.

If you want to take a long journey on this road, you will start to look for mysql information. The basic SQL statements must be good, and you must master the relationship between each data, 1-n, 1-1, n-n, the first basic relationship, how to implement queries, how to design, there must be a clear idea.

When you use php + pure SQL for several simple projects, you will consider how to encapsulate SQL calls and manage database connections. At this time, you need to understand the framework, so I recommend that you start from yii. The core is to understand the M layer, because most of the frameworks of M are the same as those of MVC. M also contains a more ActiveRecord, many languages have similar implementations in many frameworks.

Learning is a gradual process of searching for order, and skill-based learning is based on field operations. Therefore, learning and development are hooligans if you do not do anything. Framework source code.

For example, zend framework.

At the beginning, I started to read the source code of the Yii framework and applied it to its code style and design mode. Wordpress, ZendFramework, CodeIgniter

Drupal and Joomla are not recommended if they are not very specific! . With a certain php Foundation, we recommend that you build a small website to exercise.
Then, you can look at the CI framework and use your own experience to see how other people build a German framework.
Next, download some common free systems to see how others do it, such as phpcms and discuz. you can see the process-oriented code such as dz, learn how to implement the function and build the database structure. Earlier versions are better, and 6.0 is enough.
Wordpress is not recommended. The Structure of wordpress is quite complex, and the database structure is chaotic. it is not a good work from a technical point of view.
Zf, ci and other frameworks are also better to look at, it is not easy to get started. Mvc is a design pattern. it is better to study mvc after various functions are developed. (but the structure must be clear when writing code, do not mess up html ).
In addition, the smarty template is not recommended. Smarty is very boring to use the template syntax. There is a PT source code, NexusPHP, which is well-written. It provides well-known functions such as intra-page search, P2P, Tracker, and database indexing, and discuz is widely used in China, and the efficiency is also very high, you can study the project structure, the core code, and the code of some community websites, such as thinksns. You can also use some useful frameworks ThinkPHP and zendframework to deepen your understanding of the framework and mvc.

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.