The Aida 6 web framework is rather different in objectives than Seaside 3 as a Smalltalk application server. My specific interest was to determine to what extent the services for web applications were orthogonal to any given web markup. Both default to HTML but I am looking at frameworks suitable for emitting declarative Curl markup using the Curl web content language (originally MIT and now Sumisho.)
Both frameworks loaded fine into Pharo as Metacello configured packages and both had gotchas which required some experience in Smalltalk - unlike the Gofer and Metacello tools themselves.
What was distinctive in Aida was the need to make changes across many framework classes - and in Pharo Smalltalk, I can see no way to move new methods for base classes into my packages other than the *extensions mechanism.
The worst problem was an >>initialize method which started with super initialize and then failed to call a private method - the one mechanism that permits a subclass to override initialize properly ( I will submit my change as a fix.)
A serious problem was the lack of critical cleanup and reset methods ( I only needed to add one to Seaside for WAKom.) I will submit these to the Aida team.
You will not want to try to prototype anything in Aida without using the process browser tool and without running a set of >>allInstances sanity-check mthods.
The proliferation of objects comes from inadequate cleanup - but in a Version 6 of Aida may reflect the reliance on loading packages into base images. This is terrific for PITL but Smalltalk was always great for prototyping and that almost means maintaining a 'working' image - which is one way to spot objects that hang around.
In the early days of Seaside my rule was to discard any image in which Seaside had launched. For anything other than prototyping, Aida would mean working from a close-to core base image. That's just my take on what I saw after running two subclasses of SwazooSite in the same image, stopping, saving, quitting, launching ST.
And all bets are off until I have seen what a production image looks like - in the old days this was a matter of "stripping" images down - but we should now be in the age of building core images up.
I say that with a clear awareness of just how tiny servers can be in other alternative languages - such as Rebol - aside from any issues of code getting reused, code being understood and code being maintainable.
In the positive column: Aida has achieved a dialect for composing web pages which I think is on a par with Seaside. But Rebol is also great at dialecting ... so dialecting is not enough.
In secure corporate environments where Curl shines, I remain concerned with the use of a pharo.st file at startup. On the other side of that coin, the Aida tag method looks as if it should be reading from a resource file as adding a new tag should not always be a matter of changing framework level code.
At this time I have more of Curl running under Seaside but neither have the equivalent of 'halos' in Curl yet - so the jury is still out on a Smalltalk web framework for Curl markup.
Curl has great prospects in Asia, the subcontinent and Africa (most professional Curl developers are in India and Japan) wherever security is paramount.
My current work has moved from "eyes-only" document browsing* to "dark documents" on analogy with "dark matter": shedding light on a file directory or a DB table does not reveal them. The key is to make "dark documents" run light in collaborative environments. Both Smalltalk and Curl come with such excellent programmer facilities that they make a terrific match for prototyping a dark objects source and viewers. And Curl has an exisiting inheritance mechanism near to Traits and no barrier to evolution away from classic OOP (having been designed and implemented by MIT Lisp and Scheme experts at curl.com)
More to follow ...
* a early prototype for which there are links at logiquewerks.com and at aule-browser.com - both required the Curl runtime for the browser or the Curl REPL with scripted variants.
Showing posts with label Seaside. Show all posts
Showing posts with label Seaside. Show all posts
Monday, December 20, 2010
Sunday, December 19, 2010
Pharo Curl
It took some effort again to get Curl markup running as an alternative to HTML+JavaScript on Seaside 3.0 on Pharo 1.1.1 Smalltalk.
The worst nuisance was Seaside using a method named text: for the equivalent of stream nextPutAll: or document print
This is because text is a common declarative identifier in Curl markup. But it is only an annoyance and without examing available selectors at runtime or usinf perform: I can't see a workaround while leaving Seaside intact.
What was vexing was to still have to modifiy the WAAdmin class to defeat HTML-bias built into the framework. And one or two other known quirks.
If only Seaside would embrace Traits on Pharo Smalltalk! Traits would make it so clear that the choice of markup can be separated from the choice to use continuations, to use halos ...
Traits might also reduce the reliance on the Decorator pattern. In a language with late binding, this leads to odd code, such as assigning a stream to an object whose class name and instance identifier clearly mean that it is not a stream ( but of course it is a decorator of a stream.)
Traits might reduce the reliance on the visitor pattern whcih I think reduces the understandability of code far more than double-dispatch itself because of the proliferation of visitor classes. It is no longer necessary to ake a virtue of that necessity ( dare we now say, 'limitation' ?)
Many things are improved in Seaside 3.0 so that overall flipping from HTML markup to Curl goes well in the details - especially in a reduced need to subclass where closed tags happen to be identical across HTML and Curl.
It was amusing to me this time to add crlf so as to get better formatted Curl markup to inspect using the Curl source inspector - and spc to put spaces into the markup layout itself (Curl ignores whitespace the same an HTML client.)
The one concession was to use txt: to dump plain text - but super was not enough to preserve a Curl text: tag - for that I had to look at the runtime class so blocks go to text: and strings go to the canvas encoder for printing.
Curl 'attributes' (properties and options) are laid out the same as Seaside HtmlAttributes so anyone who can layout HTML for Seaside can layout Curl while remaining on 'the gentle slope' of the Curl language when used for declarative web content markup.
It still may be that Aida will be a better home for Curl poetry markup on a Pharo Smalltalk web server.
The worst nuisance was Seaside using a method named text: for the equivalent of stream nextPutAll: or document print
This is because text is a common declarative identifier in Curl markup. But it is only an annoyance and without examing available selectors at runtime or usinf perform: I can't see a workaround while leaving Seaside intact.
What was vexing was to still have to modifiy the WAAdmin class to defeat HTML-bias built into the framework. And one or two other known quirks.
If only Seaside would embrace Traits on Pharo Smalltalk! Traits would make it so clear that the choice of markup can be separated from the choice to use continuations, to use halos ...
Traits might also reduce the reliance on the Decorator pattern. In a language with late binding, this leads to odd code, such as assigning a stream to an object whose class name and instance identifier clearly mean that it is not a stream ( but of course it is a decorator of a stream.)
Traits might reduce the reliance on the visitor pattern whcih I think reduces the understandability of code far more than double-dispatch itself because of the proliferation of visitor classes. It is no longer necessary to ake a virtue of that necessity ( dare we now say, 'limitation' ?)
Many things are improved in Seaside 3.0 so that overall flipping from HTML markup to Curl goes well in the details - especially in a reduced need to subclass where closed tags happen to be identical across HTML and Curl.
It was amusing to me this time to add crlf so as to get better formatted Curl markup to inspect using the Curl source inspector - and spc to put spaces into the markup layout itself (Curl ignores whitespace the same an HTML client.)
The one concession was to use txt: to dump plain text - but super was not enough to preserve a Curl text: tag - for that I had to look at the runtime class so blocks go to text: and strings go to the canvas encoder for printing.
Curl 'attributes' (properties and options) are laid out the same as Seaside HtmlAttributes so anyone who can layout HTML for Seaside can layout Curl while remaining on 'the gentle slope' of the Curl language when used for declarative web content markup.
It still may be that Aida will be a better home for Curl poetry markup on a Pharo Smalltalk web server.
Sunday, November 7, 2010
Seaside Book at Lulu or as PDF
Seaside - the Book
Dynamic Web Development with Seaside, by Steph Ducasse
Available for charge as PDF or from Lulu as softcover.
Suitable for use with Pharo Smalltalk.
Dynamic Web Development with Seaside, by Steph Ducasse
Available for charge as PDF or from Lulu as softcover.
Suitable for use with Pharo Smalltalk.
Seaside web code browser at code.google
Here is a Seaside Code Browser project at code.google.com/p/smalltalklabsbrowser
For a Pharo one-click Seaside development environment, visit seaside.st
For a Pharo one-click Seaside development environment, visit seaside.st
Pharo Smalltalk for Seaside on Windows, Mac and Linux
James Robertson of Cincom has a Pharo Smalltalk introduction on YouTube.
If you know JavaScript and ruby but never learned to work in a Smalltalk environment, this video is just one of a starter series called "Smalltalk For You".
And if you are taken with Pharo, you an go to their pages at code.google.com/p/pharo or start with Smalltalk Television.
Both Cincom Smalltalk and Pharo have taken to Seaside for Smalltalk.
The Pharo Smalltalk branch of Squeak Smalltalk requires itself to support the Seaside web development framework while focusing on Traits as an abstraction mechanism for programming to interfaces without deep inheritance subclassing. With the advent of the Roar multi-core VM for Squeak Smalltalk, this should be an alternative to Scala.
For daily Smalltalk podcasts on Cincom Smalltalk and their variant development using the Seaside framework, see Cincom Smalltalk on Web Velocity.
For an alternative using Seaside, see Sea Breeze: YouTube has these links.
If you know JavaScript and ruby but never learned to work in a Smalltalk environment, this video is just one of a starter series called "Smalltalk For You".
And if you are taken with Pharo, you an go to their pages at code.google.com/p/pharo or start with Smalltalk Television.
Both Cincom Smalltalk and Pharo have taken to Seaside for Smalltalk.
The Pharo Smalltalk branch of Squeak Smalltalk requires itself to support the Seaside web development framework while focusing on Traits as an abstraction mechanism for programming to interfaces without deep inheritance subclassing. With the advent of the Roar multi-core VM for Squeak Smalltalk, this should be an alternative to Scala.
For daily Smalltalk podcasts on Cincom Smalltalk and their variant development using the Seaside framework, see Cincom Smalltalk on Web Velocity.
For an alternative using Seaside, see Sea Breeze: YouTube has these links.
Labels:
Cincom,
Pharo,
Seaside,
Smalltalk,
Web Velocity
Thursday, May 20, 2010
Cincom VisualWorks Smalltalk 7.7 and Seaside 3.0
About a week ago James Robertson began re-doing the >tutorial for Seaside 3.0 and Cincom VisualWorks Smalltalk 7.7.
An immediate problem arises if you installed an >NC image from Cincom without selecting "Preview" components for install: you will not have WriteBarriers.
Just connect Store to the Cincom repository, select Published and load WriteBarriers from down near the bottom of the list - I took the version at the top of the pile.
After that, the Package Manager loaded Seaside-All 3.0-3 with no complaint.
Now to see how often contentType is defaulting to 'text/html' ... (my interest in Seaside at the moment is for generating non-HTML content as Curl markup or 'text/vnd.curl')
PS
Smalltalk Daily has a post on WriteBarriers.
An immediate problem arises if you installed an >NC image from Cincom without selecting "Preview" components for install: you will not have WriteBarriers.
Just connect Store to the Cincom repository, select Published and load WriteBarriers from down near the bottom of the list - I took the version at the top of the pile.
After that, the Package Manager loaded Seaside-All 3.0-3 with no complaint.
Now to see how often contentType is defaulting to 'text/html' ... (my interest in Seaside at the moment is for generating non-HTML content as Curl markup or 'text/vnd.curl')
PS
Smalltalk Daily has a post on WriteBarriers.
Labels:
Cincom,
contentType,
Curl,
mimeType,
non-HTML,
package,
repository,
Seaside,
Seaside 3.0,
Smalltalk,
Smalltalk Daily,
Store,
VisualWorks,
vw 7.7,
vwnc,
WAMimeType,
WARequest,
WriteBarriers
Monday, February 22, 2010
Rebol 3, still alpha
Many mornings I begin in EeeBuntu linux on an Asus netbook and do
cd rebol3
./r3
upgrade
chat
n
first to see if there is another release of the alpha and then to check for new posts to the Rebol3 chat server.
It is not easy to form an opinion. A rebol wiki, web pages and a text chat server appear to have become an immense anchor dragging in mud, impeding the entry of a beta from being cleared into a safe harbour.
Perhaps the core of the Rebol code will see changes from struggles with a server, with multitasking issues, TCP/IP issues. Perhaps an opinion could be informed by following the new rebol3 exchanges in the R3 world at altme.com
Maybe with economies so depressed, it is possible to imagine that there is no real urgency. But the iPad is released an there is no Rebol option to Objective-C.
I am biased. My interest is held more by ObjectIcon and Curl web content for poetry and poetry translation and for the last phases of adult foreign language learning.
There are other new languages of great interest: Io and Converge among others. But as a web language, Rebol has always seemed to me to be an alternative to even Seaside in Smalltalk - and certainly an alternative to any language relying on regex.
It is not just that there is the imprint of one inventor over a group: that is the case with Io and with Falcon (the case of Icon after the death of Ralph Griswold is such a difficulty with at least three talented individuals on separate forks.) In the case of Smalltalk, there was no standard and Self, Strongtalk or Slate were promising new directions - and now there is Io.
It may be that a beta with a graphical library is closer at hand than I am aware now that so many more developers are active in building modules for the R3 core.
And doubtless a Rebol 3.1 would be the version to await for any major commercial project.
And in fairness, we are sure to see a Rebol 2.7.8 before Icon 9.5 - but still this has been a sobering story for anyone interested in the sociology of invention, if that is how best to understand such innovations as computer programming languages on the edges or margins of science. Not quite Esperanto and not the decoding of genomes. An apposite analogy escapes me.
cd rebol3
./r3
upgrade
chat
n
first to see if there is another release of the alpha and then to check for new posts to the Rebol3 chat server.
It is not easy to form an opinion. A rebol wiki, web pages and a text chat server appear to have become an immense anchor dragging in mud, impeding the entry of a beta from being cleared into a safe harbour.
Perhaps the core of the Rebol code will see changes from struggles with a server, with multitasking issues, TCP/IP issues. Perhaps an opinion could be informed by following the new rebol3 exchanges in the R3 world at altme.com
Maybe with economies so depressed, it is possible to imagine that there is no real urgency. But the iPad is released an there is no Rebol option to Objective-C.
I am biased. My interest is held more by ObjectIcon and Curl web content for poetry and poetry translation and for the last phases of adult foreign language learning.
There are other new languages of great interest: Io and Converge among others. But as a web language, Rebol has always seemed to me to be an alternative to even Seaside in Smalltalk - and certainly an alternative to any language relying on regex.
It is not just that there is the imprint of one inventor over a group: that is the case with Io and with Falcon (the case of Icon after the death of Ralph Griswold is such a difficulty with at least three talented individuals on separate forks.) In the case of Smalltalk, there was no standard and Self, Strongtalk or Slate were promising new directions - and now there is Io.
It may be that a beta with a graphical library is closer at hand than I am aware now that so many more developers are active in building modules for the R3 core.
And doubtless a Rebol 3.1 would be the version to await for any major commercial project.
And in fairness, we are sure to see a Rebol 2.7.8 before Icon 9.5 - but still this has been a sobering story for anyone interested in the sociology of invention, if that is how best to understand such innovations as computer programming languages on the edges or margins of science. Not quite Esperanto and not the decoding of genomes. An apposite analogy escapes me.
Wednesday, September 9, 2009
Generating Curl 7.0 web content from Seaside 3.0 on Pharo 1.0 beta
Yesterday I used a 3.0 install on the Pharo 1.0 beta to generate non-HTML (in my case that is Curl markup )
I would not say that is any easier that before 2009 Camp Smalltalk ( I started from scratch - it still took me hours to track down everything )
Anyone trying this must remember both gotchas:
WASystemConfiguration clearAllDescriptions.
WARenderer resetDefault.
But since WARenderer is an HTML subclass which always resets the default renderer class to itself, that >>default method had to change.
The main nuisance is that methods >>textHtml or >>textPlain are in many critical places instead of a default rendering type ... and of course many key methods for error and redirect still output raw HTML.
Now to see what headaches appear as Pharo and Seaside evolve - given the wide-spread changes still required to accommodate a default rendering MIME type other than plain text or html.
Curl and GemStone are such a natural match that the game still looks to be worth the candles.
I would not say that is any easier that before 2009 Camp Smalltalk ( I started from scratch - it still took me hours to track down everything )
Anyone trying this must remember both gotchas:
WASystemConfiguration clearAllDescriptions.
WARenderer resetDefault.
But since WARenderer is an HTML subclass which always resets the default renderer class to itself, that >>default method had to change.
The main nuisance is that methods >>textHtml or >>textPlain are in many critical places instead of a default rendering type ... and of course many key methods for error and redirect still output raw HTML.
Now to see what headaches appear as Pharo and Seaside evolve - given the wide-spread changes still required to accommodate a default rendering MIME type other than plain text or html.
Curl and GemStone are such a natural match that the game still looks to be worth the candles.
Wednesday, August 26, 2009
Curl web content generated by Seaside 2.9
Today I tackled getting Seaside 2.9 alpha 4 sufficiently decoupled from HTML/XHTML to generate web content of MIME type 'text/vnd.curl'.
The Seaside alpha was installed in a Squeak 3.10 Smalltak image using a MonticelloCeonfigurations map from the folks at seaside.st
It was really satisfying to see a Curl application open in my browser with Seaside running as my localhost.
Now to get a "headless" version that can run as a server-side process to be maintained remotely ... that will start at seasidehosting.st
The Seaside alpha was installed in a Squeak 3.10 Smalltak image using a MonticelloCeonfigurations map from the folks at seaside.st
It was really satisfying to see a Curl application open in my browser with Seaside running as my localhost.
Now to get a "headless" version that can run as a server-side process to be maintained remotely ... that will start at seasidehosting.st
Squeak MonticelloConfigurations mcm for Seaside 2.9
If you are like me and have not used an Monticello configuration file such as the mcm file to install Seaside 2.9 in Squeak, what you need to do is download the mcm file and place it in the package-cache directory of the Squeak you are going to run.
I tried using Monticello to create a package and then edit the script but PackageInfo is broken even in the LevelPlayingField (LPF) image that I built by running
HTTPSocket httpFileIn: 'ftp.squeak.org/3.11/scripts/LPF.st'
in a workspace.
Once the file is where a monticello tool can see it, even the Monticello Browser can be used to load it by doing Open on the package-cache which should appear at top of the panel on the right of the browser.
I tried using Monticello to create a package and then edit the script but PackageInfo is broken even in the LevelPlayingField (LPF) image that I built by running
HTTPSocket httpFileIn: 'ftp.squeak.org/3.11/scripts/LPF.st'
in a workspace.
Once the file is where a monticello tool can see it, even the Monticello Browser can be used to load it by doing Open on the package-cache which should appear at top of the panel on the right of the browser.
Saturday, October 25, 2008
The Future of Curl
Over at Curl I have added some comments to an invitation by Richard Monson-Haefel to weigh-in on improving Curl.
Divining the future of Curl means thinking outside the box. Here's a few attempts.
Pair up Curl as a client-side to Gemstone as has been done by Seaside.
Beef-up Curl on the client-side by getting serious about the future of expression-based languages: if there is not room in the marketplace for ICON, UNICON, REBOL and Curl then look to partner with the remnant of the ICON team at U. of Arizona.
If the Curl team cannot partner-up, then look to go beyond one of those languages by having more effective goal-oriented programming than UNICON or more user-friendly parsing than REBOL.
The option of viewing Curl as a platform and not a language seems to close off many avenues unless Curl, the platform, is able to embrace languages such as ICON which appear to be in need of a new home.
Or is there a niche for Curl in the future of Perl with Parrot, or Ruby with an industrial-quality VM, or distributed OZ?
One interesting place to look is GROK and what they are looking to do with Python ZOPE. That project alone might ensure the future of ZOPE.
Then there is RDF. Somehow RDF has become tied to clunky XML implementations or worse. Even now that W3C has embraced "sparkle" for RDF Data Access, we need not ignore the prospects for Curl as a potentially RDF-friendly language. Prima facie, ICON back-tracking and REBOL paths make either look more promising as a language. But Curl, the platform, could be a powerful starting point for a more language-neutral approach to RDF triples. Mozilla XUL has moved away from RDF (blame XML there, where the 'X' is for 'Xtra-heavy' rather than eXtensible.) The real-issue is how to effectively provide metadata. As more people look to HTML and XHTML itself as the answer, Curl appears to be a natural: Curl has always been metadata-friendly.
Curl CSPD could even be used to help ensure that meta-data that would disclose too much would be suppressed where privacy is an issue (think blogging in China and i-journalism most anywhere.)
Divining the future of Curl means thinking outside the box. Here's a few attempts.
Pair up Curl as a client-side to Gemstone as has been done by Seaside.
Beef-up Curl on the client-side by getting serious about the future of expression-based languages: if there is not room in the marketplace for ICON, UNICON, REBOL and Curl then look to partner with the remnant of the ICON team at U. of Arizona.
If the Curl team cannot partner-up, then look to go beyond one of those languages by having more effective goal-oriented programming than UNICON or more user-friendly parsing than REBOL.
The option of viewing Curl as a platform and not a language seems to close off many avenues unless Curl, the platform, is able to embrace languages such as ICON which appear to be in need of a new home.
Or is there a niche for Curl in the future of Perl with Parrot, or Ruby with an industrial-quality VM, or distributed OZ?
One interesting place to look is GROK and what they are looking to do with Python ZOPE. That project alone might ensure the future of ZOPE.
Then there is RDF. Somehow RDF has become tied to clunky XML implementations or worse. Even now that W3C has embraced "sparkle" for RDF Data Access, we need not ignore the prospects for Curl as a potentially RDF-friendly language. Prima facie, ICON back-tracking and REBOL paths make either look more promising as a language. But Curl, the platform, could be a powerful starting point for a more language-neutral approach to RDF triples. Mozilla XUL has moved away from RDF (blame XML there, where the 'X' is for 'Xtra-heavy' rather than eXtensible.) The real-issue is how to effectively provide metadata. As more people look to HTML and XHTML itself as the answer, Curl appears to be a natural: Curl has always been metadata-friendly.
Curl CSPD could even be used to help ensure that meta-data that would disclose too much would be suppressed where privacy is an issue (think blogging in China and i-journalism most anywhere.)
Thursday, September 13, 2007
Cool Curl 'live' code widget
Over at eclectic-pencil I have a post on a very cool Curl widget that rivals almost anything I have ever seen expand and collapse on a web page.
What I neglect to mention is that in the example, the only code to create the XMl tree is this:
Which you would be hard-pressed to beat in Seaside for Smalltalk or in Groovy. Concise.
TiScript also has an alternative DOM and some nice features as a JavaScript alternative, but Curl 5.0 is a mature, full RIA product with 'live' code for inspection and a focus on the client-side. It is almost Smalltalk but it was also built for the web (in fairness, Curl goes about as far back as Smalltalk VisualWave.)
The only cool but alive technologies as neglected as Curl 5.0 must be Gemstone/S and Rebol 2.6.3 ... and the latter is soon to be 2.7.x with 3.0 in the wings ...
Watch for a Seaside for Gemstone/S beta in the news soon ...
PS For people living on AIR and FLASH, Rebol/FLASH went 2.0 today ...
What I neglect to mention is that in the example, the only code to create the XMl tree is this:
let xmldoc:XDMDocument = {build-xml preserve-whitespace? = false, loc} || ... {XDMTreeControl open? = true, xmldoc.root}
Which you would be hard-pressed to beat in Seaside for Smalltalk or in Groovy. Concise.
TiScript also has an alternative DOM and some nice features as a JavaScript alternative, but Curl 5.0 is a mature, full RIA product with 'live' code for inspection and a focus on the client-side. It is almost Smalltalk but it was also built for the web (in fairness, Curl goes about as far back as Smalltalk VisualWave.)
The only cool but alive technologies as neglected as Curl 5.0 must be Gemstone/S and Rebol 2.6.3 ... and the latter is soon to be 2.7.x with 3.0 in the wings ...
Watch for a Seaside for Gemstone/S beta in the news soon ...
PS For people living on AIR and FLASH, Rebol/FLASH went 2.0 today ...
Labels:
client-side,
Curl,
eclectic-pencil,
GemStone,
Groovy,
Rebol,
RIA,
Seaside,
Smaltalk,
VisualWave,
XDM
Subscribe to:
Posts (Atom)