简体   繁体   English

通过API绑定到Node.js后端的骨架js前端

[英]backbonejs frontend bound via an api to a nodejs backend

Here's my concept: 这是我的概念:

  'Javascript Frontend in the Browser (eg. Backbonejs)'
            Handles most of the logic

                       |
                 'RESTful API'
                       |
                       V

     'API Backend (eg. nodejs, python, ruby)'
             Only handles raw data 

And my question is: Is this a stable architecture? 我的问题是:这是一个稳定的体系结构吗? Doesn't it create more possible points of failure than a generic python/ruby/java web app? 与通用python / ruby​​ / java网络应用程序相比,它不会创造更多的故障点吗? Also, is it a good idea to base the frontend on an API that could, one day, become publicly accessible? 另外,将前端基于有一天可能可以公开访问的API是个好主意吗?

I've built multiple tools at work using this exact design. 我已经使用这种精确的设计在工作中构建了多个工具。 I haven't had any major issues at all. 我根本没有任何重大问题。 The most complex part was the use of web sockets to define an API that Backbone interacts with, but you can easily swap that with ajax for reduced complexity. 最复杂的部分是使用Web套接字定义Backbone与之交互的API,但是您可以轻松地用ajax交换它以降低复杂性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM