Archive for the ‘RIA’ Category

Web Velocity released

Wednesday, July 1st, 2009

I have a note over at my Curl blog that Web Velocity is now available. So “Borges” for Ruby should look out even if running on rubinious …

Actually, CINCOM’s framework will likely see adoption in the enterprise (in recent years, financials) and Ruby on Rails remain the small ISV temptation that it already is … and no, Smalltalk is not dead: just look at the CINCOM client list.

Nor is PROLOG dead. One of the vendors simply chooses to mention their software and their clients, not their language. Competitive advantage, I suppose. What Seaside has done for Smalltalk we may yet see Logtalk do for PROLOG.

As for Curl, there should be an announcement soon …

Aule Browser

Friday, June 26th, 2009

Over at my LogiqueWerks pages there is now a demo of the Aule Browser to view online or run on desktop for Windows or linux. You must first install the Curl runtime engine – something both safe and easy (Curl came out of MIT at the same time as the w3.org and has been in use in large corporations in Japan for almost a decade.)

‘Aule’ means hall or entryway (it is ‘Eule’ that mean owl … ) and because of the ‘lobby’ concept in the Io language, I had once suggested it as a name for Io. “Simple” was taken, so ‘Aule’ it is!

HTTP resync issues for Curl applets

Thursday, June 11th, 2009

With the release of Curl 7.0 there is now an additional resync facility as noted by Chris Barber.

Here is what the documentation says:

resync-file (accessor) Class: ComponentMetaData Package: CURL.LANGUAGE.COMPONENT

getter public sealed resync-file:#String
setter public sealed resync-file:#String

Set component resynchronization time from specified file.

When specified in the meta-data for an applet or script this attribute defines the URL of a file whose when-last-modified time will be used to set the value of process-resync-as-of.

When setting this value through this setter, the value must contain an absolute URL or an exception will be thrown. When setting via the applet or script declaration a relative path may be used or the empty string may be used as shorthand for the main applet or script load file.

Curl for RIA with AMF

Friday, May 22nd, 2009

I was not aware that there was another binary alternative in Binary JSON or BISON. But I have found two places where developers outside ActionScript might want to take a look: the Glare framework for AMF with Smalltalk and the python AMF code.

Regardless, the Curl framework is using an abstract DataObject class with two subclasses: StandardDataObject and DynamicDataObject. It was interesting to see that one DataObject factory method uses
from-traits
    traits:DataObjectTraits

as traits are not much discussed in relation to Curl.

The supported types are bool, null, String, int, double, DateTime, DataObject, Array, ExtendedArray, ByteArray, AMFXmlDocument with the latter being just a wrapper for a String of XML. An ExtendedArray used to obtain a DataObject from a ByteInputStream or to put to a ByteOutputStream with its AMFSerializer and AMFDeserializer children.

Here is the default constructor for the DataObjectTraits:

{StandardDataObjectTraits.default
    name:String,
    members:StringArray,
    dynamic?:bool = true,
    externalizable?:bool = false
}

so this look very approachable. But it has nothing to do with Traits as in Squeak or Scala. Traits were introduced to help structure the refactoring of code in a way in which categorizing methods could not. Traits are classes which are not intended to have instances but which can implement methods. That is a very natural thing in Curl, but without a refactoring browser, their usefulness as an explicit cosntruct is dificult to demonstrate (an Eclipse plugin might be in the offing.) The Curl 7.0 introduction of a library access modifier should make naming classes with Trait more meaningful.

Now to get BlazeDS running on my Apache localhost.

CurlUnit and Curl site-specific browsers using the Surge RTE

Thursday, May 21st, 2009

Over at LogiqueWerks there are 2 new links on my Curl 7.0 page: a live page running unit tests against Curl project in a test runner UI (just click the RUN button) and the project beiing tested: a simple SSB (site-specific browser.)

I have come to rely on Mozilla Prism for the sites at which I make daily changes: but I know that Curl offers a an enterprise SSB alternative to GreaseMonkey. And I can see a Curl GTD browser that makes TiddlyWiki seem lame in comparison. Let 42 useful browsers bloom!

Three more open-source projects for the Curl RIA platform

Friday, May 15th, 2009

Over at sourceforge.net there are 3 more open-source projects for Curl. One is for a Curl MVC framework and as of today has no available downloads. Another is a non-visual Curl library with packages such as CODEC and packages with utility procedures such as
{visit-super-classes}.
The third package is a Curl-Java project to facilitate communications between a Curl client and server-side Java (both using the Spring framework and the Japanese Seasar2 AOP framework.)

The two projects with available downloads are for Curl 6.0 at this moment and do not yet have detailed English documentation. I had no problem deploying the LIB project as as to be able to install 6.0 documentation for the Curl Documentation Viewer. The ORB project has pre-compiler pre-processed pcurl code files containing standard Curl docs.

The ORB project includes both Curl and Java directories along with a curl-orb-client.jar which has classes such as CurlSerializableStreamWriter and a set of server-side JAR files including curl-serializer.jar and curl-orb-server.jar From what I can see, the object request project includes code for generating mappings between object instances in Java and object instances in Curl.

This attention to the j2ee server-side should help move Curl towards the goal of Curl as a secure enterprise platform and not just a mature web-content language for the client-side.

Curl 7.0 RIA platform released May 7, 2009

Sunday, May 10th, 2009

The latest Curl from Curl Inc. is now available as both Runtime and developer IDE or Eclipse plugin for Windows and Linux (both as rpm and as deb).

If you are a developer looking at the Curl platform you will not want to miss the example code ZIP files in the docs/default/examples directory. It is found under your install below /Surge/8/docs ( the “8″ because 7.0 is known internally as curl8, rather as you started your 2nd year on your 1st birthday.)

The most significant change for me as someone who has worked mostly in Curl 3.0 is the “library” access modifier which allows packages under the same project manifest to share code ( so we have private, protected, package, library and public.) I recently worked on a framework where this would have helped keep classes in separate packages which worked with each other across component layers. And this means we have the syntactic-sugar of “library-get” and “library-set” for ease in declaring accessors.

As most often in the past, Curl 7 installs so as to co-exist with Curl 3.x, 5.x or 6.x either as RTE or also with IDE’s. If you have seen a Curl installer in the Windows Control Panel you will know that it is very selective as to what you can uninstall or retain among your Curl versions.

I had been hoping to see an option to “disable selected breakpoints” on that Debug pane, but there are now large, obvious buttons with dropdowns on the IDE for flipping from one edit point back to another which is helpful when refactoring code across scurl source files.

The best kept IDE secret is that a right click on an edit pane tab gives you the option to “split” right or top ( the menu has an option which defaults to split to the bottom.)

With the TextMate knock-off for Windows and Linux, E, now going open-source for linux, I will want to try using E. But Curl also comes with an emacs site file and offers an Eclipse plugin for the Curl language.

Curl Inc. is now positioning Curl as more of an RIA enterprise platform than a web content language (Curl is usually presented as HTML + JavaScript + CSS) and now has more options for using JSON, JavaScript, Flash and Flex. There are a few Curl open-source packages now for XML as a data format, for SQLite and for UnitTests among others. I have not checked yet whether Curl embedded as an HTML Object now accepts Object parameters – the lack of which had been a pet peeve of mine … or whether there is now more complete documentation of the API for Curl sub-applets.

I am glad to be able to say that the Curl RIA demos at the Curl home page are not “toy” applications as can be seen with the dynamic “social network” applet for FaceBook or the impressive Timeline demo. In addition, there are code examples available elsewhere on the web for advanced Curl UI’s.

In a few days I may have a chance to look at writing Mixin classes in Curl and see what has become more comfortable with the “library” access modifier for code common across packages for code which is not public or protected (Curl allows multiple inheritance and constructors are of the “factory” pattern.)

With the renewed enterprise interest in Smalltalk, the re-emergence of the “Slate” project as “Clean Slate Smalltalk”, the fine Seaside web framework, traits from Squeak Smalltalk and the good work done on the Io beyond-Smalltalk language, it is nice to be able to say that the only web programming environment which I think can rival Curl is a multi-platform dialect of Smalltalk. Curl allows you to relax all typing and do your prototype and then get down to re-writing your application as an industrial-strength web or desktop app relying largely on static types. All that I miss in the Curl IDE is a Smalltalk-style refactoring browser …

In my many years working on mission critical applications first in both Curl and Smalltalk, Curl is as productive for experienced developers as Smalltalk and just as well-suited to evolutionary approaches to software development. Both promote: “See, Yes you can! Just like this …” And after that short turn-around demo or prototype, we can get the app right with UnitTests, an excellent debugger, live documentation and then get it fast with the profiler and the HTTP monitor. And have the option of using Curl itself as the data format. And now Curl stylesheets as well (Smalltalk Seaside is also not married to HTML.)

If you have not yet looked at Seaside for Smalltalk and you are doing web applications, you owe it to yourself to do so. It you are interested in the desktop or in site-specific browser applets, then Curl is a must-see, must-try. Then if you opt for Air or Silverlight or yet another framework, library or platform, you will make that choice knowing what you have passed up. Just as you may have thought you knew why you ignore PROLOG for business rules, you may just not know about Logtalk or the latest on constraints in distributed Oz. These are not just languages: Curl as much as Smalltalk, Erlang or Oz offers an approach to getting from a software vision to a maintainable product with manageable risks and a good chance of being within budget. But as much as Smalltalk or Rebol or UNICON you must be ready to set aside preconceived notions – and I think that it helps to embrace evolution as a fact: your prototype need not be a throw-away but you must have the discipline to move beyond exploratory and feasibility mode to the demands of industrial-strength components. Curl offers restrictions at the code package level which would offend most Smalltalkers. But it is worth it in my experience. Start modeling your web app in a declarative mode with no type restrictions. And then get beyond that.

Really cool Curl

Thursday, September 13th, 2007

I was pointing out JSForth to a developer on-line (Forth interpreter in JavaScript) which I thought was cool but then I see this in Curl: a folding coding window in a web page.

Here is the Curl 5.0 code for the applet:


{curl 5.0 applet}
{curl-file-attributes character-encoding = "windows-latin-1"}
{applet manifest = "manifest.mcurl"}

{include "./utils/guide-header.scurl"}
{include "./utils/support.scurl"}

   {x-example-ref
        title = "Folding Tree example",
        {url "./examples/RIA_with_Curl.curl"}
    }

What this does is create a labeled hotspot on my page: with one click an entire Curl client-side scripting environment opens. The running example is there; the code that is running is there; buttons to execute, save applet; revert changes; close popup – and the panel allows editing the script.

Clicking on ‘Execute’ causes a popup version of the script to run with your changes.

I had seen this cool way of working with code as part of the example macro

{example

}

What was new was the ‘expandable’ and ‘collapsible’.

I cannot imagine this being more concise in JavaFX or in Groovy. Here is the Curl procedure from the include file:


|| Copyright (C) 1998-2006, Sumisho Computer Systems Corp.
|| All Rights Reserved.
{define-proc {x-example-ref
                 title:String = {message Example},
                 href:Url, ...}:Visual
    let display:Graphic = {example-ref title = title, href, ...}
    {for-each-graphic
        {proc {g:Graphic}:void
            {type-switch g
             case g:TextEditPanel do
                || consume right click, so TreeControl ignores it
                {g.add-event-handler
                    {on e:PointerPress do
                        {if e.button == right-button then
                            {e.consume}}}}}},
        display}
    {return
        {text-width-display
            {expandable
                border-width = 2px,
                {bold {value title}},
                display}}}
}
|| *** calls the following ***
{define-proc public {example-ref
                        loc:Url,
                        title:#String = null,
                        base-url:Url = {get-base-url},
                        manifest:ComponentManifest =
                           {get-default-manifest},
                        package:OpenPackage =
                            {OpenPackage
                                CURL.IMPLICIT.APPLET,
                                CURL.IDE.DOCUMENTATION,
                                manifest = manifest},
                        ...
                    }:Graphic
    let result:any =
        {try
            {evaluate
                base-url = loc,
                package = package,
                {format "\{example title = %w,\n %s\}",
                    title,
                    {read-from loc}}}
         catch e:Exception do
            {paragraph
                Error in {bold {value loc}}:{br}
                {text color = "red", {value e}}}}
    {return {Frame result, ...}}
}

It is perfectly readable. When you see ‘…’ inside { } what you are seeing are rest arguments, or unnamed arguments for variable parameter procedure calls. And then again in the

{ return {Frame result, …} }

– these are not code elisions! The critical {example } macro is in the evaluate block. Dynamic language fans will note that the result is their preferred type: any.

And to learn to use this expand/collapse ‘live’ code environment/widget all I had to do was right-click on a folding code-editor page in the Curl Documentation Viewer which is itself Curl. I copied in the files to include for my applet and set a few imports in my ‘manifest.mcurl’ file. No CLASSPATH to look at, no question of which JARs are where. No JavaScript library required. As cool as Smalltalk, Strongtalk or the XOTcl IDE.

To see one in action, you will need the XML Document Model for Curl 5.0 from curl.com
Just install the RTE, then the IDE and then the XDM. Open your Documentation Viewer and search for ‘WSDK XML Document Model’ or just ‘build-xml

The proc identifies an anonymous procedure and we pass in what Groovy calls a ‘closure’ at on e:PointerPress do or what would likely be an inner class Listener in Java.

If you know something as cool using FLASH with ActionScript, post a snippet or a link to same.
Of course you could do this using AJAX with Prototype and Scriptaculous. But I got this page out in a matter of minutes. Oh yes, Sun says JavaFX is not about ‘throwing up pages’ …

Imagine that you are working on a problematic page. You drop in a gem like this and now you are displaying and experimenting with your code. Only Seaside for Smalltalk can rival this as far as I am aware but that requires some understanding of Smalltalk. I love Seaside, but I know of nothing that can beat this. Of course Rebol 3.0 is on the way …

As for snide remarks from Sun in their JavaFX promo, there are quick ways to throw up a web page… I like blocknote and there is the Meta/HyperCard Revolution product or even MS Word or FrontPage in a pinch…

Hyper ZK

Monday, August 6th, 2007

AJAX without JavaScript‘ is what you can expect managers to be talking about and ZK is something they may mention because at one time ZK marketing made that claim on their ‘Simply Rich’ homepage. Here are some useful quotes.

The first line of any ZK applet:

<noscript><p style="color:red">Sorry, JavaScript must be enabled.<br/>Change your browser options, then
<a href="">try again</a>.</p></noscript>

Here is a quote from the ZK site:

Browsers without JavaScript at all is another platform, also a challenge. We’d like to see if we can make them talk in ZK.

And this:

We are working with our partner to deliver an intuitive visual design tool that works with Eclipse IDE.

And if that is not enough, this gem:

To work with existent applications more efficiently, ZK components will be ready in the form of JSP tags. We also consider the possibility to provide them in JSF.

ZK is considered to be hot, but Mozilla + XUL is not. A rising tide does not lift all boats: some are sunk, have too must ballast or are otherwise already scuttled.

One ZK claim is that they have been able to use BeanShell to show what a good scripting language Java is. That should give you pause.

And they promise to offer scripting for Ruby (they may mean JRuby) and Groovy.

The only answer is to look at what the product offers (libraries? a framework? an RTE? a consistent API?) and requires (less web scripting, but more java programmers?) and then to look at genuine alternatives. The promise of a visual environment in Eclipse, so many years after the failure of visual environments to adequately address complex callbacks is taken up on my page … AJAX = AWAX.

It might seem that the choice between ZK and the GWT is obvious. I don’t think so, and I try to suggest why not. It is even claimed that they are complementary approaches. Perhaps in fairness ZK is more of a framework – but it is such a conflicting mix that after some initial enthusiam I am left completely lost as to its intent.

If nothing else it breaks any easy association of AJAX with RIA and that may confuse your manager. Then there is the claim that it allows building an RIA ‘without programming‘. I prefer the AJAX ‘without JavaScript’ claim.

The best outline of the ZK framework that I found was an image reproduced at Ajax Magazine.

As for hype there is ZK’s own claim to be “#1 Ajax project on SourceForge.net” and they report that they are finalists in the 2007 SourceForge community awards in 3 categories: “Best Tool and Utility for Developers,” “Best User Support” and “Best Technical Design”.

Curl as a Web Content Language

Saturday, July 14th, 2007

You could view the Curl/Surge RTE as a runtime environment to host a domain specific language: a web content language.

Viewed in that light, it is not surprising to find the class

TableContentPrototype

in the package CURL.GUI.BASE

Using the page for the topic ‘Reflection’ in the Curl Documentation Viewer you can modify and execute the following code snippet:


{value
    let p:Package =
        {import-package
            {ComponentSelector name = "CURL.GUI.BASE"}
        }
    let members:VBox = {VBox}
    {for m in {p.get-members} do
        {members.add {String m}}
    }
    {VBox
        {HBox
            {String p & ".get-members : "},
            members
        }
    }
} 

to view the members of CURL.GUI.BASE

But it would be fun to use concrete subclasses of the abstract class TableContentPrototype to explore the parent class.

{import * from CURL.GUI.BASE}
{value
    let t:ClassType = TableContentPrototype
    let members:Table =
        {Table
            {row-prototype
                {cell-prototype t}
            },
            {row-prototype
                {cell-prototype "member"},
                {cell-prototype "name"}
            }
        }
    {for m in {t.get-members search-superclasses? = false} do
        {members.add
            {row-prototype
                {cell-prototype m},
                {cell-prototype m.name}
            }
        }
    }
    members
} 

We are able to use the procedures row-prototype and cell-prototype from the GUI.BASE package to expose the class. The package procedure row-prototype itself returns an instance of a subclass of TableContentPrototype because that is what the package procedure cell-prototype returns. Curl is highly-modular but sensibly so: there are alternate packages and super packages.

To see this all in action, download the Curl RTE and save either code snippet as a .curl file. Add a ‘herald’ at the top of the file as follows:

{curl 5.0 applet}
{applet license=”development”}

Load the file into your browser address field using

file:///C:/any-directory/my-curl-file.curl

and substitute your drive, directory and filename.
Or you can open the file using the FILE menu on your browser’s menu bar.

Or you can simply paste the code snippet into any Curl tutorial or documentation code widget which has an EXECUTE button.

The point of this? Curl is a web content language designed for the internet and intranets. It provides all of the services that are usually obtained with a mix of Java, HTML, CSS and JavaScript. Instead of requiring the Java runtime, it requires the Curl runtime. It is ready for SOA and it was RIA from the get-go.

There are other alternatives but they tend to involve a language + a layout language. Two notable exceptions are Seaside for Smalltalk and Rebol.

But what distinguishes Curl from Smalltalk is what the team at MIT dubbed ‘the gentle curve’ in learning Curl and using Curl. Many software development managers consider JavaScript to be ‘just’ scripting to be done by a ‘web developer’. The perceived need for Google’s Web Toolkit to cope with Java and JavaScript in the Eclipse IDE should give us pause. JavaScript is a very rich language with a capacity to boggle known as ‘unintended closures’. It has been ill-served by the notion that it is a kind of web-Basic script and was completely mis-named by SUN marketing.

Of course there is Ruby on Rails, but if you are going to use Ruby, what was it that decided you against Smalltalk and a mature virtual machine? Seaside with Smalltalk is just hard to beat. The tough call would be Rebol. Rebol is as deep a language as Smalltalk or JavaScript and like any such language, it is a way to express thinking about a problem. It is a software development language which happens to be ideally suited to the internet. It should lead to an OS just as Smalltalk is leading to Croquet. It already boasts an ‘IOS’.

Curl is different. Curl was designed as the language for www. Like JavaScript, it was international from the start by being built for UNICODE. It is most widely used in Japan and Korea to exploit the web in business settings.

JavaScript can be viewed as a branch of Self, which was the next generation of Smalltalk which SUN kept to itself as they did Strongtalk, the typed-Smalltalk. As ECMAScript, JavaScript may soon cease to be a dynamically-typed, prototype-based language. At that point it may be a better language for some web development or simply be overtaken by Adobe ActionScript and FLASH.

Almost any programming language can fade in a comparison: Rebol fades when compared to Oz as does Ruby when compared to a mature Smalltalk implementation. But Curl can stand on it’s own as a web content language. Rebol’s strength is in it’s ease of parsing, its dialects and its internet savvy. And its European community and US leader, Carl Sassenrath. Curl’s strength is in the breadth of its code packages and the ‘gentle curve’. And the number of its core team members who have been with Curl since it spun-off at MIT. And the number of its team members from the Far East. Its few annoyances could be readily addressed with a little syntactic sugar. It is a one-stop web language. And it is cool to Curl.

Early adoption of Curl in the LATIN-1 world may have been delayed by the dot-com crash: it was not hurt in countries where UNICODE matters to business. If you are looking to build a rich internet application, Curl5 deserves consideration. Besides, Rebol3 is still a few weeks away …