??xml version="1.0" encoding="utf-8" standalone="yes"?>性感美女激情视频在线观看,黄色大片在线看,久久人人超碰http://www.aygfsteel.com/javaora/category/6993.htmlzh-cnTue, 27 Feb 2007 14:48:29 GMTTue, 27 Feb 2007 14:48:29 GMT60Framework 与Library 和Tookit的区?/title><link>http://www.aygfsteel.com/javaora/archive/2006/05/05/44623.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Fri, 05 May 2006 05:22:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2006/05/05/44623.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/44623.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2006/05/05/44623.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/44623.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/44623.html</trackback:ping><description><![CDATA[ <h2>FrameworkQ框Ӟ</h2> <p>In software development, a framework is a defined support structure in which other project can be organized and developed. A framework typically consists of several smaller components; support programs, libraries, and a scripting language. There may also be other software involved to aid in development and meshing of the different components of a project. As you can see, dojo could be part of a framework, but it isn't a framework in itself.<br /></p> <p>在Y件开发中Q一个框架是一个被定义的支持结构,在其中其他项目可以被l织和开发。一个框架代表性地包含需要小的组件、支持程序、类库、和一个脚? 语言。这些也可能是其他Y件包括帮助开发和不同的项目组件编制。如你看到的Qdojo可能是框架的一部分Q但是本质上它本w不是一个框架?br /></p> <h2>LibraryQ库Q?/h2> <p>A library is defined as a collection of related functions and subroutines used to develop software. They are distinguished from executables in that they are not independant programs; rather, they are "helper" code that provide access to common functions in one easy to manage location. After reading this you are probably saying, "Hey! dojo is a collection of libraries!", and you would be correct; however, dojo is much more than just a collection of libraries.<br /> 库被定义Z个相兛_能和被用来开发Y件的子程序的集合。他们区别于执行Q在其中他们不是独立的程序;更适合的,他们是“助手”代码,用来支持通过通用 成ؓ一体的功能Ҏ来进行管理。在dq些Q你可能_“嗨Qdojo是一个库的集合”,你可能是正确的,然而,dojo不仅仅是做ؓ一个库的集合?br /></p> <h2>ToolkitQ工P</h2> <p>Now on to toolkits. A toolkit is generally used in reference to graphical user interface (GUI) toolkits. Basically, a library that is mainly focused on creating a GUI. Yes, dojo could also fall under this category, in fact our name implies it. Why do we call dojo a toolkit? Certainly not because it focuses mainly on GUI development, right? Well quite simply, because dojo is so much more than just a collection of libraries.<br /></p> <p>现在说说toolkits. 一个工具通常被用在参考图形用L面工兗基圎ͼ一个类库主要集中在创徏一个GUI。是圎ͼdojo可被归入q个cdQ实际上我们命名暗示了它Qؓ什? 我们叫dojo是一个工P当然不是因ؓ它主要集中在GUI开发,正确么?很好Q其实很单,因ؓpojo不仅仅是一个库的集合?br /></p> <img src ="http://www.aygfsteel.com/javaora/aggbug/44623.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2006-05-05 13:22 <a href="http://www.aygfsteel.com/javaora/archive/2006/05/05/44623.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>What is dojo 什么是Dojohttp://www.aygfsteel.com/javaora/archive/2006/05/05/44594.htmljava世界畅谈java世界畅谈Fri, 05 May 2006 03:29:00 GMThttp://www.aygfsteel.com/javaora/archive/2006/05/05/44594.htmlhttp://www.aygfsteel.com/javaora/comments/44594.htmlhttp://www.aygfsteel.com/javaora/archive/2006/05/05/44594.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/44594.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/44594.html Dojo is an Open Source DHTML toolkit written in JavaScript. It builds on several contributed code bases (nWidgets, Burstlib, f(m)), which is why we refer to it sometimes as a "unified" toolkit. Dojo aims to solve some long-standing historical problems with DHTML which prevented mass adoption of dynamic web application development.

    Dojo是一个用Javascript~写的开源DHTML工具。它建立于很多已捐献的代码基QnWidgets、Burstlib、f(m)Q?q? 是ؓ什么我们谈到它有时是一?l一"的工兗Dojo致力于解决一些长期存在的伴随DHTML的历史问题,阻止大多数采用动态web应用E序开发?br />

Dojo allows you to easily build dynamic capabilities into web pages and any other environment that supports JavaScript sanely. You can use the components that Dojo provides to make your web sites more useable, responsive, and functional  With Dojo you can build degradeable user interfaces more easily, prototype interactive widgets quickly, and animate transitions.  You can use the lower-level APIs and compatibility layers from Dojo to write portable JavaScript and simplify complex scripts. Dojo's event system, I/O APIs, and generic language enhancement form the basis of a powerful programming environment. You can use the Dojo build tools to write command-line unit-tests for your JavaScript code.  You can use the Dojo package system to make your code easier to maintain and less platform dependent.  The Dojo build process helps you optimize your JavaScript for deployment by grouping sets of files together and reuse those groups through "profiles".

Dojo允许你容易地建立动态性能到web面和其他稳健支持javascript地环境中?你可以用Dojo支持lgQ它使你的web站点更有可用行的。伴随dojo,你可以更Ҏ地徏立degradeable用户界面Q迅速地原型交互Cg和动画{变。你可以使用底层地api和兼容层Q从Dojo到写M的Javascript和简单复杂教本。Dojo的事件系l,I/O api,和泛型语a增强l成强大的程序环境的基础?你可以用dojo建造工hZ的Javascript代码写命令行单元试。你可以使用Dojo 包系l来使得你的代码更容易去l护和更^C赖?Dojo建造过E帮助你优化你的JavascriptZ的部|Ԍ它通过一起分l文仉合和通过"profile"重用q些l?

Dojo does all of these things by layering capabilities onto a very small core which provides the package system and little else. When you write scripts with Dojo, you can include as little or as much of the available APIs as you need to suit your needs. Dojo provides MultiplePointsOfEntry, InterpreterIndependence, ForwardLookingAPIs, and focuses on ReducingBarriersToAdoption.

Dojo处理所有这些事情,通过分层能力分解成一些非常小的和核心Q它支持包系l和其他更少的。单你写是用Dojo写脚本,你可以包含作为很或 者同样多可用的api作ؓ你需要满你的需要的。Dojo支持MutiplePointsOfEntry, InterprerterIndependence, ForwardLookingAPIs, 和集中ReducingBarriersToAdoption.

Dojo is being built around a single markup language that will provide application authors with a (more) simple way of declaring and using responsive DHTML interface components. Renderings may be made available in several rendering contexts (such as SVG, or perhaps even the desktop or Flash), but the markup language (DojoML) and scripting language (JavaScript) will not change. Better yet, the DojoML parser accepts extended HTML and SVG as valid input, and can be used to easily create DegradeableResponsiveApplications.

Dojo是一个被建造在一个单一的标记语aQ它支持应用程序作者采用一个(多个Q简单方法来声明和用作出响应的DHTML界面lg。表现在许多表现上下?? 如:SVGQ或甚至可能桌面或flash)可能被合法化,但是标记语言(DojoML)和脚本语aQJavascriptQ将不改变。然而更好的Q? DojoML 解析器接受已扩展的HTML和SVG作ؓ一个合法的输入Qƈ且可以被Ҏ的创建DegradeableResponsiveApplications.



]]>
MyEC 4.1新增的几个功?/title><link>http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Wed, 19 Apr 2006 14:35:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/42016.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/42016.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/42016.html</trackback:ping><description><![CDATA[1.增加了一个图形编辑器。呵呵~~,以后单的东西Q在Eclipse中就可以~辑了!<br />2.Spring和Hibernate的自动集?br />3.Jsp EditorQ其实这个东西,我们一般是不做使用的。以前的版本出现的经常性打开很慢的情c?br />4.UML囑Ş<br />5.Javascript<img src ="http://www.aygfsteel.com/javaora/aggbug/42016.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2006-04-19 22:35 <a href="http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MyEclipse JavaScript Debugger (MyEclipse javascript 调试?http://www.aygfsteel.com/javaora/archive/2006/04/19/42014.htmljava世界畅谈java世界畅谈Wed, 19 Apr 2006 14:24:00 GMThttp://www.aygfsteel.com/javaora/archive/2006/04/19/42014.htmlhttp://www.aygfsteel.com/javaora/comments/42014.htmlhttp://www.aygfsteel.com/javaora/archive/2006/04/19/42014.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/42014.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/42014.htmlThe MyEclipse JavaScript Debugger is the first fully integrated client-side Eclipse debugger for JavaScript. Feature highlights include:
MyEc Javascript 调试器试首个为Javascript。完整集成客LEclipse调试器。特征主要包含:

  • Debug any web page containing JavaScript source or included JavaScript files, or standalone JavaScript files
  • 调试Mweb面包含Javascript 源代码或包含Javascript 文gQ或者单独的Javascript文g
  • Operations: Pause, Resume, Step Into, Step Over, Step to Return, Terminate
  • 操作Q暂停、重新开始、进入、蟩出、蟩入返回、终?
  • Views: 视图
    • Web Browser View (web 览器视?
    • Call Stack View  Q呼叫堆栈视图)
    • Variables View (变量视图)
    • Console View  Q控制台视图Q?/li>
  • Set JavaScript breakpoints in: 讄javascript断点
    • JavaScript files (Javascript文g)
    • HTML with embedded JavaScript and linked JavaScript files Q包含内|的javascript和关联的javascript文g的HTMLQ?
    • JSP files (jsp 文g)
    • Conditional breakpoints planned for MyEclipse 4.1.1 QؓMyEC的有条g的断点计划)
  • Integrates with Eclipse Launch Manager Q集成Eclipse发行理器)
    • Quick launch from context-menu using "Debug As" (使用Debug As q速调用上下文按钮)
    • Launch from Eclipse Debug toolbar action Q从Eclipse 调试工具条行Z调用Q?
    • Use Launch Profile to modify launch configuration Q)
    • Launch JavaScript resource from project location or deployed MyEclipse web-application


]]>
10条通向快速Web 站点现实的步?/title><link>http://www.aygfsteel.com/javaora/archive/2006/02/11/30257.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sat, 11 Feb 2006 05:48:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2006/02/11/30257.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/30257.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2006/02/11/30257.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/30257.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/30257.html</trackback:ping><description><![CDATA[10条通向快速Web 站点现实的步?BR>1.定瓉<BR> 1.1文g大小<BR>   在需要用这个页面时用户需要加载多数据。?BR>   60-100K 面大小 保持教小的文?BR> 1.2反应旉<BR>   你向服务器发送请求和数据到达PC的时间间?BR>   |络反应旉<BR>2.减少文g大小<BR>  100K以上 <BR>  大量的文件当前主要是由巨大的Javascriptcd?BR>  巨大的图?BR>  老的HTML样式也会产生大文Ӟ可能地使用XHTML和CSS<BR>  压羃<BR>3.查找什么导致了很高的反?BR>  如上我们所提到的,反应旉主要׃个主要的元素<BR>  3.1|络反应旉<BR>  3.2是否p了太长的旉来生页?BR>  3.3性能<BR>4.定l缘lg<BR>5.~译~存<BR>6.查看DB查询<BR>  避免join. 查询~存<BR>7.发送正的已修Ҏ?BR>8.考虑lg~存<BR>9.减少服务加蝲<BR>  9.1使用相反的代?BR>  9.2采用轻量U的HTTP服务?BR>10. 增加服务?BR><img src ="http://www.aygfsteel.com/javaora/aggbug/30257.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2006-02-11 13:48 <a href="http://www.aygfsteel.com/javaora/archive/2006/02/11/30257.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ten good practices for writing JavaScript in 2005http://www.aygfsteel.com/javaora/archive/2006/02/08/29976.htmljava世界畅谈java世界畅谈Wed, 08 Feb 2006 15:06:00 GMThttp://www.aygfsteel.com/javaora/archive/2006/02/08/29976.htmlhttp://www.aygfsteel.com/javaora/comments/29976.htmlhttp://www.aygfsteel.com/javaora/archive/2006/02/08/29976.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/29976.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/29976.html原文地址Q?A >http://www.bobbyvandersluis.com/articles/goodpractices.php

