Hi,
Am 15.05.2008 um 22:11 schrieb janandith jayawardena:
The extensions directory in sling contains 3 directories.
There are a few more now, because there was some refactoring of
Slings
source organization.
1. apt
This contains actually 2 bundles, a servlet for handling requests
with
*.aptml extension and a parser for transforming APT files (
http://maven.apache.org/doxia/references/apt-format.html) into
HTML. Since
APT is a kind of simple markup language (like wiki markup) this can
be used
for implementing wiki apps (or other social apps with user generated
content). Your user can just write their content in APT and the app
stores
it in a file. You can then access the content file using *.aptml
extension
and you get an HTML view of that content.
2. dojo
This provides the core sources of the latest DOJO release as
content and
allows you to use DOJO in your client implementations.
For instance you can add something like the following code snippet
to your
JSPs and then use DOJO for implementing a rich client:
<script type="text/javascript" src="<%= request.getContextPath()
%>/dojo/dojo.js" djConfig="isDebug:false, parseOnLoad:true"></script>
<script type="text/javascript">
dojo.require("dojo.parser");
</script>
3. dojo-ujax
This contains some DOJO extensions like a Sling based DOJO store
which can
be used for storing content from DOJO widgets into the repository
that comes
with Sling.
How can i use these extensions and what are the roles of each
extension in
sling ?.
Generally the role of the extensions is to provide functionality
that goes
beyond the core of Sling, which is targeted at providing a RESTful
framework
(as set of bundles/services) and API for building applications on
top of JCR
compliant repositories. Since Sling is based on OSGI you can just
install
the bundles using the Sling Console or the Maven Sling plugin.
After that
the functionality should be available.
Is apt used for list processing. If so how does it fit in sling ?.
See above.
I would also like to know more about ujax. Is it related to Ajax.
ujax is a kind of HTTP based protocol for manipulating content in
the JCR
repository that comes with Sling. It was originally developed as
part of
microsling and is now merged into Sling. It consists of two parts.
One is
the SlingPostServlet that allows to create, delete, copy and move
nodes by
using HTTP requests. The other part is the sling client library which
provides JS methods for working the SlingPostServlet. Since the
protocol is
HTTP, you can easily manipulate content using XHR requests and thus
access
it directly with AJAX clients.
Hope this helps.
Regards,
Alex