Prototype, jQuery in Dreamweaver
Blogs20102010-11-12
JavaScript framework (library) is indispensability in todayâs web developing, the popular 2 are Prototype, jQuery. Both Prototype and jQueryâs Ajax are super, which can satisfy mostly users requirements. For me, I use proximately Prototype 50% and jQuery 10% in my developing, mixed with pure JavaScript 30% and others 10%.
Meanwhile, ususally I use Dreamweaver as developing platform. Dreamweaver has its JavaScript framework Spry which integrates into the GUI environment.
So it is natural and inevitable to use Spry functions such as âMenu Barâ, âTabbed Panelâ, and âAccordionâ for quick application (actually they are simply to use, just click the men button!).
So as a web/ajax developer in âDreamweaverâ environment, the possible combination of JavaScript are:
- Pure JavaScript
the simplest way, such as for validation: if(/^s+$/.test(form.field.value)) { alert(âŠ); return false;} - Prototype
for Ajax, of course, also with a lot of other utility methods, and modules. Itâs smaller and quicker than jQuery, besides, with its famous UI interface extension http://script.aculo.us/. - jQuery
XPath, Ajax, DOM, Events, Effects, other plugins, etc. - Spry
yes, quick app for tabbed Panel which I used mostly. - Prototype + Spry
create prototype objects to access Spryâs tabs. - jQuery + Spry
create jQuery objects to access Spryâs tabs. - Others
such as js window.
Prototype is my first choice, I used the following functions:
- Autocompleter
- InPlaceEditor / InPlaceCollectionEditor
- Draggable
- Effect.* series
plus the outstanding UI interface functions, animation effects, they are really cool.
jQueryâs most favorite features are listing here:
-
searching for elements using CSS selectors
This is most I like jQuery$(âli[a:contains(âRegisterâ)]â); $(âinput[@type=radio][@checked]â) $(âul/li/dl/liâ) $(â#myForm :inputâ)
- operations implicitly applied to all found elements
-
ability to chain operations
Suppose how much work we can do to use just a single statement!$(âdiv1 div2 div3â).removeClass(â).addClass(â).show().accordion().sortable({});
No matter which framework you prefer to, in Dreamweaver environment, there are 2 very useful extension plugins from http://xtnd.us/dreamweaver/.
They will give auto-remindering box when typing, by using them, Coding Prototype and jQuery are pretty easy and faster in Dreamweaver.
