Hi folks .. a newbie here.
I just took a great Seaside workshop, given by James Foster of GemStone. One issue that I didn't understand as well as I'd like is Seaside- Javascript integration. I know Prototype/Scriptaculous (and others) are used, but I wasn't clear what the *architecture* of the integration was. For example, are there tiny code fragments built up by the component libraries that create a script? Is there some smalltalk-to-javascript translation taking place? Is there a Seaside specific javascript library loaded onto the client that makes for smooth integration with seaside? I'd *love* a pointer to a tutorial on Javascript integration. Or pointers to which classes to read in detail -- the ones actually spouting javascript and receiving the Ajax XMLHtmlRequests. Thanks! -- Owen _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Owen.
Creating Javascript works very similar to creating HTML: You ask the HTML canvas for a Javascript brushes. You configure it using a cascade of message sends, compose it with other Javascript brushes and eventually assign it to some event handlers. In Seaside there is built-in support for Prototype/script.aculo.us (starting from Seaside 2.7) and jQuery/jQueryUI (starting from Seaside 2.9). You can use all features of these libraries without writing a single line of Javascript code. Every feature is modelled as an object in Smalltalk that knows how to transform itself to Javascript. If you are fluent with these Javascript libraries, you'll immediately know how to use them. All entities are named the same way as their Javascript counterparts. Sometimes it helps to look at the respective Smalltalk classes for nice helper methods, so that you can use callback blocks, etc. A good start is to work through the functional test-suite and play with the examples. They come with the Seaside distribution and can be found under /seaside/tests/scriptaculous, /seaside/tests/jquery and /seaside/tests/jquery-ui. You also find links to instances of the tests running online <http://www.seaside.st/about/examples>. Feel free to ask further questions! Cheers, Lukas On Sun, Apr 5, 2009 at 6:21 AM, Owen Densmore <[hidden email]> wrote: > Hi folks .. a newbie here. > > I just took a great Seaside workshop, given by James Foster of GemStone. > > One issue that I didn't understand as well as I'd like is Seaside-Javascript > integration. I know Prototype/Scriptaculous (and others) are used, but I > wasn't clear what the *architecture* of the integration was. > > For example, are there tiny code fragments built up by the component > libraries that create a script? Is there some smalltalk-to-javascript > translation taking place? Is there a Seaside specific javascript library > loaded onto the client that makes for smooth integration with seaside? > > I'd *love* a pointer to a tutorial on Javascript integration. Or pointers > to which classes to read in detail -- the ones actually spouting javascript > and receiving the Ajax XMLHtmlRequests. > > Thanks! > > -- Owen > > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Owen Densmore
> -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de Owen Densmore > Enviado el: Sunday, April 05, 2009 01:22 > Para: [hidden email] > Asunto: [Seaside] Javascript Integration > > Hi folks .. a newbie here. > > For example, are there tiny code fragments built up by the component > libraries that create a script? unless you ask it to be loaded with a custom #updateRoot: components don't "have" js libraries. Usually the entire app has it (or don't) by the configuration you set. Said that you always can make a component to add its own little script as needed. Is there some > smalltalk-to-javascript > translation taking place? yes. In this style, what you do is to create some smalltalk objects that will be serialized to javascript. I use to write and the inspect the javascript fragment (usually while debugging). This inspection will print the same javascript code the UA will see. Is there a Seaside specific javascript > library loaded onto the client that makes for smooth > integration with > seaside? AFAIK no. The integration is that framework itself. > > I'd *love* a pointer to a tutorial on Javascript integration. Or > pointers to which classes to read in detail -- the ones actually > spouting javascript and receiving the Ajax XMLHtmlRequests. tests are the best current pointer to start (AFAIK). feel free to ask more, FYI you also have the Seaside IRC channel available, have fun, sebastian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
Lukas, Sebastian -- Thanks for the valuable responses.
I'll look into how to apply them to the project I had in mind: Google Maps. http://code.google.com/apis/maps/documentation/reference.html -- Owen _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Mon, Apr 6, 2009 at 3:22 PM, Owen Densmore <[hidden email]> wrote: Lukas, Sebastian -- Thanks for the valuable responses. It would be nice to have that :) Perhaps you should see the mail of James Foster with subject "Examples of Google Maps in Seaside". Cheers, Mariano
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |