java - 我想问个后端问题,平常开发的web网站后端开发和app后端接口开发有什么不同呢
阿神
阿神 2017-04-18 10:30:30
0
5
3417

我想问个后端问题,平常开发的web网站后端开发和app后端接口开发有什么不同呢?pc网站也可以跟app那样调用接口开发吗?就是所谓的前后端分离,后端提供接口的,pc网站怎么怎么实现的?譬如金融p2p投资平台网站或者电商系统网站等等,可以跟app那样调用后端接口吗?开发思路两者有什么不同呢??

阿神
阿神

闭关修行中......

reply all(5)
小葫芦

It is recommended that you learn about SOA (Service-Oriented Architecture).

Due to historical reasons, many of the ordinary Web have not yet switched to SOA architecture, while Apps are new applications (and because of their Native characteristics), and many of them directly adopt SOA architecture.

If you imagine that the browser and App are both clients (C), and the server (S) both provide interfaces in the form of HTTP API, then there is no difference between the two. If the app is written using a Hybrid framework such as Codorva, then the difference between them is only the difference between the browser framework and the Hybrid framework. This difference has nothing to do with the server.

左手右手慢动作

Theoretically, there is no difference. For example, they all use tcp/ip protocol stack, http(s) and so on. In fact, it is completely possible to make a set of interfaces common to mobile and web pages.

However, the mobile side has more push actions, while the web side has more response actions. Although the web side has a certain MVC layering, in fact, the coupling is generally stronger than that of the app side.

左手右手慢动作

If the web is separated from the front and back ends, the difference will not be big, but there may be differences in security and sessions.

黄舟

Modify the website’s view layer template engine to a rest that sends and receives json and it becomes the app backend.
Generally, the HTTP interface of apps is more rigorously designed than websites; also, apps generally use tokens, while websites use sessions to "maintain state"

刘奇

It’s the same in my eyes.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!