Home  >  Q&A  >  body text

java - 我想问个后端问题,平常开发的web网站后端开发和app后端接口开发有什么不同呢

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

阿神阿神2763 days ago3446

reply all(5)I'll reply

  • 高洛峰

    高洛峰2017-04-18 10:32:30

    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.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 10:32:30

    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.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 10:32:30

    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.

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:32:30

    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"

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 10:32:30

    It’s the same in my eyes.

    reply
    0
  • Cancelreply