How to develop a website

Source: Internet
Author: User
Tags php and mysql php framework zend framework

I hope this article is helpful to the beginner's friends. So I wrote this article for the purpose of

How to develop a website? Developing a language is not an issue today we are going to start with PHP.

One. Development environment: We are familiar with the lamp is the current popular architecture that is linux+apache+mysql+php the beginning of the friends of the main focus on PHP and MYSQL.

What you need to know about PHP: basic syntax-----> Functions-----> Regular--------> Arrays (Arrays I would like to emphasize that arrays are very common, it is important to lay the groundwork for special attention to the use of multidimensional arrays)--------> Session and Cookie (this is also the heavy-weight HTTP is stateless a site left out of the user no meaning need to master these two later I will detail the cookie and the session principle and application)

------------> Object-oriented (this is not important, I'm talking about it. There are many benefits of object-oriented development such as the Inheritance interface abstract class Magic method and so on not only can make the code redundancy low more extensible now popular PHP framework is the basic MVC object-oriented development of the hope that everyone will take this To figure out what's behind the development. I'll go into detail about object-oriented use and how to design a framework. I said these people need to take the time to understand the PHP this piece you can, it seems very few, but the things are still many, I hope you spend more thoughts.

What you need to know about MySQL: additions and deletions-------some of the functions connected to the >php-------> database table design-------->mysql storage engine (which scenarios I'll write a blog about the storage engine later.---------> Index (what is it?) How to use it? You're going to go check the information.------> Triggers------> Stored procedures-------> use of cursors-------> views and so on some concepts I'll write a brief introduction just to get started But the basics need to be mastered and understood

Two. Choose an appropriate development framework for your PHP framework in recent years there is certainly no shortage of high-performance, easy-to-use frameworks such as the Kohana Zend Framework thinkphp Yii and so on only for your own without the best frame of course you can also develop yourself (using these boxes Frame requires you to have an object-oriented basis)

Three. Version Control SVN We know that developing a Web site is a collaborative development that requires a version-controlled software to standardize our code (go ahead and search for SVN to build a try)

Four. The FTP server is used to publish our code officially on-line run (same as everyone build one)

Five. From here we enter the business aspect: a diagram to indicate the development process of the specific development process according to the actual situation

650) this.width=650; "Src=" http://img.blog.csdn.net/20140915222234411?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvewpjbg92zq==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "/>


Six. Architecture changes

At first, our system is generally the Apache and MySQL are placed on a machine with the increase in traffic, we generally from the optimization of the bottleneck is generally in the storage of the language itself is not a big bottleneck we can do database sub-table (horizontal and vertical) MySQL has its own partition technology We'll describe in detail the following simple improvements

650) this.width=650; "Src=" http://img.blog.csdn.net/20140915222317826?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvewpjbg92zq==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "/>

There's a problem here. We know that the session is on the service side. Once the LVS is polled on a different server, session sharing becomes a problem solution a lot of the time I take the session to do centralized management write to the database  In this way, you can share the session to ensure that the normal access there is a problem is the login delay because the primary server to replicate to the server when it takes time to normally be very quickly there may be users clearly logged in the page after the refresh or is not logged in the state and then refreshed and logged in This is because the primary server is replicated to the slave server.

Seven. Design principles The following principles are I in the work to find out whether I feel or to their own help relatively large share with you

1 controllability: Any function must be controllable. For example, when we design an open interface, we need to design the interface that can be accessed by the docking account and the number of calls to each interface within the same time period, and so on, all of which need to be controlled to make our program more flexible.

2 Traceability: Any operations need to log records to trace the history of the problem: such as who in the period of time to manipulate what browse what and so on this kind of data we do not only to track down the reasons can also accumulate data for later data mining preparation (there is data to do what is more convenient We can also use the strategy and so on later)

3 Extensibility: A feature can be extended as much as possible this requires that some common things be left behind to derive

Eight. Some of the common design ideas

1 Async: Many times we do things do not need to do one-time we can do in batches for example: A user after registration we need to send an email to let customers activate we can send the mail to the asynchronous processing

When designing, we can add a message to the database and then run it with an asynchronous script in a timed way.

The docking between the 22 systems is also very common and we need a protocol to connect the two to each other first, like Phprpc.

3 modules distributed: In applications we need to split the module to separate out some large cumbersome processing data modules to communicate through the middleware and the message mechanism the advantage is that you can focus more on your own functionality more scalable

Nine. Some of the concepts mentioned above will be shared with all of you later.


This article is from the "Like Fate" blog, please be sure to keep this source http://xiyudongqing.blog.51cto.com/2380647/1556713

How to develop a website

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.