"Android system source code scenario analysis" Serial memoirs: The Source of inspiration

Source: Internet
Author: User
Tags php and mysql ssh access

Last month, after spending 1.5 hours, I wrote 55 articles, analyzing the implementation of chromium on Android, and the WebView of Android based on chromium implementations. Learned a lot of things, but also very tired, on average less than two weeks an article. Originally want to rest a period of time, then continue to analyze chromium use of JS engine V8. But one night, lying in bed can't sleep, unconsciously want to create a personal site, used to serial "Android system source code scenario analysis," The content of the book.

The thing is that, lying in bed can't sleep, went to apply for a domain name, 0xcc0xcd.com. Domain name application to, can not not use it. What do you use it for? Think of the book I wrote, "Android system source code scenario analysis", published since October 2012, also has more than four years of time, got everyone's thick. However, there are some pirated PDFs appearing on the internet. Needless to say, quality must be poor. Let me just release the contents of this book on my personal site. After obtaining the consent of the publishers, he started to do it.

The website name is "attack programmer", mainly in order to cooperate with 0xcc0xcd.com this domain name. Older drivers from the Windows era may see what the domain name means at a glance. Do not understand, if everyone is interested, I can also say in detail later, miss the Lost youth.

It took less than one months from the beginning to have ideas, to build the site, and to put the contents of the first three chapters (preparation knowledge, hardware abstraction layer, smart pointers). In less than one months of time, learned a lot of things: application domain name, cloud server, domain name resolution, domain name mailbox, website filing and development site and so on. Because I have been doing client development, just graduated a few years to do is the Windows client, behind the Android side, did not do site-related development, including the front and back end, so the learning process is still some minor twists and turns. But overall it was quite smooth. It is also related to the technical selection of the website.

Now is not advocating to be a full stack engineer? The process of building a station is also a small practice. Afraid of a long time will forget some of the key details and stepped on the pit, so plan to build the station serial book process recorded. Also hope to be able to help the students who are interested in doing the whole stack of engineers.

The site uses the LNMP architecture, as shown in 1:


Figure 1 An attack on the programmer's website architecture

Web site running on the cloud server, the system is installed in Ubuntu 14.04, in addition to Nginx, PHP and MySQL, but also a git repository, used to manage the site source code. This git repository, in addition to managing the site source code, is also used to distribute the source code to the site.

Specifically, the website is developed locally using its own computer (in fact, using Vim to edit Web pages and PHP). After the test is no problem, use the git push command to upload the source to the Git repository. Then log on to the cloud server and use the git pull command from the Web site root to get the latest website source from the Git repository.

In addition, a management background was built on the premises. This management background is used to administer the website to the administrator. The main thing is to manipulate the database, such as viewing data, inserting data, updating data, and so on. Regular websites are dedicated to providing some pages for administrators to work with. Since this site is not very formal, the administrator is a technical control, so the direct use of the Python script to implement the management background, want to what function directly write a script.

Oracle provides a python version of MySQL database driver library MySQL Connector/python, which makes it easy to manipulate data in MySQL with a Python script. Such a simple management background is built up.

The architecture of the entire site is very simple, very quick to get started, and it perfectly formed. The front-end of the website mainly uses AJAX, jquery development, the back end does not use what tall still frame, basically is the freehand writing PHP. The main thing is to consider this site to do is very simple, is the serial "Android system source code scenario analysis" content, the basic function is to browse and comment. So it's in the simplest and quickest way possible.

To make it easier for people to read the contents of the book in Time of fragmentation, the website offers a mobile version while providing a PC version. The features of the mobile and PC editions are the same, but their page representations are different. Therefore, the site at the beginning of the design, the consideration of the modular and code reuse, with the minimum cost to achieve both PC-side and mobile-side functions.

Don't know why, speaking of PHP, always think of "PHP is the best language" sentence. From this one months experience, PHP is not the best language do not know, but to build a website, PHP is indeed the best language. With PHP and JS development site, efficiency than with JAVA/OC development app, much higher. However, the experience of the website is less than the app. So mobile development is now the king.

Next, I'll use a series of articles to share the entire build process, including:

1. Domain name, cloud server, domain name resolution, website filing, domain name mailbox, CA certificate request

2. LNMP development environment, including how to configure HTTPS sites for SSL encryption

3. Git repository support for SSH access

4. Website basic function Development, PC version and mobile code reuse

5. Management background development based on MySQL Connector/python

Welcome everyone to pay attention to! To read the "Android system source code Scenario analysis" book online, click on an attack programmer to enter!

"Android system source code scenario analysis" Serial memoirs: The Source of inspiration

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.