Hello Janko,
Jan told me that you are going to inspect some classes that I have used in my project. The most important is class CSWebApplication, that extends WebApplication and includes methods for invoking callback blocks and detecting changes in the element tree. Other classes for page elements are in category CellStore-Web-Elements. I'm thinking about porting some of these classes to Squeak and about creating a library with Aida elements for single-page web applications. As the single-page components are very similar to original components, there should be special categories for them, and they should be named in compliance with a naming convention. For example, category Aida-SP-Components could contain class SPWebApplication. Do you think it is a good idea? What naming convention for classes and categories would you prefer? Best regards, Jarda _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello,
to complete Jarda, all the code could be found at our SVN http://smalltalk.felk.cvut.cz/svn/cvut/fel/cellstore/service_http/trunk/ However, it's quite hard to load it into the image. Jarda, can you extract all the single-page functionality from the service_http and move it to package stx:goodies/aida together with very simple demo app? Then Janko and others may load it without need to load whole CellStore (which is bit complicated to load because of myriads of more-or-less broken branches :-) Jan On Wed, 2009-06-24 at 20:41 +0200, Jaroslav Havlín wrote: > Hello Janko, > > Jan told me that you are going to inspect some classes that I have > used in my project. > > The most important is class CSWebApplication, that extends > WebApplication and includes methods for invoking callback blocks and > detecting changes in the element tree. > Other classes for page elements are in category CellStore-Web-Elements. > > > I'm thinking about porting some of these classes to Squeak and about > creating a library with Aida elements for single-page web > applications. > > As the single-page components are very similar to original components, > there should be special categories > for them, and they should be named in compliance with a naming convention. > For example, category Aida-SP-Components could contain class SPWebApplication. > > Do you think it is a good idea? What naming convention for classes and > categories would you prefer? > > Best regards, > Jarda > _______________________________________________ > Aida mailing list > [hidden email] > http://lists.aidaweb.si/mailman/listinfo/aida _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello Jan,
of course, I can :-) I'm sorry, I can't start working on it right now. I hope it will be done before the weekend. Jarda 2009/6/24 Jan Vrany <[hidden email]> Hello, _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
In reply to this post by Jaroslav Havlín-2
Hi Jarda,
JH> I'm thinking about porting some of these classes to Squeak and about JH> creating a library with Aida elements for single-page web JH> applications. please keep us informed. Everything I do qualifies as single page for the reasons you discuss in your thesis. I'm building apps with a web interface and not websites. BTW your thesis has grown by ten pages since your first announcement. I anticipate reading it again while trying the code in Squeak. Cheers, Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Herbert König pravi:
> JH> I'm thinking about porting some of these classes to Squeak and about > JH> creating a library with Aida elements for single-page web > JH> applications. > > please keep us informed. Everything I do qualifies as single page for > the reasons you discuss in your thesis. I'm building apps with a > web interface and not websites. Another one to study is also Nico's Iliad and his approach here. Quite interesting, but more in a separate post. > BTW your thesis has grown by ten pages since your first announcement. > I anticipate reading it again while trying the code in Squeak. So I need to reread it again :) Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
In reply to this post by Jaroslav Havlín-2
Hi Jarda,
Jaroslav Havlín pravi: > Jan told me that you are going to inspect some classes that I have > used in my project. Yes, finally I got some time. Sorry that so late! > The most important is class CSWebApplication, that extends > WebApplication and includes methods for invoking callback blocks and > detecting changes in the element tree. > Other classes for page elements are in category CellStore-Web-Elements. > > > I'm thinking about porting some of these classes to Squeak and about > creating a library with Aida elements for single-page web > applications. This would be great! > As the single-page components are very similar to original components, > there should be special categories > for them, and they should be named in compliance with a naming convention. > For example, category Aida-SP-Components could contain class SPWebApplication. > > Do you think it is a good idea? What naming convention for classes and > categories would you prefer? This can be good for now I think. We need to get the code ASAP to study and maybe can later improve main Aida to incorporate single page functionality in it. Here I also have some ideas, Herbert also, then there is Iliad approach... My current idea is to gradually go from usual website like pages to more single page apps, but without need for a separate support for them. Just the extension of the current WebApp support. Well, we'll see if this is achievable, otherwise we'll go with your approach. Best regards Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
In reply to this post by Jan Vrany-2
Hello,
> Jarda, can you extract all the single-page functionality > from the service_http and move it to package > stx:goodies/aida together with very simple demo app? I'm sorry for being late. The general functionality has been extracted. The example application can be started with this code - Aida::AidaSPExample start. > BTW your thesis has grown by ten pages since your first announcement. > I anticipate reading it again while trying the code in Squeak. If you are not interested in the CellStore Web Client, there is no need to read it again. The new parts are focused on the CellStore details, not on the general page processing. Now I am going to port it to Squeak, so that it will be easier for Squeak users to read and test the source code. I hope it won't take too long time. Kind regards, Jarda _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Jaroslav Havlín pravi:
> Now I am going to port it to Squeak, so that it will be easier for > Squeak users to > read and test the source code. > I hope it won't take too long time. Jarda, this would be just perfect! Best regards Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello,
the first less-or-more functional port of the Aida Single-Page library for Squeak is ready. At least the simple example application seems to work. It is still very experimental, just to see whether it is worth continuing with it. It can be found at SqueakSource - http://www.squeaksource.com/AidaSP/ The example application can be started by doing "AidaSPExample start", the port is 8888. The project is writeable by everyone, so feel free to commit your changes. I hope I will be able to write a small tutorial soon. Janko, could you please explain me briefly the ideas behind the execution context support? It seems that a context id must be specified every time a AJAX request is sent. Is it possible to get the ID by a JavaScript method? King regards, Jarda 2009/6/28 Janko Mivšek <[hidden email]>: > Jaroslav Havlín pravi: > >> Now I am going to port it to Squeak, so that it will be easier for >> Squeak users to >> read and test the source code. >> I hope it won't take too long time. > > Jarda, this would be just perfect! > > Best regards > Janko > > -- > Janko Mivšek > AIDA/Web > Smalltalk Web Application Server > http://www.aidaweb.si > _______________________________________________ > Aida mailing list > [hidden email] > http://lists.aidaweb.si/mailman/listinfo/aida > Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi Jarda, I made it work on top of beta2 and the counter demo is now on front of me. Thanks a lot, now I can start studying your approach.... From the first sight it looks pretty similar to Iliad :) Janko Jaroslav Havlín pravi: > Hello, > > the first less-or-more functional port of the Aida Single-Page library > for Squeak is ready. At least the simple example application seems to > work. > It is still very experimental, just to see whether it is worth > continuing with it. > > It can be found at SqueakSource - http://www.squeaksource.com/AidaSP/ > > The example application can be started by doing "AidaSPExample start", > the port is 8888. > > The project is writeable by everyone, so feel free to commit your > changes. I hope I will be able to write a small tutorial soon. > > Janko, could you please explain me briefly the ideas behind the > execution context support? > > It seems that a context id must be specified every time a AJAX request is sent. > Is it possible to get the ID by a JavaScript method? > > King regards, > Jarda > > > > 2009/6/28 Janko Mivšek <[hidden email]>: >> Jaroslav Havlín pravi: >> >>> Now I am going to port it to Squeak, so that it will be easier for >>> Squeak users to >>> read and test the source code. >>> I hope it won't take too long time. >> Jarda, this would be just perfect! >> >> Best regards >> Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Le lundi 29 juin 2009 à 21:37 +0200, Janko Mivšek a écrit :
> Hi Jarda, > > I made it work on top of beta2 and the counter demo is now on front of > me. Thanks a lot, now I can start studying your approach.... From the > first sight it looks pretty similar to Iliad :) I just quickly browsed the code, but I didn't see any stateful widget, or did I miss something? Cheers! Nico _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello Nicolas,
> I just quickly browsed the code, but I didn't see any stateful widget, > or did I miss something? No, you didn't. There are no widgets yet. The whole tree of page elements is stored between requests, so every element is stateful. This can be sometimes costly, but it was easier to implement. Best regards, Jarda P.S. What version of GNU Smalltalk is required to run Iliad? _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Le lundi 29 juin 2009 à 22:17 +0200, Jaroslav Havlín a écrit :
> Hello Nicolas, > > > I just quickly browsed the code, but I didn't see any stateful widget, > > or did I miss something? > > No, you didn't. There are no widgets yet. The whole tree of > page elements is stored between requests, so every element is stateful. > > This can be sometimes costly, but it was easier to implement. Especially because elements are used from html tags to pages, so you quickly end up with hundreds of elements, right? Also, how do you manage actions with your stateful elements? Are they reusable? (do they have actions, or is it like other Aida applications in WebApp?) > What version of GNU Smalltalk is required to run Iliad? The latest version Iliad needs git version of gst since Swazoo2.2 was just ported to gst a few days ago. However the revision 1367 should work with gst 3.1. Cheers! Nico _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello Nicolas,
> Also, how do you manage actions with your stateful elements? Are they > reusable? (do they have actions, or is it like other Aida applications > in WebApp?) Some elements contain action blocks, that are invoked when needed (e.g. links has blocks that are invoked after a link was clicked, this is probably similar in Seaside and Iliad too, but more sophisticated). Each block has simply an ID, and if a link is clicked, this ID is sent to the server. The action block can modify the element tree. Then, updated parts of the tree are detected and send to the client. > The latest version Iliad needs git version of gst since Swazoo2.2 was > just ported to gst a few days ago. > > However the revision 1367 should work with gst 3.1. Thank you. I have used an older version of gst. I'm looking forward to trying Iliad. Cheers, Jarda _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Le lundi 29 juin 2009 à 23:38 +0200, Jaroslav Havlín a écrit :
> Hello Nicolas, > > > Also, how do you manage actions with your stateful elements? Are they > > reusable? (do they have actions, or is it like other Aida applications > > in WebApp?) > > Some elements contain action blocks, that are invoked when needed > (e.g. links has blocks that are invoked after a link was clicked, > this is probably similar in Seaside and Iliad too, but more > sophisticated) Iliad or Seaside way of doing it? > . Each block has simply an ID, and if a link is clicked, > this ID > is sent to the server. > The action block can modify the element tree. Then, updated parts of > the tree are detected and send to the client So, only modified elements are sent to the client? How do you detect modified elements? Also, do you use AJAX requests? and if so what will happen if js is disable? > > > > The latest version Iliad needs git version of gst since Swazoo2.2 was > > just ported to gst a few days ago. > > > > However the revision 1367 should work with gst 3.1. > > Thank you. I have used an older version of gst. I'm looking forward to > trying Iliad. You're welcome. I'm working on a squeak port, so Iliad could people not familiar with gst will be able to give Iliad a try. Cheers! Nico _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello Nicolas,
> Could you explain how it is more sophisticated? Do you see limits in > Iliad or Seaside way of doing it? No, I meant that Iliad's and Seaside's way is more sophisticated :-) AidaSP implementation is very simple and it can bring problems when the user uses more than one browser window. I hope we will solve this with Janko's contexts. > So, only modified elements are sent to the client? How do you detect > modified elements? There is a simple algorithm for that. 1) Before a request is handled, a snapshot of current state of element tree is taken. We call this the shadow-tree. It is a structure that holds only the hashes of the elements in the real tree. 2) An action is invoked. This can lead to changes in the element tree, or changes in the model (but this can propagate as change in the element tree as well). 3) The updated tree is compared to the shadow-tree, and elements that should be sent to the client via AJAX are detected. This is quite complicated, because only elements with ID attribute can be updated. So it is needed to find the deepest possible ancestor with ID. The code can than look like this: e := SPWebElement newDiv. e id: 'counterControls'. e addLinkText: '-- ' thatDoes: [self observee decCounter]. valueContainer := SPWebValueWrapper with: [self observee counter asString]. e add: valueContainer. e addLinkText: ' ++' thatDoes: [self observee incCounter]. > Also, do you use AJAX requests? and if so what will happen if js is > disable? AJAX request are used by default. If the browser doesn't support AJAX, standard requests are used automatically. But this only works in Firefox now :-( > You're welcome. I'm working on a squeak port, so Iliad could people not > familiar with gst will be able to give Iliad a try. That are really good news. Thank you! Kind regards, Jarda _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Le mardi 30 juin 2009 à 00:10 +0200, Jaroslav Havlín a écrit :
> Hello Nicolas, > > > Could you explain how it is more sophisticated? Do you see limits in > > Iliad or Seaside way of doing it? > > No, I meant that Iliad's and Seaside's way is more sophisticated :-) ah, ok :) > > AJAX request are used by default. If the browser doesn't support AJAX, > standard requests are used automatically. But this only works in > Firefox now :-( Is there a reason? If you had said that AJAX requests only work with firefox, I would have understood... Anyway, you could have a look at Iliad's js code. I just saw that, like Iliad, dirty elements are sent in JSON (with Iliad it's dirty widgets, but still, it's similar). http://bioskop.fr/svn/gst/iliad/trunk/Public/javascripts/iliad.js Cheers! Nico _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello,
>> AJAX request are used by default. If the browser doesn't support AJAX, >> standard requests are used automatically. But this only works in >> Firefox now :-( > > Is there a reason? If you had said that AJAX requests only work with > firefox, I would have understood... There is a problem with parsing responses. There is a JavaScript method that works only in Firefox so far, but I hope I will be able to fix it. If the browser doesn't support JavaScript at all, it works. > Anyway, you could have a look at Iliad's js code. I just saw that, like > Iliad, dirty elements are sent in JSON (with Iliad it's dirty widgets, > but still, it's similar). > > http://bioskop.fr/svn/gst/iliad/trunk/Public/javascripts/iliad.js No, actually JSON is not used. A set of fragments of HTML code is sent back as a result of AJAX requests. But I will look at it, anyway :-) It is a good idea, as JSON responses are much smaller. Cheers, Jarda _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |