角,反应,火焰(客户端流星)之间的主要设计上的差异? [英] Major design differences between Angular, React, and Blaze (client-side Meteor)?

查看:141
本文介绍了角,反应,火焰(客户端流星)之间的主要设计上的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过的角度与反应,VS流星问题问了很多次。在流星侧不可避免地回答这个问题是流星是如何在规模大得多的解释(有DDP,部署,所有的服务器端的东西,和所有其他的东西它提供)。

I've seen the Angular vs. React, vs Meteor questions asked a number of times. On the meteor side inevitably the answer to that question is an explanation of how meteor is much larger in scope (has DDP, deployment, all the server side stuff, and all the other things it provides).

欲这个问题限制为仅在火焰发动机和东西,​​他们做有所重叠,尤其是在任一个可以提供书面或构建客户端code而言附加特征和/或能力。

I want to restrict this question to only the Blaze engine and things where they do somewhat overlap, especially where either one may provide additional features and/or capability in terms of writing or structuring the client side code.


  • 在哪里,他们的互补性? (例如,是什么带来 https://github.com/lvbreda/Meteor_angularjs 表)

  • 假设上面带来了一定的优势,你怎么补偿,如果使用纯流星?

  • 鉴于角度鼓励code的客户端MVC一个相当严格的分离,应该怎样一种结构良好的code中的客户端上的流星遵循其MVVM模式? (是否刚刚从有模板,客户端模块(s)和一个模型来固有)

推荐答案

好吧,只要我可以告诉你问三个不同的问题:

Okay as far as I can tell you are asking three different questions:

他们在哪里的互补性? (例如,是什么带来 https://github.com/lvbreda/Meteor_angularjs 表)

Where are they complementary to each other? (e.g. what does https://github.com/lvbreda/Meteor_angularjs bring to the table)

AngularJS是一个全栈的客户端框架,它带来的功能吨对前端发展。

AngularJS is a full stack client side framework that brings ton's of features for frontend development.

下面的东西它带给上述标准流星表:

The following things it brings to the table above standard meteor:

  • Testing: Angular offers a complete testing framework for the client side
  • Form Validation
  • Localization
  • Components (Example: http://angular-ui.github.io/ )

假设上面带来了一定的优势,如果采用纯流星你怎么弥补呢?

Assuming the above brings certain advantages, how do you compensate for that if using pure meteor?

如果您使用的是纯流星几乎可以使用所有可能的客户端库例如像jQuery的,也可以从角code一些方便的功能,如手工表单验证。

If you are using pure meteor you can use almost all possible client side libraries like for example jQuery or you can code some convenience functions from angular like form validation by hand.

由于角度鼓励code的客户端MVC一个相当严格的分离,应该怎样一种结构良好的code中的客户端上的流星遵循其MVVM模式? (是否刚刚从有模板,客户端模块(s)和一个模型来固有)

Given that angular encourages a fairly strict separation of code on the client for MVC, how should one structure good code on the client in meteor to follow its MVVM pattern? (Does it just come inherently from having template, client module(s), and a model)

有许多方法来构建你的code。流星是不是自以为是约code组织。您可以使用 http://docs.meteor.com/#structuringyourapp <​​/A>作为你的指导,但它确实取决于你如何喜欢$ C $℃。很可能你的code拆分成不同的文件夹中,或者把一切都成一个大文件。对于非常小的应用程序我preFER把一切都在一个文件中。

There are many ways to structure your code. Meteor is not that opinionated about code organization. You can use http://docs.meteor.com/#structuringyourapp as your guidance but it really depends how you like to code. It is possible to split your code into different files in folders or to put everything into just one big file. For very small apps I prefer to keep everything in one file.

我喜欢我的code分成两个文件夹:

I like to split my code into two folders:


  • 系统的客户端的东西文件夹(如视图和资产的子文件夹,有时一个不错的选择)

  • 系统服务器端的东西文件夹

如果你正在寻找一个很好的做法,那么你还可以看看在 http://telesc.pe/ 源code: https://github.com/SachaG/Telescope

If you are looking for a good practice then you can also have a look at the http://telesc.pe/ source code: https://github.com/SachaG/Telescope

这篇关于角,反应,火焰(客户端流星)之间的主要设计上的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