Latest Posts

Archives [+]

Introducing µjax \ˈmī-(ˌ)krōˈjaks\

µjax (microjax or ujax) is a client sided javascript persistence layer that leverages the symbiosis of a (JCR compliant) Content Repository and the agilepatterns of browser based ajax development, to form a completely new wayof developing applications.

microjax is a part of Apache Sling which is currently in incubation.

As an important differentiator to other Ajax frameworks µjax focuses onadding an attractive server-sided persistence and does not focuson providing a rich application framework with components, widgets or visual effects.µjax can be combined with any Ajax framework of your choosing.

µjax uses XHR & JSON based AJAX techniques to retrieve contentand uses regular form input to write content.

 

Download, Register & Install


Prerequisites

Knowledge of Javascript and HTML are required.

An understanding of JCR is certainlyvery helpful to quickly start developing in µjax.

 

Download

The µjax pre-release can be downloaded attached (below) to this post pre-packed with the attached CRX builds.(Windows, Unix, Linux & macosx)

Keep in mind:

Nightly builds are intended to provide CRX Developers with the latestenhancements and bug fixes. A NIGHTLY BUILD IS NOT AN OFFICIAL RELEASEAND IT IS NOT TESTED BY QA. USE IT AT YOUR OWN RISK. IT IS RECOMMENDEDNOT TO USE A NIGHTLY BUILD ON A PRODUCTION SYSTEM, BUT TO USE IT FORDEVELOPMENT PURPOSES ONLY. DAY MANAGEMENT AG CANNOT BE HELD RESPONSIBLEFOR ANY DAMAGE THAT COULD BE CAUSED BY A NIGHTLY BUILD.

 

Register

To be able to install CRX you will have to get an evaluation license, which can beobtained by filling out the following form.

 

Install

µjax is only installed in the default installation of CRX, so pleaseselect that option in your downloaded CRX installer.

The installation is very straight forward and does not have dependencies beyonda JDK 1.4 or greater.

 

Mount your workspace

To be able to interact with the content repository for development purposesit is recommended to use webdav and connect to
http://localhost:7402/crx/repository/crx.default

On Windows use "My Network Places" / "Add new network place"

On macosx use "Go" / "Connect to Server" in Finder

 

Look around

Explore you content repository athttp://localhost:7402/crx, as soon as you start developing your applications you will find both your code and also the content your applicationscreate in the "Content Explorer".

First Steps

To get started please either use the test application below orjust extract the "firststeps.zip" (below) and drag and drop the "apps" folder into root folder of your webdav mount.

 

Test application:

Put the source code below into a test.html file and drag this into your mounted webdav drive:

<html><head><title>Hello World</title><script src="/ujax/ujax.js"></script></head><body><script>var welcomeNode=ujax.getContent("/content/welcome");</script><h1>Welcome String:<script>if(welcomeNode)
{ document.write(welcomeNode.hello); }
</script></h1><form action="/content/welcome" method="POST"><input name="hello" value="" /><input type="submit"></form><script>ujax.wizard();</script></body></html>

and hit http://localhost:7402/test.html

in your browser.

 

µjax Version of "Stefano's Linotype"

To get a feeling of a more real-life application feel free to downloadan µjax-ed version of Stefano's Linotypeyou can simply extract the "linotype.zip" (attached below)into the /apps folder of your webdav drive pointing at http://localhost:7402/

After the installation hit http://localhost:7402/content/linotype/posts/*.post.htmland hit the save button to create your first blogentry. After creating the post you can surf to http://localhost:7402/content/linotype.html

Please keep in mind that this is really just prototype to explain the µjaxbasic concepts and how they could be applied to existing web applicationswithout a lot of effort.

* crx-ujax_windows_installer.exe
crx-ujax_windows_installer.exe
* crx-ujax_unix_macosx_installer.sh
crx-ujax_unix_macosx_installer.sh
* linotype.zip
linotype.zip
* firststeps.zip
firststeps.zip
 

COMMENTS

  • By Bertrand Delacretaz - 1:02 PM on Dec 12, 2007   Reply
    Note that people can turn to the sling-dev mailing list [1] for questions about &micro;jax and &micro;sling, or to the CRX discussion group [2] for CRX-specific questions.
    <br>
    [1] http://incubator.apache.org/sling/site/project-information.html#ProjectInformation-lists<br>
    [2] http://tech.groups.yahoo.com/group/jcr-crx/
  • By Joseph Ottinger - 3:36 PM on Jan 16, 2008   Reply
    I installed the ujax version of CRX, and ... the directions above don't work for me? I get "Not Found" for each url.
  • By David Nuescheler - 7:08 PM on Jan 16, 2008   Reply
    Hi Joe,<br>
    <br>
    thanks for bringing that to our attention.<br><br>
    ...using all these Apples actually led to issue that a broken installer was uploaded for windows and nobody noticed.<br><br>
    Sorry for that, we will fix that as soon as possible and keep you posted.<br><br>
    (.ps: the unix installer works ;)<br><br>
  • By David Nuescheler - 3:02 PM on Jan 20, 2008   Reply
    Hi Joe,<br />
    <br />
    after looking a little bit more detailed
    into the issue I found out that the above microjax install <b>requires</b> JDK 1.5.<br />
    <br />
    After installing 1.5 you can change the JVM by going to "Start / All Programs / Day CRX 1.3.2 / Start CRX 1.3.2" and double-click "CRX 1.3.2" and change the "Java VM" param to the javaw.exe in your <b>JDK</b> installation directory of 1.5<br>
    <br>

    Sorry for the inconvenience.<br>
    <br>
    regards,<br>
    david
  • By Fabien Calais - 2:38 PM on Mar 07, 2008   Reply
    after installing, i cannot access to the page http://localhost:7402/test.html<br/><br/><br/><br/>and when i hit http://localhost:7402/<br/><br/>i have an http 404 error message<br/><br/><br/><br/>any idea?
  • By Fabien Calais - 3:41 PM on Mar 07, 2008   Reply
    hi, <br/><br/><br/><br/>after investigate<br/><br/>if i use the JDK 1.5., i can access http://localhost:7402/test.html<br/><br/>but i cannot access http://localhost:7402/crx<br/><br/><br/><br/>if i use JDK 1.4 from the installation of the crx i can access to http://localhost:7402/crx but cannot access to http://localhost:7402/test.html<br/><br/><br/><br/>is there any solution to test it ?<br/><br/><br/><br/>
  • By Rene Robinson - 4:52 PM on Mar 08, 2008   Reply
    So, I'm interested in seeing the linotype application, but the directions are missing/confusing. I dropped the linotype folder into apps and tried the URL given, no go. I tried creating the linotype folder under content with posts, etc...no go.<br/><br/>solutions?<br/><br/>Rene' Robinson (you know where to find me...)
  • By Randell Browning - 3:15 AM on Apr 30, 2008   Reply
    Have you created the node property sling:resourceType on the node linotype that you created under the content node and assigned it a value to point to the desired script you want to call under the apps node?
  • By Tung Vu - 10:35 PM on Sep 04, 2008   Reply
    hmmm i can't start the repository with JDK-1.6. It just does nothings after click on start.<br/>