How to use PHP as a server-side ~ Learning path for Android Applications!!

Source: Internet
Author: User
Tags oauth php write
The previous time has been writing an Android app app, basically make a single machine in the mobile phone to run the local app. So want to learn to do the background of the application, intends to use Php+mysql. My backstage small white one, do not know how to study is the best route. What design patterns or frameworks do you need to learn? Ask for a learning route!! Thanks, eh?

Reply content:

The previous time has been writing an Android app app, basically make a single machine in the mobile phone to run the local app. So want to learn to do the background of the application, intends to use Php+mysql. My backstage small white one, do not know how to study is the best route. What design patterns or frameworks do you need to learn? Ask for a learning route!! Thanks, eh?

1, in order to facilitate the development, select a PHP framework, such as ThinkPHP Yii CI .

2, understand the API related knowledge, such as: RESTful API , and understand your choice of PHP framework, how to develop API interface.

3, understand JSON or XML (less use), recommended JSON as a data transfer method.

4. Use the HTTP class library on Android to request the PHP interface you have written.

Back-end words are a big topic, you can trickery learn a framework such as laravel or go straight to open API practice. The first to learn Android as the top.

I suggest that if you are studying or starting from native PHP, write.
If you use YII2, the framework does too much for you and it's hard to know what it's like to be native.

Android call is the PHP write interface, that is, PHP files, just start not to learn what frame, the PHP Foundation to learn the line, the framework is written on the basis of PHP. The foundation is not good is the wood without root, on the road of programming not far. Recommended to see this article http://www.cnblogs.com/xrq730/p/5260294.html although will be interview, but you can see the importance of the foundation

There is a "Android and PHP development Best practice", many look at the electronic version, you can consider the beginning to see,

If you are starting with PHP, it is better to use the framework, the framework helps you to do most of the work, you can focus on the business logic, you can take the time to slowly study the way it is implemented.
The server uses PHP to provide a restful interface, call Android, and then look at OAuth
Android Call API I use the class library has, Okhttp retrofit2 android-oauth-client, etc., can provide a lot of convenience

It is better to choose a mini-frame that can quickly develop the API in the framework Slim
The following is excerpted from Slim website:

Slim is a PHP Micro framework This helps you quickly write simple yet powerful Web applications and APIs.

Translate as follows:

Slim is a PHP mini-framework that can help you quickly develop simple and powerful Web applications and APIs

  • Related Article

    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.