Æjaks

Because a simple to use interface should also be simple to program.

TP Æjaks combines the server-side Ajax windowing system Echo2 with the powerful simplicity of the Tcl language. The result is a rich development environment in which to develop Ajax-based web applications, often with much less code to write.

Download, documentation, source code, mailing list, etc. now online at: http://aejaks.sourceforge.net/

AMG: But it's not simple to spell. Aejaks is an alternate spelling that's easier to type.

26 September 2013 - version 2.3 released, changes at [L1 ]

MHo 2013-11-04: seems that aejaks.Demo.war only contains empty subfolders? TP Uploaded the file again to SourceForge, should be good to go.


See how Æjaks compares to Tcl/Tk coding.


LV Anyone know of a web site which makes use of this package, so a demo of the capabilities can be seen?

TP answers: localhost is your best bet for now. The distribution file aejaks-2.2-exe.tar.gz or aejaks-2.2-exe.zip has everything you need, except a Java installation. This makes Æjaks a batteries included distribution, that's why it's such a big file. (There are even backup batteries yet to be utilized, waiting for a future release. :-)

The Æjaks website has a specific page [L2 ] on starting the server with the sample apps. In short:

  1. unpack the distribution.
  2. change to the directory that was unpacked.
  3. run.sh (Windows users run.bat).
  4. point your browser to http://localhost:8080/
  5. Now, be amazed that you're running this on your browser.

NB I had to first go to http://localhost:8082/ and login before I could access the index page on port 8080.. Incredible stuff Tom!!!

Now, if you just want to see the flavor of the toolkit, the Echo2 page at NextApp has some demo programs to run. Surf on over to: http://nextapp.com/platform/echo2/echo/demo/

Anything that is done with the Java-based demos can be completely done in Tcl with Æjaks. The 0.4 release of Æjaks doesn't include the Extras and Chart widgets in Tcl yet, but you can still make use of those through the TclJava interfaces [L3 ] if you really want. (Avoid the Test applications on the NextApp demo page.)

TP 06 July 2007 - Version 0.5 now includes Echo2 Extras, ChartDisplay, and FileTransfer widgets.

[email protected] says: Have looked over this and it looks pretty astounding. Can't wait to get me hands dirty with this.


2007-01-17 VI One cool app! I am writing some of our internal tools using this. Is there any way to (prompt the user to) load or save a file? Or everything has to be done on their server?

TP Echo2 has a FileTransfer library jar, and it is included in the Æjaks ./lib directory. Æjaks doesn't yet have Tcl support for FileTransfer, it is on my To-Do list. You should be able to use it now using Jacl's java package to interface directly. See the FileTransfer example on the NextApp Echo2 Wiki [L4 ].

TP 06 July 2007 - Version 0.5 now includes Echo2 Extras, ChartDisplay, and FileTransfer widgets.


2007-01-25 MRJC Is there a reason why the Tk Convention of lower case windowing commands can't be supported?

 Tk                                            Aejaks (NOW)
 --------------------------------------        ----------------------------------------
 pack .top.row1                                Pack .top.row1

 Tk                                            Aejaks (POSSIBLE??)
 --------------------------------------        ----------------------------------------
 pack .top.row1                                pack .top.row1

TP Æjaks is not compatible with Tk, and I believe it would be confusing to name widgets and commands the same as Tk. The Pack command has different syntax from pack. However, if you would really like to use pack in Æjaks, Tcl provides an easy way to alias commands, see interp alias.


IL 2/2/2007 I can try to put up a demo app of this provided it doesn't conflict with my main tomcat setup. Check back sometime after the weekend :). Update: I can't seem to find an easy .war for this for those of us that already have a container set up. Did I miss it somewhere? TP The .war file is included in any of the download files, in the ./war/ directory after unpacking. I haven't made a .war available as separate download yet, but I'll make one available for the next release.

IL - Right, I saw that one, and deployed it, but it can't seem to run the demos by itself, so I started messing around with the web.xml in order to try get it to work, but gave up and used the Jetty demo which worked fine. After the next release, I can try again, I'd like to put this on my host.

TP 06 July 2007 - Version 0.5 distribution includes AejaksDemo.war, ready to deploy in a running Java web server.


VI 15-MAR-2007 Probably doesn't belong here - I'd like to build something like this for the GWT (http://code.google.com/webtoolkit/ ) - any ideas on how I could start?

Roy Keene VI, Maybe a good start: Porting a Tk GUI to A Web Browser especially TkWeb (by me) :-)


SAF 05-June-2007 Looks pretty good. Since this all server based, I assume there is no way to have an offline caching mode like JavaFX, Apollo, GoogleGears, etc.?

TP Correct.


NEM 12 May 2007: The example apps on the Echo2 webpage seem to be quite MDI in nature, i.e. the browser window becomes a mini window manager. Can you configure Æjaks to open native windows instead of using these "fake" windows?

TP Basically, no. I don't know the exact specifics, but probably has a lot to do with the Javascript context per browser window. There are additional Echo2 UI widgets such as Tab and Accordion panes that might help to organize an application. These are supported by Æjaks in the current SVN sources.

TP 06 July 2007 - Version 0.5 includes AccordionPane, TabPane, and TransitionPane containters.


XO 17-June-2007: I did a little tweak on running Snit under Jacl; with minor modification, I was able to run Snit inside Jacl, but the tcltest script snit.test is a bit difficult to port though (jacl supports tcltest V1.0 which is very different from the tcltest V2.2 required by snit.test). So I have not run the snit regresstion test under jacl.

It took me a while to figure out that there is a little trick to make the Snit package work like it does under Tcl. I thought I could simply copy the snit folder under D:\jacl140\lib folder, and I would be able to fire away package require snit. Jacl didn't work out that way, until I specified the property -DTCLLIBPATH D:\jacl140\lib when invoking the java command.

But this trick doesn't work for Aejaks, I don't know why?

TP Jacl processes the TCLLIBPATH property and adds paths listed to the auto_path global variable, but you should use Unix-style pathnames and separators, even with running on Windows. An equal sign is also required between the property name and its value. The correct usage on the java command line would be: -DTCLLIBPATH=D:/jacl140/lib


Chang LI Glad to test Aejaks. Several questions:

(1)Where is the directory that I can put my own tcl code? (2)Where is the directory to add a Tcl library? (3)How can I write HTML page with Jacl?

TP Please see the documentation, it should answer all of your questions. Specifically, for your questions (1) and (2), see: http://aejaks.sourceforge.net/Documentation/Configuration/index.html . For (3) you do not write HTML, you write Tk-like widget commands instead, see: http://aejaks.sourceforge.net/Documentation/Programmer's_Guide/index.html or the example above.

MHo:

  1. Shure I missed something. If aejaks says I should close a window - how do I do this...? There is no such thing as a close symbol or system menue... I could move and resize, ok, but...? TP Hmm, there should be a 'X' in the top right corner of windows that allow themselves to be closed. If not, please send a screenshot to me, and follow up on the mailing list. Are you somehow blocking images from be loaded on your browser? MHo: Ok, with OPERA, the close symbols appears, so it seems to be a browser topic.
  2. On my WinXP, something's going wrong. If I started an application, say .../aejaks/app?AEJAKS_SCRIPT_NAME=widget_tour.tcl, then the previously called app appears... and if I alter a procedure in the /samples dir, aejaks ignores the changes until restarting the server. Seems a kind of caching occures... Maybe my SeaMonkey fools me. TP This is because Aejaks is entirely stateful, not stateless as other HTTP applications. Aejaks (Echo2 really) uses a JSESSIONID cookie to maintain state with your window session objects and your Jacl interpreter. You should use the 'Exit' button or menu 'Exit' menu selection to quit the applications. MHo: This means: in one loaded browser instance, I only could call one aejaks app, regardless of how many tabs are open and what URL is given... makes this sense? To call another app, I have to load another browser... TP There are two current ways to achieve running multiple apps: 1) simply copy war/aejaks.war to war/aejaks2.war and adjust your URL to to http://localhost:8080/aejaks2/app/...etc ... 2) extract the file WEB-INF/web.xml from the aejaks.war file, edit it, copy the elements <servlet> and <servlet-mapping>, rename the <servlet-name> element to Aejaks2 in both, and <url-pattern> to app2 ; replace the WEB-INF/web.xml file in aejaks.war. (I'll look into putting this into the source).
  3. On windows, long running service applications should be implemented and running as so called windows services. Is there a way to turn the whole jetty stuff into such a true windows service which survives logoff etc.? TP Should be possible, see http://docs.codehaus.org/display/JETTY/Win32Wrapper . MHo: Hm, it seems the wrapper is only partially open source... TP I believe the Jetty-Server.exe is based on http://wrapper.tanukisoftware.org/doc/english/index.html which is MIT-licensed, SourceForge page at http://sourceforge.net/projects/wrapper/ . You can also run Aejaks under other Java webservers such as Tomcat, that has a similar solution: http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

TP Æjaks includes two extension packages, Hyde for easy Tcl-to-Java integration, and MrPersister a database access library.


"... [M]any useful widgets from the EchopointNG library have not made their way into Echo3. The most notable ones are container widgets that allow exact positioning of child widgets.... I will probably adopt Echo3 when those extra widgets are implemented." TP, 2 December 2009


Articles

"Microsoft makes AJAX technology available" [L5 ]. Page 2 mentions Æjaks early release.

"Amplify Web Apps with Æjaks" [L6 ] is a lightweight introduction for non-Tclers.

"Æjaks Tutorial" [L7 ] blog by XO Geoffrey Wu (Chinese)


Dshue - 2016-03-30 19:23:30

Hello, I'm a inexperienced programmer. I really I only know TCL language and am looking to use the Aejaks platform to start developing a web application. Before I do I want to know if the Aejaks platform is still being developed or is 2.3 going to be the last release?

TP Aejaks is on infrequent updates for now, I'll will from time to time update the JTcl interpreter that it uses. The lower level library (Echo2) is also in mature/infrequent updates, so don't expect much work there. I would still consider it for my own uses, for what it's worth.