是谷歌公司的聚合物一个全功能的前端框架替补多或补充其他前端框架? [英] Is Google's Polymer a fully functioning Frontend Framework to Subsitute OR Complement other Frontend Frameworks?

查看:251
本文介绍了是谷歌公司的聚合物一个全功能的前端框架替补多或补充其他前端框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是关于AngularJS,BackboneJS,EmberJS和其他框架。

我来翻译从PHP到JavaScript的一个项目,我必须做出决定,如果我要使用:


  1. AngularJS

  2. 聚合物

  3. 它们的组合

使用聚合物,因为我喜欢它

我preFER。

不过,我很想念(并纠正我在哪里,我错了),使能力:


  1. (在Angualar等)的意见和链接它们之间

  2. 控制器

我知道结构对我,对如何建立我的应用程序,但似乎angularjs对构建MVC应用程序精心predefined结构。

所以我想知道:是聚合物的替代的角度,如果你想建立一个结构良好的Web应用程序或为聚合物的补充以沿其他使用库现有的框架?

修改2014年9月21日
没有人真正回答了这个问题对我完全满意,因此我将其标记为未回答。许多人说,这只是看情况。但是,没有人能够详细说明,对究竟它依赖。

在该应用的复杂性?在应用程序的需求?对于哪些需要做聚合物适合和不适合它?这是我一直在寻找的答案。

有人说,它可被用作一个前端框架。也有人说,这只是一个图书馆和其他人说Yes和No。不幸的是相当混乱的答案。

我希望有这一个官方答案,但我让你在我的感觉是什么。我相信这是一个替代的,但聚合物尚未达到的结构,即其它框架需要工作。也许这是故意的,也许它只是一个未得成熟的事情,因为该框架是新的。

我希望创作者会解释,当它是最好用AngularJS时候应该有人采用高分子建设大型可扩展的Web应用程序。

修改2015年8月15日

聚合物1.0出来了。而事实证明聚合物是不是正式的框架,应该在 complentary 与其他前端框架的工作方式。
https://youtu.be/fD2As5RmM8Q?t=6m42s


解决方案

恕我直言,两者是两个不同的东西,他们都是服务于两个不同的目的。虽然他们有一些共同的特点,提供,数据绑定可以是其中之一。

聚合物

如果你真的想使用真棒 Webcoponents ,聚合物是实现的一个方法。还有其他选项,如你可以用香草JS去,或者使用其他库如的X标记从Mozilla或玻色。这些库填充工具的功能WebComponent的这仍处于起草状态。那么,这些库帮助我们有/提供跨浏览器相同的用户体验即使没有为webcomponents没有原生支持。

这是一个完全成熟的MVC框架。而这里的人都知道是什么,包括作为角MVC框架/提供。

这一切说来回答你的问题。

谷歌公司的聚合物是不完全是一个全功能的前端框架和可以用作一个替补多或补充其他前端框架。它可以作为对角的 V 部分替换为 MVC 。就像人们使用作出反应, V 在不同的框架。这算什么对我来说是不同的情况。作为在角情况下,更具体的,聚合物比如在角1.x的指令而像在即将到来的2角组件 .X。


参考

要更有把握的是什么,我说什么和如何使用与Angular2高分子其他来源的(Angular2没有公布这个日期)

所以,在我看来这两个项目不是互相竞争的。


WebComponent的规格

该WebComponent的规格在这里为自己的参考

我只希望webcomponents原产于常绿的浏览器尽快。

The question is in regard to AngularJS, BackboneJS, EmberJS and the other frameworks.

I have to translate a project from php to javascript and I have to decide, if I am going to use:

  1. AngularJS
  2. Polymer
  3. A combination of them

I prefer using Polymer, because I like it.

Yet, I am missing (and correct me where I am wrong) the ability to make:

  1. Views and link between them (like in Angualar)
  2. Controllers

I know that the structure is up to me, on how to build my application, but it seems that angularjs has a well predefined structure for building mvc-applications.

Therefore I want to know: Is Polymer a substitute for Angular, if you want to build a well structured web application or is Polymer complementary library to be used along other existing frameworks?

EDIT 21.09.2014 No one really answered the question to my fullest satisfaction, therefore I marked it as not answered yet. Many say it just "DEPENDS". But no one is able to elaborate, on what exactly it depends.

On the complexity of the application? On the needs of the application? For what needs does Polymer fit and for which doesn't it fit? These are the answers I was looking for.

Some say it can be used as a frontend framework. Others say that is just a library and others say "Yes and No". Unfortunately rather confusing answers.

I wish there was an official answer to this, but I let you in on what my feeling is. I believe it is a substitute, but Polymer hasn't yet reached the structure, that other frameworks require to work. Maybe this is intentional, maybe it is just a matter of unreached maturity, because the framework is new.

I hope that the creators will explain, when it is best to use AngularJS and when should someone use Polymer for building large scalable web applications.

EDIT 15.08.2015

Polymer 1.0 is out. And it turns out Polymer is officially NOT a framework and is supposed to work in a complentary way with other frontend frameworks. https://youtu.be/fD2As5RmM8Q?t=6m42s

解决方案

IMHO both are two different things and they both are to serve two different purposes. Though they have some common features to offer, data-binding can be one of them.

Polymer

If you truly want to use the Awesome Webcoponents, Polymer is one way to achieve that. There are other options like you can go with your vanilla JS, or use other libraries like X-Tag from Mozilla or Bosonic. These libraries polyfill the webcomponent features which are still in drafted state. So, these libs help us have/provide the same user experience across browsers even where there is no native support for the webcomponents.

Angular

This is a full fledged MVC framework. And people here know what Angular as an MVC framework includes/provides.

That all said to answer your question

Google's Polymer is not exactly a fully functioning Frontend Framework and can be used as a Subsitute OR Complement to other Frontend Frameworks. It can be used as a substitution for the V part in Angular as MVC. Like people use React as V in different frameworks. It is not much a different case for me. Being more specific in case of Angular, Polymer is like directives in Angular 1.x while like components in upcoming Angular 2.x.


References

To be more sure of what I am talking about and for additional sources on how to use the Polymer with Angular2 (Angular2 not released to this date)

So, in my view these two projects are not competing each other.


Webcomponent Specs

The webcomponent specs are here for one's reference

I just wish the webcomponents are native to the evergreen browsers ASAP.

这篇关于是谷歌公司的聚合物一个全功能的前端框架替补多或补充其他前端框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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