YUI之死可以教给开发人员什么

tech2023-07-29  119

The Yahoo User Interface (YUI) library has been abandoned. In a brief announcement made on August 29, 2014, Director of Engineering Julien Lecomte stated that all development would cease with immediate effect.

Yahoo用户界面(YUI)库已被放弃。 在2014年8月29日的简短公告中 ,工程总监Julien Lecomte表示,所有开发将立即停止。

什么是YUI? (What is YUI?)

yuilibrary.com describes the library as:

yuilibrary.com将库描述为:

A free, open source JavaScript and CSS library for building richly interactive web applications

免费的开源JavaScript和CSS库,用于构建丰富的交互式Web应用程序

YUI is a collection of HTML, CSS and JavaScript components. It provides cross-browser:

YUI是HTML,CSS和JavaScript组件的集合。 它提供了跨浏览器:

DOM and event handling;

DOM和事件处理; MVC application frameworks;

MVC应用程序框架; Data structures;

数据结构; Helper utilities and functions;

助手实用程序和功能; Developer tools;

开发者工具; And HTML widgets such as auto-complete fields, calendars, charts, data tables, sliders, tab controls and more.

还有HTML小部件,例如自动完成字段,日历,图表,数据表,滑块,标签控件等等。

Think of YUI like a combination of jQuery, jQueryUI, numerous plug-ins, and Backbone, with a few other libraries thrown in. Of course, this did lead to monolithic JavaScript applications running to several hundred kilobytes but YUI 3.0 introduced increased modularization and dynamic loading to ensure components were only requested when required.

将YUI看作是jQuery,jQueryUI,众多插件和Backbone的组合,并引入了其他一些库。当然,这确实导致单片JavaScript应用程序运行到数百KB,但是YUI 3.0引入了增强的模块化和动态加载以确保仅在需要时才需要组件。

The library is supported by a considerable volume of documentation and community forums.

该图书馆有大量的文档和社区论坛支持。

YUI的历史 (YUI History)

YUI was founded by Thomas Sha of Yahoo in 2005 and formed the basis of Yahoo’s new Ajax-ified webmail application. The free, open source library was made available to the public in February 2006.

YUI由雅虎(Yahoo)的托马斯·沙(Thomas Sha)于2005年创立,并构成了雅虎新的Ajax认证的Webmail应用程序的基础。 免费的开放源代码库于2006年2月向公众开放 。

YUI 3.0 was released in 2009. The new version was largely rebuilt to modernize the library, introduce jQuery-like CSS DOM selectors and modularize the components.

YUI 3.0于2009年发布。新版本在很大程度上进行了重新构建,以实现库的现代化,引入类似于jQueryCSS DOM选择器并模块化组件。

As of 2014, W3Techs reports that YUI is used on 0.7% of all websites and 1.1% of those using a JavaScript library. jQuery is the undisputed champion — it’s used on 60.4% of all websites and a colossal 94.3% of those using a library. jQuery aside, YUI compares well with other libraries such as Prototype and MooTools but usage has been in steady decline for some time.

截至2014年, W3Techs报告称所有网站中有0.7%使用了YUI,而使用JavaScript库的网站中有1.1%使用了YUI。 jQuery是无可争议的拥护者-在所有网站中有60.4%使用了jQuery,在使用图书馆的网站中占了94.3%的巨大比例。 除了jQuery外,YUI与其他库(如Prototype和MooTools)相比还不错,但是一段时间以来使用率一直在稳定下降 。

YUI的利与弊 (YUI Pros and Cons)

On the plus side, YUI is a complete solution for building cross-browser web applications which (mostly) work in IE6 and above. It has also given us some great side projects such as the YUI Compressor.

从好的方面来说,YUI是构建跨浏览器Web应用程序的完整解决方案,该应用程序(通常)在IE6及更高版本中运行。 它还给了我们一些很棒的附带项目,例如YUI Compressor 。

However, the library possibly became too big and too complex. YUI locked you in and functionality was abstracted from the programmer. That’s fine when everything works but a development nightmare when it doesn’t.