Ten good practices for writing JavaScript in 2005

1. Make sure your JavaScript code is in balance with its environment

Web Standards are a three-legged stool, or without metaphors(暗喻), a threesomeQ三Zl) of technologies that should live together in harmonyQ和睦相处). (X)HTML adds structure and semantics to your content, CSS is responsible for Qؓ...负责Qits presentation, and the DOM provides an interface to add behavior. You keep your Web pages flexible (or: easier to understand, maintain, restyle<改变样式> and update behavior) by separating all three layers; structure and content from presentation, structure and content from behavior and presentation from behavior. To accomplish this, try to avoid inline behavior and use unobtrusive techniques instead.

主要表述了三U技术的l合使用Qhtml为细节结构和语法 css现负?nbsp; dom支持增加事g行ؓ的接口?/P>

When you attach behavior on page load, you may have to work around some known issues. First, you may encounter differences in cross-browser event handling. Second, make sure you don't overwrite existing onload handlers. Last, but not least, you may encounter a delay in the attachment of your behavior. The underlying Q潜在的Qproblem is that a window onload event will only execute after the whole document, including all page assets like images and objects, is loaded. If your script needs to respond immediately after an element has loaded or if you work with a lot of content, a series of images or a slow server, you may be forced to look for a solution. You can either hide your content until the behavior is attached or attach the behavior via a script call after your elements are loaded, like at the end of the body element.
介绍在页面开发中主要遇到的问题!

