Home >Backend Development >PHP Tutorial >One person website development
What I wrote before: Some time ago, a friend was planning to do something related to education. He was in Shenzhen, a big city, and he always wanted to use his spare time to take a certificate, attend a training course, etc. to recharge his batteries. , a bookstore that I often go to is always full of people attending lectures, and even the floor is full of people. So he thought, could he do the following thing: He would create an intermediary platform and gather some people who wanted to attend classes (apprentices), and at the same time gather some people who could give lectures (masters, I think many people who have worked for many years , in a certain aspect, I must have accumulated a lot of useful information, and I want to express it quickly. At the same time, while earning my own hard salary, I can contribute knowledge and earn some extra money). This is probably what he did when he divided the money he received from his apprentices with his master. As for connections, venues, etc., everything can be done, so I wanted to make a website because I was doing it while working. Therefore, I want to do this by myself and don’t want to trouble others. If I ask for advice, there are probably three requirements: 1. Able to develop quickly. 2. It can be modified relatively flexibly later. (Wordpress still feels not very flexible) 3. Develop by yourself, and do all the art and background work by yourself, as much as possible to suit yourself. Hence this article.
Before I officially start writing, let me make a statement:
1. Purely independent writing, without any interest relationship with any party. It is just like chatting with a friend and telling him about the plan I provided him. The only thing that has some publicity effect is this The WeChat official account at the bottom of this blog is nothing more.
2. My friend knows a little bit about computers and a little bit about messy website knowledge, so the website development I wrote is just tailored for him. It will be different from the classic method of Daniel. I hope I will despise it a little.
3. There are many masters in the blog garden. If it can inspire beginners, it will not be a waste to code so many words.
==========Formal content begins==================
A formal website development theoretically requires the cooperation of a team, each of which can exert its own capabilities. Strengths include website demand analysis, prototype design, renderings, cutouts, front-end art, back-end code, algorithm design, database design, server configuration, and a series of other things. It still takes some time for a person to cover all of these. So for a beginner, my advice is: don’t worry about it. Don’t you want to develop a website? Don’t worry about whether you understand it or not. Develop one first and then talk about it. During the development process, if you encounter problems, then In the process of finding solutions, I learned a lot. After I completed a website, I also learned some messy knowledge. With a perceptual understanding, it is not too late to study systematically and in-depth.
Here is my development idea and specific implementation method:
Developing a website probably includes these things:
1. There is an overall website page, let’s call it front-end development.
2. There is a front-end. Clicking on buttons, links, adding information, modifying information, etc. requires back-end coding. Let’s call it back-end development.
3. We have the front-end and the back-end, but where should we put the data? Therefore, we need to use a database. Let’s call it database development.
4. After the previous step is completed, the website can be viewed. Next, you need to find a server to publish it. Let’s call it website publishing.
5. The website is published. If you want others to access it through a domain name, you need to bind the domain name. Let's call it domain name binding.
6. You’re done, let’s go back and digest it. Let’s call it endless aftertaste.
Details will be introduced next. (It is recommended to read through it first, and don’t get caught up in a certain detail as soon as you get started)
1. Front-end development
1. First take a pen and find a piece of paper, and roughly think about what pages your website has and what each page looks like. If you don’t have inspiration, Just browse around on the Internet for a while and learn from other people's practices.
2. I have an idea of what the website will look like, and now it’s time to develop it. Don’t write the code from scratch. You can use a front-end framework. I won’t compare various front-end frameworks, and don’t give you a headache to choose. Just use bootstrap. URL: http://getbootstrap.com/, developed by Twitter engineers. Many websites are useful, so developing a makeshift website is not a problem. To put it bluntly, it provides you with css and javascript files. For some page layouts and javascript effects, you don’t have to write them yourself. You can directly follow the official instructions. For specific instructions, you can check out the official website. Don’t blame them because they are in English. In fact, there are few words you don’t know. Search and practice first to get a feel for them.
3.What? During the process, you encountered problems with html, css, javascript, etc. If you don’t understand them, I suggest you go to this website to learn about them: http://www.w3school.com.cn/. If you practice on your own, the knowledge should be enough.
After the first three steps, you should be able to develop a website with similar effects. It will take about a week to look at it. It is enough.
Note: During the front-end development process, you don’t have to think about how to implement the back-end? For example, how do you click a button to implement a function? Just focus on developing front-end pages. The front-end and back-end are independent and require only minimal integration.
2. Backend development
1. If the front-end pages have been developed, then you need to implement some functional things on the page. If you want to register, log in, etc., you need to develop the backend. I also recommend using a framework here, and the backend development framework is also a sea-level development framework. If you don't, just use Thinkphp. The domestic framework is okay, but the routines are quite obvious. Website: http://www.thinkphp.cn/, it’s PHP, what? Have you never learned PHP? Did you learn C# before? java? Wait, don't worry, it doesn't take long to learn PHP. The key is to learn PHP while learning ThinkPHP. How to learn ThinkPHP, you can just read the official documents. If you don't understand, you can watch this buddy's video tutorial: http://www.thinkphp.cn/document/258.html, it's pretty good.
2. After watching the video tutorial, I am still a little confused about what MVC and other concepts are. Don’t worry, just keep moving forward. You may be able to understand it slowly. Who said you can’t move forward if you don’t understand it, right?
Note: This process may be a bit difficult, but it is still acceptable. Once you understand it, you will be more flexible in modifying it in the future, at least it feels more flexible than wordpress.
3. Database development
1. During the background development process, you need to save data and inevitably use a database. Then install mysql. If you find it difficult to manage, you can install another visual tool: Navicat. What do you need? Just create whatever table you want. Anyway, if it feels inappropriate in the future, you will have to modify it.
2. If you don’t know anything about databases, just search for relevant knowledge on the Internet. You will probably be familiar with it and you can create tables and add and subtract data. Some database operations are very simple using the ThinkPHP framework, and you don’t need to think too much about it.
Note: Database development must be coordinated with backend development. The backend development is probably completed and the database is almost built.
4. Website publishing
1. There are many servers that host code, some are paid and some are free. I will recommend one. Use Sina's SAE. The speed is okay. Find one to try at the beginning and wait for later. When you have time, you can try other products. Here SAE is the SAE version that supports ThinkPHP. So you can see the effect by uploading the code. After publishing, the URL will probably look like: ****.sinaapp.com
2.SAE charges according to the access traffic. If you get a real-name authentication, the traffic will be sent. For those who are just starting out The website is enough; if you are not sure, you can apply for an intermediate developer and you will get free traffic every month. Previously, you could apply for an intermediate developer by adding a V on Weibo, and you could just add a V on Weibo and upload a photo of your work. Now I am a mid-level developer and I can help out if you need recommendations, but I don’t use them much anyway.
3. If you want to view it locally, you can install an Apache. As for deployment, it is not difficult.
Note: I think it shouldn’t be difficult to get to the publishing stage. Although I was at odds with Sina in the past, I still selflessly advertised for him today. On behalf of Sina, I would like to thank myself. (Please don’t call me naughty)
5. Domain name binding
1. The website is built. If you feel that ****.sinaapp.com doesn’t look good and want to use your own domain name, that’s fine.
2. Go to Godaddy to apply. Why Godaddy? Others said it was good, so I used it. Anyway, I applied for two domain names, but I haven’t used them much so far, just for fun.
3. Once you have a domain name, you can log in to the SAE backend and bind the domain name. The operation steps will be explained in detail.
6. Endless aftertaste
1. After a series of processes above, a website that you think is okay should be born.
2. If there is anything else you want to learn during the process, you can learn it.
3. After developing a website, this set of templates can be saved and used by yourself when developing other websites.
4. After many years, you will feel that your website is low, but so what, this is just a taste of life.
We have talked a lot. If you have any questions, you can discuss them with each other. I hope it will be helpful to you.
Reprinted with the permission of the author
More java http://techfoxbbs.com
The above introduces one person's website development, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.