We are looking at options to build the front end of an application we are creating and are trying to evaluate a tool that will work for us and give us the best platform to move forward.(我们正在寻找构建我们正在创建的应用程序前端的选项,并且正在尝试评估一个对我们有用的工具,并为我们提供最佳的平台。)
This is a Node.js project.(这是一个Node.js项目。)
Our initial plan was to use Express and go down that route, but we decided that before we kick off this stage it might be best to review what is out there.(我们最初的计划是使用Express并沿着这条路走下去,但我们决定在开始这个阶段之前,最好回顾一下那里的情况。) Our application has several areas which we don't believe fit the single-page model in that they are related from an application perspective, but not from a view one.(我们的应用程序有几个我们认为不适合单页模型的领域,因为它们从应用程序的角度来看是相关的,而不是从视图中看。)
We have seen a few of the frameworks we could use to build out the client like Backbone.js , Meteor , etc. and also AngularJS.(我们已经看到了一些可以用来构建客户端的框架,比如Backbone.js , Meteor等,还有AngularJS。)
This may be a fairly obvious question, but we cannot seem to decipher if AngularJS is purely for single-page application or it can be used for multi-page applications like Express for instance.(这可能是一个相当明显的问题,但是如果AngularJS纯粹用于单页面应用程序,或者它可以用于Express等多页面应用程序,我们似乎无法破译。)
UPDATE 17 July 2013 Just to keep people in the loop, I will be updating this question as we go through the process.(更新2013年7月17日为了让人们保持在循环中,我将在整个过程中更新这个问题。)
We are going to build everything together for now, and we will see how well that performs.(我们现在要一起构建所有内容,我们将看到它的表现如何。) We have reached out to a few people who are more qualified with AngularJS than us and posed the question regarding splitting up larger applications that share context, but may be too large working on a single page.(我们已经联系了一些比我们更有资格使用AngularJS的人,并且提出了关于拆分共享上下文的更大应用程序的问题,但是在单个页面上工作可能太大。)
The consensus was that we could serve multiple static pages and create AngularJS applications that work with only those pages, effectively creating a collection of SPA and linking those applications together using standard linking.(我们的共识是,我们可以提供多个静态页面并创建仅与这些页面一起使用的AngularJS应用程序,有效地创建SPA集合并使用标准链接将这些应用程序链接在一起。)
Now our use case is very specific as our solution has several applications, and as I said we are going to try the single code base first and optimise from there.(现在我们的用例非常具体,因为我们的解决方案有几个应用程序,正如我所说,我们将首先尝试单个代码库并从那里进行优化。)
UPDATE 18 June 2016 The project fell of a cliff, so we never got round to getting too much done.(更新2016年6月18日该项目陷入悬崖,所以我们从来没有完成过多的工作。)
We have picked it up again recently, but are no longer using angular and are using React instead.(我们最近再次提起它,但不再使用角度而是使用React。) We are still using the architecture outlined in the previous update, where we use express and self contain apps, so for example, we have a /chat
route in express that serves up our React chat app, we have another route /projects
that serves up the projects app and so on.(我们仍然使用上一次更新中概述的体系结构,我们使用快速和自包含应用程序,例如,我们在快递中有一条/chat
路线,用于提供我们的React聊天应用程序,我们有另一条路线/projects
提供服务项目应用程序等。) The way we are kinda looking at it is each app is an aggregate root in terms of its feature set, it needs to be able to standalone for it to be considered an app in itself.(我们有点看待它的方式是每个应用程序在其功能集方面是一个聚合根,它需要能够独立,因为它本身被视为一个应用程序。) Technically, all the information is out there, its just basic express and whatever flavour of client side app building goodness you want to use.(从技术上讲,所有的信息都在那里,它只是基本的表达,以及你想要使用的客户端应用程序构建良好的任何风格。)
ask by Modika translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…