I am starting to learn frontend JavaScript frameworks like Backbone.js or Embers.js and I wanted to do some projects in Node.js. I have been reading some documentation and it seems these frameworks are used when you create an application in a single page. I'm used to developing apps which are divided into several pages and I wonder if those frameworks would be more a help or a burden to the project in my case.
我开始学习像Backbone.js或Embers.js这样的前端JavaScript框架,我想在Node.js中做一些项目。我一直在阅读一些文档,似乎在单个页面中创建应用程序时会使用这些框架。我习惯于开发分为几个页面的应用程序,我想知道这些框架在我的案例中是否会对项目更有帮助或负担。
I also wanted to know if as JavaScript is used both in the server and the client, as I use the same language if there is any kind of feature I can use to share some code between them, and if any frontend framework is more suitable for Node.js because of this.
我还想知道在服务器和客户端中是否使用了JavaScript,因为我使用相同的语言,如果有任何类型的功能,我可以用来在它们之间共享一些代码,如果任何前端框架更适合于Node.js因为这个。
2 个解决方案
#1
27
We can't really point out a frontend framework suitable simultaneously for NodeJS applications and Frontend both.
我们无法真正指出同时适用于NodeJS应用程序和Frontend的前端框架。
A. NodeJS is essentially server side. But its JavaScript. This means all the good functional utilities like underscore.js, uglify.js, your own stuff for functionality (like a logic you might have developed for finding an item in an array in web based JavaScript), etc. can be used at the backend.
答:NodeJS本质上是服务器端。但它的JavaScript。这意味着所有良好的功能实用程序,如underscore.js,uglify.js,您自己的功能(如您可能已经开发用于在基于Web的JavaScript中查找数组中的项目的逻辑)等,可以在后端使用。
B. Frontend has evolved, and so have JavaScript Applications. Per your question, when you want to develop one page applications, you might want to look at MVC, MVVM, MVW, MVP Design Patterns. For eg. BackboneJS helps you build MVC Applications. While there are libraries like jQuery taking care of DOM, ajax and other stuff in Rich Applications, most of the time you will find the application is a combination of multiple things
B.前端已经发展,JavaScript应用程序也在发展。根据您的问题,当您想要开发一个页面应用程序时,您可能希望查看MVC,MVVM,MVW,MVP设计模式。例如。 BackboneJS可帮助您构建MVC应用程序。虽然有像jQuery这样的库在Rich Applications中处理DOM,ajax和其他东西,但大多数时候你会发现应用程序是多个东西的组合
- A one-page MVC application also requires Dynamic views, and so, templating comes into picture. For eg., Ember uses Handlebars. Backbone uses underscore, etc.
- 一页的MVC应用程序也需要动态视图,因此,模板化进入了画面。例如,Ember使用Handlebars。 Backbone使用下划线等。
C. When you want to choose a framework for Frontend of your application, TodoMVC is the best to decide - http://todomvc.com/.
C.当你想为你的应用程序的前端选择一个框架时,TodoMVC是最好的决定 - http://todomvc.com/。
D. When you want to choose a framework for Back-end (in your case, NodeJS), you might want to look at Express and Geddy.
If NodeJS were Plain Browser JavaScript, Express and Geddy would be Backbone - for MVC
Additionally, for NodeJS apps, the NPM registry has enormous list of utilities, most of which are port of things you have already used in Browser JavaScript
D.如果你想为后端选择一个框架(在你的情况下,NodeJS),你可能想看看Express和Geddy。如果NodeJS是普通浏览器JavaScript,Express和Geddy将是Backbone - 对于MVC此外,对于NodeJS应用程序,NPM注册表有很多实用程序列表,其中大部分都是您在浏览器JavaScript中使用过的东西的端口
E. A server simply serves pages and resources. As per my little knowledge therefore, even if you are using JavaScript both at backend and frontend, you would need individual efforts and files / scripts at both. The only thing you would benefit in common is that the same frontend JavaScript developers can work on the backend with a smaller learning curve.
E.服务器只提供页面和资源。因此,根据我的小知识,即使您在后端和前端都使用JavaScript,您也需要单独的工作和文件/脚本。您唯一会受益的是,相同的前端JavaScript开发人员可以使用较小的学习曲线处理后端。
I have seen experts dropping the idea of a framework due to burden of a learning curve. At the end of the day, therefore, some research must be performed specially for an application that uses multiple technologies, and the efforts involved to learn and implement those
由于学习曲线的负担,我看到专家们放弃了框架的想法。因此,在一天结束时,必须专门针对使用多种技术的应用程序进行一些研究,并且必须努力学习和实施这些技术。
#2
5
Checkout this page:
查看此页面:
http://todomvc.com/
It has all the common javascript frameworks and their todo examples. Try some and figure out which is the best option for you. Hope this material helps.
它具有所有常见的javascript框架及其todo示例。尝试一下,找出最适合你的选择。希望这些材料有所帮助
#1
27
We can't really point out a frontend framework suitable simultaneously for NodeJS applications and Frontend both.
我们无法真正指出同时适用于NodeJS应用程序和Frontend的前端框架。
A. NodeJS is essentially server side. But its JavaScript. This means all the good functional utilities like underscore.js, uglify.js, your own stuff for functionality (like a logic you might have developed for finding an item in an array in web based JavaScript), etc. can be used at the backend.
答:NodeJS本质上是服务器端。但它的JavaScript。这意味着所有良好的功能实用程序,如underscore.js,uglify.js,您自己的功能(如您可能已经开发用于在基于Web的JavaScript中查找数组中的项目的逻辑)等,可以在后端使用。
B. Frontend has evolved, and so have JavaScript Applications. Per your question, when you want to develop one page applications, you might want to look at MVC, MVVM, MVW, MVP Design Patterns. For eg. BackboneJS helps you build MVC Applications. While there are libraries like jQuery taking care of DOM, ajax and other stuff in Rich Applications, most of the time you will find the application is a combination of multiple things
B.前端已经发展,JavaScript应用程序也在发展。根据您的问题,当您想要开发一个页面应用程序时,您可能希望查看MVC,MVVM,MVW,MVP设计模式。例如。 BackboneJS可帮助您构建MVC应用程序。虽然有像jQuery这样的库在Rich Applications中处理DOM,ajax和其他东西,但大多数时候你会发现应用程序是多个东西的组合
- A one-page MVC application also requires Dynamic views, and so, templating comes into picture. For eg., Ember uses Handlebars. Backbone uses underscore, etc.
- 一页的MVC应用程序也需要动态视图,因此,模板化进入了画面。例如,Ember使用Handlebars。 Backbone使用下划线等。
C. When you want to choose a framework for Frontend of your application, TodoMVC is the best to decide - http://todomvc.com/.
C.当你想为你的应用程序的前端选择一个框架时,TodoMVC是最好的决定 - http://todomvc.com/。
D. When you want to choose a framework for Back-end (in your case, NodeJS), you might want to look at Express and Geddy.
If NodeJS were Plain Browser JavaScript, Express and Geddy would be Backbone - for MVC
Additionally, for NodeJS apps, the NPM registry has enormous list of utilities, most of which are port of things you have already used in Browser JavaScript
D.如果你想为后端选择一个框架(在你的情况下,NodeJS),你可能想看看Express和Geddy。如果NodeJS是普通浏览器JavaScript,Express和Geddy将是Backbone - 对于MVC此外,对于NodeJS应用程序,NPM注册表有很多实用程序列表,其中大部分都是您在浏览器JavaScript中使用过的东西的端口
E. A server simply serves pages and resources. As per my little knowledge therefore, even if you are using JavaScript both at backend and frontend, you would need individual efforts and files / scripts at both. The only thing you would benefit in common is that the same frontend JavaScript developers can work on the backend with a smaller learning curve.
E.服务器只提供页面和资源。因此,根据我的小知识,即使您在后端和前端都使用JavaScript,您也需要单独的工作和文件/脚本。您唯一会受益的是,相同的前端JavaScript开发人员可以使用较小的学习曲线处理后端。
I have seen experts dropping the idea of a framework due to burden of a learning curve. At the end of the day, therefore, some research must be performed specially for an application that uses multiple technologies, and the efforts involved to learn and implement those
由于学习曲线的负担,我看到专家们放弃了框架的想法。因此,在一天结束时,必须专门针对使用多种技术的应用程序进行一些研究,并且必须努力学习和实施这些技术。
#2
5
Checkout this page:
查看此页面:
http://todomvc.com/
It has all the common javascript frameworks and their todo examples. Try some and figure out which is the best option for you. Hope this material helps.
它具有所有常见的javascript框架及其todo示例。尝试一下,找出最适合你的选择。希望这些材料有所帮助