Choose your markup wisely, so you can take full advantage of the power of the DOM.<充分利用dom的力?gt; For example, when you use nested lists to build a navigation bar, you can use the structure of the DOM tree instead of a replicated(复制) structure in arrays.<list dom tree> Scripting should be avoided in some cases where you can use markup or CSS to create behavior. This may sound a bit contradictory(反对), however built-in behavior enabled by (X)HTML attributes (e.g. disabling a form field or setting a max length on an input field) and CSS pseudo-classes (e.g. when building rollovers or drop downs) are regarded to be wider supported and easier to implement than using JavaScript. ToughQuiz on Quirksmode illustrates the discussion and the fine line between the uses of CSS generated content and regular markup and behavior.

In those cases where CSS currently lacks<~Z> cross-browser support or is missing features for adding presentation, DOM based scripting can supplement<补充> CSS. Presentational scripting will probably be replaced in a few years, when browsers have better CSS2.1 compliance<Z> and with the support of CSS3. Please realize that, because of the interrelationship<怺影响> of the different Web Standards and because both Web Standards and Web clients are constantly evolving<q化>, some good practices for using the DOM and JavaScript will change over time<随着旉的过?gt;.

2. Create accessible<可理解的、易受媄响的> JavaScript

JavaScript is accessible when a page's navigation, content and main functionality (e.g. submitting a form) is available to your whole target audience, independent of their Web client or input device. This includes:

  • People who use assistive<帮助> technologies, like screen readers
  • People who don't use a mouse for navigation
  • People who have no JavaScript support (e.g. some mobile clients), have JavaScript disabled, or have partial<部分?gt; DOM or JavaScript support
  • Machines, like search engines

The most common way to create accessible JavaScript is to use unobtrusive techniques that are mouse independent and enhance your already accessible markup with behavior. Progressive enhancement and its predecessor graceful degradation are good strategies to create Web pages that are accessible to the most common denominator, while providing a better user experience for a smaller group of people with more advanced devices or Web clients. No matter what strategy you use, make sure that you always design for multiple scenarios.

3. Create usableQ便于用的Q?JavaScript

The usability of a Web page is often determined by a good information architecture, clear and intuitive(直觉? visual design and well designed functionality. One of the main arguments to enhance your markup using unobtrusive JavaScript is to improve the usability of a Web page by supporting these usability attributes. If you add JavaScript and don't enhance the usability of a Web page, you should rethink if you should apply it at all.

4. Create easy applicableQ可适用的) JavaScript

Unobtrusive scripting bridges the gap between 'designers' and 'coders'. There is a big group of people in today's industry that does know how to write (X)HTML and CSS but doesn't feel very comfortable with the DOM and JavaScript. Unobtrusive behavior introduced a mechanism to easily apply small portable scripts to a Web page: "Just make sure your markup looks like A, include this script B, and as a result you have a page that can do C".

Try to create small pieces of independent code. The disadvantages of a lot of existing JavaScript code libraries are that you often have to include a lot more code than you really need and that they are harder to understand and maintain if you didn't create them yourself. Because the functions in these libraries are often grouped and reused by other scripts, it often feels like they are spaghetti-coded. A library with small unobtrusive scripts has the advantage of being light-weight, easy to be understood and easy to be adjusted for more specific implementations.

