Wiki source code of ERJQuery
Last modified by Ravi Mendis on 2010/11/30 05:16
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
33.1 | 1 | == What is ERJQuery? == |
2 | |||
![]() |
99.1 | 3 | ERJQuery is an alternative, //pseudo-stateless// Ajax framework for WebObjects applications. |
![]() |
101.1 | 4 | It's is a [[jQuery>>url:http://jquery.com/||shape="rect"]] version of [[doc:documentation.Home.Frameworks.ERPrototaculous.WebHome]]. |
5 | ERJQuery and [[doc:documentation.Home.Frameworks.ERPrototaculous.WebHome]] are mutually exclusive frameworks. In other words, you may only use one or the other. | ||
![]() |
33.1 | 6 | |
![]() |
51.1 | 7 | Features include: |
8 | |||
![]() |
99.1 | 9 | * 'Organic' support for [[jQuery>>url:http://jquery.com/||shape="rect"]] in WebObjects. |
![]() |
51.1 | 10 | ** Light-weight dynamic elements to support jQuery |
11 | ** Transparent API that doesn't hide or abstract jQuery | ||
12 | ** Sans patches or extensions to jQuery | ||
![]() |
99.1 | 13 | * Use of [[Unobtrusive Javascript>>url:http://en.wikipedia.org/wiki/Unobtrusive_JavaScript||shape="rect"]]. |
![]() |
51.1 | 14 | * Pseudo-stateless ajax responses |
15 | * A set of jQuery widgets. | ||
16 | |||
![]() |
101.1 | 17 | Ajax actions and update containers are handled just like [[doc:documentation.Home.Frameworks.ERPrototaculous.WebHome]] except they use jQuery instead of Prototype and Scriptaculous. |
![]() |
51.1 | 18 | |
![]() |
81.1 | 19 | ==== Unobtrusive JavaScript in ERJQuery ==== |
20 | |||
![]() |
100.1 | 21 | [[doc:WO.Using Unobtrusive JavaScript]] |
![]() |
81.1 | 22 | |
![]() |
100.1 | 23 | {{include/}} |
24 | |||
![]() |
99.1 | 25 | {{code}} |
26 | |||
27 | er.jquery.useUnobtrusively = true | ||
28 | |||
29 | {{/code}} | ||
30 | |||
![]() |
81.1 | 31 | ==== jQuery WebObjects Elements ==== |
32 | |||
![]() |
99.1 | 33 | //jQuery.get()// has been implemented as a WebObjects dynamic element. Currently support for [[jQuery.get()>>url:http://api.jquery.com/jQuery.get/||shape="rect"]] and [[.load()>>url:http://api.jquery.com/load/||shape="rect"]] is limited to the following: |
![]() |
81.1 | 34 | |
35 | ===== jQuery.get() ===== | ||
36 | |||
37 | * jQueryGetLink | ||
38 | |||
![]() |
99.1 | 39 | ===== jQuery.load() ===== |
40 | |||
41 | * jQueryLoadLink | ||
42 | |||
![]() |
51.1 | 43 | ==== jQuery Widgets ==== |
44 | |||
![]() |
99.1 | 45 | (% class="alternate" %) |
46 | * [[FileUpload>>url:http://valums.com/ajax-upload/||shape="rect"]] | ||
47 | * [[Video Player>>url:http://www.longtailvideo.com/players/jw-flv-player||shape="rect"]] | ||
48 | * [[Tweet Button>>url:http://twitter.com/about/resources/tweetbutton||shape="rect"]] | ||
![]() |
51.1 | 49 | |
![]() |
63.1 | 50 | Support for the file upload widget has been implemented as an input and as a CSS style-able container. |
![]() |
51.1 | 51 | |
![]() |
99.1 | 52 | = Embrace Statelessness! = |
![]() |
65.1 | 53 | |
![]() |
100.1 | 54 | [[doc:WO.Embrace Statelessness]] |
![]() |
65.1 | 55 | |
![]() |
100.1 | 56 | {{include/}} |
57 | |||
![]() |
99.1 | 58 | ERJQuery embraces the stateless model Ajax offers in exchange for simplifying the work WebObjects has to do - it's a win-win! |
![]() |
65.1 | 59 | |
![]() |
71.1 | 60 | So you may observe one notable difference between ERJQuery and the Ajax framework is in the way it handles ajax responses. |
![]() |
101.1 | 61 | In ERJQuery, updates and actions break with standard WebObjects behaviour by being pseudo-stateless just like [[doc:documentation.Home.Frameworks.ERPrototaculous.WebHome]]. |
![]() |
65.1 | 62 | |
![]() |
51.1 | 63 | == Compatibility == |
64 | |||
65 | ERJQuery can not be used with WebObjects 5.3 as it is dependent on the hooks for ajax added to WebObjects with version 5.4. | ||
66 | |||
![]() |
99.1 | 67 | {{warning title="ERJQuery is WebObjects *5.4* compatible only"/}} |
![]() |
51.1 | 68 | |
![]() |
99.1 | 69 | == External Links == |
![]() |
51.1 | 70 | |
![]() |
99.1 | 71 | WOWODC '10 (Slides) - [[DirectToWeb 2.0>>url:http://www.wocommunity.org/wowodc10/slides/D2W2.pdf||shape="rect"]] |