Symbols A

Document Sample
Symbols A Powered By Docstoc
					                                                                                index
Symbols                       ActionController 492               Ajax.Base 50
                              ActionPack 492                     Ajax.InPlaceCollectionEditor
$$() 335, 440                 ActiveRecord 432                        163
  and CSS rules 336           ActiveX 5                            ajaxOptions option 166
  and RJS 440                   component 19                       cancelLink option 165
$() 20, 318, 384              addClassName() 340                   cancelText option 165
  defined 334                 addHeader() 493                      clickToEditText option 165
  flexibility of argument     Adept 479                            collection option 163, 165
     type 335                   package manager 480                externalControl option 166
  and Insertion objects 343   Ajax 4, 143                          formClassName option 165
  multiple arguments 335        adding new programming             formId option 165
$() function 76                    languages to a project 86       highlightcolor option 165
$_POST                          benefits to network traffic 91     highlightendcolor option 165
  and raw POST data 377         different styles of 72             loadTextUrl option 166
$_REQUEST 380                   impact on network traffic 87       okButton option 165
  and raw POST data 377         moving a classic web app           okText option 165
$A() 63, 318, 391                  over to 48                      onComplete option 165
  and the DOM 329             Ajax helper classes                  onFailure option 165
  and Strings 319               in Prototype 72                    savingClassName option 165
                              Ajax helper objects 50               savingText option 165
$F() 352
                              Ajax libraries 25                  Ajax.InPlaceEditor 143
  form element types 352
                              Ajax request 379                     ajaxOptions option 148, 153
$H() 23, 320, 379
                              Ajax Responder 370, 377, 409         callback option 148, 152, 154
  and the Hash Object 320       as notification system 370         cancelLink 150
$HTTP_RAW_POST_DATA           Ajax.Autocompleter                   cancelLink option 147
     377, 495                      167–168, 428                    cancelText option 147, 150
$R() 323                        afterUpdateElement                 clickToEditText option 147
<< method                          option 171, 173                 cols option 147, 150
  of RJS page object 441        frequency option 171–172           externalControl option 148
                                indicator option 171, 173          formClassName option 147
A                               minChars option 171–172            formId option 147, 151
                                parameters option 171–172          highlightcolor option
absolute positioning 40         paramName option 171                  147, 150
  of DOM elements 345           tokens option 171, 173             highlightendcolor
absolutize() 346                updateElement option                  option 147, 150
Abstract.TimedObserver 354         171, 173                        loadingText option 147, 150


                                            497
498        INDEX




Ajax.InPlaceEditor (continued)    apache_request_headers() array     Array.sortBy() 317
   loadTextURL option               and PHP 377                      Array.splice() 296–297
      148, 150, 153               Appear effect 114                    to add or substitute
   okButton option 147, 150       appendChild() 332, 342                  elements 297
   okText option 147              Apple iTunes 187                     to remove elements 297
   onComplete option              application                        Array.unshift() 295
      148, 152, 158                 context 472                      Array.without() 301
   onFailure option                 workflow 142                     Array.zip() 315
      148, 152, 158               application.js                     array-like syntax
   and Rails 426                    in Rails apps 413                  and reflection 261
   rows option 147                application.rhtml 414              arrays
   savingClassName option         application/x-www-form-              associative 293
      147, 151                        urlencoded 19                    as fundamental language
   savingText option              arguments 281                           feature 293
      147, 150–151                Array 253                            numerically indexed 293
   size option 147, 150           Array methods                        types of 293
Ajax.PeriodicalUpdater              and RJS 440                      Arrays and Strings 299
      73, 83, 422                 Array.all() 304                    asynchronous 5
   potential dangers of 74        Array.any() 304                      property of Ajax.Request 54
Ajax.Request 22, 27, 51, 72,      Array.clear() 301                    request 27, 46
      252, 376, 392, 409, 490     Array.collect() 311, 378, 391      auto_complete_for 427
   and HTML Forms 353             Array.compact() 301                autocomplete feature 426
                                  Array.concat() 296                 Autocompleter 265
Ajax.Responders 74, 82,
                                  Array.detect() 306                 autocompleter control 168
      401, 435
                                  Array.each() 303                     in action 169
Ajax.Updater 72–73, 76, 78, 421
                                  Array.findAll() 306                  callbacks 173
   container element 73
                                  Array.first() 300                    creation 168
   limitations of 434                                                  example 168
                                  Array.flatten() 302
   in Rails 414                                                        multiple choices 173
                                  Array.grep() 308
   and Rails                                                           options 171
                                    optional iterator function 308
      remote_function 423                                              server-side code 174
                                  Array.include() 270, 305
Alex P 381                                                             server-side control 171
                                  Array.indexOf() 301
aliases                           Array.inject() 313                   styling 179
   for methods of                 Array.invoke() 312                   triggering 172
      Enumerable 306              Array.join() 299, 378              Autocompleter.Local 181
all() 304                         Array.last() 300                     choices option 184–185
animation 387                     Array.max() 316                      fullSearch option 184, 186
   effects 98                     Array.min() 316                      ignoreCase option 184, 186
   timeline 389                   Array.partition() 307                indicator option 184
anonymous function                Array.pluck() 310, 392               minChars option 185
      16, 279, 285                Array.pop() 295                      parameters option 184
   and closures 285               Array.prototype 300                  paramName option 184
   and Prototype’s event          Array.push() 295                     partialChars option 184–186
      system 350                  Array.reject() 306                   partialSearch option 184–185
any() 304                         Array.reverse() 298, 316
   and detect() 306               Array.shift() 295                  B
Apache 474                        Array.slice() 296
Apache Tomcat 478                   optional arguments 296           balance of code size
Apache Web Server 478             Array.sort() 298, 316                between client and server 85
   versions 478                     providing a comparator           bandwidth
