Jaxer is an open-source web application development framework providing an consistent Javascript based programming model between the cloud (server) and client. In this post I will provide an architectural overview of this technology and provide a conceptual mobile strategy that this framework can be used for.
Architectural Overview
The core of Jaxer is written in C/C++ and is powered by the same Mozilla engine that powers Firefox 3. There is a wrapper Javascript framework which can be easily extended by developers if needed.
Jaxer provides a plugin as post-processor to the web server and receives an static HTML as input. The core framework is responsible for parsing the input, executing scripts (server-side) and generating proxies.
The framework allows the developer to mark Javascript functions to be executed in the server using - runat="server" attribute in the script tag. There is also runat="server-proxy" where when the client calls are redirected to be executed in the server, the framework is responsible for injecting the methods.
From the server-side code there is also access to the Jaxer library and hence access to session, file system, database, network sockets, etc.
Thanks to Aptana for the image.
Mobile in Minutes
Here I would like to outline an use-case which will enable web properties to quickly create a mobile flavored output using Jaxer. This is intended to be a proof-of-concept and an example for the possibilities enabled by this framework. Lets say you have an existing simple web application and want to enable mobile flavored version modifying the existing application. This solution levereges the server-side processing of Jaxer to identify elements of interest from the HTML and renders a modified output.
Here the idea is to annotate on the HTML elements of the original output. It could be id="mobile-????". This step is just to identify elements of interest and construct a modified html. Here is a brief code snippet which should provide some direction and simply by injecting this script and marking ids mobile should do the job. This is no way intended to be a full-fledged implementation but to give a direction and server as a proof-of-concept:
var k = document.getElementById("b");
var m = document.createElement("body");
var e = document.getElementsByTagName("a");
m.innerHTML = 'Mobile rendering: ';
for ( var i = 0 ; i < style="font-style: italic;">
{
var l = e[i];
if (l.id == 'mobile') {
m.innerHTML = m.innerHTML + ' ' + l + ' +'';
}
}
k.innerHTML = m.innerHTML;
Architectural Overview
The core of Jaxer is written in C/C++ and is powered by the same Mozilla engine that powers Firefox 3. There is a wrapper Javascript framework which can be easily extended by developers if needed.
Jaxer provides a plugin as post-processor to the web server and receives an static HTML as input. The core framework is responsible for parsing the input, executing scripts (server-side) and generating proxies.
The framework allows the developer to mark Javascript functions to be executed in the server using - runat="server" attribute in the script tag. There is also runat="server-proxy" where when the client calls are redirected to be executed in the server, the framework is responsible for injecting the methods.
From the server-side code there is also access to the Jaxer library and hence access to session, file system, database, network sockets, etc.
Thanks to Aptana for the image.
Mobile in Minutes
Here I would like to outline an use-case which will enable web properties to quickly create a mobile flavored output using Jaxer. This is intended to be a proof-of-concept and an example for the possibilities enabled by this framework. Lets say you have an existing simple web application and want to enable mobile flavored version modifying the existing application. This solution levereges the server-side processing of Jaxer to identify elements of interest from the HTML and renders a modified output.
Here the idea is to annotate on the HTML elements of the original output. It could be id="mobile-????". This step is just to identify elements of interest and construct a modified html. Here is a brief code snippet which should provide some direction and simply by injecting this script and marking ids mobile should do the job. This is no way intended to be a full-fledged implementation but to give a direction and server as a proof-of-concept:
var k = document.getElementById("b");
var m = document.createElement("body");
var e = document.getElementsByTagName("a");
m.innerHTML = 'Mobile rendering: ';
for ( var i = 0 ; i < style="font-style: italic;">
{
var l = e[i];
if (l.id == 'mobile') {
m.innerHTML = m.innerHTML + ' ' + l + ' +'';
}
}
k.innerHTML = m.innerHTML;
Infrastructural Support
Jaxer can "peacefully" co-exists with your open source technology stack. Jaxer can work with your existing Apache installation and have IIS support in their roadmap. Presently MySQL database is supported but definitely this is an area for improvement. There is also support Tomcat based deployment model and out-of-box support for running in EC2.
Conclusion
Emerging programming models such as Jaxer provide possibilities for more innovative web application extensions. This form of web extensions is extremely useful in enterprise and consumer environments to try-out in a plugin in on-demand.
Technorati Tags: technology, javascript
1 comment:
where you come from!
Post a Comment