From g.cotelli at mercapsoftware.com Mon Nov 2 12:08:33 2015 From: g.cotelli at mercapsoftware.com (Gabriel Cotelli) Date: Mon Nov 2 12:08:36 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: Hi Gast?n, What kind of integration do you have in mind? If you will be at Smalltalks'15 @ UBA we can meet and talk about it. I'm not familiar with Torsten's Bootstrap, but if you are we can pair program something during the conference. Gabriel On Fri, Oct 30, 2015 at 7:34 PM, Gast?n Dall' Oglio < gaston.dalloglio@gmail.com> wrote: > Hello. > > Torsten thanks for share RenoirSt link! I love it > https://github.com/gcotelli/RenoirSt/blob/stable/docs/tutorial/Tutorial%20-%20Part%20I.md > > Will it be possible to integrate with your Bootstrap for pharo in any way? > > Cheers > > 2015-10-28 9:09 GMT-03:00 Torsten Bergmann : > >> Otto Behrens wrote: >> >We took all our CSS out of Seaside and put it on disk. We use less and >> >what not to "compile" it and get the web server to produce it. Mainly >> >because 1. Seaside is too heavyweight to serve (dynamically created) >> >CSS up as well as the HTML and 2. The tools are a but scrappy to deal >> >with CSS properly (but would be nice if we had a Seaside-like library >> >that helps with CSS). >> >> Did you check: http://gcotelli.github.io/RenoirSt >> for Pharo? >> >> Bye >> T. >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- ------------------------------ Gabriel O. Cotelli Desarrollo y Tecnolog?a Mercap Tel: +54 (011) 4342-6294 http://www.mercapsoftware.com This message is confidential. It may also contain information that is privileged or otherwise legally exempt from disclosure. If you have received it by mistake please let us know by e-mail immediately and delete it from your system; also you shouldn't copy the message nor disclose its contents to anyone. Thanks. ------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151102/b856001f/attachment.htm From Ondrej.Altman at seznam.cz Mon Nov 2 12:54:40 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Mon Nov 2 13:07:35 2015 Subject: [Seaside] Seaside in combination with IIS Message-ID: <1446468880397-4858955.post@n4.nabble.com> Hi guys, is there anybody experienced in running Seaside application in combination with IIS (i. e. when Apache HTTP Server is not available), is it possible? For me it is a first time to work with IIS, could you please give me some instructions, what do I have to configure? Our application runs as a Windows service, on VA Smalltalk 8.5.2 and Seaside 3.0.6. Thank you very much in advance. Ondrej -- View this message in context: http://forum.world.st/Seaside-in-combination-with-IIS-tp4858955.html Sent from the Seaside General mailing list archive at Nabble.com. From philippe.marschall at gmail.com Mon Nov 2 13:42:04 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Mon Nov 2 13:42:06 2015 Subject: [Seaside] Seaside in combination with IIS In-Reply-To: <1446468880397-4858955.post@n4.nabble.com> References: <1446468880397-4858955.post@n4.nabble.com> Message-ID: On Mon, Nov 2, 2015 at 1:54 PM, wilwarin wrote: > Hi guys, > > is there anybody experienced in running Seaside application in combination > with IIS (i. e. when Apache HTTP Server is not available), is it possible? > For me it is a first time to work with IIS, could you please give me some > instructions, what do I have to configure? > > Our application runs as a Windows service, on VA Smalltalk 8.5.2 and Seaside > 3.0.6. > > Thank you very much in advance. In theory you "just" need to set up IIS as an reverse proxy. The following [1] article suggests it's not that easy but almost ten years have passed so maybe things have improved. [1] http://onsmalltalk.com/running-seaside-apache-and-iis-on-windowsxp Cheers Philippe From andy.burnett at knowinnovation.com Mon Nov 2 13:48:55 2015 From: andy.burnett at knowinnovation.com (Andy Burnett) Date: Mon Nov 2 13:48:57 2015 Subject: [Seaside] The SushiShop Message-ID: Johan said >>> Damien, I?m adding the Todo application example I used at ESUG in Cambridge to the Seaside-Examples package. I think it will be a more up-to-date example. It?s already in the repo for 3.2 but I intend to improve it since it was quickly written for the tutorial demos I did back then. So, I would not recommend to point beginners to it right now, but wait a little more. It should ship with the 3.2.0 version <<< I would be very interested in seeing that example. And, I would really like to see an example that used the server sent events that I saw mentioned a while ago. I think SSE might give me enough of a real-time experience to be able to use Seaside without needing web sockets - which I don't think Seaside can use. Cheers Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151102/96620eab/attachment.htm From a3aan at xs4all.nl Mon Nov 2 15:58:51 2015 From: a3aan at xs4all.nl (Adriaan van Os) Date: Mon Nov 2 15:58:55 2015 Subject: [Seaside] Seaside in combination with IIS (wilwarin) In-Reply-To: <201511021342.tA2DgFL8017873@mxdrop301.xs4all.net> References: <201511021342.tA2DgFL8017873@mxdrop301.xs4all.net> Message-ID: <038566c735cc91109d3e58d353c9b587@xs4all.nl> We are using ISAPI_Rewrite (http://www.helicontech.com/isapi_rewrite/) in combination with VA Smalltalk and Seaside for many years now. Our business web applications and VAStGoodies.com are all behind ISAPI_Rewrite. Hope this helps. Adriaan. On Mon, Nov 2, 2015 at 1:54 PM, wilwarin wrote: > is there anybody experienced in running Seaside application in > combination > with IIS (i. e. when Apache HTTP Server is not available), is it > possible? > For me it is a first time to work with IIS, could you please give me > some > instructions, what do I have to configure? > > Our application runs as a Windows service, on VA Smalltalk 8.5.2 and > Seaside > 3.0.6. From Ondrej.Altman at seznam.cz Tue Nov 3 07:31:34 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Tue Nov 3 07:44:36 2015 Subject: [Seaside] Re: Seaside in combination with IIS In-Reply-To: References: <1446468880397-4858955.post@n4.nabble.com> Message-ID: <1446535894534-4859051.post@n4.nabble.com> Philippe Marschall wrote > On Mon, Nov 2, 2015 at 1:54 PM, wilwarin < > Ondrej.Altman@ > > wrote: > In theory you "just" need to set up IIS as an reverse proxy. The > following [1] article suggests it's not that easy but almost ten years > have passed so maybe things have improved. > > [1] http://onsmalltalk.com/running-seaside-apache-and-iis-on-windowsxp > > Cheers > Philippe > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside Thank you very much for your response. I think I am still missing something, because it seems to be impossible for me to reach a running service without Apache. I will give it a few more tries today. Ondrej -- View this message in context: http://forum.world.st/Seaside-in-combination-with-IIS-tp4858955p4859051.html Sent from the Seaside General mailing list archive at Nabble.com. From Ondrej.Altman at seznam.cz Thu Nov 5 08:09:24 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Thu Nov 5 08:22:40 2015 Subject: [Seaside] Re: Seaside in combination with IIS (wilwarin) In-Reply-To: <038566c735cc91109d3e58d353c9b587@xs4all.nl> References: <038566c735cc91109d3e58d353c9b587@xs4all.nl> Message-ID: <1446710964904-4859306.post@n4.nabble.com> Hi Adriaan. (I had a problem with sending of this message, so I hope it will work now.) Thank you very much for your response. It is great that there is a way to go. Unfortunately I still do not know, what exactly I have to do, sorry. Could you please provide me with any examples, what should I configure? How to use ISAPI_Rewrite in this situation? Thank you once more. Ondrej a3aan wrote > We are using ISAPI_Rewrite (http://www.helicontech.com/isapi_rewrite/) > in combination with VA Smalltalk and Seaside for many years now. > Our business web applications and VAStGoodies.com are all behind > ISAPI_Rewrite. -- View this message in context: http://forum.world.st/Seaside-in-combination-with-IIS-wilwarin-tp4858973p4859306.html Sent from the Seaside General mailing list archive at Nabble.com. From hilaire at drgeo.eu Thu Nov 5 09:41:16 2015 From: hilaire at drgeo.eu (Hilaire) Date: Thu Nov 5 09:41:33 2015 Subject: [Seaside] Mustache template editor (was: WAComponent to PDF) In-Reply-To: References: Message-ID: Le 23/10/2015 16:52, Stephan Eggermont a ?crit : > On 22/10/15 15:56, Hilaire wrote: >> I would like to render WAComponents as PDF documents. >> I took at look at Artefact, but it is an important work to render again >> the data as PDF with Artefact, not to mention I feel it is a duplicated >> work. Moreover, I have quite long documents spanning over several pages, >> some of my tables are complex with some columns spanning over 2 or 3 >> columns and I have about 50 different documents to turn as PDF file. > > What are you trying to achieve and how complex are the pages? The > output quality of html to pdf solutions has always been a bit > disappointing to me, but I'm used to Framemaker/LaTeX. Line breaking, > kerning, micro typography are all worse. But that might not be > relevant for your documents. You could add a canvas subclass that > generates what you need (LaTeX, rtf, etc) instead, or make an iText > based webservice. iText offers better paragraph support than Artefact > currently. Extending Artefact would of course be very welcome, but I > understand the reluctance to spend that much time. > > Stephan Documents contain long texts, tables, with various colours and font schemes. Some come with graphics, but I can pass on that for now. Now, I realize there are too many documents to code it as Seaside components. I have been looking at Mustache and it will be part of the equation; documents should be Mustache template edited by a non technician person, so it is easier to update when needed. Editing does not need to be on-line, an html editor could be ok. I am wondering if some of you ever used Mustache template edited by non tech person? What tools did you used? Of course Mustache could generate anything else than html. LaTeX? Docbook? It is also then a matter of an appropriate editor for non tech person, as well cpu consumption to generate the final PDF, and eventually html for on line viewing. Thanks Hilaire -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From johan at inceptive.be Fri Nov 6 10:14:59 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Nov 6 10:15:05 2015 Subject: [Seaside] Re: [Pharo-dev] How to declare a script variable to hold attribute value in jQuery seaside In-Reply-To: References: Message-ID: Hi Jayla, The script you generate executes an ajax call to the server to set the value of ?data-tab? and the code after that call was generated with the value of ?self tabId? at the time of generation (which was probably nil). Mind that unless you need the ?data-tab? value on the server-side, it does not make sense to pass the value to the server, nor to generate this script with Seaside, but this should work: html document addLoadScript: ((html jQuery: 'ul.tabs li') onClick: (html jQuery ajax callback: [ :val | self tabId: val ] value: (html jQuery this attributeAt: 'data-tab?); script: [:s | s << ((s jQuery: 'ul.tabs li') removeClass: 'current'), ((s jQuery: '.tab-content') removeClass: 'current'), (s jQuery this addClass: 'current'), ((s jQuery id: self tabId) addClass: 'current?)) ]). The important part to understand here is _when_ the script is generated. If it needs a value from the server, you can only generate it when the server has that value. Hope this helps, Johan > On 06 Nov 2015, at 04:02, Jayalakshmi Lade wrote: > > Hi, > > I am new to jQuery in seaside and trying to convert the below jQuery script to seaside jQuery for activating tabs and to render the related data but on another tab click getting val as 'undefined'. > > jQuery script: > > $(document).ready(function(){ > > $('ul.tabs li').click(function(){ > var tab_id = $(this).attr('data-tab'); > > $('ul.tabs li').removeClass('current'); > $('.tab-content').removeClass('current'); > > $(this).addClass('current'); > $("#"+tab_id).addClass('current'); > }) > }) > > My Converted jQuery code in seaside: > > html document > addLoadScript: > ((html jQuery: 'ul.tabs li') > onClick: > (html jQuery ajax > callback: [ :val | self tabId: val ] > value: (html jQuery this attributeAt: 'data-tab')), > ((html jQuery: 'ul.tabs li') removeClass: 'current'), > ((html jQuery: '.tab-content') removeClass: 'current'), > (html jQuery this addClass: 'current'), > ((html jQuery id: self tabId) addClass: 'current')). > > > Please give me your valuable suggestions on this. > Thank you and looking forward for your reply. > > Regards, > > > Jaya L > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151106/e69f86ff/attachment-0001.htm From ma.chris.m at gmail.com Sun Nov 8 21:58:59 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Sun Nov 8 21:59:40 2015 Subject: [Seaside] streaming server for Squeak Message-ID: I'd like to use Comet in Squeak, but the documentation for getting a "streaming server" has gotten out of date. What is currently the proper way to do this in Seaside 3.2 for Squeak 5? From philippe.marschall at gmail.com Mon Nov 9 13:03:16 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Mon Nov 9 13:03:19 2015 Subject: [Seaside] streaming server for Squeak In-Reply-To: References: Message-ID: On Sun, Nov 8, 2015 at 10:58 PM, Chris Muller wrote: > I'd like to use Comet in Squeak, but the documentation for getting a > "streaming server" has gotten out of date. Streaming and Comet in Seaside terminology are two different concepts. Streaming refers to sending part of the response as you're generating it. Comet is the precursor to Server Sent Events or WebSockets. > What is currently the > proper way to do this in Seaside 3.2 for Squeak 5? AFAIK this was only ever implemented for Comanche/Kom AFAIK the implementation is a bit hairy, AFAIK it does: thisContext swapSender: nil I wouldn't describe this code production ready. Cheers Philippe From johan at inceptive.be Wed Nov 11 08:48:08 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Nov 11 08:48:10 2015 Subject: [Seaside] Re: [Seaside-dev] How to send email from seaside web application using gmail smtp server In-Reply-To: References: Message-ID: <1BB0FDFF-523C-43BA-9E58-E101C9EB716F@inceptive.be> For general Seaside questions, please post to the Seaside general discussion mailinglist. Did you load the Seaside-Email-* packages? There are facilities in Seaside to help you generating an mail. For examples, check out the Seaside-Tests-Email package. In addition, Stephan?s suggestion to use ZdcSecureSMTPClient from Zinc-Zodiac seems a good suggestion as it?s probably an SSL/TLS connection that you need. For that, you will need to manually replace the references to SMTPClient in GRPlatform to ZdcSecureSMTPClient > On 11 Nov 2015, at 08:43, Jayalakshmi Lade wrote: > > Hi, > > I want to send an email using gmail smtp server from my seaside web application to any email id, for that in workspace I used below code, > > username:= 'test@gmail.com '. > password:='admin'. > client := SMTPClient openOnHostNamed: 'smtp.gmail.com ' port: 465. > client user: username; password: password; login; initiateSession. > client mailFrom: 'test@gmail.com '; > recipient: 'jayal@gmail.com '; > data: > 'Subject: Hello from SMTPClient! > From: test@gmail.com > To: jayal@gmail.com > Sending from SMTPClient!'. > client quit. > > when I inspect getting this error: "Connection closed: Connection closed while waiting for data". > > Can anyone please help on this? > > Looking forward for your suggestions. > > > Thanks, > > > Jaya L > > _______________________________________________ > seaside-dev mailing list > seaside-dev@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151111/5f488c2e/attachment.htm From lasmiste at gmail.com Thu Nov 12 11:17:01 2015 From: lasmiste at gmail.com (Dave) Date: Thu Nov 12 11:31:08 2015 Subject: [Seaside] How to detect a key modifier during mouse click Message-ID: <1447327021634-4860663.post@n4.nabble.com> Hi guys, Is there a Seaside way to detect if a key modifier is pressed during a mouse click event? i.e. with standard jquery I can code something like: but I can't imagine how to do the same on Smalltalk Can you help me please? TIA Dave -- View this message in context: http://forum.world.st/How-to-detect-a-key-modifier-during-mouse-click-tp4860663.html Sent from the Seaside General mailing list archive at Nabble.com. From lasmiste at gmail.com Thu Nov 12 11:30:04 2015 From: lasmiste at gmail.com (Dave) Date: Thu Nov 12 11:44:10 2015 Subject: [Seaside] Re: How to detect a key modifier during mouse click In-Reply-To: <1447327021634-4860663.post@n4.nabble.com> References: <1447327021634-4860663.post@n4.nabble.com> Message-ID: <1447327804957-4860664.post@n4.nabble.com> The code from previous email wasn't visible, so I repost the email again: ------- Hi guys, Is there a Seaside way to detect if a key modifier is pressed during a mouse click event? i.e. with standard jquery I can code something like: $(#myDiv).click(function (e) { if (e.keyCode == 18) { alert("ALT was pressed"); } else ... }); but I can't imagine how to do the same on Smalltalk html div onClick: ???? Can you help me please? TIA Dave -- View this message in context: http://forum.world.st/How-to-detect-a-key-modifier-during-mouse-click-tp4860663p4860664.html Sent from the Seaside General mailing list archive at Nabble.com. From lasmiste at gmail.com Thu Nov 12 15:28:52 2015 From: lasmiste at gmail.com (Dave) Date: Thu Nov 12 15:42:59 2015 Subject: [Seaside] Re: How to detect a key modifier during mouse click In-Reply-To: <1447327804957-4860664.post@n4.nabble.com> References: <1447327021634-4860663.post@n4.nabble.com> <1447327804957-4860664.post@n4.nabble.com> Message-ID: <1447342132532-4860730.post@n4.nabble.com> Nobody? -- View this message in context: http://forum.world.st/How-to-detect-a-key-modifier-during-mouse-click-tp4860663p4860730.html Sent from the Seaside General mailing list archive at Nabble.com. From stephan at stack.nl Thu Nov 12 16:43:44 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Thu Nov 12 16:43:54 2015 Subject: [Seaside] Re: How to detect a key modifier during mouse click In-Reply-To: <1447342132532-4860730.post@n4.nabble.com> References: <1447327021634-4860663.post@n4.nabble.com> <1447327804957-4860664.post@n4.nabble.com> <1447342132532-4860730.post@n4.nabble.com> Message-ID: On 12-11-15 16:28, Dave wrote: > Nobody? World-wide list, and #Smalltalks2015 just started. Stephan From johan at inceptive.be Thu Nov 12 18:48:22 2015 From: johan at inceptive.be (Johan Brichau) Date: Thu Nov 12 18:48:27 2015 Subject: [Seaside] How to detect a key modifier during mouse click In-Reply-To: <1447327804957-4860664.post@n4.nabble.com> References: <1447327021634-4860663.post@n4.nabble.com> <1447327804957-4860664.post@n4.nabble.com> Message-ID: <21E4F07B-C581-458E-9468-3C5D25745231@inceptive.be> Dave, Not sure what exactly is the question. Here is what pops to my mind: html div script: (html jQuery this on: 'click' do: ((JSStream on: 'if(e.keyCode === 18) ? ?) asFunction: #(e))) Seaside?s Javascript generation feature is focused on generating wrapper code around Seaside-generated JQuery callbacks, etc.. so you can easily tie those together with your Javascript code. If you?re looking to add (jQuery) ajax callbacks in your JS code, here?s an example: html div script: (html jQuery this on: 'click' do: (((JSStream on: 'e.keyCode === 18') then: (html jQuery ajax callback:[ ? ])) asFunction: #(e))) If you need the keyCode to be transported to the server: html div script: (html jQuery this on: 'click' do: ((html jQuery ajax callback:[:keyCode | ... ] value: ((html javascript alias:'e') access: 'keyCode')) asFunction: #(e))) And there?s many more possibilities. In general, I think you need to do as much as possible in hand-written Javascript and use Seaside-Javascript to glue server-side Smalltalk callbacks to your client-side Javascript code. cheers Johan > On 12 Nov 2015, at 12:30, Dave wrote: > > The code from previous email wasn't visible, so I repost the email again: > ------- > Hi guys, > Is there a Seaside way to detect if a key modifier is pressed during a mouse > click event? > > i.e. with standard jquery I can code something like: > $(#myDiv).click(function (e) { > if (e.keyCode == 18) { > alert("ALT was pressed"); > } > else ... > }); > > but I can't imagine how to do the same on Smalltalk > html div onClick: ???? > > Can you help me please? > TIA > Dave > > > > -- > View this message in context: http://forum.world.st/How-to-detect-a-key-modifier-during-mouse-click-tp4860663p4860664.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From lasmiste at gmail.com Thu Nov 12 20:01:02 2015 From: lasmiste at gmail.com (Dave) Date: Thu Nov 12 20:15:12 2015 Subject: [Seaside] Re: How to detect a key modifier during mouse click In-Reply-To: <21E4F07B-C581-458E-9468-3C5D25745231@inceptive.be> References: <1447327021634-4860663.post@n4.nabble.com> <1447327804957-4860664.post@n4.nabble.com> <21E4F07B-C581-458E-9468-3C5D25745231@inceptive.be> Message-ID: <1447358462556-4860753.post@n4.nabble.com> Johan Brichau-2 wrote > Dave, > > Not sure what exactly is the question. Here is what pops to my mind: > > html div > script: (html jQuery this on: 'click' do: ((JSStream on: 'if(e.keyCode > === 18) ? ?) asFunction: #(e))) Thanks Johan, That solves my question. Dave -- View this message in context: http://forum.world.st/How-to-detect-a-key-modifier-during-mouse-click-tp4860663p4860753.html Sent from the Seaside General mailing list archive at Nabble.com. From hannes.hirzel at gmail.com Wed Nov 18 13:00:23 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Wed Nov 18 13:00:26 2015 Subject: [Seaside] Re: [Cuis] New Introductory Tutorial In-Reply-To: <564A77EE.6060802@jvuletich.org> References: <564A77EE.6060802@jvuletich.org> Message-ID: Hi Euan Worthwhile to refer to in your tutorial is as well the web version of the ProfStef Smalltalk tutorial implemented in Amber Smalltalk http://amber-smalltalk.github.io/trysmalltalk/ (https://github.com/amber-smalltalk/trysmalltalk) It explains the syntax, control constructs and some basic classes. It was first implemented in Pharo and then ported. --Hannes On 11/17/15, Juan Vuletich wrote: > Hi EuanM, > > This is a great initiative. Thanks for including Cuis in the bunch! > > Cheers, > Juan Vuletich > > On 14/11/2015 02:02 a.m., EuanM wrote: >> I've created Yet Another Smalltalk First >> Steps tutorial. >> >> This is intended as one of a series. >> >> It is designed to be cross-platform across >> >> Squeak 5 >> Pharo 4 >> Seaside 3.1 >> Cuis >> Dolphin 6 >> >> If you have experience running any of these systems on Windows, Linux >> or MacOS, please check to see if I have the instructions correct for >> your chosen pairing of Smalltalk and OS platform. >> >> (As you'll see when you look, I do not have detailed instructions for >> aspects of MacOS). >> >> The document is at: >> http://smalltalkinsmallsteps.blogspot.co.uk/2015/11/get-smalltalk-up-and-running.html >> >> (It's intended to move to a different blog after this review process). >> >> I feel the need to do this as cross-Smalltalks tutorial because of >> findings and 4 charts I've placed at: >> http://smalltalkinsmallsteps.blogspot.co.uk/2015/11/mindshare-of-smalltalk-in-development.html >> >> Essentially, Smalltalk mindshare and use is incredibly tiny, compared >> to other languages in the same space. (We all know this, but seeing >> it represented graphically has a more visceral effect, IMO) >> >> Aggregating interest in all the Smalltalks still does not bring more >> than a tiny proportion of the interest in, and use of, Ruby. >> >> In turn, Ruby is (quite understandably) small in comparison to >> JavaScript. >> >> Comparing interest in any specific Smalltalk is, predictably, smaller >> than the aggregate interest in Smalltalk. >> >> Our community seems determined to split itself into smaller and >> smaller sub-communities. I think we do ourselves a disservice this >> way. >> >> My initial contribution will be to try to provide some explicitly >> pan-Smalltalk beginners' tutorials, like this one. >> >> Cheers, and happy Smalltalking, >> EuanM >> >> _______________________________________________ >> Cuis mailing list >> Cuis@jvuletich.org >> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org >> > > > _______________________________________________ > Cuis mailing list > Cuis@jvuletich.org > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org > From bsselfridge at gmail.com Wed Nov 18 15:46:44 2015 From: bsselfridge at gmail.com (bsselfridge@gmail.com) Date: Wed Nov 18 16:01:34 2015 Subject: [Seaside] Looks like redirect creates a new session Message-ID: <1447861604821-4861716.post@n4.nabble.com> I'm new to Seaside. I'm trying to create a "home" page that will contain menu bar etc. But, I'm checking to see if the user has logged in first. If not, then I'm redirecting to a login page. I can walk through the login process, but when redirecting back to the "home" page the session does NOT have any login information in it. It looks to me like a redirect is creating a new session object rather than a shared session object. Does anyone know if this is true? Any ideas how I should tackle this? I am using Seaside3(topa.278) configuration and Pharo 4.0. Thanks, Brad Selfridge ----- Brad Selfridge -- View this message in context: http://forum.world.st/Looks-like-redirect-creates-a-new-session-tp4861716.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Wed Nov 18 16:15:15 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Nov 18 16:15:21 2015 Subject: [Seaside] Looks like redirect creates a new session In-Reply-To: <1447861604821-4861716.post@n4.nabble.com> References: <1447861604821-4861716.post@n4.nabble.com> Message-ID: <0483AACB-A991-454C-958A-CA614561A4E8@inceptive.be> Brad, Can you share the code how you redirect to the homepage? The session id is stored in the url, and if you loose that when redirecting, a new session will be created. This would happen when you are literally coding a redirect instead of using a WATask or a #call:/#answer flow. Johan > On 18 Nov 2015, at 16:46, bsselfridge@gmail.com wrote: > > I'm new to Seaside. I'm trying to create a "home" page that will contain menu > bar etc. But, I'm checking to see if the user has logged in first. If not, > then I'm redirecting to a login page. I can walk through the login process, > but when redirecting back to the "home" page the session does NOT have any > login information in it. It looks to me like a redirect is creating a new > session object rather than a shared session object. Does anyone know if this > is true? Any ideas how I should tackle this? > > I am using Seaside3(topa.278) configuration and Pharo 4.0. > > Thanks, > > Brad Selfridge > > > > ----- > Brad Selfridge > -- > View this message in context: http://forum.world.st/Looks-like-redirect-creates-a-new-session-tp4861716.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From bsselfridge at gmail.com Wed Nov 18 16:08:27 2015 From: bsselfridge at gmail.com (bsselfridge@gmail.com) Date: Wed Nov 18 16:23:17 2015 Subject: [Seaside] Re: Looks like redirect creates a new session In-Reply-To: <0483AACB-A991-454C-958A-CA614561A4E8@inceptive.be> References: <1447861604821-4861716.post@n4.nabble.com> <0483AACB-A991-454C-958A-CA614561A4E8@inceptive.be> Message-ID: <1447862907793-4861722.post@n4.nabble.com> Ah. That's probably the problem. I'm simply passing the string "\login" to the redirect. Looks like I need to inject "\login" into the current url. I'll look into that. Thanks, ----- Brad Selfridge -- View this message in context: http://forum.world.st/Looks-like-redirect-creates-a-new-session-tp4861716p4861722.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Wed Nov 18 17:06:12 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Nov 18 17:06:18 2015 Subject: [Seaside] Re: Looks like redirect creates a new session In-Reply-To: <1447862907793-4861722.post@n4.nabble.com> References: <1447861604821-4861716.post@n4.nabble.com> <0483AACB-A991-454C-958A-CA614561A4E8@inceptive.be> <1447862907793-4861722.post@n4.nabble.com> Message-ID: <0C586A51-AC0A-468D-A230-F3FC941DD107@inceptive.be> Actually, for this flow, you should not be using redirect explicitly. Take a look at Seaside Tasks and how to pass control-flow on from one component to another via call:answer: That is the Seaside way of developing this and it?s explained in the Seaside book. cheers Johan > On 18 Nov 2015, at 17:08, bsselfridge@gmail.com wrote: > > Ah. > > That's probably the problem. I'm simply passing the string "\login" to the > redirect. Looks like I need to inject "\login" into the current url. > > I'll look into that. > > Thanks, > > > > ----- > Brad Selfridge > -- > View this message in context: http://forum.world.st/Looks-like-redirect-creates-a-new-session-tp4861716p4861722.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From bsselfridge at gmail.com Wed Nov 18 19:03:27 2015 From: bsselfridge at gmail.com (bsselfridge@gmail.com) Date: Wed Nov 18 19:18:17 2015 Subject: [Seaside] Re: Looks like redirect creates a new session In-Reply-To: <0C586A51-AC0A-468D-A230-F3FC941DD107@inceptive.be> References: <1447861604821-4861716.post@n4.nabble.com> <0483AACB-A991-454C-958A-CA614561A4E8@inceptive.be> <1447862907793-4861722.post@n4.nabble.com> <0C586A51-AC0A-468D-A230-F3FC941DD107@inceptive.be> Message-ID: <1447873407816-4861768.post@n4.nabble.com> I looked at task and thought that it would only get me part of the way. Question: What happens if the user is sitting on a page for a long time and the session expires? My thought was that the application would show an expired page that had a button that forced the user back to the "home" page or redirect back to the login page. This is why I was traveling down the redirect path in the first place. (I'm not committed to my way by any means). ----- Brad Selfridge -- View this message in context: http://forum.world.st/Looks-like-redirect-creates-a-new-session-tp4861716p4861768.html Sent from the Seaside General mailing list archive at Nabble.com. From stephan at stack.nl Thu Nov 19 08:54:44 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Thu Nov 19 08:55:48 2015 Subject: [Seaside] Re: Looks like redirect creates a new session In-Reply-To: <1447873407816-4861768.post@n4.nabble.com> References: <1447861604821-4861716.post@n4.nabble.com> <0483AACB-A991-454C-958A-CA614561A4E8@inceptive.be> <1447862907793-4861722.post@n4.nabble.com> <0C586A51-AC0A-468D-A230-F3FC941DD107@inceptive.be> <1447873407816-4861768.post@n4.nabble.com> Message-ID: On 18-11-15 20:03, bsselfridge@gmail.com wrote: > I looked at task and thought that it would only get me part of the way. > > Question: What happens if the user is sitting on a page for a long time and > the session expires? We try to avoid that. If you can afford to have long sessions: QCComponent>>renderKeepAliveOn: canvas | cacheTimeout | cacheTimeout := self session application cache expiryPolicy configuration at: #cacheTimeout. canvas document addLoadScript: (canvas jQuery ajax callback: []; interval: (cacheTimeout - 60) seconds) And then in the application QCApplication>>renderContentOn: canvas self hasKeepAlive ifTrue: [ self renderKeepAliveOn: canvas ]. self renderHeaderOn: canvas. super renderContentOn: canvas Stephan From jtuchel at objektfabrik.de Thu Nov 19 08:59:44 2015 From: jtuchel at objektfabrik.de (jtuchel) Date: Thu Nov 19 09:14:38 2015 Subject: [Seaside] Non-blocking jQuery load Message-ID: <1447923584557-4861881.post@n4.nabble.com> Hi, in our application, the user sees a dashboard right after logging in. Depending on the configuration of this dashboard, load and render times can get quite long. So we tried to wrap slow components into a Decoration that uses load() to postponbe the loading of their content. The render code in our decoration looks like this: replaced ifTrue: [div with: [self renderNextOn: html]] ifFalse: [ html document addLoadScript: ( (html jQuery: self idSelector) load html: [:r | replaced := true. self renderNextOn: html]). div with: [ html image src: someSpinnerImage html space; text: self message]] Thus, we hoped, the page would display very quickly, and be responsive before all the widgets are loaded. So far, we've reached one of the two goals: the page now loads quickly and the widgets use ajax to load their contents later. Another nice side effect is that if you go back to the start page, all widgets are loaded already. The other goal, however, is not met: If you log in and immediately click on one of the menu items, the browser won't react to your click before all widgets have finished loading. So it seems like jQuery's load is blocking. We've tried in Chrome and Firefox, and both expose this behavior. Does anybody know how to not only cheat on the load times of our dashboard but also enable the browser to react on clicks before all widgets have loaded their contents? Any hint is appreciated, Joachim -- View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html Sent from the Seaside General mailing list archive at Nabble.com. From jtuchel at objektfabrik.de Thu Nov 19 09:19:08 2015 From: jtuchel at objektfabrik.de (jtuchel@objektfabrik.de) Date: Thu Nov 19 09:19:11 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <1447923584557-4861881.post@n4.nabble.com> References: <1447923584557-4861881.post@n4.nabble.com> Message-ID: <564D940C.8060608@objektfabrik.de> As an illustration of what we want to do, you can look at the Wordpress Admin panel: teh traffic statistics come up with a "Loadind" Spinner, and while the statistics are being loaded from the Server, you can already click on links and immediately go to, say, the editor for new posts. In our Seaside app, the browser will not react immediately but wait until all calls to load() have finished... Joachim -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 From asqueaker at gmail.com Thu Nov 19 20:57:54 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Nov 19 20:57:56 2015 Subject: [Seaside] where to store my own application attributes? Message-ID: Where do people store their own application-level attributes? #myDbLocation, for example? This is such a basic question for every web app, I'm surprised tto find he answer so elusive.. I was looking at WAApplication>>#preferenceAt: and #preferenceAt:put:. Even though DB Location is a property, not "preference" I thought it would at least work.. Nope. #preferenceAt: goes through its WAUserConfiguration's specific set of "attributes", which I have not yet figured out how to extend.. .. and I'm not sure I would want to because access to those attributes is very inefficient -- creating a temporary IdentityDictionary and IdentitySet, enumerating all "ancestors" and each ancestor enumerating its "localAttributes" while adding and checking the IdentitySet in an inefficient way too.. Maybe I don't need efficient access, not sure yet, but I was really just looking for a properties Dictionary I could use; simple, fast and unrestricted... That's what I thought the #preferenceAt: was. Now I see besides #attributeAt:, WAConfiguration also has #at:,.... but its not obvious what it is doing. Do I need to define my own subclass of WAConfiguration to do this? Any advice is appreciated.. From johan at inceptive.be Thu Nov 19 21:31:46 2015 From: johan at inceptive.be (Johan Brichau) Date: Thu Nov 19 21:31:50 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <1447923584557-4861881.post@n4.nabble.com> References: <1447923584557-4861881.post@n4.nabble.com> Message-ID: <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> Hi Joachim, jQuery load is an ajax request and should thus not be blocking any browser action. What kind of interaction are you expecting from the ?click? to which the browser is not responder? A page request, an ajax request, the execution of a javascript program, ... ? Johan > On 19 Nov 2015, at 09:59, jtuchel wrote: > > Hi, > > in our application, the user sees a dashboard right after logging in. > Depending on the configuration of this dashboard, load and render times can > get quite long. > > So we tried to wrap slow components into a Decoration that uses load() to > postponbe the loading of their content. The render code in our decoration > looks like this: > > replaced > ifTrue: [div with: [self renderNextOn: html]] > ifFalse: [ > html document addLoadScript: ( > (html jQuery: self idSelector) load html: [:r | > replaced := true. > self renderNextOn: html]). > div with: [ > html image src: someSpinnerImage > html space; text: self message]] > > > > Thus, we hoped, the page would display very quickly, and be responsive > before all the widgets are loaded. > > So far, we've reached one of the two goals: the page now loads quickly and > the widgets use ajax to load their contents later. Another nice side effect > is that if you go back to the start page, all widgets are loaded already. > > The other goal, however, is not met: If you log in and immediately click on > one of the menu items, the browser won't react to your click before all > widgets have finished loading. So it seems like jQuery's load is blocking. > > We've tried in Chrome and Firefox, and both expose this behavior. > Does anybody know how to not only cheat on the load times of our dashboard > but also enable the browser to react on clicks before all widgets have > loaded their contents? > > Any hint is appreciated, > > Joachim > > > > -- > View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From johan at inceptive.be Thu Nov 19 22:10:07 2015 From: johan at inceptive.be (Johan Brichau) Date: Thu Nov 19 22:10:11 2015 Subject: [Seaside] where to store my own application attributes? In-Reply-To: References: Message-ID: <31F8ABD6-2590-4C8F-B673-F22CD7F6E983@inceptive.be> Hi Chris, There?s not much documentation on the WAConfiguration framework. I don?t really know about applications really using this infrastructure. Some Seaside extensions (such as Seaside-Gettext) use it. If you want to use Seaside?s WAConfiguration framework to embed your application-specific settings: - The class comment in WASystemConfiguration provides useful information. - Take a look at an example class: WAEmailConfiguration - When you register an application, here?s what it needs to add the configuration: application preferenceAt: #smtpServer put: ?smtp.somewhere.com'. application configuration addParent: WAEmailConfiguration instance. Preference values are cached once looked up in an application. So, that should cover performance concerns with the lookup. Hope this helps, Johan > On 19 Nov 2015, at 21:57, Chris Muller wrote: > > Where do people store their own application-level attributes? > #myDbLocation, for example? This is such a basic question for every > web app, I'm surprised tto find he answer so elusive.. > > I was looking at WAApplication>>#preferenceAt: and #preferenceAt:put:. > Even though DB Location is a property, not "preference" I thought it > would at least work.. > > Nope. #preferenceAt: goes through its WAUserConfiguration's specific > set of "attributes", which I have not yet figured out how to extend.. > > .. and I'm not sure I would want to because access to those attributes > is very inefficient -- creating a temporary IdentityDictionary and > IdentitySet, enumerating all "ancestors" and each ancestor enumerating > its "localAttributes" while adding and checking the IdentitySet in an > inefficient way too.. > > Maybe I don't need efficient access, not sure yet, but I was really > just looking for a properties Dictionary I could use; simple, fast and > unrestricted... That's what I thought the #preferenceAt: was. > > Now I see besides #attributeAt:, WAConfiguration also has #at:,.... > but its not obvious what it is doing. > > Do I need to define my own subclass of WAConfiguration to do this? > Any advice is appreciated.. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From jtuchel at objektfabrik.de Fri Nov 20 07:08:04 2015 From: jtuchel at objektfabrik.de (jtuchel) Date: Fri Nov 20 07:23:05 2015 Subject: [Seaside] Re: Non-blocking jQuery load In-Reply-To: <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> Message-ID: <564ECA3C.70108@objektfabrik.de> Hi Johan, Am 19.11.15 um 22:17 schrieb Johan Brichau-2 [via Smalltalk]: > Hi Joachim, > > jQuery load is an ajax request and should thus not be blocking any > browser action. Yes, that's what I thought as well... > > What kind of interaction are you expecting from the ?click? to which > the browser is not responder? > A page request, an ajax request, the execution of a javascript > program, ... ? On our Dashboard we have the main navigation menu which consists of anchors with normal callback blocks. After I had sent my last mail, I saw that both ajax requests take about the same time to finish (4022 and 4096 ms on a slow development machine), so I thought maybe this all is just a coincidence. So here is what I've tried then: I added a (Delay forSeconds: 5) wait to one of our dashboard widget's business code. What happens is this: The widgets all immediately start an ajax request, and the one without the Delay gets rendered after the usual 4 seconds. The other one renders a bit more than 5 seconds later. So far, so unsurprising. BUT: If I click on one of the main navigation links (which should be totally unrelated to the Components that issue the ajax call), the callback is not called before the longer runnin Ajax request is finished. The Re-rendering of the Component in the Browser is not performed, however (at least I can't see it). So the first observation seems to tell me the "load html:" calls are not blocking. The second, however, seems to indicate that they block. Or (shiver) there is something strange going on on the server side (VA Smalltalk) that keeps the server from handling the "normal" request before the ajax requests are finished. I need to test with a bit more logging to find out... Thanks for listening, Joachim > > Johan > > > On 19 Nov 2015, at 09:59, jtuchel <[hidden email] > > wrote: > > > > Hi, > > > > in our application, the user sees a dashboard right after logging in. > > Depending on the configuration of this dashboard, load and render > times can > > get quite long. > > > > So we tried to wrap slow components into a Decoration that uses > load() to > > postponbe the loading of their content. The render code in our > decoration > > looks like this: > > > > replaced > > ifTrue: [div with: [self renderNextOn: html]] > > ifFalse: [ > > html document addLoadScript: ( > > (html jQuery: self idSelector) load html: [:r | > > replaced := true. > > self renderNextOn: html]). > > div with: [ > > html image src: someSpinnerImage > > html space; text: self message]] > > > > > > > > Thus, we hoped, the page would display very quickly, and be responsive > > before all the widgets are loaded. > > > > So far, we've reached one of the two goals: the page now loads > quickly and > > the widgets use ajax to load their contents later. Another nice side > effect > > is that if you go back to the start page, all widgets are loaded > already. > > > > The other goal, however, is not met: If you log in and immediately > click on > > one of the menu items, the browser won't react to your click before all > > widgets have finished loading. So it seems like jQuery's load is > blocking. > > > > We've tried in Chrome and Firefox, and both expose this behavior. > > Does anybody know how to not only cheat on the load times of our > dashboard > > but also enable the browser to react on clicks before all widgets have > > loaded their contents? > > > > Any hint is appreciated, > > > > Joachim > > > > > > > > -- > > View this message in context: > http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html > > Sent from the Seaside General mailing list archive at Nabble.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 > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862097.html > To unsubscribe from Non-blocking jQuery load, click here > . > NAML > > -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 -- View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862141.html Sent from the Seaside General mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151119/e2409f0c/attachment-0001.htm From johan at inceptive.be Fri Nov 20 07:56:47 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Nov 20 07:57:39 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <564ECA3C.70108@objektfabrik.de> References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> Message-ID: Joachim, Are you inspecting execution of the callbacks on the server-side only? It seems that when you say that ?the browser is blocking? you are actually saying that the request for the callback is not *processed* while the ajax load is executing? To verify: do you see the browser performing a request in the browser developer tools when you click the link? Seaside requires all requests for the same session to be processed sequentially. So, callbacks will not execute as long as the server is processing any other callback for the same session. It seems to me that this is what you are experiencing. This has to do with how Seaside manages session state for you. Thinking about it: I?m not sure if it would be possible to have an exception for some ajax callbacks. At the very least, it would put a responsibility of managing the session state concurrency conflicts in the hands of the application developer. However, this does not solve your problem. Do you have a bit more information on why these components are rendering slowly? Is it the rendering phase or is the retrieval of the data for these components slow? Johan > On 20 Nov 2015, at 08:08, jtuchel > wrote: > > Hi Johan, > > > Am 19.11.15 um 22:17 schrieb Johan Brichau-2 [via Smalltalk]: >> Hi Joachim, >> >> jQuery load is an ajax request and should thus not be blocking any browser action. > > Yes, that's what I thought as well... > >> >> What kind of interaction are you expecting from the ?click? to which the browser is not responder? >> A page request, an ajax request, the execution of a javascript program, ... ? > On our Dashboard we have the main navigation menu which consists of anchors with normal callback blocks. > > After I had sent my last mail, I saw that both ajax requests take about the same time to finish (4022 and 4096 ms on a slow development machine), so I thought maybe this all is just a coincidence. > > So here is what I've tried then: > > I added a (Delay forSeconds: 5) wait to one of our dashboard widget's business code. > > What happens is this: > > The widgets all immediately start an ajax request, and the one without the Delay gets rendered after the usual 4 seconds. The other one renders a bit more than 5 seconds later. So far, so unsurprising. > > BUT: If I click on one of the main navigation links (which should be totally unrelated to the Components that issue the ajax call), the callback is not called before the longer runnin Ajax request is finished. The Re-rendering of the Component in the Browser is not performed, however (at least I can't see it). > > So the first observation seems to tell me the "load html:" calls are not blocking. The second, however, seems to indicate that they block. > > Or (shiver) there is something strange going on on the server side (VA Smalltalk) that keeps the server from handling the "normal" request before the ajax requests are finished. I need to test with a bit more logging to find out... > > Thanks for listening, > > Joachim > > > > > >> >> Johan >> >> > On 19 Nov 2015, at 09:59, jtuchel <[hidden email] > wrote: >> > >> > Hi, >> > >> > in our application, the user sees a dashboard right after logging in. >> > Depending on the configuration of this dashboard, load and render times can >> > get quite long. >> > >> > So we tried to wrap slow components into a Decoration that uses load() to >> > postponbe the loading of their content. The render code in our decoration >> > looks like this: >> > >> > replaced >> > ifTrue: [div with: [self renderNextOn: html]] >> > ifFalse: [ >> > html document addLoadScript: ( >> > (html jQuery: self idSelector) load html: [:r | >> > replaced := true. >> > self renderNextOn: html]). >> > div with: [ >> > html image src: someSpinnerImage >> > html space; text: self message]] >> > >> > >> > >> > Thus, we hoped, the page would display very quickly, and be responsive >> > before all the widgets are loaded. >> > >> > So far, we've reached one of the two goals: the page now loads quickly and >> > the widgets use ajax to load their contents later. Another nice side effect >> > is that if you go back to the start page, all widgets are loaded already. >> > >> > The other goal, however, is not met: If you log in and immediately click on >> > one of the menu items, the browser won't react to your click before all >> > widgets have finished loading. So it seems like jQuery's load is blocking. >> > >> > We've tried in Chrome and Firefox, and both expose this behavior. >> > Does anybody know how to not only cheat on the load times of our dashboard >> > but also enable the browser to react on clicks before all widgets have >> > loaded their contents? >> > >> > Any hint is appreciated, >> > >> > Joachim >> > >> > >> > >> > -- >> > View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html >> > Sent from the Seaside General mailing list archive at Nabble.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 >> >> >> If you reply to this email, your message will be added to the discussion below: >> http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862097.html >> To unsubscribe from Non-blocking jQuery load, click here . >> NAML > > -- > ----------------------------------------------------------------------- > Objektfabrik Joachim Tuchel [hidden email] > Fliederweg 1 http://www.objektfabrik.de > D-71640 Ludwigsburg http://joachimtuchel.wordpress.com > Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 > > > View this message in context: Re: Non-blocking jQuery load > Sent from the Seaside General mailing list archive at Nabble.com . > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151120/69549643/attachment-0001.htm From johan at inceptive.be Fri Nov 20 07:57:41 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Nov 20 07:59:05 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <564ECA3C.70108@objektfabrik.de> References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> Message-ID: <9D1AABB1-BE88-474C-88E3-EAF293825F19@inceptive.be> An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151120/72dd6214/attachment-0001.htm From jtuchel at objektfabrik.de Fri Nov 20 08:16:22 2015 From: jtuchel at objektfabrik.de (jtuchel@objektfabrik.de) Date: Fri Nov 20 08:16:28 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> Message-ID: <564ED6D6.9000202@objektfabrik.de> Hi Johan, what you describe fits well into my observations (or vice versa).... Am 20.11.15 um 08:56 schrieb Johan Brichau: > Joachim, > > Are you inspecting execution of the callbacks on the server-side only? > It seems that when you say that ?the browser is blocking? you are > actually saying that the request for the callback is not *processed* > while the ajax load is executing? Of course the use of "blocking" was wrong. The browser is not blocking, I just see no reaction to my click on the "normal" link before all the all Ajax requests are finished - and it seems you just described why that is. > To verify: do you see the browser performing a request in the browser > developer tools when you click the link? > The link does a show:, so the browser navigates away from the page the very instant the longest running ajax request is done. The dev toos in Firefox are cleared in that moment, so I cannot see anything of that "normal" request. While the two Ajax requests are being processed, I cannot see that "normal" request being sent to the server (but I should, even if the server doesn't react). > Seaside requires all requests for the same session to be processed > sequentially. > So, callbacks will not execute as long as the server is processing any > other callback for the same session. > So this explains a lot. This means we can cheat a little by showing the page earlier, but it won't be reacting to menu selections any sooner. Unless we do some "use another session (or even server) to collect the data" magic. > It seems to me that this is what you are experiencing. > Yes, I was hoping to not only make page load times shorter, but also let the user click sooner... Especially since our dashboard will grow and allow more data-intensive reporting over time. > This has to do with how Seaside manages session state for you. > > Thinking about it: I?m not sure if it would be possible to have an > exception for some ajax callbacks. > At the very least, it would put a responsibility of managing the > session state concurrency conflicts in the hands of the application > developer. > So far I seem to have learned that this power wouldn't be put in good hands in my case ;-) One stupid question that wants to be asked: AFAIK there is no way of stopping the server side from processind Ajax requests? I know you can cancel the ajax request on the client side, but this is just keeping the browser from waiting, right? Thinking about this a little further, I could possibly implement some crude special ajax call that stops the ajax processing on the server side and kills those background-processes on the server side (currently, they are not forked processes, but they could be) whenever the user clicks one of the links in the menu.... Not sure I really like the idea, but maybe it would work... > However, this does not solve your problem. Do you have a bit more > information on why these components are rendering slowly? Is it the > rendering phase or is the retrieval of the data for these components slow? It is a lot of data that has to be processed on the smalltalk side. So no Seaside problem here. Glorp is probably the busiest component in this processing. Oh my, so I have to put on my Architect's hat again and see how we can speed up the data collection before we add more widgets to the dashboard. > > Johan > >> On 20 Nov 2015, at 08:08, jtuchel > > wrote: >> >> Hi Johan, >> >> >> Am 19.11.15 um 22:17 schrieb Johan Brichau-2 [via Smalltalk]: >>> Hi Joachim, >>> >>> jQuery load is an ajax request and should thus not be blocking any >>> browser action. >> >> Yes, that's what I thought as well... >> >>> >>> What kind of interaction are you expecting from the ?click? to which >>> the browser is not responder? >>> A page request, an ajax request, the execution of a javascript >>> program, ... ? >> On our Dashboard we have the main navigation menu which consists of >> anchors with normal callback blocks. >> >> After I had sent my last mail, I saw that both ajax requests take >> about the same time to finish (4022 and 4096 ms on a slow development >> machine), so I thought maybe this all is just a coincidence. >> >> So here is what I've tried then: >> >> I added a (Delay forSeconds: 5) wait to one of our dashboard widget's >> business code. >> >> What happens is this: >> >> The widgets all immediately start an ajax request, and the one >> without the Delay gets rendered after the usual 4 seconds. The other >> one renders a bit more than 5 seconds later. So far, so unsurprising. >> >> BUT: If I click on one of the main navigation links (which should be >> totally unrelated to the Components that issue the ajax call), the >> callback is not called before the longer runnin Ajax request is >> finished. The Re-rendering of the Component in the Browser is not >> performed, however (at least I can't see it). >> >> So the first observation seems to tell me the "load html:" calls are >> not blocking. The second, however, seems to indicate that they block. >> >> Or (shiver) there is something strange going on on the server side >> (VA Smalltalk) that keeps the server from handling the "normal" >> request before the ajax requests are finished. I need to test with a >> bit more logging to find out... >> >> Thanks for listening, >> >> Joachim >> >> >> >> >> >>> >>> Johan >>> >>> > On 19 Nov 2015, at 09:59, jtuchel <[hidden email] >>> > wrote: >>> > >>> > Hi, >>> > >>> > in our application, the user sees a dashboard right after logging in. >>> > Depending on the configuration of this dashboard, load and render >>> times can >>> > get quite long. >>> > >>> > So we tried to wrap slow components into a Decoration that uses >>> load() to >>> > postponbe the loading of their content. The render code in our >>> decoration >>> > looks like this: >>> > >>> > replaced >>> > ifTrue: [div with: [self renderNextOn: html]] >>> > ifFalse: [ >>> > html document addLoadScript: ( >>> > (html jQuery: self idSelector) load html: [:r | >>> > replaced := true. >>> > self renderNextOn: html]). >>> > div with: [ >>> > html image src: someSpinnerImage >>> > html space; text: self message]] >>> > >>> > >>> > >>> > Thus, we hoped, the page would display very quickly, and be responsive >>> > before all the widgets are loaded. >>> > >>> > So far, we've reached one of the two goals: the page now loads >>> quickly and >>> > the widgets use ajax to load their contents later. Another nice >>> side effect >>> > is that if you go back to the start page, all widgets are loaded >>> already. >>> > >>> > The other goal, however, is not met: If you log in and immediately >>> click on >>> > one of the menu items, the browser won't react to your click >>> before all >>> > widgets have finished loading. So it seems like jQuery's load is >>> blocking. >>> > >>> > We've tried in Chrome and Firefox, and both expose this behavior. >>> > Does anybody know how to not only cheat on the load times of our >>> dashboard >>> > but also enable the browser to react on clicks before all widgets have >>> > loaded their contents? >>> > >>> > Any hint is appreciated, >>> > >>> > Joachim >>> > >>> > >>> > >>> > -- >>> > View this message in >>> context:http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html >>> > Sent from the Seaside General mailing list archive atNabble.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 >>> >>> >>> ------------------------------------------------------------------------ >>> If you reply to this email, your message will be added to the >>> discussion below: >>> http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862097.html >>> To unsubscribe from Non-blocking jQuery load,click here. >>> NAML >>> >> >> >> -- >> ----------------------------------------------------------------------- >> Objektfabrik Joachim Tuchel[hidden email] >> Fliederweg 1http://www.objektfabrik.de >> D-71640 Ludwigsburghttp://joachimtuchel.wordpress.com >> Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 >> >> >> ------------------------------------------------------------------------ >> View this message in context:Re: Non-blocking jQuery load >> >> Sent from theSeaside General mailing list archive >> atNabble.com >> . >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151120/9e8d7048/attachment-0001.htm From johan at inceptive.be Fri Nov 20 08:57:25 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Nov 20 09:02:16 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <564ED6D6.9000202@objektfabrik.de> References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> <564ED6D6.9000202@objektfabrik.de> Message-ID: An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151120/51de961c/attachment.htm From johan at inceptive.be Fri Nov 20 09:06:53 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Nov 20 09:06:56 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> <564ED6D6.9000202@objektfabrik.de> Message-ID: > On 20 Nov 2015, at 09:57, Johan Brichau wrote: > > This perfectly fits your decoration implementation. Something along these lines (disclaimer: untested code written in email client :) : The code I sent before will poll a bit too quickly :) I forgot to add a wait on the client: replaced ifTrue: [div with: [self renderNextOn: html]] ifFalse: [ html document addLoadScript: (self loadScriptOn: html). div with: [ html image src: someSpinnerImage html space; text: self message]] loadScriptOn: html (html jQuery: self idSelector) load html: [:r | self isDataReady ifTrue:[ replaced := true. self renderNextOn: html] ifFalse: [ r addLoadScript: ((self loadScriptOn: r) timeout: 1000) ]). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151120/ccf8743e/attachment.htm From jtuchel at objektfabrik.de Fri Nov 20 09:07:59 2015 From: jtuchel at objektfabrik.de (jtuchel) Date: Fri Nov 20 09:23:00 2015 Subject: [Seaside] Re: Non-blocking jQuery load In-Reply-To: References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> <564ED6D6.9000202@objektfabrik.de> Message-ID: <564EE661.3040502@objektfabrik.de> Johan, thanks a lot for this idea and code draft. It is of course exactly what I need. Given that we use that background process thing at another place (show a progress dialog for a long running process), it is sad but trrue I didn't think of the same technique for this purpose. But of course this is the perfect thing to do. Thus the Ajax's will be short running and the browser won't wait for the data. Definitely worth it. Once again: thanks a lot for your guidance and help! I still hope one day I can give something back. Maybe a drink in Prague at ESUG 2016 counts as a first attempt? ;-) Joachim Am 20.11.15 um 09:52 schrieb Johan Brichau-2 [via Smalltalk]: > >> On 20 Nov 2015, at 09:57, Johan Brichau <[hidden email] >> > wrote: >> >> This perfectly fits your decoration implementation. Something along >> these lines (disclaimer: untested code written in email client :) : > > The code I sent before will poll a bit too quickly :) I forgot to add > a wait on the client: > > > replaced > ifTrue: [div with: [self renderNextOn: html]] > ifFalse: [ > html document addLoadScript: (self loadScriptOn: html). > div with: [ > html image src: someSpinnerImage > html space; text: self message]] > > loadScriptOn: html > > (html jQuery: self idSelector) load html: [:r | > self isDataReady > ifTrue:[ replaced := true. > self renderNextOn: html] > ifFalse: [ r addLoadScript: ((self loadScriptOn: r) timeout: 1000) ]). > > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862164.html > To unsubscribe from Non-blocking jQuery load, click here > . > NAML > > -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 -- View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862167.html Sent from the Seaside General mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151120/a1b0e253/attachment-0001.htm From jtuchel at objektfabrik.de Sat Nov 21 06:32:36 2015 From: jtuchel at objektfabrik.de (jtuchel@objektfabrik.de) Date: Sat Nov 21 06:32:40 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> <564ED6D6.9000202@objektfabrik.de> Message-ID: <56501004.4050004@objektfabrik.de> Hi Johan, Adding a loadScript during an ajax callback is a really cool trick. I've got this working - in principle ;-) There is, however, a problem: jQuery's load doesn't support timeouts (nor any other paramters) . So I need to rewrite load as an ajax call which supports the timout parameter. Currently struggling a bit, but it's a good learning experience ;-) Again, thanks a lot, you've added a few important building blocks to the solution! Joachim Am 20.11.15 um 10:06 schrieb Johan Brichau: > >> On 20 Nov 2015, at 09:57, Johan Brichau > > wrote: >> >> This perfectly fits your decoration implementation. Something along >> these lines (disclaimer: untested code written in email client :) : > > The code I sent before will poll a bit too quickly :) I forgot to add > a wait on the client: > > > replaced > ifTrue: [div with: [self renderNextOn: html]] > ifFalse: [ > html document addLoadScript: (self loadScriptOn: html). > div with: [ > html image src: someSpinnerImage > html space; text: self message]] > > loadScriptOn: html > > (html jQuery: self idSelector) load html: [:r | > self isDataReady > ifTrue:[ replaced := true. > self renderNextOn: html] > ifFalse: [ r addLoadScript: ((self loadScriptOn: r) timeout: 1000) ]). > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151121/049343e2/attachment.htm From johan at inceptive.be Sat Nov 21 08:14:49 2015 From: johan at inceptive.be (Johan Brichau) Date: Sat Nov 21 08:14:53 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <564EE661.3040502@objektfabrik.de> References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> <564ED6D6.9000202@objektfabrik.de> <564EE661.3040502@objektfabrik.de> Message-ID: <4D5AA438-A938-4394-B058-D75800007379@inceptive.be> Hi Joachim, I?m not really sure what ?timeout? you are referring to, but your reply makes me think of an issue (see below). The timeout method I used in my code snippet corresponds to JavaScript?s setTimeout function wrapped around the ajax request. So, in that sense, any JS expression supports that. BUT, an issue regarding the #timeout: message pops to my mind: There are two unrelated implementations of the #timeout: message. The one on (JSObject>>timeout:) is to wrap a JS statement in a setTimeout function, the other one on (JQAjaxSetup>>timeout:) is to set a timeout value for the ajax request. Unfortunately, the latter overrides the former. I suspect that the code I sent you hits that issue. You can solve it by sending "addDecoration: (JSTimeout duration: aDuration)? instead of #timeout:. I got bitten by this before. I ignored it (working around it by using #addDecoration:). A colleague of mine got bitten just a couple of weeks ago. I think you got bitten too now. I think I should no longer ignore this unpolymorphic override anymore :/ [1] [1] https://github.com/SeasideSt/Seaside/issues/861 > On 20 Nov 2015, at 10:07, jtuchel wrote: > > Johan, > > thanks a lot for this idea and code draft. It is of course exactly what I need. > > Given that we use that background process thing at another place (show a progress dialog for a long running process), it is sad but trrue I didn't think of the same technique for this purpose. But of course this is the perfect thing to do. Thus the Ajax's will be short running and the browser won't wait for the data. Definitely worth it. > > Once again: thanks a lot for your guidance and help! I still hope one day I can give something back. > > Maybe a drink in Prague at ESUG 2016 counts as a first attempt? ;-) > > Joachim > > > > Am 20.11.15 um 09:52 schrieb Johan Brichau-2 [via Smalltalk]: >> >>> On 20 Nov 2015, at 09:57, Johan Brichau <[hidden email] > wrote: >>> >>> This perfectly fits your decoration implementation. Something along these lines (disclaimer: untested code written in email client :) : >> >> The code I sent before will poll a bit too quickly :) I forgot to add a wait on the client: >> >> >> replaced >> ifTrue: [div with: [self renderNextOn: html]] >> ifFalse: [ >> html document addLoadScript: (self loadScriptOn: html). >> div with: [ >> html image src: someSpinnerImage >> html space; text: self message]] >> >> loadScriptOn: html >> >> (html jQuery: self idSelector) load html: [:r | >> self isDataReady >> ifTrue:[ replaced := true. >> self renderNextOn: html] >> ifFalse: [ r addLoadScript: ((self loadScriptOn: r) timeout: 1000) ]). >> >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> If you reply to this email, your message will be added to the discussion below: >> http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862164.html >> To unsubscribe from Non-blocking jQuery load, click here . >> NAML > > -- > ----------------------------------------------------------------------- > Objektfabrik Joachim Tuchel [hidden email] > Fliederweg 1 http://www.objektfabrik.de > D-71640 Ludwigsburg http://joachimtuchel.wordpress.com > Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 > > > View this message in context: Re: Non-blocking jQuery load > Sent from the Seaside General mailing list archive at Nabble.com . > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151121/3ea98773/attachment-0001.htm From andy.burnett at knowinnovation.com Sat Nov 21 12:40:33 2015 From: andy.burnett at knowinnovation.com (Andy Burnett) Date: Sat Nov 21 12:40:36 2015 Subject: [Seaside] Using Polymer Webcomponents in seaside Message-ID: <0A2FBFA1-8AE8-4D39-B189-EA87DE571FCB@knowinnovation.com> Is there a way to use Polymer, or similar libraries of components from within Seaside? Obviously, we can just include them as one would any other HTML tag, but what I am interested in is whether anyone is integrating the features of e.g. a text component within their Smalltalk logic. Webcomponents seem to offer significant advantages, and it would be great to use them within seaside. Cheers Andy From jtuchel at objektfabrik.de Sat Nov 21 13:56:27 2015 From: jtuchel at objektfabrik.de (jtuchel@objektfabrik.de) Date: Sat Nov 21 13:56:33 2015 Subject: [Seaside] Non-blocking jQuery load In-Reply-To: <4D5AA438-A938-4394-B058-D75800007379@inceptive.be> References: <1447923584557-4861881.post@n4.nabble.com> <127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be> <564ECA3C.70108@objektfabrik.de> <564ED6D6.9000202@objektfabrik.de> <564EE661.3040502@objektfabrik.de> <4D5AA438-A938-4394-B058-D75800007379@inceptive.be> Message-ID: <5650780B.1040501@objektfabrik.de> Hi Johan, I was referring to the timeout: parameter of $.ajax() which is not supported by .load() (see here: http://stackoverflow.com/questions/16129292/how-do-i-set-a-timeout-in-load-jquery-for-this-particular-example). But the wrapping of the load()-call within a setTimout() works perfectly. So your suggestion of "addDecoration: (JSTimeout duration: aDuration)" works perfectly! So you taught me at least 3 important lessons today: 1. I can addLoadScript: in an ajax callback 2. addDecoration: in JSObjects to wrap stuff into a function 3. The handling of Ajax Callbacks on the Seaside Server blocks "normal" callbacks (I know of no better way to name it) We now have a dashboard that reacts to clicks immediately. There is one thing with a bitter taste for now: the server side Ajax processing is not stopped, so the background process still burns cycles although nobody is interested in its results any more. It should be easy to do this, because it is just a question of terminating background processes and keep track of what background processes are currently running for this session. Combined with another Ajax call and a bit of bookeeping we'll be able to save cycles should the need arise. For now we just enjoy the improvements ;-) Thanks for great help! Joachim Am 21.11.15 um 09:14 schrieb Johan Brichau: > Hi Joachim, > > I?m not really sure what ?timeout? you are referring to, but your > reply makes me think of an issue (see below). > The timeout method I used in my code snippet corresponds to > JavaScript?s setTimeout function wrapped around the ajax request. So, > in that sense, any JS expression supports that. > > BUT, an issue regarding the #timeout: message pops to my mind: > > There are two unrelated implementations of the #timeout: message. The > one on (JSObject>>timeout:) is to wrap a JS statement in a setTimeout > function, the other one on (JQAjaxSetup>>timeout:) is to set a timeout > value for the ajax request. Unfortunately, the latter overrides the > former. I suspect that the code I sent you hits that issue. You can > solve it by sending "addDecoration: (JSTimeout duration: aDuration)? > instead of #timeout:. > > I got bitten by this before. I ignored it (working around it by using > #addDecoration:). A colleague of mine got bitten just a couple of > weeks ago. I think you got bitten too now. > I think I should no longer ignore this unpolymorphic override anymore > :/ [1] > > [1] https://github.com/SeasideSt/Seaside/issues/861 > >> On 20 Nov 2015, at 10:07, jtuchel > > wrote: >> >> Johan, >> >> thanks a lot for this idea and code draft. It is of course exactly >> what I need. >> >> Given that we use that background process thing at another place >> (show a progress dialog for a long running process), it is sad but >> trrue I didn't think of the same technique for this purpose. But of >> course this is the perfect thing to do. Thus the Ajax's will be short >> running and the browser won't wait for the data. Definitely worth it. >> >> Once again: thanks a lot for your guidance and help! I still hope one >> day I can give something back. >> >> Maybe a drink in Prague at ESUG 2016 counts as a first attempt? ;-) >> >> Joachim >> >> >> >> Am 20.11.15 um 09:52 schrieb Johan Brichau-2 [via Smalltalk]: >>> >>>> On 20 Nov 2015, at 09:57, Johan Brichau <[hidden email] >>>> > wrote: >>>> >>>> This perfectly fits your decoration implementation. Something along >>>> these lines (disclaimer: untested code written in email client :) : >>> >>> The code I sent before will poll a bit too quickly :) I forgot to >>> add a wait on the client: >>> >>> >>> replaced >>> ifTrue: [div with: [self renderNextOn: html]] >>> ifFalse: [ >>> html document addLoadScript: (self loadScriptOn: html). >>> div with: [ >>> html image src: someSpinnerImage >>> html space; text: self message]] >>> >>> loadScriptOn: html >>> >>> (html jQuery: self idSelector) load html: [:r | >>> self isDataReady >>> ifTrue:[ replaced := true. >>> self renderNextOn: html] >>> ifFalse: [ r addLoadScript: ((self loadScriptOn: r) timeout: 1000) ]). >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> [hidden email] >>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> >>> >>> ------------------------------------------------------------------------ >>> If you reply to this email, your message will be added to the >>> discussion below: >>> http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862164.html >>> To unsubscribe from Non-blocking jQuery load,click here. >>> NAML >>> >> >> >> -- >> ----------------------------------------------------------------------- >> Objektfabrik Joachim Tuchel[hidden email] >> Fliederweg 1http://www.objektfabrik.de >> D-71640 Ludwigsburghttp://joachimtuchel.wordpress.com >> Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1 >> >> >> ------------------------------------------------------------------------ >> View this message in context:Re: Non-blocking jQuery load >> >> Sent from theSeaside General mailing list archive >> atNabble.com >> . >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151121/4db7b82e/attachment-0001.htm From sebastian_heidbrink at yahoo.de Sat Nov 21 14:07:06 2015 From: sebastian_heidbrink at yahoo.de (Sebastian Heidbrink) Date: Sat Nov 21 14:07:19 2015 Subject: [Seaside] Using Polymer Webcomponents in seaside In-Reply-To: <0A2FBFA1-8AE8-4D39-B189-EA87DE571FCB@knowinnovation.com> References: <0A2FBFA1-8AE8-4D39-B189-EA87DE571FCB@knowinnovation.com> Message-ID: <56507A8A.7070603@yahoo.de> Hi Andy, I actually just started to write a little PolymerWorkbench as a proof-of-concept to integrate Glamour, PharoJS and Polymer. I have no idea if that will work at all yet, since I have only little PharoJS experience so far. Seaside is no target of mine. I parse the web component definition files and will edit CSS and HTML directly. Eventhandling and script generation shall be done via PharoJS. I think this could open the PharoIDE to the web dev world if successful. My impression on Polymer is the same as yours. I have the impression that Polymer finally adds some software engineering level sanity to the JS web world... I'll let you know once I will have made sources available. Sebastian On 2015-11-21 4:40 AM, Andy Burnett wrote: > Is there a way to use Polymer, or similar libraries of components from within Seaside? > > Obviously, we can just include them as one would any other HTML tag, but what I am interested in is whether anyone is integrating the features of e.g. a text component within their Smalltalk logic. > > Webcomponents seem to offer significant advantages, and it would be great to use them within seaside. > > Cheers > Andy_______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > From maxleske at gmail.com Tue Nov 24 15:45:55 2015 From: maxleske at gmail.com (Max Leske) Date: Tue Nov 24 15:45:59 2015 Subject: [Seaside] Fwd: [Pharo-dev] Seaside REST on Pharo 50 References: Message-ID: <93D0F89F-BE92-440D-BCB7-5FE9C71B704E@gmail.com> Forwarded. > Begin forwarded message: > > From: Franck Warlouzet > Date: 24 November 2015 at 16:43:22 GMT+1 > To: "pharo-dev@lists.pharo.org" > Subject: [Pharo-dev] Seaside REST on Pharo 50 > > Hi, > > We are currently using seaside, magritte, reef etc to do a project at school. We also have to do a mobile app (written in Java :(), so we are doing a REST service to access the database from the mobile app. > > We are working on Pharo 50, and we noticed that Seaside-REST is not working anymore. > For simple get, it is ok, for example : > > test > > ^ 'foo' > > but if you want to have a complete path like that : > > test: aValue > > > ^ 'foo' > > You get a DNU RBVariableNode>>key during the route creating (Same on pharo 40 is working). > > Any idea why ? > > In the meantime, we are using Teapot, it seems to be working on Pharo 50. > > Btw, I cannot subscribe to seaside mailing list (I never get the confirmation mail), so if someone could forward this email on seaside mailing list, it would be nice. > > Franck -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151124/5ba8b54c/attachment.htm From johan at inceptive.be Wed Nov 25 06:46:09 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Nov 25 06:46:13 2015 Subject: [Seaside] Re: [Pharo-dev] Seaside REST on Pharo 50 In-Reply-To: References: Message-ID: <95EE804A-FC85-433B-A961-6F9B9D78B96D@inceptive.be> Hi, Seaside-REST is included in Seaside since version 3.1 ConfigurationOfSeasideREST is outdated; it works with version 3.0 Therefore, load the ?REST? group from ConfigurationOfSeaside3: Metacello new configuration: 'Seaside3'; version: #stable; load: ?REST' If you want to experiment with all of Seaside, load everything: Metacello new configuration: 'Seaside3'; version: #stable; load: ?OneClick' Seaside is also not tested on Pharo5 as it?s still a moving target. Use Pharo4 if you want to make sure it works. regards Johan > On 25 Nov 2015, at 01:07, Franck Warlouzet wrote: > > I was using both ConfigurationOfSeaside3 and ConfigurationOfSeasideRest. Is it the wrong way ? > > Franck > > > To: pharo-dev@lists.pharo.org > > From: stephan@stack.nl > > Date: Wed, 25 Nov 2015 00:26:05 +0100 > > Subject: Re: [Pharo-dev] Seaside REST on Pharo 50 > > > > On 24/11/15 16:43, Franck Warlouzet wrote: > > > We are working on Pharo 50, and we noticed that Seaside-REST is not > > > working anymore. > > > > How are you loading it? > > > > (ConfigurationOfSeaside3 project version: #'release3.2') load: > > #('OneClick' 'REST') > > > > There could be a configuration problem, or not the right combination of > > groups. > > > > To resolve it, compare the package cache from Pharo4 vs Pharo5 after > > loading. > > > > Stephan > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151125/a2340713/attachment.htm From dtrussardi at tiscali.it Wed Nov 25 11:30:46 2015 From: dtrussardi at tiscali.it (dtrussardi@tiscali.it) Date: Wed Nov 25 11:30:55 2015 Subject: [Seaside] Suitable version Message-ID: <56861D2F-00C6-4648-AC62-E9DE1B1668F2@tiscali.it> Ciao, i'm ready to revision some code relative to Seaside 3.1.0 application. My goal is to do this work with Pharo and port it to the Gemstone GLASS environment. Now i load the Pharo Launcher, but i doubt about which Pharo version to use. The Common tools instances what includes ? What version use ? The analog question is relative to the Seaside version to use. The ConfigurationOfSeaside3 define the stable, the development and some other versions. Considering i need to port all to GLASS ( not tomorrow, but in the next months ) what version it is the most suitable ? Thanks for any indications, Dario From johan at inceptive.be Sun Nov 29 13:20:44 2015 From: johan at inceptive.be (Johan Brichau) Date: Sun Nov 29 13:20:52 2015 Subject: [Seaside] vacancy: interface developer Message-ID: <94C2C00C-2A9B-4030-8AD8-9C1F71B2EBFD@inceptive.be> Hi Seasiders, Since many of you have connections with interface designers, I also contact this list for our job opportunity: At Yesplan, we are looking for a new interface developer / interaction designer. The job description is in dutch [1], but if there is anyone who knows an interface developer with strong html+css skills, that is looking for a full-time job, do not hesitate to forward the job opportunity. The job requirements are: - full-time job on location in Gent, Belgium - strong html+css skills - background/interests in user-interface design Yesplan is a small startup company, 4 years old. We are looking forward to hearing from anyone who is interested! Cheers Johan [1] http://yesplan.be/jobs/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151129/b0135783/attachment-0001.htm From andy.burnett at knowinnovation.com Mon Nov 30 16:47:11 2015 From: andy.burnett at knowinnovation.com (Andy Burnett) Date: Mon Nov 30 23:37:19 2015 Subject: [Seaside] Re: Using Polymer Webcomponents in seaside Message-ID: >>> Sebastian Heidbrink said Hi Andy, I actually just started to write a little PolymerWorkbench as a proof-of-concept to integrate Glamour, PharoJS and Polymer. I have no idea if that will work at all yet, since I have only little PharoJS experience so far. Seaside is no target of mine. I parse the web component definition files and will edit CSS and HTML directly. Eventhandling and script generation shall be done via PharoJS. I think this could open the PharoIDE to the web dev world if successful. My impression on Polymer is the same as yours. I have the impression that Polymer finally adds some software engineering level sanity to the JS web world... I'll let you know once I will have made sources available. <<< That sounds very interesting indeed. I have just started playing with PharoJS. So, I am keen to learn about your experience. Cheers Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151130/ba58721d/attachment.html