Reef
                                AJAX the way it should be




miércoles 29 de febrero de 12
Who am I?




miércoles 29 de febrero de 12
Who am I?


                    • The guy who builds a VM, and everybody hates
                          because their plugins are not ready




miércoles 29 de febrero de 12
Who am I?


                    • The guy who builds a VM, and everybody hates
                          because their plugins are not ready
                    • He also does some Seaside time to time


miércoles 29 de febrero de 12
Last year...


                    • Reef presentation was a big success (thanks!)
                    • Some of you tried it and provide valuable
                          feedback...




miércoles 29 de febrero de 12
But not everybody present here today
                                        was present last year...


                                          So... what’s Reef?




miércoles 29 de febrero de 12
“The problem”




miércoles 29 de febrero de 12
Nesting problem
             Functionality is distributed all around the component
                              (and could be worse)



                    • renderContentOn:
                                sends renderRegionsOn:
                                 sends renderCitiesOn:



miércoles 29 de febrero de 12
Nesting problem

                   Real problem is we are still programing in HTML
                     (yes, with smalltalk “flavour”, but still HTML)




miércoles 29 de febrero de 12
Reef summary

                          AJAX/Javascript
                            component
                          framework for
                              Seaside.




miércoles 29 de febrero de 12
Reef summary




                                Models HTML/Javascript components
                                       into Smalltalk objects

miércoles 29 de febrero de 12
Reef summary


                                Hides communication complexity




miércoles 29 de febrero de 12
Reef architecture




miércoles 29 de febrero de 12
Reef architecture


                                   Dispatcher




miércoles 29 de febrero de 12
A trade-off
                                (yep, there is always one)



                                   An extra request
                  (not always, but enough to be taken into account)




miércoles 29 de febrero de 12
Communication

                    • We handle interactions through callbacks, just
                          as Seaside
                    •                         Texto
                          But all callbacks should be threat the same
                         • AJAX calls
                         • regular requests
                         • client behavior

miércoles 29 de febrero de 12
Example




miércoles 29 de febrero de 12
Coming to your image... this year!
miércoles 29 de febrero de 12
What changed
                                        (for good)



                          Better
                     integration with
                         jQuery:
                    skins, widget box




miércoles 29 de febrero de 12
What changed
                                   (for good)



                    An important
                    optimization:
                #asReefTriggerCallback




miércoles 29 de febrero de 12
What changed
                                      (for good)



                    More widgets
                    (but still just
                    those I need)




miércoles 29 de febrero de 12
What’s new
                                  (and testing)




                    Composites




miércoles 29 de febrero de 12
What’s new
                                    (and testing)

           • Magritte-Reef
            • Brings web 2.0 to
                      Magritte-Seaside
                • Ease cool effects:
                 • tooltips, masks, etc.
                • Complex behaviors

miércoles 29 de febrero de 12
What remains
                                 (and it shouldn’t)




                    • Documentation is still poor
                    • Reef protocol names are still ugly
                    • Testing is still non-existent
miércoles 29 de febrero de 12
The heresy revisited
                                (we need to be heretics again)




miércoles 29 de febrero de 12
you know:




miércoles 29 de febrero de 12
why not:




miércoles 29 de febrero de 12
Future work
                    • Still experimenting with optimizations around
                          the dispatcher
                    • Rename all protocols into something really
                          meaningful
                    • Write more documentation (like finalize the
                          chapter for PBE2)
                    • More feedback?

miércoles 29 de febrero de 12
Questions?
                                http://squeaksource.com/Reef




miércoles 29 de febrero de 12

Reef - ESUG2011

  • 1.
    Reef AJAX the way it should be miércoles 29 de febrero de 12
  • 2.
    Who am I? miércoles29 de febrero de 12
  • 3.
    Who am I? • The guy who builds a VM, and everybody hates because their plugins are not ready miércoles 29 de febrero de 12
  • 4.
    Who am I? • The guy who builds a VM, and everybody hates because their plugins are not ready • He also does some Seaside time to time miércoles 29 de febrero de 12
  • 5.
    Last year... • Reef presentation was a big success (thanks!) • Some of you tried it and provide valuable feedback... miércoles 29 de febrero de 12
  • 6.
    But not everybodypresent here today was present last year... So... what’s Reef? miércoles 29 de febrero de 12
  • 7.
  • 8.
    Nesting problem Functionality is distributed all around the component (and could be worse) • renderContentOn: sends renderRegionsOn: sends renderCitiesOn: miércoles 29 de febrero de 12
  • 9.
    Nesting problem Real problem is we are still programing in HTML (yes, with smalltalk “flavour”, but still HTML) miércoles 29 de febrero de 12
  • 10.
    Reef summary AJAX/Javascript component framework for Seaside. miércoles 29 de febrero de 12
  • 11.
    Reef summary Models HTML/Javascript components into Smalltalk objects miércoles 29 de febrero de 12
  • 12.
    Reef summary Hides communication complexity miércoles 29 de febrero de 12
  • 13.
  • 14.
    Reef architecture Dispatcher miércoles 29 de febrero de 12
  • 15.
    A trade-off (yep, there is always one) An extra request (not always, but enough to be taken into account) miércoles 29 de febrero de 12
  • 16.
    Communication • We handle interactions through callbacks, just as Seaside • Texto But all callbacks should be threat the same • AJAX calls • regular requests • client behavior miércoles 29 de febrero de 12
  • 17.
  • 18.
    Coming to yourimage... this year! miércoles 29 de febrero de 12
  • 19.
    What changed (for good) Better integration with jQuery: skins, widget box miércoles 29 de febrero de 12
  • 20.
    What changed (for good) An important optimization: #asReefTriggerCallback miércoles 29 de febrero de 12
  • 21.
    What changed (for good) More widgets (but still just those I need) miércoles 29 de febrero de 12
  • 22.
    What’s new (and testing) Composites miércoles 29 de febrero de 12
  • 23.
    What’s new (and testing) • Magritte-Reef • Brings web 2.0 to Magritte-Seaside • Ease cool effects: • tooltips, masks, etc. • Complex behaviors miércoles 29 de febrero de 12
  • 24.
    What remains (and it shouldn’t) • Documentation is still poor • Reef protocol names are still ugly • Testing is still non-existent miércoles 29 de febrero de 12
  • 25.
    The heresy revisited (we need to be heretics again) miércoles 29 de febrero de 12
  • 26.
    you know: miércoles 29de febrero de 12
  • 27.
    why not: miércoles 29de febrero de 12
  • 28.
    Future work • Still experimenting with optimizations around the dispatcher • Rename all protocols into something really meaningful • Write more documentation (like finalize the chapter for PBE2) • More feedback? miércoles 29 de febrero de 12
  • 29.
    Questions? http://squeaksource.com/Reef miércoles 29 de febrero de 12