亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

Yahoo! UI Libraries Target Cross-browser Web Development Woes

2019-11-17 04:48:04
字體:
來源:轉載
供稿:網友
URL:http://www.devx.com/webdev/Article/31225/0/page/2

The recently released Yahoo! UI libraries PRovide cross-browser DHTML and Ajax capabilities with a commercial-friendly BSD License. Unfortunately poor documentation, verbose syntax, and incomplete capabilities mar the eXPerience. 

by David Talbot April 17, 2006

Yahoo! UI Libraries Target Cross-browser Web Development Woes(圖一) ver since the 4.0 browsers were released, cross-browser dynamic HTML libraries have proliferated as a simple matter of necessity. Any developer who wants to take advantage of the latest and greatest HTML/javascript capabilities while maintaining cross-browser compatibility has probably developed something of a library of "hacks" to normalize the API between the warring and buggy browsers.

Overall, Yahoo provides a decent library for general cross-browser hacks, but unfortunately, the effort doesn't measure up to some of the other open source APIs available sUCh as DynAPI. You can download the free Yahoo! UI (YUI) libraries and experiment with them yourself.

A Quick Tour
After you've downloaded YUI and extracted the .zip file, you'll find the extraction creates eight folders, each with a similar sub-folder structure. Each folder contains several subfolders, but the only ones of interest are:

  • The build folders, which contain just the files you'll need to use the functionality.
  • The example folder that shows the functionality in action.
I wouldn't recommend bothering with the source Directories as these contain some .js files that also exist in combined versions in the build directories, no douBT created by a utility they didn't include in the package nor reference on their Web site.

Overall, YUI is basically a function library that you access through a combination of anonymous methods and "namespace-like" syntax. For example, if you wanted to set the X/Y location of an element on the page, instead of writing code such as SetLayerLoc('MyID', 10, 10), you would instead make a library call as follows:


YAHOO.util.Dom.setXY('MyID', new Array(10,10));
Although YUI gets the job done, the syntax is thoroughly verbose.

The documentation consists of some Javadoc-like API reference that was automatically generated from some sort of automated tool with no effort to clean it up or add useful detail to the generated class descriptions. It does include a fairly complete set of examples that go through most of the common functions in a reasonable and straightforward way, but without any linkages to or from the rest of the generated documentation.

The DOM and Event Libraries
YUI's capabilities in regard to core DOM and event handling are incredibly rock-solid, perform as expected, and cover a broad range of capabilities. Most surprisingly, this API gives you simple cross-browser transparency control. Most developers aren't even aware that magic tricks even exist (via DirectX calls) to make semi-transparency work in IE, much less the Mozilla-based equivalents, but YUI enables access to most, if not all, of the CSS properties you'd ever want. Here's an example:

YAHOO.util.Dom.setStyle('MyDivID', 'opacity', .5);
The caveat of so many of these wonderful capabilities is again the documentation. The documentation implies that you can set the CSS style properties on all elements using their Javascript equivalent names, for example, by writing backgroundColor rather than the CSS equivalent background-color, but the downside is that it lacks a full list of supported properties.

After you realize YUI has an amazingly cool cross-browser hack to enable transparency, your hopes will briefly rise that perhaps the libraries also implement cross-browser hacks to save you from having to remember every CSS hack around non-standard CSS properties. Unfortunately this isn't the case. Upon further inspection of the code you'll discover that the transparency hack is the only CSS hack supported by YUI—all other setStyle calls are passed directly through to the browser's DOM unchecked.

Fortunately, the event API is deeper than the DOM API and includes functions to normalize many of the cross-browser events. It normalizes the API to the more standards based addListener/removeListener functions.

Overall, the DOM and Event libraries do the job but require verbose syntax to accomplish what other libraries do with half the typing.

Animation API
The animation API is where the framework starts to provide real value. The approach of the API is to define a series of from and to key states as well as the duration the animation should last from start to finish.

Among the properties you can animate are: color transitions, location, size, and opacity. You can create fascinating displays with relatively little effort in a manner similar to the Dreamweaver JavaScript. However, these API capabilities are only truly useful if you know the precise path of your animation at design time, because the declarative syntax used makes it difficult to alter animation paths at runtime.

Drag and Drop
Drag-and-drop support has always been an area of divergence among browser implementations. YUI does a masterful job of not only smoothing out the differences but adding some great functionality on top of it.

The Drag and Drop API provides a lot of advanced functionality not seen in other freely available JavaScript libraries. The end user experience with YUI drag-and-drop elements is very slick. You can specify what items are draggable and what items are drop targets in a relatively simple, though verbose, way.

I would have liked to have seen YUI behave a little more like some of the other freely available libraries out there in terms of associating drag sources with possible drop targets. In YUI you have to write code (there's an example in the documentation) to specify drop targets as opposed to simply adding grouping tags to your targets as you can with Script.aculo.us.

Connection API
Remote scripting has been around for years but when Google launched Google maps it set the Internet afire with AJAX mania. The mania is of course well-founded, because AJAX can offer a dramatic user experience improvement. The result of this mania has been a tremendous proliferation of libraries that normalize the interface to the underlying browser hacks that enable you to make a round trip to the server for more data without refreshing the browser.

YUI provides a reasonably complete API for remote scripting. It includes the ability to make remote calls, handle successes, and handle failures. If you're using a server-side language that does not yet have a client side API for remote scripting, YUI is pretty good choice.

The code example below highlights the relative simplicity of the YUI connection libraries.


var handlers = {
success: success,
failure: failure }
function success(t)
{ alert('Yea, success'); }
function failure(t)
{ alert('Awww.'); }
YAHOO.util.Connect.asyncRequest('GET',
'http://mysite.com/Remote.aspx?GetPage=1',
handlers,null);
Despite the fact that the connection library is one of the strong points of YUI, I would still recommend sticking with whatever AJAX libraries are specifically designed for your server-side language. The reason for this is simple—consistency in data type handling will reduce the overall amount of effort required to achieve the desired result. However, if you work in a multi-language or multi-platform environment, the YUI connection library is the better choice.

To be completely honest, I rewrote this article after my initial review. I had half of my review written based on playing with a few of the examples but repeatedly found myself disappointed with so many facets of the library that I had to delete the first article attempt and try again. Overall, YUI is filled with verbose syntax and undocumented bizarre parameter options. Personally, as a .NET man, I'll stick with writing good xbrowser DOM, using DynAPI for event normalization and ATLAS for my AJAX needs.

In sum, the YUI libraries attempt to provide a complete cross-browser DHTML and AJAX API, but while parts of the libraries are rock-solid and work well, the attempt falls short in a few areas and fails miserably in its overall syntax.

Page 2 of 2
Yahoo! UI Libraries Target Cross-browser Web Development Woes(圖二)
Yahoo! UI Libraries Target Cross-browser Web Development Woes(圖三)%20%20%20%20%20
%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20 %20 %20%20%20%20%20%20%20%20%20%20%20%20%20 David Talbot is the vice president of development for Data Systems International, a company that develops case-management software for the social services industry. His experience ranges from license-plate recognition using neural networks to television set-top boxes to highly scalable Web applications. He is also the author of Applied ADO.NET.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
zzijzzij亚洲日本成熟少妇| 日韩美女激情视频| 日韩在线观看网址| 欧美性视频网站| 91高潮精品免费porn| 日韩精品一区二区视频| 91sa在线看| 国产日韩精品在线播放| 欧美日韩亚洲天堂| 亚洲大胆人体在线| 51视频国产精品一区二区| 2020欧美日韩在线视频| 俺去了亚洲欧美日韩| 日韩在线观看免费高清完整版| 亚洲欧洲一区二区三区在线观看| 中文字幕日韩综合av| 国产成人精品国内自产拍免费看| 成人精品一区二区三区| 国产一区二区三区在线观看视频| 欧美自拍大量在线观看| 欧美亚洲日本黄色| 午夜免费在线观看精品视频| 久久在线视频在线| 欧美乱大交做爰xxxⅹ性3| 亚洲成色777777女色窝| 久久久久国产精品www| 俺去亚洲欧洲欧美日韩| 国产剧情日韩欧美| 中文在线资源观看视频网站免费不卡| 78m国产成人精品视频| 久久久久九九九九| 久久精品国产欧美激情| 久久久人成影片一区二区三区| 欧美xxxx14xxxxx性爽| 欧洲日本亚洲国产区| 久久综合色88| 午夜精品久久久久久久白皮肤| 亚洲人午夜精品免费| 亚洲欧美国产精品专区久久| 77777少妇光屁股久久一区| 国产盗摄xxxx视频xxx69| 91人成网站www| 国产欧美日韩专区发布| 中文字幕亚洲综合| 一本一本久久a久久精品牛牛影视| 成人黄色av播放免费| 欧美一级在线亚洲天堂| 欧美一级bbbbb性bbbb喷潮片| 岛国视频午夜一区免费在线观看| 日韩视频免费在线观看| 国产精品视频一区二区三区四| 日韩成人激情影院| 亚洲精品美女在线| 亚洲午夜久久久久久久| 精品欧美aⅴ在线网站| 国产精品久久久久久一区二区| 国产欧美一区二区三区在线看| 日韩不卡在线观看| 久久精品电影一区二区| 日本中文字幕成人| 狠狠躁18三区二区一区| 丁香五六月婷婷久久激情| 亚洲成人激情在线| 国产精品入口日韩视频大尺度| 中国china体内裑精亚洲片| 亚洲第一免费播放区| 国产精品一区二区三区久久久| 亚洲人精选亚洲人成在线| 久久91精品国产91久久久| 欧美性xxxx18| 欧美一级大片在线观看| 亚洲欧美色图片| 97视频在线观看播放| 久久久久久久久久久成人| 国产精品日日做人人爱| 国产在线精品播放| 中文字幕无线精品亚洲乱码一区| 91精品国产免费久久久久久| 国产精品人成电影在线观看| 91精品国产高清| 国产在线观看91精品一区| 国产精品午夜国产小视频| 北条麻妃一区二区三区中文字幕| 亚洲xxxx18| 日韩成人在线视频| 中文字幕亚洲自拍| 黑人巨大精品欧美一区免费视频| 国产精品久久久久99| 国产欧美精品在线播放| 神马国产精品影院av| 亚洲欧美激情另类校园| 欧美大全免费观看电视剧大泉洋| 久久精品国产96久久久香蕉| 欧美亚洲另类激情另类| 在线观看日韩av| 欧美成人精品不卡视频在线观看| 久久久精品在线| 亚洲国产欧美一区二区三区同亚洲| 久久久久久久久久久久久久久久久久av| 97视频在线观看网址| 亚洲另类欧美自拍| 午夜精品久久久久久久99热浪潮| 久久中国妇女中文字幕| 一区二区三区在线播放欧美| 亚洲性夜色噜噜噜7777| 91久久在线视频| 国产精品欧美一区二区三区奶水| 欧美日韩国产成人在线| 久久亚洲精品网站| 国产精品私拍pans大尺度在线| 日韩av电影中文字幕| 成人黄色免费网站在线观看| 2019av中文字幕| 国产极品精品在线观看| 欧美巨大黑人极品精男| 国产精品久久久久高潮| 欧美尺度大的性做爰视频| 亚洲国产天堂久久国产91| 成人免费视频xnxx.com| 久久久久久国产免费| 九九久久精品一区| 欧美激情二区三区| 国产精品美腿一区在线看| 欧美亚州一区二区三区| 91天堂在线视频| 久久天天躁狠狠躁夜夜躁| 欧美日韩亚洲一区二区三区| 在线播放国产精品| 精品久久久久久中文字幕| 国产精品久久久久秋霞鲁丝| 亚洲午夜av久久乱码| 亚洲欧美日韩天堂| 日韩免费在线看| 亚洲深夜福利网站| 国产精品久久久| 国产精品欧美一区二区| 91精品久久久久久久| 一本一道久久a久久精品逆3p| 色噜噜狠狠色综合网图区| 一区二区三区无码高清视频| 国产精品高潮呻吟久久av无限| 国产精品欧美一区二区| 亚洲xxxx视频| 欧美精品做受xxx性少妇| 国产精品直播网红| 美女视频黄免费的亚洲男人天堂| 国产午夜精品美女视频明星a级| 精品欧美一区二区三区| 97av在线视频免费播放| 亚洲精品久久久久中文字幕二区| 日韩中文字幕精品| 欧洲成人在线视频| 成人在线视频网| 国产精品麻豆va在线播放| 欧美人在线视频| 亚洲一区二区中文字幕| 日韩美女视频中文字幕| 综合136福利视频在线| 久久久精品一区| 亚洲国产精品va在线| 97国产精品视频人人做人人爱| 国产精品直播网红| 亚洲最新av在线网站| 午夜精品久久久久久久99黑人|