但是,图书馆可能变得太大和太复杂。 YUI使您陷入困境,并且功能是从程序员那里抽象出来的。 在一切正常的情况下很好,但在一切都没有的情况下进行开发梦night。

Finally, there were complaints about Yahoo’s willingness to accept pull requests from contributors outside the company. I’m not wholly surprised given the number of critical Yahoo applications which depended on YUI.

最后,有人抱怨雅虎愿意接受公司外部贡献者的请求。 鉴于依赖YUI的重要Yahoo应用程序数量众多,我并不感到完全惊讶。

为什么将YUI删除了? (Why has YUI Been Dropped?)

Julien Lecomte admits the industry is headed in a new direction:

Julien Lecomte承认行业正在朝着新的方向发展:

Build tools such as Grunt, Gulp and Broccoli allow us to assemble smaller modules into larger applications.

诸如Grunt,Gulp和Broccoli之类的构建工具使我们能够将较小的模块组装到较大的应用程序中。 Frameworks such as Angular, Backbone and Ember approach application development in a more scalable and maintainable way.

诸如Angular,Backbone和Ember之类的框架以更可扩展和可维护的方式处理应用程序开发。 Vendors and standards bodies are working together; there’s less need for custom widgets on legacy browsers when HTML5 can be used.

供应商和标准机构正在共同努力; 使用HTML5时,在旧版浏览器上不需要自定义小部件。

Developers rarely require a single, catch-all library. YUI interest waned and usage dropped accordingly.

开发人员很少需要一个通用的库。 YUI的兴趣有所减弱,使用量也相应下降。

I also suspect there were internal pressures in Yahoo. The company’s focus has changed: there’s less emphasis on cool developer projects and more on profitability and survival.

我还怀疑雅虎内部存在压力。 该公司的重点已发生变化:不再关注出色的开发人员项目,而更多地关注盈利能力和生存能力。

但是我依靠YUI! (But I Depend on YUI!)

Yahoo’s announcement gave no warning but there’s little need to panic. YUI is still available and will continue to work for the immediate future — presuming your application has been successfully completed.

雅虎的公告没有发出警告,但没有必要惊慌。 YUI仍然可用,并且会在不久的将来继续工作- 假设您的应用程序已成功完成 。

The situation is less clear for partially-finished projects. Should you continue to develop an application based on a defunct library? It will probably depend on the size of the task, how much work has been completed and your reliance on YUI. You should certainly be discussing the options and, fortunately, there are numerous alternatives to choose from. Just don’t expect to find a simple drop-in replacement.

对于部分完成的项目,情况还不太清楚。 您是否应该继续基于已失效的库开发应用程序? 这可能取决于任务的大小,完成的工作量以及您对YUI的依赖。 您当然应该在讨论这些选项,而且幸运的是,有很多其他选择。 只是不要期望找到简单的替代产品。

给我们所有人一个教训? (A Lesson for Us All?)

It doesn’t matter which third-party library or framework you use: it will be discontinued at some point. Yes, even jQuery and Angular. That’s not necessarily an argument for developing your own system — even your own code will eventually be superseded.

不管使用哪个第三方库或框架, 它都将在某个时候终止 。 是的,甚至jQuery和Angular。 这不一定是开发您自己的系统的理由,甚至最终您自己的代码也将被取代。

IT moves rapidly and the web is one of the fastest evolving technologies. It’s increasingly difficult to keep up with advances but doing something is infinitely better than doing nothing. Pick a technology stack and stick with it while it’s practical to do so.

ITSwift发展,Web是发展最快的技术之一。 跟上进步的难度越来越大,但是做某事总比什么都不做好。 在可行的情况下,选择一个技术栈并坚持下去。

So goodbye YUI. The web has lost one of it’s more innovative endeavors but, like many, I wasn’t using it anyway.

再见了YUI。 网络已经失去了一项更具创新性的工作,但是和许多人一样,我还是没有使用它。

翻译自: https://www.sitepoint.com/death-yui-can-teach-developers/

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)