Download - µjax in 30 minutes (for Stockholm)
![Page 3: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/3.jpg)
Lars Trieloff• Product Manager at Day
• Author, Blogger, Open Source Code
• Apache Cocoon
• Mindquarry
• Goshaky
• DAX
![Page 4: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/4.jpg)
µjaxcontent repository vs. ajax
![Page 5: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/5.jpg)
µjaxcontent repository vs. ajax
What’s JCR (elevator pitch)
Introducing µjaxsilver
![Page 6: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/6.jpg)
µjaxcontent repository vs. ajax
What’s JCR (elevator pitch) Introducing µjax
silver
![Page 7: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/7.jpg)
![Page 8: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/8.jpg)
What’s JCR?
![Page 9: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/9.jpg)
What’s JCR?
“The API should be a standard, implementation independent, way to access content bi-directionally on a granular level to a content repository.”
![Page 10: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/10.jpg)
What’s JCR?
“The API should be a standard, implementation independent, way to access content bi-directionally on a granular level to a content repository.”?
![Page 11: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/11.jpg)
What’s JCR?
“The API should be a standard, implementation independent, way to access content bi-directionally on a granular level to a content repository.”?
![Page 12: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/12.jpg)
Best of both worlds.database filesystem
content repository
![Page 13: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/13.jpg)
Best of both worlds.database filesystem
content repository
read
write
hier-archiesstreams
locking accesscontrol
integrity structure
tx query
un-structured “full-
text” sortorder
versioning
obser-vation
multi-value
![Page 14: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/14.jpg)
Some known JCR Applications
![Page 15: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/15.jpg)
Sourcemix SourcemixPercussion Rhythmix Lutece Portal
QuickWCM WCMS
Jahia Framework
Hippo CMSInfoQ Online CommunityNuxeo ECM
Sakai E-learning
TYPO3 v5.0 WCMGX WebManagerExo ECMS Platform
Liferay Enterprise Portal
Artifactory Maven ProxyIBM FileNet WebSiteManagerApache James medic-2-medic mapofmedicine
Day Communiqué WCMS
Apache Tapestry
Day Communique Collab
QSLabs ComplianceApache Cocoon
Alfresco ECMSApache Sling
Mindquarry Collaboration
Day Communique DAMmagnolia WCMS
JBoss Portal
Some known JCR Applications
Sun OpenPortalInterface 21 Spring Framework
Fast Enterprise SearchOracle PortalBEA Portal
![Page 16: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/16.jpg)
µjaxcontent repository vs. ajax
What’s JCR (elevator pitch) Introducing µjax
silver
![Page 17: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/17.jpg)
µjaxcontent repository vs. ajax
What’s JCRIntroducing µjax
![Page 18: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/18.jpg)
µjaxcontent repository vs. ajax
What’s JCRIntroducing µjax
silver
![Page 19: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/19.jpg)
Introducing µjax
Repository based AJAX
![Page 20: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/20.jpg)
Introducing µjax
JCR
![Page 21: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/21.jpg)
Introducing µjax
JCR
![Page 22: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/22.jpg)
Introducing µjax
JCR
![Page 23: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/23.jpg)
Introducing µjax
JCR
the o
ther
side
![Page 24: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/24.jpg)
Introducing µjax
JCR
me (lars)
developer hat
“i want to build webapps” the o
ther
side
![Page 25: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/25.jpg)
Introducing µjax
JCR
me (lars)
developer hat
“i want to build webapps” the o
ther
side
![Page 26: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/26.jpg)
Introducing µjax
JCR
me (lars)
developer hat
“i want to build webapps” the o
ther
side
![Page 27: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/27.jpg)
Introducing µjax
JCR
me (lars)
developer hat
µjax
silver
![Page 28: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/28.jpg)
Introducing µjax
JCR
me (lars)
developer hat
very simple projection: fits the bill
µjax
silver
![Page 29: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/29.jpg)
Introducing µjax
JCR
me (lars)
developer hat
very simple projection: fits the bill
µjax
“usecase” driven
silver
![Page 30: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/30.jpg)
Introducing µjax
I2
3
Browser
J2EE WebServer
browser & ujax.jsreading: json & resource GET’swriting: form-POSTs & GETs
UjaxServlet.javatranslating requests to JCR callsJCR CompliantContent Repository
I
2
3
![Page 31: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/31.jpg)
Introducing µjax
I2
3
Browser
J2EE WebServer
browser & ujax.jsreading: json & resource GET’swriting: form-POSTs & GETs
UjaxServlet.javatranslating requests to JCR callsJCR CompliantContent Repository
I
2
3very simple js API to read content, Forms to write content
![Page 32: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/32.jpg)
Introducing µjax
I2
3
Browser
J2EE WebServer
browser & ujax.jsreading: json & resource GET’swriting: form-POSTs & GETs
UjaxServlet.javatranslating requests to JCR callsJCR CompliantContent Repository
I
2
3very simple js API to read content, Forms to write content
handles all the heavy lifting, particularly security16 tons
![Page 33: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/33.jpg)
Getting ready...
download and installtest & mount as a drive
![Page 34: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/34.jpg)
hello, world.
drag, drop, donehttp://localhost:7402/firststeps/0_hello.html
<html>
<head><title>µ
jax:hello, wor
ld</title>
</head>
<body><h2>hell
o, world</h2>
</body>
</html>
![Page 35: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/35.jpg)
simple write example
write me!http://localhost:7402/firstst
eps/1_write.html
<html>
<head><title>µ
jax: simple wr
ite example</t
itle>
</head><body>
<form action="
/mydata" metho
d="POST">
<!-- title -->
<h2>Title</h2>
<input type="t
ext" name="Tit
le" />
<!-- descripti
on -->
<h2>Descriptio
n</h2>
<textarea rows
="5" name="Des
cription">
</te
xtarea>
<!-- color -->
<h2>Color</h2>
<select name="
Color">
<option value=
"red">red
<option value=
"green">green
</select>
</form>
</body>
</html>
![Page 36: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/36.jpg)
simple read example
read me!http://localhost:7402/firststeps/2_read.html
<html>
<head><title>µ
jax: simple re
ad example</ti
tle>
</head>
<body>
<script src
="/rjax.js"></
script
<script>
var node=Uj
ax.getContent(
"/mydata");
var div='<d
iv style="back
ground-color:'
+node.Color+'"
>';
document.wr
ite(div);
</script>
<h2><script>
document.write
(node.Title);
</script></h2>
<p><script>
document.write
(node.Descript
ion);
</script></p>
</div>
</body>
</html>
![Page 37: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/37.jpg)
add newhttp://localhost:7402/firststeps/3_addnew.html
add new entry<html>
<head><title>µ
jax: add new e
ntry example</
title>
</head><body>
<form action="
/mydata/entrie
s/*"
method="PO
ST" enctype="m
ultipart/form-
data">
<h2>Title</h2>
<input type="t
ext" name="Tit
le" />
<h2>Descriptio
n</h2>
<textarea rows
="5" name="Des
cription"></te
xtarea>
<h2>Color</h2>
<select name="
Color">
<option value=
"red">red
<option value=
"green">green
</select>
<h2>Im
age</h2>
<input
type="file" n
ame="Image"/>
<p><input type
="submit"></p>
</form>
</body>
</html>
![Page 38: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/38.jpg)
list entries
list entrieshttp://localhost:7402/firststeps/4_list.html
<html>
<head><title>r
jax: list entr
ies example</t
itle>
[...]
<script>
var entries=Uj
ax.getContent(
"/mydata/entri
es");
</script>
<div>
<script>
for (var a i
n entries) {
var entry=ent
ries[a];
document.
write('<div st
yle="backgroun
d-color:'+entr
y.Color+'">');
document.
write('<h2>'+e
ntry.Title+'</
h3>');
document.
write(entry.De
scription);
if(entry.
Image) {
[...]
}
document.
write('</div>'
);
}
</script>
<a href="3_add
new.html">add
new</a>
</div>
</body>
</html>
![Page 39: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/39.jpg)
resource oriented urlshttp://localhost:7402/mydata/entries.list.html
views
[...]
<script>
Ujax.wizard();
</script>
[...]
! ! Rjax.wizard();
! </script>
![Page 40: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/40.jpg)
views
![Page 41: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/41.jpg)
Dojo Integration
repository browser with less than 50 LOC
![Page 42: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/42.jpg)
µjaxcontent repository vs. ajax
What’s JCRIntroducing µjax
![Page 43: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/43.jpg)
µjaxcontent repository vs. ajax
What’s JCRIntroducing µjax
silver
![Page 44: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/44.jpg)
If you remember only 2 things.
dev.day.com Download CRX and play with µjax. keep an eye on “apache sling”2
I
![Page 45: µjax in 30 minutes (for Stockholm)](https://reader033.vdocuments.mx/reader033/viewer/2022060119/558df38b1a28ab9c598b4668/html5/thumbnails/45.jpg)
If you remember only 2 things.
dev.day.com Download CRX and play with µjax. keep an eye on “apache sling”2
I
seriously!