Create reusable code. If you find yourself duplicating code snippets(片段), create functions. If you find yourself duplicating(复制) similar code snippets, try to abstract your code to the level that you can reuse it for multiple purposes.

Document your code well. If you work together with other people, like to share your code with others, or still want to know why you did certain things one year from now, good documentation is key.

5. Create future-proof JavaScript

Avoid browser detection, because it is almost impossible to maintain in the future. Feature testing or object detection offers a browser independent and future-proof technique to test to what extent your Web client supports JavaScript.

XHTML (if not used in backwards-compatible mode) introduces media type application/xhtml+xml (currently unsupported by Internet Explorer), which has a huge impact on how we write JavaScript code:

  • The HTML DOM is case-insensitive, the XML DOM is case-sensitive (区分大小?
  • Elements need to be referenced in lowercase, e.g. document.getElementsByTagName("p")
  • document.body is deprecated, instead reference it by id or use document.getElementsByTagName("body").item(0)
  • Collections like document.images, document.applets, document.links, document.forms and document.anchors do not exist when serving XHTML as XML, instead use document.getElementsByTagName()
  • innerHTML and document.write cannot be used anymore, instead use DOM methods, e.g. document.createElementNS("http://www.w3.org/1999/xhtml", "div")

If you want to keep yourself up-to-date with the latest developments, there are a lot of initiatives from different organisations that will impact the ways we use JavaScript and the DOM in the near future:

  • W3C
    • DOM 3 provides further XML and XPath integration
    • XHTML 2 includes XML Events, which introduces a declarative way to hook up event observers via markup, and XForms, which will change the way how we add behavior to forms
    • CSS3 introduces new pseudo-elements
  • ECMA
  • Browser vendors
    • Standards support, e.g. at the moment it is still a big question if Microsoft will ever fully support existing Web Standards and is going to support future standards
    • The addition of proprietary methods and attributes, e.g. innerHTML, Microsoft.XMLHTTP and XMLHttpRequest
    • Collaborations like the WHAT WG aimed to create new standards in shorter timeframes, e.g. the submission of Web Forms 2 to become a W3C recommendation and Web Applications, which in the future may standardise XMLHttpRequest

6. Know JavaScript's weaknesses(q), limitationsQ限Ӟ and bugs

Although JavaScript is generally well supported by most modern Web clients, support still remains its biggest weakness. Because from the first days of the Web users were often harassed(疲倦的) by all kinds of annoying(讨厌? behavior, browser makers decided to make it easy to switch JavaScript off (Windows XP Service Pack 2 even disables some JavaScript by default, because it regards it as active scripting). If you compare JavaScript with its little stepbrother ActionScript (which is supported when the Flash plug-in is installed and cannot be switched off), you will find that the main difference is that you can rely on its behavior to accomplish certain tasks. Because it is just too easy to switch JavaScript off, simple tasks like form validation always need to be duplicated at the server side. It will be for this reason that in the future most client-side form validation will be replaced by markup and 'built-in behavior'.

As mentioned earlier, the onload event handler is insufficient to get the best out of unobtrusive techniques. I hope that the people of the W3C will respond to this feedback from the JavaScript community and add new handlers like onElementLoad and onDOMLoad to future DOM specifications.

The JavaScript implementations of Internet Explorer and Safari suffer from memory leaks when using circular references like closures. When using circular references, make sure you remove event handlers when a page is unloaded.

7. Often there is more than one good solution

JavaScript is a very flexible language and as a result you often have multiple ways of doing things. You could choose for either a procedural(E序? or an object oriented way of coding. For your unobtrusive behavior you can either use custom attributes or use class attributes as triggers to fully control the behavior of your site. Flexibility implies that you have to make certain choices, however often one solution is not necessarily better or worse than another. Base your decisions on the context in which you have to use your scripts and your own philosophy or taste and try to use a consistent coding style.

8. Write your own scripts or reuse code from trusted places

Currently a lot of outdated(q期? and badly written code is available on the Internet. Many scripts are plagued by browser detection, are using proprietary features that don't work cross-browser, are inaccessible or are not separating behavior from structure, because they rely on inline event handlers and scripts. It seems that Web Standards, Web clients and the practice of writing good JavaScript have evolved so quickly in the past two years, that it is hard to keep up with the latest good practices. This on its turn makes it hard to reuse code from others or reuse code you wrote yourself a year ago. Because some parts of older scripts may still contain valid code constructs, it is best to review them and rewrite the parts that don't suffice anymore. You will probably often find that a complete rewrite will do best.

So how do less experienced DOM and JavaScript users tell the difference between good and bad code on the Internet? There are some experts on the Internet that advocate modern ways of scripting and there are communities that discuss and rate new scripts and techniques. Some examples are:

DHTML Utopia: Modern Web Design Using JavaScript & DOM is the first title of a new range of books focusing on the application of modern JavaScript and unobtrusive scripting techniques.

9. Optimize your JavaScript code for performance

Optimize your scripts for both download speed and execution speed. <下蝲速度和执行速度>Some tips:

  • Avoid fat code libraries and make sure your scripts stay lean and mean (or: small, independent and straightforward)
  • Write efficient code and avoid constructs that execute slow
  • Keep developer versions of your scripts that include full comments and use a compression<压羃> tool (like JavaScript cruncher or JavaScript Crunchinator) to strip out all comments and white-spaces to create a version for deployment.

10. Use tools to optimize your work process

A selection of tools that make life much easier:

  • Mozilla or Firefox browser
    • Includes the good old Netscape JavaScript console by default (Tools > Web Development > JavaScript Console for Mozilla and Tools > JavaScript Console for Firefox), e.g. to view errors and warnings that make sense
    • The Web Developer Toolbar extension, e.g. to quickly enable or disable your scripts
    • The Mozilla DOM Inspector and the Firefox DOM Inspector extension, to inspect and edit the live DOM of any Web document
    • Venkman, the JavaScript debugger (the Venkman extension for Firefox)
  • JSDoc, a tool that parses inline documentation in JavaScript source files, and produces an HTML summary
  • JSLint, a JavaScript verifier to check for syntax and programming errors.

Back



]]>
Navigator object & userAgenthttp://www.aygfsteel.com/javaora/archive/2006/01/14/28001.htmljava世界畅谈java世界畅谈Sat, 14 Jan 2006 01:55:00 GMThttp://www.aygfsteel.com/javaora/archive/2006/01/14/28001.htmlhttp://www.aygfsteel.com/javaora/comments/28001.htmlhttp://www.aygfsteel.com/javaora/archive/2006/01/14/28001.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/28001.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/28001.htmlThe Navigator object (named after the Netscape web browser, of course) has variables that specify the name and version of the browser that is running, as well as variables that identify the platform on which it is running. These variables allow scripts to customize their behavior based on browser or platform, so that they can take advantage of extra capabilities supported by some versions or work around bugs that exist on some platforms.

userAgent
   The string that the browser sends in its USER-AGENT HTTP header.This property typically contains all the information in both appName and appVersion.

eg.
 this.isIE = navigator.userAgent.toLowerCase().indexOf("msie") >= 0;



]]>
Function.bindAsEventListenerhttp://www.aygfsteel.com/javaora/archive/2006/01/14/27999.htmljava世界畅谈java世界畅谈Sat, 14 Jan 2006 01:35:00 GMThttp://www.aygfsteel.com/javaora/archive/2006/01/14/27999.htmlhttp://www.aygfsteel.com/javaora/comments/27999.htmlhttp://www.aygfsteel.com/javaora/archive/2006/01/14/27999.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/27999.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/27999.htmlname: Function.bindAsEventListener

This provides a new method to the core class Function. The method,called bindAsEventListener(),is used to do bind methods to event handlers.

qؓ核心class 函数支持了一个新的方法。这个方法叫bindAsEventListener(),是用来绑定方法给事g处理器的?BR>var obj = new SomeClass();
var closure = obj.someMethod.bindAsEventListener(this);
element.onclick = closure;



]]>
վ֩ģ壺 | | | żҽ| | Դ| | ˮ| | | ξ| ̷| | | | | ̨| | | Ȫ| ԭ| ɽ| | | ͨ| н| | | | Ϫ| | | ̨| ʱ| ɽ| ֦| | IJ| ƽ| ߶| |