Hi,
There are situations in which I feel like after 10+ years of using
Seaside, I am still a newbie. (well, same for Smalltalk after 25+ years,
so this may be normal).
I would like to implement some kind of FileLibrary that is aware of the
current session and only delivers files to logged-on users.
It seems like the best starting point for this is to subclass
WARequestHandler and register it with WAAdmin. So the first thing I did
was implement handleFiltered: aRequestContext. Unfortunately, neither
aRequestContext nor self return a WASession, although I entered _s and
_k form a logged in session into the address bar of my Browser. This may
be a naive approach, but as a fist test case this seemed like a good
idea ;-)
Now the question I ask myself is: how do I teach my WARequestHandler
subclass the trick of knowing/finding the current session. Do I add some
Filter? Is subclassing WARequestHandler the wrong idea anyways? (I
started my experiments with a subclass of WAFileLibrary, but that also
didn't get me anywhere...).
I am not asking for a ready-made solution. I'd rather try to understand
a little more about Seasides innards here...
Any pointers? Kick-off ideas what to look at?
tia,
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
Hi,
https://github.com/SeasideSt/Seaside/pull/1247
It add CharacterCollection>>seasideMimeDocument to Seaside-GemstoneCore
but does not remove String>>seasideMimeDocument which is in Seaside-Core.
reagards,
bruno
On 26/3/2021 11:34, Johan Brichau via Glass wrote:
> Hi,
>
> Methods that should be on CharacterCollection in GemStone and not on
> String… that is indeed something we often encounter in the GemStone
> port :-)
> So, might very well be a bug… can you submit it on the GitHub? a PR
> would be great as well.
>
> Thanks!
> Johan
>
>> On 25 Mar 2021, at 20:51, Jupiter Jones via Glass
>> <glass(a)lists.gemtalksystems.com
>> <mailto:glass@lists.gemtalksystems.com>> wrote:
>>
>> Good point :)
>>
>> Maybe those methods need to move to the nearest common superclass -
>> CharacterCollection.
>>
>> I’m copying this to the seaside list - perhaps someone there could
>> offer more educated advice.
>>
>> Cheers,
>>
>> J
>>
>>> On 26 Mar 2021, at 5:05 am, bruno buzzi brassesco via Glass
>>> <glass(a)lists.gemtalksystems.com
>>> <mailto:glass@lists.gemtalksystems.com>> wrote:
>>>
>>> Hi,
>>>
>>> But the receiver object is anUnicode16 not aString.
>>>
>>> regards,
>>>
>>> bruno
>>>
>>> On 24/3/2021 19:13, Jupiter Jones wrote:
>>>> Hey Bruno,
>>>>
>>>> String-#seasideMimeDocument is in the package Seaside-Core.
>>>>
>>>> Does loading that package resolve the issue? Is this in a stone
>>>> with all seaside loaded, or were you just testing REST by loading
>>>> the REST group?
>>>>
>>>> Cheers,
>>>>
>>>> J
>>>>
>>>>> On 25 Mar 2021, at 8:21 am, bruno buzzi brassesco via Glass
>>>>> <glass(a)lists.gemtalksystems.com
>>>>> <mailto:glass@lists.gemtalksystems.com>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> This is just a report.
>>>>>
>>>>> Doing some tests on a REST layer i came across this error.
>>>>>
>>>>> Unicode16 DNU seasideMimeDocument (GS 3.5.4) -Seaside was loaded
>>>>> from https://github.com/SeasideSt/Seaside/-
>>>>>
>>>>> Not sure in which github repository report it... Or send a PR
>>>>> because is an easy fix:
>>>>>
>>>>> |Unicode16 seasideMimeDocument ^ WAMimeDocument on: self mimeType:
>>>>> WAMimeType textPlain regards, bruno |
>>>>> _______________________________________________
>>>>> Glass mailing list
>>>>> Glass(a)lists.gemtalksystems.com <mailto:Glass@lists.gemtalksystems.com>
>>>>> https://lists.gemtalksystems.com/mailman/listinfo/glass
>>>>
>>> _______________________________________________
>>> Glass mailing list
>>> Glass(a)lists.gemtalksystems.com <mailto:Glass@lists.gemtalksystems.com>
>>> https://lists.gemtalksystems.com/mailman/listinfo/glass
>>> <https://lists.gemtalksystems.com/mailman/listinfo/glass>
>>
>> _______________________________________________
>> Glass mailing list
>> Glass(a)lists.gemtalksystems.com <mailto:Glass@lists.gemtalksystems.com>
>> https://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
> _______________________________________________
> Glass mailing list
> Glass(a)lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
Good point :)
Maybe those methods need to move to the nearest common superclass - CharacterCollection.
I’m copying this to the seaside list - perhaps someone there could offer more educated advice.
Cheers,
J
> On 26 Mar 2021, at 5:05 am, bruno buzzi brassesco via Glass <glass(a)lists.gemtalksystems.com> wrote:
>
> Hi,
>
> But the receiver object is anUnicode16 not aString.
>
> regards,
>
> bruno
>
> On 24/3/2021 19:13, Jupiter Jones wrote:
>> Hey Bruno,
>>
>> String-#seasideMimeDocument is in the package Seaside-Core.
>>
>> Does loading that package resolve the issue? Is this in a stone with all seaside loaded, or were you just testing REST by loading the REST group?
>>
>> Cheers,
>>
>> J
>>
>>> On 25 Mar 2021, at 8:21 am, bruno buzzi brassesco via Glass <glass(a)lists.gemtalksystems.com <mailto:glass@lists.gemtalksystems.com>> wrote:
>>>
>>> Hi,
>>>
>>> This is just a report.
>>>
>>> Doing some tests on a REST layer i came across this error.
>>>
>>> Unicode16 DNU seasideMimeDocument (GS 3.5.4) -Seaside was loaded from https://github.com/SeasideSt/Seaside/ <https://github.com/SeasideSt/Seaside/>-
>>>
>>> Not sure in which github repository report it... Or send a PR because is an easy fix:
>>>
>>> Unicode16
>>> seasideMimeDocument
>>> ^ WAMimeDocument on: self mimeType: WAMimeType textPlain
>>>
>>> regards,
>>> bruno
>>> _______________________________________________
>>> Glass mailing list
>>> Glass(a)lists.gemtalksystems.com <mailto:Glass@lists.gemtalksystems.com>
>>> https://lists.gemtalksystems.com/mailman/listinfo/glass <https://lists.gemtalksystems.com/mailman/listinfo/glass>
>>
> _______________________________________________
> Glass mailing list
> Glass(a)lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
Hi,
Last I checked, Seaside is single-threaded which is a “good thing.” That said, it implies that every user action must return quickly… perhaps no longer than 1 second. If the action takes longer, a chain reaction starts to form from multiple “simultaneous” users (not really at-the-same-time users, they queue up with the single thread). There are times, in apps I’ve written, where the act of clicking a link (or button) is expected to take 10 minutes (sometimes half hour). During this time we want to fork a thread to do the big task (like generate a report) that doesn’t tie up the main thread. This way we can poll every 2 seconds to ask “are you done yet?” with a progress bar and then ultimately bring the user back to the normal flow.
Does Seaside have a pre-baked solution for this?
If not, I’ll take Ramon’s lead as his posts are the only thing I’ve been able to find about the subject:
http://onsmalltalk.com/polling-for-long-running-processes <http://onsmalltalk.com/polling-for-long-running-processes>
http://onsmalltalk.com/2010-07-28-a-simple-thread-pool-for-smalltalk <http://onsmalltalk.com/2010-07-28-a-simple-thread-pool-for-smalltalk>
In his case, he wanted a page to load immediately but then have a handful (or more) ajax requests running in the background pinging other servers to tally prices for a travel quote site. Sort of like those interlaced GIF images back in the day, his page pops with basic information then progressively renders other parts. So his example has maybe 10 threads forked for one page to fully load and shows updates inline.
I was thinking more of one page WAProgress (I made that up) with one forked thread that monitors its execution and returns when it either completes, errors, or the user clicks a cancel link.
These are things baked into WebObjects (NeXT / Apple) and is what my buddies and I use daily. We are tiptoeing around the idea of starting new web development projects with Smalltalk / Seaside and testing the waters.
I’ve setup a public demo app / repo to test out these concepts:
https://github.com/recurve/ScriptaculistPharoHeySql/ <https://github.com/recurve/ScriptaculistPharoHeySql/>
It’s an address book application. What I’ll do is modify the delete of a contact to fork and render the Progress component and programmatically make the delete slow to show the feature. By the way, how do I do the equivalent of “Thread.sleep()” in Smalltalk?
Thanks in advance for any advice you may have,
— Aaron
Hi,
I’m working on a demo app that is in a public repo and trying to setup my baseline correctly for loading via Metacello.
Here is the snippet I’m using to include Seaside:
seaside: spec
spec
baseline: 'Seaside3'
with: [ spec repository: 'github://SeasideSt/Seaside:master/repository' ].
This works well; however, I want to use Prototype-Core and Scriptaculous-Core. These don’t come out of the box. I sort of know that jQuery is the new hotness but consider this academic, I want to know how to include Prototype / Scriptaculous. Right now I can manually load them from Iceberg but I’d prefer this to be automatic and easy for a newcomer.
I did read this manual: https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/… <https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/…>
Still, I’m stumbling finding the right syntax to set this up. Maybe I overlooked something obvious, that could be the case.
My goal is to have a simple AddressBook app with a little eye candy by resurrecting Alan’s (Objcentric’s) tutorial and mating it to a SQL backend with Petter’s HeySql. The URL for that is: https://github.com/recurve/ScriptaculistPharoHeySql <https://github.com/recurve/ScriptaculistPharoHeySql>
I’m open to using jQuery instead but I first want to do it with Scriptaculous. I’m also very curious in how to get this syntax right in general, for baselines, as an academic exercise.
Thanks in advance,
— Aaron