Apache web server 491                 function 298                     consumes 88
                                                                                 INDEX         499



bandwidth (continued)         canceling effects 133               close-up 27
  overhead of multiple Ajax   carriage returns                    close-up view
     requests 77                 and HTML parsing 329               hiding, in QuickGallery 76
  shaping using Fiddler 462   cascading style sheet. See CSS      closure 16, 201, 278, 284
bar chart 91                  Catalina. See Tomcat                  accidental creation of 285
benefit visual effects        CGI parameters 50                     and anonymous
  benefit of 23               checkbox elements 352                    functions 285
bind() 23                     checkered history                     as solution to function context
bindAsEventListener()            of browser event model 349            switching in objects 287
     20, 23, 351              child nodes 391                       definition 284
BlindDown effect 115          childNodes 299, 318                   in JavaScript 278
BlindUp effect 115            childNodes property                   and JavaScript Functions 278
Boo 492                          of DOM elements 328                and the keyword this 287
breadcrumb 57, 64                and pseudo-arrays 329              lack of syntax 285
  trail 28, 30–31, 34, 361    children property of DOM              practical use of 278, 284, 286
browser event model 8               elements (IE only) 329          problems in coding 285
  classic versus W3C 349      clash in namespaces 266                and scope of variables 285
bubble sort algorithm 298     class definitions in JavaScript       simplifying in Prototype 288
BufferedReader 495               lack of 258                        and XMLHttpRequest
buffering of the response     class inheritance                        object 19
  on the server 492              in JavaScript 265                code size, content- versus data-
bugs, cross-canceling 227     class methods                            centric Ajax 86
Builder object 372, 392          and JavaScript Functions 278     coding conventions
built-in transitions 126      Class object 263
                                                                    marking private methods 270
business logic                Class Proxies
                                                                  collect() 311, 318, 320, 378, 391
                                 generic form of 440
  and multiple update                                             Combination Effects 114
                                 in RJS 439
     problem 77                                                   combining words and
                              Class.create() 263, 269
  reusing 75                                                           pictures 361
                                 as ‘syntactic sugar’ 265
  separating from                                                 Combo Box 202
                              classic web application 29, 327
     presentation 37                                              common functionality
                                 and the DOM 327
                                 and HTML forms 351                 abstracting into a mixin 274
C                                shortcomings of 27               compact() 301
                              classic web application             comparator functions 298
C# 254, 269, 281, 284, 393          model 43, 47                    bubblesort 298
caching proxies 459              limitations of 41                comparing styles of Ajax
callback 51                   className property 339                   coding 85
callback function 284, 290       assigning multiple values        comparison function
  and browser events 349            XE 340                          for max() and min() 317
  and closures 286            classNames() 341                    complex Array
  for form element            cleanWhitespace() 342                    manipulations 296
     observers 354            clear() 301                         complex data structures
  in Prototype and            click and drag. See drag and drop     and arrays 293
     Scriptaculous 286        client-side                         complex object model 375
  to Image.onload() 392          domain objects 255               composite effects 388
  writing by hand 72             logic 60                         concat() 296
  X-JSON header as argument   clientX and clientY 290             conditional logic
     of 82                    clone() 347                           applying to arrays 304
callback handler 19, 23          optional arguments 348           configuring effects
camel-case convention 439        See also Position.clone()          in Rails 424
Cancel button 133             close button 386                    CONNECT 447
500         INDEX




constant strings 177                  formatted HTML 329               deployment descriptor 155, 474
constructor 258                       and W3C event model 349          design issues 360
   for Ajax.Updater 76              CRT television set effect 116      desktop controls 141
containment option for Scriptac-    CSS 4, 37, 141, 143, 170,          detect() 306
      ulous Sortables 370                179, 188, 207, 220, 235       DHTML 141, 143
content-centric 47–48, 72, 84         defining look and feel 382         tooltip libraries 382
content-centric Ajax                  delegating visual layout to 39   dialog box 142
   HTTP traffic generation 91         and the Element object 339       Dickens, Charles 444
   and Prototype 87                   fine-grained                     Dictionaries associative
   reducing client-side coding           modifications 341                  arrays 293
      burden 72                       float property 40                digital cameras 28
ContentType 494                       hover modifier 383               document base 472
contentType attribute                 overflow 232, 241                Document Object Model.
   of JSP page directives 493         rule 40, 373                          See DOM
Content-type header 492               selector expression 336          document.forms 299
context object 283                  CSS display property 383           document.getElementById()
context path 154, 472                 block versus inline 383               328
   programmatically                 CSS opacity as modal               doGet() 491
      rendering 154                      backdrop 384                  DOM 4–5, 10, 318, 326
Control.Slider 188                  CSV file 463                         and Array-like objects 318
   axis option 193–194              cumulativeOffset() 345               inspector 327
   axis range 193                   custom HTML attributes               manipulation 86, 121
   disabled option 194, 196           and form_remote_tag 419            node 75
   onChange option 194, 197         custom HTTP headers 376              and Prototype 326, 334
   onSlide option 194, 197          custom JavaScript                    as structural definition 39
   range option 195                   using RJS 433                      as a tree structure 327
   setDisabled() 196                                                   DOM element 73, 392
                                    custom Scriptaculous
   setEnabled() 196                      Effects 386                     childNodes property 299
   setValue() 196                                                        getElementsByTagName()
                                    Cygwin 471, 484
   sliderValue option 194                                                   299
   values option 194–196                                                 and Prototype’s Element
controller 175, 178, 419            D                                       object 336
controller class in Ruby on                                              target for content-centric
      Rails 412                     DarwinPorts 481                         Ajax 76
controls 141                        data- and content-centric Ajax       types 331
   extending with Ajax 141            and internet folklore 92         DOM methods 48
   HTML set 141                     data reformatting 160                using to create new nodes 331
   in-place collection editor 162   database primary keys              Donne, John 446
   in-place text editor 142           and DOM element IDs 328          doPost() 491
cookies 446                         data-centric 47, 49, 84            dot notation for JavaScript
coordinate space and DOM              approach to Ajax 80                   Objects 254
      elements 345                  declaring a function as a top      drag and drop 10, 12,
core effects 109, 388                    level object 279                   205, 367–368
core JavaScript classes             declaring Functions 279              customizing, in Rails 430
   extending 252                    defaults argument of                 delete operation 205
Costello, Eric 6                         javascript_include_tag 413      desktop metaphor 205
criteria for evaluating styles of   defining look and feel               drop target 206
      Ajax coding 85                  using CSS 382                      example 223
Crockford, Doug 6                   defining Object types                for editing slideshows 367
cross-browser 20                      using prototypes 258               in action 223
   and DOM parsing 329              DELETE 447, 452                      and Rails 428
                                                                                 INDEX         501



drag and drop (continued)           creation 218                     Puff 116
  refreshing 371                    drop notification 222            Pulsate 117
  sorting using 228                 drop threshold 219               queuing 135
  to reorganize elements 368        example 218                      quick example 99
  and trash can 368                 hoverclass option 219–221,       running in parallel 134
  using Scriptaculous 369              223, 226                      running serially 135
Draggable 206–208                   onDrop option 219, 222–223       Scale 111
  axis 213                          onHover option 219, 221–223      Shake 117
  callbacks 215                     options 218                      Shrink 116
  change option 211, 215, 217       overlap option 219, 222          simultaneous 134
  constraint option 211, 213        removal 218                      SlideDown 115
  constraints 212–213               remove() 218                     SlideUp 115
  controlling movement 213          selectivity 220                  Squish 117
  current position 216              visual cues 219                  start and end points 108
  effects 216                     dropping 217                       SwitchOff 116
  endeffect option                duration of Effects 388            table of 103
     211, 216–217                                                    toggling 117
  example 208                     E                                  transitions 125
  ghosting 214                                                       types 103
  ghosting option 211, 214, 226   each() 303, 318, 335            Effects Laboratory
  grid 212                        ease of development 85             General 104
  handle option 211, 215             measuring 85                    Parallel 135
  handles 215                     effect toggling, example 119       Queuing 137
  options 210                     Effect.Highlight 417            efficiency 85
  positioning 211                 Effect.SlideShow object 392     element
  revert option                   effects 98                         grouping 217
     211, 216–217, 226               Appear 114                      mapping 217
  revert zindex 211                  BlindDown 115                   ordering 217
  reverteffect option                BlindUp 115                     rearranging 217
     211, 216–217                    callback options 131            sorting 228
  snap option 211–213                canceling 133                Element object 365
  stacking order 214                 code triggers 131               and CSS 339
  starteffect option 211, 216        Combination effects 114         flexible calling semantics 336
  zindex option 214                  common options 107              as mixin 336
draggable objects 428                Core effects 109                and Prototype 336
draggable_element helper 429         diagnostics 132              element proxy in RJS 439
drop target 206, 218, 370            DropOut 116                  Element.addClassName() 340
drop zone. See drop target           duration 107                 Element.classNames() 341
drop_receiving_element               Fade 114                     Element.cleanWhitespace() 342
  support for Ajax 430               Fold 117                     Element.extend.cache
drop_receiving_element               frames per second 108              object 337
     helper 429                      global queue 135             Element.getStyle() 341
DropOut effect 116                   Grow 116                     Element.hasClassName() 341
droppable 206–207                    Highlight 110                Element.hide() 336
  objects 428                        irregular pacing 134         Element.remove() 319, 337
Droppables 228                       Laboratory 104               Element.removeClassName()
  accept option 219–221              MoveBy 113                         340
  add() 218                          multiple 134                 Element.replace() 337, 342
  callbacks 221–222                  named queues 136             Element.setStyle() 341
  constraints 220                    Opacity 109                  Element.show() 336
  containment option 219, 221        pairs 114                    Element.toggle() 336
502         INDEX




Element.update() 337, 342, 436     eval() 48                       firstChild
  and tags 338                     evalScripts                        problems with whitespace 62
email address validation 159         property of Ajax.Updater 78   fixed-length arrays 293
encodeURI() 19, 23                 event handlers                  flatten() 302
encodeURIComponent() 172             programmatically              Flickr 408
encoding 172                            assigning 16               flushing the browser’s cache 88
Enumerable 300, 303                  using JavaScript 349          Fold effect 117
  and Hash 320                     event model                     folklore about Ajax network
  in the Prototype library 300       classic versus W3C 349              performance 92
Enumerable mixin                     and Prototype 349             Form class 439
  in Ruby 273                      Event observers                 form element types
Enumerable Object                    and window.onload 383            and $F() 352
  and Ruby 303                     event.closures                  Form object
Enumerable object 303                and event model 16               in Prototype 351
  aliases for common               Event.observe() 21, 349, 384    Form.disable() 439
     methods 306                   event-driven 286                Form.Element.Observer
  and hashes 303                     programming 286, 291                354, 421
  and ObjectRanges 303             event-handler functions         Form.enable() 439
Enumerable.all() 304                 and Prototype 350             Form.focusFirstElement() 439
Enumerable.any() 304               explode() 31, 34                Form.getElements() 355
Enumerable.collect() 311           extended controls 142           Form.Observer 354
  iterator function for 311        extending Object                Form.reset() 352
Enumerable.detect() 306              dangers of 262                Form.serialize() method 420
Enumerable.each() 303              extending the native Array      form_remote_tag 415, 419, 421
  as foundation of Array                class 261                  formatted HTML 329
     extensions 304                extra network traffic 42        Foster, Mike 6
Enumerable.find(). See Enumer-                                     frames per second (fps)
     able.detect()                                                       property 389
Enumerable.findAll() 306           F                               frequency
Enumerable.grep() 308                                                 of form element
  optional iterator function 308   Fade effect 114                       observers 354
Enumerable.include() 305           Fedora 481                         property of
Enumerable.inject() 313            fgets() 380                           Ajax.PeriodicalUpdater 84
  and iterator functions 314       Fiddler 462                     frequency parameter
  versus collect() 313                differences from                to observe_field 420
Enumerable.invoke() 312                  LiveHTTPHeaders 462       full-page refresh 29, 46, 72
  passing extra arguments             and Internet Explorer 462    Function arguments 281
     to 313                           manual configuration of         mutability of 281
Enumerable.max() 316                     client 463                function context 283
Enumerable.min() 316                  and other web browsers 462      and the browser event
Enumerable.partition() 307         filesystem 29, 360                    model 287
Enumerable.pluck() 310, 322           functions                       and browser events 350
Enumerable.reject() 306                  PHP 30                       object 282
Enumerable.select(). See Enu-      Filters 167                        objects to be called with
     merable.findAll()             findAll() 65, 306, 309, 321           arbitrary contexts 17
Enumerable.sortBy() 317               and complex objects 309         reassigning 283
  ranking function for 317         Fink 481                           switching
Enumerable.zip() 315               Firebug 436                           inside objects 287
  and multiple arguments 315       Firefox 451, 456                function declaration
Enumeration 9                         extensions 460                  inline 279
/etc/init.d/apache2 480            first() 300                        top-level 279
                                                                                   INDEX         503



Function object                   getElementsByTagName()            hierarchical classification 360
  as an Object 280                     62, 299, 331                 high-level API 80
  inherently anonymous 280          and $A() 331                      to avoid tight coupling 80
  methods of 280                    and white space 331             Highlight effect 110, 150
  properties of 280               getStyle() 341                    hover modifier
  referencing versus              ghosting 206, 214                   in CSS 383
     invoking 280                 GIF animation 173                 HTML 4, 141, 188, 206–207
function() keyword 279            global layout in Rails apps 414     block elements 188
Function, as first-class          global variable 63                  button 145
     object 278                   Gnome 479                           controls 141
Function.apply() 281              good practices 40
                                                                      elements 326
Function.bind() 289               Google Suggest 12
                                                                      form elements 162
  and closures 289                graceful degradation of Ajax
  example of 289                       features in Rails 419          Forms 10
Function.bindAsEventListener()    graphs                              forms 41, 351, 494
      290                           of HTTP traffic 459               fragment 419, 434
  and event handlers 290            to display HTTP traffic 88        link 145
  as special case of bind() 290   graying out the UI 385              list element 170
Function.call() 281               grep() 308                          select element 164, 167
functionality 88                    and iterator functions 308        text entry control 145
functions                         Grow effect 116                   HTML markup 326
  as arguments to other           GUI drag and drop 205               adding behavior 378
     functions 303                                                  HTTP 175, 490
  declaring 279                   H                                   description of 444
  are first-class objects 303                                         GET 160, 177, 447
  invoking 279                    halting effects 133                 HEAD 447
  and Prototype 288               hasClassName() 341                  headers 19
                                  Hash Object 319                     measuring toolkit 459
G                                   and Enumerable 320                message format 448
                                    filtering with findAll() 321      method 54, 76
Garrett, Jesse James 4              and Hash object and POST          POST 160, 177, 353, 447
GD                                     body 379                       protocol 17, 444
  graphics libraries                as mixin 319                      statelessness 446
    installing 479                Hash.keys() 322                     status 66
  graphics library for PHP 33     Hash.toQueryString() 323, 379       status code 417
  and XAMPP 482                   Hash.values() 322                   verb 50, 61
generate the X-JSON header 81     Hashes associative arrays 293
                                                                    HTTP 1.1 specification
generated JavaScript, on          Hatcher, Erik 6
                                                                      location of 445
    server 79                     HEAD 447
generating arbitrary JavaScript   header() function in PHP 493      HTTP traffic 74, 459
  in RJS 441                      headers array in Rails 494          breakdown by mime type 90
generating HTML fragments 75      helper objects for Ajax 415         graphs 88
generating JavaScript             helpers in Rails                    results of measuring 88
  benefits 412                      and Prototype and               HTTP traffic data
  using Ruby on Rails 411              Scriptaculous 413              parsing and analyzing 463
GET 447, 452                      hidden iframes 47                 HttpServlet 177
  example message 448             hide() 336                        HttpServletRequest 491
GET and POST                      hiding DOM elements               hyperlinks 41
  and forms in Rails 419            CSS versus DOM                  Hypertext Transfer Protocol.
getElements() 355                      manipulation 332                  See HTTP
504        INDEX




I                                   dispose() 146                    J
                                    disposing 146
id attribute                        DOM IDs 151                      Java 393, 470, 490
   and database primary             enterEditMode() 146                 classpath 157
      keys 328                      example 144                         Collection Classes 178
   of DOM elements 328              failure 153                         Collections and iterators 303
   of HTML Form elements 353        in action 144                       Collections API 493
IFrames 6                           loading 153                         regular expression 159
IIS and PHP 478                     options 146                         Servlets 141, 470
image gallery 27                    script control 146                  StringBuilder 162
Image object 392                                                     java.io.InputStream 495
                                    usage examples 154
implementing slideshow                                               java.io.Reader 495
                                    validations 155
   as an Effect object 386                                           JAVA_HOME 471, 473
implode() 29                     InPlaceEditor 373                   JavaScript 207
In place editing 425                configuring 373                     dynamic loading
in_place_editor_field            insert_html 435                           technique 102
      helper 425                 insertBefore() 333, 342                in the web browser 326
inactivity 41                    Insertion object 342                   wide but not deep knowledge
include() 305                    Insertion.Bottom 343                      of 278
inconsistent state of user          and appendChild() 343            JavaScript Array 9
      interface 77               Insertion.Top 343                      as stacks 295
indentation, readability 54         and $() 343                         filtering 306
indexOf() 301                    installing Python 468                  iterating over 294
information architecture         instanceof operator 261                length property 294
   and Web 2.0 360               interacting with the DOM 327           as linked list 293
information overload 167         interactive JavaScript                 object 293
informed decision                      interpreter 252                  and Prototype 300
   in web architecture 85        interactivity and UI design 366        and Strings 299
inheritance                      interface 4, 273                       tidying, using Prototype 302
   in Ajax helper classes 76     Internet Explorer 123, 192,            truncating 294
   single 269, 272                     233, 235, 456                 JavaScript Callbacks
   single and multiple 269          version 5 5                         in Rails 417
initialize() method 263, 388        version 7 19                     JavaScript event model 16
inject() 313                     invoke() 312                        JavaScript Event object 289
   and the Hash Object 321       IronPython 492                      JavaScript Events 10
innerHTML 16, 48, 73, 342, 392                                       JavaScript Function object
                                 is_dir() 30
   and content-centric Ajax 72                                             8, 278
                                 iterating over
   as simple persistence                                             JavaScript Object
      format 375                    Arrays 294                          as associative array 293
   property defined 334             JavaScript Objects and extend-      extensibility 254
in-place collection editor 162         ing objects 262               JavaScript object declaration
   creation 162                     properties of a JavaScript          simple 255
   in action 164                       object 261                    JavaScript Object Notation 67,
   options 165                   iterator function 303, 391                257
in-place editing 143                and each() 303                   JavaScript Object type 278
in-place text editor                and Enumerable.inject() 314      JavaScript Objects
   activating 146                   external 303                        as associative arrays 256, 319
   callbacks 152                    and the Hash Object 321          JavaScript reflection and the
   control 142, 150                 internal 303                           Scratchpad application 261
   creation 143                  iterators as anonymous              javascript_include_tag 413, 427
   CSS class names 151                 functions 304                 JavaScriptGenerator 436
                                                                                       INDEX        505



JavaServer Pages Standard Tag      learning curve 252                    Mac OS X stop
      Library 178                  legacy app and code reuse 86            switching off default Apache
JavaServer Pages. See JSP          length property 299                        server 482
javax.servlet.http.HttpServlet-       Array object 294                   Macintosh 205
      Request 491                     is read/write 294                  MacPorts 481
javax.servlet.http.HttpServlet-    lenient parsing of HTML               Mandriva 481
      Response 493                    by web browsers 328                manually written
join() 299, 378                    Ley, Jim 6                                 constructors 269
JPEG images 31                     limitations of classic web applica-   map(). See Enumerable.collect()
JScript.NET 492                           tion model 41                  Maps 293
JSON 49, 67, 81, 309               linear transition 389                   associative arrays 293
   as alternative to XML 70, 258   link_to and link_to_remote            max() 316
   core rules 257                     url argument 414                   measuring HTTP traffic
   expression evaluating 69, 82    link_to method 413                      from the client 460
   for defining object             link_to_remote 414–415, 418           memo object 314
      prototypes 259               link_to_remote helper 436             memo pattern XE 314
   header 377                      link_to_remote method 413             methods 8
   and Prototype 258               linked list 293, 295                  methods of Objects
   syntax 280                      lists, sorting 228                      implementing in
JSP 145, 154, 160, 178, 470, 493   LiveHTTPHeaders 460                        JavaScript 256
   Expression language 155            differences from Fiddler 462       Microsoft Excel 468
   page directive 493              LiveHttpHeaders 88                    MIME type 23, 376, 491
   Specification 155               local autocompleter control             setting 58
JSTL 178                              appearance 185                     min() 316
                                      case control 186                   mixin 273
                                      creation 181                         and the Element object 336
K                                     example 182                          applying to base classes 276
                                      in action 183                      mixin object and object
KDE 479                               matching rules 185                      types 274
key presses 290                       options 183                        mixture of content-centric and
keys() 322                         locally scoped variable 80                 script-centric Ajax 80
key-value pairs 293, 322           loose coupling 49                     Model 2 Pattern 175
Kock, Piers-Paul 6                 loosely coupling                      modern OO languages
                                      notification system 370              and multiple inheritance 269
L                                  loosely typed languages               monolithic 41
                                      and reflection 261                 mouse
Laboratory                         low-level                               coordinates 290
   Ajax Auto-completer 171            callbacks 66                         movement 290
   drag and drop 219                  capability                         mouseover 381
   draggables 211, 214                    of Prototype 252               MoveBy effect 113
   HTTP 454                        low-level UI manipulation 326         Mozilla 460
   in-place text editor 148                                                DOM inspector 327
   local autocompleter 184–185     M                                     multiple effects 134
   slider control 194                                                    multiple inheritance 273
   sortables 232, 236, 241         Mac OS X 205, 479                     multiple listeners
language                            and Apache 481                         on UI events 383
   extensions 7                     and GD libraries 481                 multiple update 77, 81
   features 252                     System Preferences 187                 and breadcrumb trail 77
large data sets 167                 third-party package                    limits of Prototype’s
last() 300                             managers 481                           solutions 93
Lawrence, Eric 462                  and XAMPP 482                          problem 48
506         INDEX




multiple update (continued)            as simple object merging      options object in Effects classes
 and Rails 434                            tool 265                     mapping to Ruby code 424
 and RJS 435, 437                      for modeling object           order of returning HTTP
MVC Pattern 175                           hierarchies 269                 responses 77
MVC web application 154              object-oriented hierarchies 8   outerHTML 339
                                     object-oriented JavaScript      over-lapping effects 132
N                                         techniques 6
                                     object-oriented programming     P
name and id attributes                 and JavaScript 254
  of HTML Form elements 353            expectations of 278           page contract 178
named arguments 51                   ObjectRange 319, 323            page object in RJS 436
  alternative to, in JavaScript 52   Objects                         page.replace_html 437
named effect queues 136                extending the behavior 255    page.select() method 440
NameValueCollection 491, 494           in the Scratchpad             Parallel Effect 134
native object 19                          application 253            parent and a child class 271
natural effect pairs                 observe() 349                   parent node 329
  toggling 117                       observe_field 415, 420          parent property
navigate 28                            without invoking Ajax 420       of DOM elements 329
navigation 360                       observe_form 415, 421           parent-child relationships 39
nesting Objects within one           Observer pattern 349            partial page template 412, 438
     another 256                     observers and HTML forms 353    partition() 307
.NET 490–491                         offset of DOM elements          performance 85, 87
network                                and Prototype 345             PeriodicalExecuter 422
  latency 172, 177, 181              offsetLeft                      periodically_call_remote
  load 459                             option to clone() 348              415, 422
  load, measuring 459                  See also Position.clone()     Perl 393
  unpredictable and                  offsetTop                       phone number, formatting 160
     unreliable 77                     option to clone() 348         photo thumbnails 223
network traffic, content- versus       See also Position.clone()     PHP 28, 393, 490
     data-centric Ajax 91            onchange event handler 420        and GD libraries 479
nextSibling 330                      onclick event handler 373         installing 478
normal browsing mode                 onComplete 55                     and operating systems 479
  QuickGallery v2 364                  and Ajax.Responders 82          variation between installed
notation, using JSON 256             onException 55                       sites 478
notification system 370              onFailure 55, 392                 versions of 478
Nuvola icon set 14                   onInteractive 55                  and web servers 478
                                     onkeypress event handler 416    pie charts 90
O                                    onload 144, 157                 pluck() 310, 392
                                     onload event handler            polling the server 83
Object 8                               on Image objects 392          pop() 295
  class, in JavaScript 252           onLoaded 55                     popup 142
object                               onLoading 54                    port
  composition 273                    onsubmit handler                  80 445, 474
  hierarchy 265                        of form_remote_tag 419          8080 445, 472
  literal 51                         onSuccess 55, 392               Position object 344
[object Object] 310                  opacity and CSS 385             position parameter
Object with methods                  Opacity Effect 109, 114, 216      of page.insert_html 438
  simulating in JavaScript 280       OpenOffice Calc 468               of Rails Ajax helpers 417
Object.extend() 263, 265, 388        OPTIONS 447                     Position.absolutize() 346
  and Functions 267                  options object 52, 73, 388      Position.clone() 347
  and inheritance 271                  preparing 388                 Position.cumulativeOffset() 345
                                                                                    INDEX         507



Position.positionedOffset() 345     and Ruby on Rails 411                content-centric
Position.realOffset() 345           when to use 360                        implementations 83
Position.relativize() 346         Prototype Array methods                page layout 361
Position.within() 346               and RJS 440                          v2 393
positionedOffset() 345              chaining into single line of           version 2 360
positive difference of Ajax on         code 311
     HTTP traffic 89              Prototype house style and DOM      R
POST 447                               element creation 372
  body format 449                 Prototype library                  radio buttons 162
  encoding 449                      and core JavaScript              Rails 411
  encoding example 449                 objects 261                     integrating Prototype and
POST body 420                       focus on ease of use 334              Scriptaculous 411
POST request 376, 494             Prototype ObjectRange 195          Rails Ajax helpers, specifying
  and HTML forms 494              Prototype.js version 1.5 74             multiple target nodes 417
  and Java servlets 495           Prototype’s Array helpers 378      Rails helpers, generating server-
  and querystrings 495            Prototype’s Class object 263            side code with 426
  reading raw request body 495    Prototype’s Event observers        Rating object 14
POST variables 53                   and window.onload 383            Ratings example 13
postBody 54                       prototype-based inheritance 7      raw POST body 380
presentation, separating from     prototypes 258                     raw POST data 377
     business logic 37              of core JavaScript objects 260   raw request body 495
previousSibling 330               proxy server 459, 462              readyState 23, 66
                                  public and private members 270     readystate value 19
primary and secondary
     resources                    Puff effect 116                    realOffset() 345
                                  Pulsate effect 117, 365, 370       reassigning function
  in HTTP traffic analysis 467
                                                                          context 283
programmatic reference            push() 295
                                                                     recording HTTP traffic 459
  to DOM elements 76              PUT 447
                                                                     Recycle Bin 205
Prototype 4, 7, 143, 153, 248     Python 393, 463
                                                                     refactoring 20, 374
  $A() 226                          installing 468
                                                                     reflection 261
  $R() function 195               Python’s lambdas
                                                                     reformatting 160
  Ajax helper classes 46            and closures 284                 register() method
  Ajax.Request 153                                                     of Ajax.Responders 82
  and Arrays 293                  Q                                  regular expression 159, 308, 467
  and arrays of complex                                              reject() 306–307
     elements 309                 QueryString 322–323                relative positioning
  and closures 288                  encoding using Hash                of DOM elements 345
  and content-centric Ajax 87          Object 322–323                relativize() 346
  and DOM 326                     querystring 19, 53                 remote_function 415, 423
  and Functions 288                 and HTML forms 352               remove() 319, 337
  version 1.4 89                  queueing effects 135               removeChild() 332
  version 1.5 89                    example 137                      removeClassName() 340
Prototype and                     quick wins with Prototype and      render() method of Rails,
     Scriptaculous 343, 356            Scriptaculous 252                  ApplicationController 412
  and the $() function 335        QuickGallery 27, 72, 360,          rendering differences
  as standalone JavaScript             435, 459, 467, 490              across browsers 346
     libraries 411                  as an Ajax application 47        rendering engine 334
  house style 311                   application 483                  rendering partials in Rails 435
  in a production setting 27        configuring 29, 486              replace() 337
  in real-world setting 360         content-centric 72, 74           replace_html 435
508         INDEX




replace_html method 437             S                                 sensible default values
replaceChild() 333                                                       providing 51
report data 167                     Safari 456                        separating business logic and
request 444                         saving HTTP traffic data                presentation 37
   body and headers 460                using Fiddler 462              Separation of Concerns 177
   CONNECT 447                         using LiveHTTPHeaders 460      serial effects 135
   DELETE 447                       Scale effect 111, 115             serialize()
   GET 447                          scaling algorithm 32                 and HTML forms 352
   HEAD 447                         scheduling 387                       and name attribute 353
   headers 449, 490                 scope 285                         serializing Objects as
   Host header 449                     and closures 285                     QueryStrings 323
   maintaining state 446            scoped variable 178               server load 77, 84
   message format 448               Scratchpad application 252, 294      and polling 84
   methods 447                         and the DOM 326                server response as a string 73
   OPTIONS 447                         highlight() method 328         server-relative addressing 154
   POST 447                            how to use 252                 server-side
   PUT 447                          <script> tags 78                     languages 490
   TRACE 447                           and Ajax.Updater 78               latency 172
   types of 447                        and innerHTML 78                  reformatting 160
   User-Agent header 449            Scriptaculous 4, 97, 141, 248        validation 155, 162
   variable 29                         and Rails 424                     well-factored 75
request.raw_post 423, 496              autocompleter controls 167     servlet 154, 175, 491
requestHeaders 54                      controls 141                   servlet path 157
reset() and HTML forms 352             download location 101          session 446
response 444                           drag and drop 205
                                                                         storing calculation results 77
   error code 158                      Draggable 208
                                                                      setHeader() 493
   header 158                          Droppables 217
                                                                      setHeight
   message example 450                 effects 97
                                                                         option to clone() 348
   message format 450                  files 101
   status codes 450                                                      See also Position.clone()
                                       in-place collection editor
responseText 69                           control 162                 setLeft
responseXML 492                        library 100                       option to clone() 348
responsiveness of polling 84           loading 102                       See also Position.clone()
reuse 86                               local autocompleter            setStyle() 341
   and content-centric Ajax 86            control 181                 setTimeout() 83
   of client-side code 80              Opacity Effect 216             setTop
   of code 37                          setting up 100                    option to clone() 348
reverse() 298, 316                     slider control 187                See also Position.clone()
Rico 7                                 Sortable 228                   setWidth
RJS 433                             Scriptaculous Effect 24, 319,        option to clone() 348
   inlining in the controller 441         386, 408                       See also Position.clone()
.rjs file 436                          managing multiple              Shake effect 117
root folder. See document base            instances 370               shift() 295
Ruby 7, 273, 393, 490               Scriptaculous InPlaceEditor 373   show() 336
   blocks 284                       script-centric 47–48              show() function and Arrays 307
   closures 284                        writing against an API 49      show()scratchpad application
Ruby Enumerable mixin 440           scrolling and DOM element            show() method 253
Ruby on Rails 411, 492                    offset 345                  Shrink effect 116
   and content-centric Ajax 87      searching Arrays 301              simplifying code base 77
   and data-centric Ajax 87         select element 162                simultaneous effects 134
   and script-centric Ajax 87       sensible default 389              sinusoidal transition 389
                                                                                      INDEX         509



Sites folder, XAMPP for              creation 228, 234                 stack
      Mac OS X 482                   drag behavior 235                    definition of 295
sizing edit box with Rails           dropOnEmpty option                   JavaScript Arrays as 295
      in_place_editor_field 426         231, 238                       start(), method of
skip_style option on Rails auto-     element type 232                        Ajax.PeriodicalUpdater 74
      complete helper 428            enabling 232                      stateless protocol 445
Skype and port 80 485                example 228, 233                  static functions of Element
slice() 296                          format option 232                       object 336
SlideDown effect 115                 ghosting option 231, 235          static methods 266
slider control 187                   handle option 232                 Steinberg, Dan 6
   axis 194                          hoverclass option 231, 235        Stephenson, Sam 87, 433
   callbacks 197                     in action 236                     stock ticker, automatically
   creation 188                      moving between 236                      updating 73
   enabling and disabling 196        multiple targets 236              stop(), method of
   example 188                       nesting 241                             Ajax.PeriodicalUpdater 74
   from desktop                      onChange option 232, 243          stop-start
      applications 187               only option 231, 235–236             in QuickGallery 42
   handle 187                        onUpdate option 232, 243             interactions 77
   in action 190                     options 231                          pattern of interaction 5
   in-depth example 197              orientation 238                      pattern of user interaction 41
   operation 187                     overlap option 232, 240           storing and retrieving
   options 193                       and Rails 428                           information 360
   orientation 194                   scroll option 232, 242            String.split() 299, 319
   styling 200                       scrolling 241
                                                                       strongly typed OO-
   track 187                         scrollSensitivity option
                                                                             languages 276
   using images with 191                232, 242
                                                                       structured data 56, 72
   value display 201                 scrollSpeed option 232, 242
                                                                       style property of DOM
   value range 195                   serialize() 243–244, 246
                                                                             elements 341
slideshow 360                        serializing elements 243
                                                                       styles of Ajax, evaluating and
   editing mode 364                  tag option 231–232, 234
                                                                             comparing 72
   editor 361                        tree option 232, 241
   editor impact on layout 362       treeTag option 232, 241           style-sheet and Rails autocom-
   retrieving from server 378      Sortable object refreshing 370            plete helper 428
   storing on the server 375       Sortable.create() 370–371, 432      subclassing Effect.Base 386
SlideShow object 369, 402          Sortable.serialize() 433            subfolders 28, 57
slideshow player 361, 384          sortable_element                    sudo command 480
   implementing 386                  helper 431                           and Mac OS X 482
slideshow.js 365                     parameters 431                    Sun 470
SlideUp effect 115                 sortables in Rails convention for   super-user privileges
Smalltalk’s compiled blocks             element IDs 431                   on Ubuntu Linux 480
   and closures 284                sortBy() 317                        supporting libraries 87
sort() 298, 316                    sorting 228                         Suse 481
Sortable 228                       special folders 30                  switching function contexts 284
   axis 238                        splice() 296–297                    SwitchOff effect 117
   callbacks 243                   split() 299, 319                    symbolic links and Windows 485
   constraint option               spreadsheet 88                      synaptic 479
      232, 238–239                   analysis of HTTP data 463         System.Web.HttpRequest 491,
   constraints 235                   to analyze HTTP traffic 88              495
   containment option              square bracket notation                and raw POST body 495
      231, 236–237, 243              for JavaScript Objects 254           ContentType property 491
   create() 231, 238, 243          Squish effect 117                   System.Web.HttpResponse 494
510        INDEX




T                                TRACE 447                             information overload 167
                                 traffic, HTTP 88                      visual feedback 206, 219
target element 15                transitions 125                     use cases
TCP/IP 445                          built-in 126                       of Ajax.PeriodicalUpdater 83
template 75                         charting 128                     user agent 445
   file 57                          charts of 128                    UTF-8 character set 493
test function 306                   mapper tool 127
test script for HTTP traffic        table of 126
                                    writing custom 130
                                                                     V
      measurement 88
text entry control 145           Transmission Control Protocol/
                                                                     values() 322
text input box 365                     Internet Protocol. See TCP/
                                                                     VB.NET 492
text node and the DOM 331              IP
                                 trash can                           VB.Net 393
text/javascript mime type 492                                        view 178
text_field_with_auto_complete       implementing drag and
                                       drop 370                         in Rails app 412
      427                                                            Vignoni, David 14
this as a reserved keyword 282      in QuickGallery v2 363
                                 Triffids 185                        virtual class 273
thumbnail 27, 223
                                 tuning polling frequency 84         Virtual folders 360
   image 31
                                                                     visibility
   images 28, 75, 361
                                 U                                      toggling 119
      generating 374
                                                                     visual consistency
   images and GD library 374
                                 Ubuntu Linux 479                       when using Effects 370
tight coupling 49, 370
                                   and PHP 479                       visual feedback 11, 23
   and script-centric Ajax 80
                                 underscore as scope                 visual jerkiness 42
timer object 73
title attribute 382                   delimiter 270                  visual layout of elements
toArray() 319                    Universal Resource Locator.            and Prototype 344
   and the $A() function 319          See URL                        visual_effect helper 424
                                 Unix command-line tool
Toggle Pane Widget 119
                                   grep 308                          W
toggle utility function 118
                                 unshift() 295
toggle() 336
                                 update parameter                    W3C event model
toggling effects 117
                                   for Rails Ajax helpers 416          and Prototype 349
Tomcat 470
                                 update() 337                        W3C standard event model 349
   application server 141          and tags 338
   downloading 470                                                   Web 2.0 Logo Creator 381
                                 update() method                     web applications 141–142, 167
   location of 470                 for custom Effects 389
   manager application 474                                             controller 175
                                 update_attribute
   managing applications 474                                           limitations 141
                                   and ActiveRecord 426
   roles 475                     updateUI()Rating object               Model 2 Pattern 174
   running 473                     updateUI() 15                       proper separation of
   user setup 475                updating user interface                  concerns 174
   welcome page 473                   programmatically 327           web browser
toolbar                          URL 76, 445                           JavaScript interpreter 326
   in QuickGallery v2 362          encoding 172, 353, 449            web developers 248
   UI element 381                  query parameter format 172        web server logs 459
tooltip 381                      url parameter for Rails Ajax        web servers and PHP 478
   and DHTML 382                      helpers 416                    web.xml 474
   and title attribute 382       usability 5, 46                     WEB-INF 175
toQueryString() 23, 323, 379       drag and drop 205, 228            weight of images
toString() method 8                guidelines 167                      in HTTP traffic profile 89
                                                                             INDEX          511



weight of JavaScript         without() 301                    XML 49, 56
  in an Ajax app 89          workflow 59                        bloat, and whether it
whitespace                                                        matters 92
  and DOM parsing 329, 380   X                                  format 375
  and DOM solution 330                                        XMLHttpRequest 5, 47,
  in DOM and Prototype 342   XAMPP 482                            153, 158
widget creation 121            coexisting with Skype 485        readystates, in Rails 417
window.onload 401              control panel 484                wrapper object 72
  and Event Observers 383      and GD 482                     XMLHttpRequest object
  attaching multiple           for Mac OS X 482                 and request headers 490
     callbacks 383             port scanning 484              X-SLIDENAME custom
window.onload event 383        troubleshooting 484                header 376
Windows 484                    for Windows 484                XSLT style sheet 453
Windows XP 479               XHR object 278
  Sound Panel 187              and closures 278               Z
within() 346                 X-JSON header 81, 83, 370–371,
                                  374, 409, 435               zip() 315

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:39
posted:9/2/2011
language:English
pages:15