Hi,
I've been browsing some Seaside examples (Squeak Source, this time) and I noticed a pattern where a call: is made replacing the current component with no expectation of return. For example, when navigating to the home page, the home component is called but it will never return to whatever component it's replacing. At least, that's what happening if I'm reading the code correctly. Is that the common way to handle such situations? -- Ronaldo Ferraz http://log.reflectivesurface.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Ronaldo,
yeah why not? What else do you need? It could probably it's called by a task after a login or something like that. It'll mostly depend on what workflow you want/need for the site/app (for example: a nil answer could mean a logout for the task who make the call of the home comp.), cheers, Sebastian Sastre > -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de Ronaldo Ferraz > Enviado el: Jueves, 21 de Febrero de 2008 13:13 > Para: Seaside - general discussion > Asunto: [Seaside] Navigating away from call:'s > > Hi, > > I've been browsing some Seaside examples (Squeak Source, this time) > and I noticed a pattern where a call: is made replacing the current > component with no expectation of return. For example, when navigating > to the home page, the home component is called but it will never > return to whatever component it's replacing. At least, that's what > happening if I'm reading the code correctly. Is that the common way to > handle such situations? > > -- > Ronaldo Ferraz > http://log.reflectivesurface.com > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi, Sebastian--
Thanks for the reply. Actually, I'm just trying to understand some aspects of the call mechanism. The documentation seems to imply that usually you should avoid coupling calls.To use a better example, suppose you have a login component that shows a login form. In the midst of the login process, the user decides to abort the call, and clicks the home link instead, which calls the home component. As far as I understand it, the call will never return and the login component would just sit there until the session expires and eventually gets garbage collect. Am I right about this? It doesn't matter to the way I'm developing but I'm curious about the mechanism. Thanks again for the reply. Cheers, Ronaldo On 2/21/08, Sebastian Sastre <[hidden email]> wrote: > Hi Ronaldo, > > yeah why not? What else do you need? It could probably it's called by a > task after a login or something like that. > > It'll mostly depend on what workflow you want/need for the site/app (for > example: a nil answer could mean a logout for the task who make the call of > the > home comp.), > > cheers, > > Sebastian Sastre > > > > -----Mensaje original----- > > De: [hidden email] > > [mailto:[hidden email]] En nombre > > de Ronaldo Ferraz > > Enviado el: Jueves, 21 de Febrero de 2008 13:13 > > Para: Seaside - general discussion > > Asunto: [Seaside] Navigating away from call:'s > > > > Hi, > > > > I've been browsing some Seaside examples (Squeak Source, this time) > > and I noticed a pattern where a call: is made replacing the current > > component with no expectation of return. For example, when navigating > > to the home page, the home component is called but it will never > > return to whatever component it's replacing. At least, that's what > > happening if I'm reading the code correctly. Is that the common way to > > handle such situations? > > > > -- > > Ronaldo Ferraz > > http://log.reflectivesurface.com > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Ronaldo Ferraz http://log.reflectivesurface.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Ronaldo Ferraz
> I've been browsing some Seaside examples (Squeak Source, this time)
> and I noticed a pattern where a call: is made replacing the current > component with no expectation of return. For example, when navigating > to the home page, the home component is called but it will never > return to whatever component it's replacing. At least, that's what > happening if I'm reading the code correctly. Is that the common way to > handle such situations? There are several ways to remove a called component other than sending #answer:. - If you remove the calling component from the composition, all called components disappear as well. - Sending the message #home to a component, removes all delegates (called components). As far as I remember both techniques are used in SqueakSource. Lukas -- 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 Ronaldo Ferraz
That depends on how you implement the abort and the access to login.
One way would be just make answer nil and whoever catches the nil answer call home. Other may be just a link to the domain which responds making a new session (kind of dirty way?) If home has an anchor or button to login, then when the user click on it, the home could call again the login component starting this all again. Anyway that is a different thing from the fact of the user abandoning a session at any point for enough time to make it to expire (in which case, yes it will be reclaimed by GC at some point). cheers, Sebastian Sastre > -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de Ronaldo Ferraz > Enviado el: Jueves, 21 de Febrero de 2008 16:49 > Para: Seaside - general discussion > Asunto: [Seaside] Re: Navigating away from call:'s > > Hi, Sebastian-- > > Thanks for the reply. Actually, I'm just trying to understand some > aspects of the call mechanism. > > The documentation seems to imply that usually you should avoid > coupling calls.To use a better example, suppose you have a login > component that shows a login form. In the midst of the login process, > the user decides to abort the call, and clicks the home link instead, > which calls the home component. As far as I understand it, the call > will never return and the login component would just sit there until > the session expires and eventually gets garbage collect. Am I right > about this? > > It doesn't matter to the way I'm developing but I'm curious > about the mechanism. > > Thanks again for the reply. > > Cheers, > > Ronaldo > > On 2/21/08, Sebastian Sastre <[hidden email]> wrote: > > Hi Ronaldo, > > > > yeah why not? What else do you need? It could probably > it's called by a > > task after a login or something like that. > > > > It'll mostly depend on what workflow you want/need for > the site/app (for > > example: a nil answer could mean a logout for the task who > make the call of > > the > > home comp.), > > > > cheers, > > > > Sebastian Sastre > > > > > > > -----Mensaje original----- > > > De: [hidden email] > > > [mailto:[hidden email]] En nombre > > > de Ronaldo Ferraz > > > Enviado el: Jueves, 21 de Febrero de 2008 13:13 > > > Para: Seaside - general discussion > > > Asunto: [Seaside] Navigating away from call:'s > > > > > > Hi, > > > > > > I've been browsing some Seaside examples (Squeak Source, > this time) > > > and I noticed a pattern where a call: is made replacing > the current > > > component with no expectation of return. For example, > when navigating > > > to the home page, the home component is called but it will never > > > return to whatever component it's replacing. At least, that's what > > > happening if I'm reading the code correctly. Is that the > common way to > > > handle such situations? > > > > > > -- > > > Ronaldo Ferraz > > > http://log.reflectivesurface.com > > > _______________________________________________ > > > seaside mailing list > > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > -- > Ronaldo Ferraz > http://log.reflectivesurface.com > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
Hi, Lukas--
> - Sending the message #home to a component, removes all delegates > (called components). Interesting. I hadn't noticed that SSFrame#call: is overriden to call home before passing control to the new component. Anyway, I'll just keep studying the code. > As far as I remember both techniques are used in SqueakSource. By the way, my question was not meant to criticize the SqueakSource code, which is proving to be enlightening. I'm just searching for the big picture here. :-) Thanks, Ronaldo _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sebastian Sastre-2
Hi, Sebastian--
> That depends on how you implement the abort and the access to login. Aborting was just used here as way to say that the use can ignore the login form and just navigate to another part of the application. > One way would be just make answer nil and whoever catches the nil answer call > home. > Other may be just a link to the domain which responds making a new session (kind > of dirty way?) Maybe, but the home example was just one of many possible. What is the user is in the midst of an edition and just clicks away? > Anyway that is a different thing from the fact of the user abandoning a session > at any point for enough time to make it to expire (in which case, yes it will be > reclaimed by GC at some point). Yes, I know. I was just trying to understand what happens to the "discarded" component. Thanks again, Ronaldo _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Maybe, but the home example was just one of many possible. What is the > user is in the midst of an edition and just clicks away? > Cliks away is just too wide. You probably want to include in that editor only anchors who has callbacks with sense for an edition context. For example an explicit save or cancel. By saying 'clicks away' you are suggesting just a different kind of post cancel action? Sebastian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Ronaldo Ferraz
That kind of navigation is not uncommon. Imagine making a flight reservation, reviewing the checkout page and clicking on header navigation to get back to the home page. I would hate to be limited to next and previous buttons in that situation. If your component never answers, so be it. But you can always hit back in your browser and proceed and that's the whole point IMHO. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sebastian Sastre-2
Actually, here I'm thinking more about tradicional navigation. For
example, a navigation bar at the top of the page any link of which the user can select at any time. Any selection will break the current component call and cause another to be displayed instead. Ronaldo On Fri, Feb 22, 2008 at 1:34 AM, Sebastian Sastre <[hidden email]> wrote: > Cliks away is just too wide. You probably want to include in that editor only > anchors who has callbacks with sense for an edition context. For example an > explicit save or cancel. By saying 'clicks away' you are suggesting just a > different kind of post cancel action? _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Hi, Boris--
Exactly. I was worried that I was doing something wrong replacing the component and forgetting about it, but after reading more of the SqueakSource and thinking about the way the back button works, it's now clear that there's not problem in doing exactly that. Besides the fact the Seaside components are very lightweight. After reading Lukas answers, I've also reestructured parts of my application to handle nesting more gracefully. Lots of learning in the process, of course. :-) Cheers, Ronaldo On Fri, Feb 22, 2008 at 1:40 AM, Boris Popov <[hidden email]> wrote: > That kind of navigation is not uncommon. Imagine making a flight > reservation, reviewing the checkout page and clicking on header navigation > to get back to the home page. I would hate to be limited to next and > previous buttons in that situation. If your component never answers, so be > it. But you can always hit back in your browser and proceed and that's the > whole point IMHO. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Ronaldo Ferraz
There is not component call breaking. Just the flow of the user call after call.
You make your components to call others as much as they need and forget about them. ThatÂ’s the whole continuations magic. You only worry about the answer when you need to. Sebastian Sastre > -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de Ronaldo Ferraz > Enviado el: Viernes, 22 de Febrero de 2008 12:09 > Para: Seaside - general discussion > Asunto: Re: [Seaside] Re: Navigating away from call:'s > > Actually, here I'm thinking more about tradicional navigation. For > example, a navigation bar at the top of the page any link of which the > user can select at any time. Any selection will break the current > component call and cause another to be displayed instead. > > Ronaldo > > On Fri, Feb 22, 2008 at 1:34 AM, Sebastian Sastre > <[hidden email]> wrote: > > Cliks away is just too wide. You probably want to include > in that editor only > > anchors who has callbacks with sense for an edition > context. For example an > > explicit save or cancel. By saying 'clicks away' you are > suggesting just a > > different kind of post cancel action? > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi, Sebastian--
Sorry, you are correct indeed. Cheers! Ronaldo On Fri, Feb 22, 2008 at 3:24 PM, Sebastian Sastre <[hidden email]> wrote: > There is not component call breaking. Just the flow of the user call after call. > You make your components to call others as much as they need and forget about > them. That's the whole continuations magic. > You only worry about the answer when you need to. > > > Sebastian Sastre > > > > > -----Mensaje original----- > > De: [hidden email] > > [mailto:[hidden email]] En nombre > > de Ronaldo Ferraz > > Enviado el: Viernes, 22 de Febrero de 2008 12:09 > > Para: Seaside - general discussion > > Asunto: Re: [Seaside] Re: Navigating away from call:'s > > > > > > Actually, here I'm thinking more about tradicional navigation. For > > example, a navigation bar at the top of the page any link of which the > > user can select at any time. Any selection will break the current > > component call and cause another to be displayed instead. > > > > Ronaldo > > > > On Fri, Feb 22, 2008 at 1:34 AM, Sebastian Sastre > > <[hidden email]> wrote: > > > Cliks away is just too wide. You probably want to include > > in that editor only > > > anchors who has callbacks with sense for an edition > > context. For example an > > > explicit save or cancel. By saying 'clicks away' you are > > suggesting just a > > > different kind of post cancel action? > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Ronaldo Ferraz http://log.reflectivesurface.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Please nothing to be sorry about. Enjoy the thing!
Sebastian > -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de Ronaldo Ferraz > Enviado el: Viernes, 22 de Febrero de 2008 15:33 > Para: Seaside - general discussion > Asunto: Re: [Seaside] Re: Navigating away from call:'s > > Hi, Sebastian-- > > Sorry, you are correct indeed. > > Cheers! > > Ronaldo > > On Fri, Feb 22, 2008 at 3:24 PM, Sebastian Sastre > <[hidden email]> wrote: > > There is not component call breaking. Just the flow of the > user call after call. > > You make your components to call others as much as they > need and forget about > > them. That's the whole continuations magic. > > You only worry about the answer when you need to. > > > > > > Sebastian Sastre > > > > > > > > > -----Mensaje original----- > > > De: [hidden email] > > > [mailto:[hidden email]] En nombre > > > de Ronaldo Ferraz > > > Enviado el: Viernes, 22 de Febrero de 2008 12:09 > > > Para: Seaside - general discussion > > > Asunto: Re: [Seaside] Re: Navigating away from call:'s > > > > > > > > > > Actually, here I'm thinking more about tradicional > navigation. For > > > example, a navigation bar at the top of the page any > link of which the > > > user can select at any time. Any selection will break the current > > > component call and cause another to be displayed instead. > > > > > > Ronaldo > > > > > > On Fri, Feb 22, 2008 at 1:34 AM, Sebastian Sastre > > > <[hidden email]> wrote: > > > > Cliks away is just too wide. You probably want to include > > > in that editor only > > > > anchors who has callbacks with sense for an edition > > > context. For example an > > > > explicit save or cancel. By saying 'clicks away' you are > > > suggesting just a > > > > different kind of post cancel action? > > > > > > > _______________________________________________ > > > seaside mailing list > > > [hidden email] > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > Ronaldo Ferraz > http://log.reflectivesurface.com > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi, Sebastian--
Thanks. I'm enjoying Seaside and Smalltalk immensely. It's pretty ironic because I've been preaching the virtues of alternative Web frameworks for a long time now--even using Seaside as my theoretical example--but only in the past few weeks I've been really studying Seaside and trying to create complete applications. It has been a long time since I was that excited about something in Web development. :-) I'm now porting the sample application I created from GOODS to CouchDB to see how it goes. Can't wait to go back to coding it again. :-) Cheers, Ronaldo On Fri, Feb 22, 2008 at 3:37 PM, Sebastian Sastre <[hidden email]> wrote: > Please nothing to be sorry about. Enjoy the thing! > > Sebastian > > > > > > -----Mensaje original----- > > De: [hidden email] > > [mailto:[hidden email]] En nombre > > de Ronaldo Ferraz > > Enviado el: Viernes, 22 de Febrero de 2008 15:33 > > > > Para: Seaside - general discussion > > Asunto: Re: [Seaside] Re: Navigating away from call:'s > > > > Hi, Sebastian-- > > > > Sorry, you are correct indeed. > > > > Cheers! > > > > Ronaldo > > > > On Fri, Feb 22, 2008 at 3:24 PM, Sebastian Sastre > > <[hidden email]> wrote: > > > There is not component call breaking. Just the flow of the > > user call after call. > > > You make your components to call others as much as they > > need and forget about > > > them. That's the whole continuations magic. > > > You only worry about the answer when you need to. > > > > > > > > > Sebastian Sastre > > > > > > > > > > > > > -----Mensaje original----- > > > > De: [hidden email] > > > > [mailto:[hidden email]] En nombre > > > > de Ronaldo Ferraz > > > > Enviado el: Viernes, 22 de Febrero de 2008 12:09 > > > > Para: Seaside - general discussion > > > > Asunto: Re: [Seaside] Re: Navigating away from call:'s > > > > > > > > > > > > > > Actually, here I'm thinking more about tradicional > > navigation. For > > > > example, a navigation bar at the top of the page any > > link of which the > > > > user can select at any time. Any selection will break the current > > > > component call and cause another to be displayed instead. > > > > > > > > Ronaldo > > > > > > > > On Fri, Feb 22, 2008 at 1:34 AM, Sebastian Sastre > > > > <[hidden email]> wrote: > > > > > Cliks away is just too wide. You probably want to include > > > > in that editor only > > > > > anchors who has callbacks with sense for an edition > > > > context. For example an > > > > > explicit save or cancel. By saying 'clicks away' you are > > > > suggesting just a > > > > > different kind of post cancel action? > > > > > > > > > > _______________________________________________ > > > > seaside mailing list > > > > [hidden email] > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > _______________________________________________ > > > seaside mailing list > > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > -- > > Ronaldo Ferraz > > http://log.reflectivesurface.com > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Ronaldo Ferraz http://log.reflectivesurface.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |