Slideshare.net (beta)

 
Post to TwitterPost to Twitter
Post: 
Myspace Hi5 Friendster Xanga LiveJournal Facebook Blogger Tagged Typepad Freewebs BlackPlanet gigya icons

All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 2 (more)

Javapolis 2007: AJAX meets JCR

From uncled, 10 months ago

Javapolis 2007 session. Introducing microjax

1432 views  |  0 comments  |  1 favorite  |  111 downloads  |  3 embeds (Stats)
 

Categories

Add Category
 
 

Groups / Events

 
Embed
options

More Info

This slideshow is Public
Total Views: 1432
on Slideshare: 1311
from embeds: 121

Slideshow transcript

Slide 2: Kickstarting the Java Content Repository AJAX meets JCR

Slide 3: obpqof`qba R håçï=óçìê=eqji=C=g~î~ëÅêáéí e~îÉ=~=î~ÖìÉ=ÅçåÅÉéí=çÑ=~= “`çåíÉåí=oÉéçëáíçêóÒ www.javapolis.com

Slide 4: Speaker’s Qualifications David Nuescheler JSR-170 Spec Lead jsr-170-comments@jcp.org David Nuescheler Chief Technology Officer david.nuescheler@day.com David Nuescheler Jackrabbit Committer / Member uncled@apache.org www.javapolis.com

Slide 5: Overall Presentation Goal Learn how JCR and Ajax allow for very agile application development. www.javapolis.com

Slide 6: Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com

Slide 7: Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com

Slide 8: What’s JCR? gpoJNTM `çåíÉåí=oÉéçëáíçêó=Ñçê= g~î~qj=íÉÅÜåçäçÖó=^mf péÉÅJiÉ~ÇW a~ó=pçÑíï~êÉ pí~íìëW= cáå~ä=oÉäÉ~ëÉ=NTJàìåJOMMR bñéÉêí=dêçìéW www.javapolis.com

Slide 9: What’s JCR? gpoJOUP gpoJNTM `çåíÉåí=oÉéçëáíçêó=Ñçê= g~î~qj=íÉÅÜåçäçÖó=^mf=îOKM péÉÅJiÉ~ÇW a~ó=pçÑíï~êÉ pí~íìëW= mìÄäáÅ=oÉîáÉï=`äçëÉÇ=ëÉéJOMMT bñéÉêí=dêçìéW www.javapolis.com

Slide 10: 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.” ? www.javapolis.com

Slide 11: Best of both worlds. s ys t e m file data base hier- archi integ es re rity structu read streams tx access write locking query control multi- value oning versi obser- un-structured “full-text” sort vation order content repo sit or y

Slide 12: What’s JCR? - Reality Check - Task: Write a JSP snippet that lists “ documents” in a “folder”” . www.javapolis.com

Slide 13: What’s JCR? - Reality Check - <% ); PI_DOCUMENTS(session <% TS documents = new LA childCount = node.getConten LAPI_DOCUMEN tCount(); new LLValue(); LLValue childTable = for(int i=0;i<childCount;i , ++) { s(volumeID, folderID documents.ListObject JCR API IContent child = node.getCo E, childTable); PI_DOCUMENTS.PERM_SE ntent(i); null, null, LA Property title = child.getP .enumerateValues(); ropertyByName(\"Title\"); children = childTable %><%= title.getValue() %><b Enumeration r/><% reElements()) { Task: Write a JSP snippet that while(children.hasMo } )e.nextElement(); lue child = (LLValue <% %> <% LLVa ring(\"Name\"); ng <% tle = child.toSt fndocs ti Stri NodeIterator children = node.getNodes(); = new PageIterator% %><%= title %><br/>< children = page.getPages(); IFnObj SetDua fnfold <<< lPr while (children.hasNex int nu while (children.hasNext()) { er.get Conten oxy( t()) { lists “ documents” in a “folder”” . } mDocs = fndo ts(idm for (i Page child = children cs. Fo nt i = %> .nextPage(); 1; i < getCount(); lderContent. Node child = children.nextNode(); Container toplevel = = numD idmFol child.getContent(); IFnDoc ocs; i derCon om title = to umentD At e Property title = child.getProperty(\"Title\"); ++) { t ntDo plevel.getAtom(\"Title\" ua new IF nDocum l fndoc = cume ); %><%= title nt));r /><% %><b entDua IFnPro %><%= title %><br /><% lPr } pe IFnPro rtiesDual pr oxy(fndocs.g %> pe et o String rtyDual idmT pset = fndoc Item(new In } te . i title = idmT tleProp = pr getPropertie ger(i))); %><%= title itlePr op.get opset.getIte s(); %> %> if (co mClean <br/><% cuments()); Value( m(\"Tit le\"); entsProxy(binder.getDo up) { <% ); s = new IDocum cleane IDocuments document r.rele } ase(fn doc); documents.cache(); } (); documents.getCount t documentCount = %> in { cumentCount; i++) ItemByIndex(i)); r (int i = 0; i<do roxy(documents.get fo umentP document = new IDoc ment.getTitle() String title = docu ><% %><%= title %><br/ +800 } %> www.javapolis.com

Slide 14: What’s JCR? - Functional Elevator Pitch - obser- sql tx locking versioning vation opt ion al level 2 write, import, access control level 1 read, export, query www.javapolis.com

Slide 15: Java Standardization ase:d rele mi inal cted Review Ballot JSR-283 Public fe exp 2008 ved ro pp a www.javapolis.com

Slide 16: Java Standardization www.javapolis.com

Slide 17: Known compliant Repositories * using third party connector * * Exo Microsoft Apache Jackrabbit Oracle XML DB OpenText Livelink ECMS Platform Sharepoint * Day CRX IBM FileNet P8 Xythos Repository Alfresco ECM Vignette V7 * * any ors ow mvendd? HSe DBMou ne R do y +hund Interwoven rs regiede of TCKs IBM CM EMC Documentum Repository st red www.javapolis.com

Slide 18: Some known JCR Applications Fast BEA Portal Oracle Portal Enterprise Search Sun JBoss Portal Interface 21 OpenPortal Day Communique Spring Framework DAM magnolia WCMS Day Communique Apache Sling Collab Mindquarry Alfresco ECMS Collaboration Apache Tapestry QSLabs Apache Day Communiqué Compliance Cocoon WCMS IBM FileNet medic-2-medic WebSiteManager Artifactory Apache James mapofmedicine Maven Proxy Exo TYPO3 ECMS Platform GX WebManager v5.0 WCM InfoQ Hippo Liferay Nuxeo ECM Online Community CMS Enterprise Portal Jahia Sakai Framework E-learning Percussion QuickWCM Rhythmix Sourcemix WCMS Lutece Sourcemix Portal www.javapolis.com

Slide 19: JCR - Weatherforcast -5° -8° -12° 2009 2010 2008 www.javapolis.com

Slide 20: Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com

Slide 21: Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com

Slide 22: Introducing jax Apache Sling JCR b ac ReST- ked (OSGI devkit , OCM subtract osgi , ...) subtract ocm microsling contains microjax jax www.javapolis.com

Slide 23: Introducing jax JCR longterm stable &durable well designed duty heavy strategic 16 t ons functionally broad www.javapolis.com

Slide 24: Introducing jax JCR longterm the other side stable &durable de ve lop er ha t well designed “i want to build webapps” heavy duty me strategic lazy 16 t ons functionally broad short-sighted h ...easily coack nfused www.javapolis.com

Slide 25: Introducing jax JCR de ve lop er ha t av id) me (d silve r µjax very simple pro jection: fits the bill www.javapolis.com

Slide 26: Introducing jax I browser & ujax.js reading: json & resource GET’s writing: form-POST & GET s s J2EE Web Server 3 handles all the h eavy 2 lifting, particul arly security I Browser 16 t ons 2 MicrojaxServlet.java very simple js A translating requests PI to read content, Fo to JCR calls rms to write conten 3 JCR Compliant t Content Repository

Slide 27: Introducing jax “Data First!” JCR s uppor “stru ts cturef aswe irst” (but t ll. hat’s mi ssing point ) www.javapolis.com

Slide 28: DEMO

Slide 29: Getting ready... test & mount as a drive download a nd install www.javapolis.com

Slide 30: hello, world. le> d</tit rl lo, wo l html> tle>ujax:he < ti head>< 2> < rld</h > </head 2>hello, wo h body>< < > </body > </html drag, drop, done http://localhost:7402/ apps/firststeps/0_hell o.html www.javapolis.com

Slide 31: simple write example title> mple</ e exa e writ T\"> d=\"POS simpl <html> itle>ujax: metho teps\" <t irsts <head> body> tent/f /con >< </head rm action=\" --> fo tle < \" /> !-- ti </h2> \"Title < name= tle <h2>Ti ype=\"text\" t > <input cription -- ion\"> s !-- de iption</h2> e=\"Descript < >Descr nam s=\"5\" <h2 a row extare a> t < extare </t r --> - colo h2> !- < >Color</ r\"> =\"Colo red\">red <h2 name select ion value=\" een\">green < \"gr opt < tion value= op <> ct </sele > </form write me! > </body > </html irststeps/1_write.html tp://localhost:7402/apps/f ht www.javapolis.com

Slide 32: simple read example title> mple</ d exa le rea simp <html> itle>ujax: <t <head> ript \"></sc ead> ax.js </h s\"); jax/uj ststep olor+'\">'; > \"/u ody t/fir src= <b conten or:'+node.C script nt(\"/ < ript> ax.getConte kground-col <sc bac =uj r node div style=\" va ='< ar div write(div); v nt. docume > pt </scri cript> le); de.Tit s h2>< (no < ument.write doc h2> ipt></ ion); </scr ript> script e.De <p><sc t.write(nod n docume /p> pt>< </scri </div> > </body read me! > </html http://localhost:7402/apps /firststeps/2_read.html www.javapolis.com

Slide 33: add new entry tle> le</ti examp entry new /*\" x: add ntries ml> uja ht < eps/e itle> irstst ead><t dy> tent/f <h ad><bo ction=\"/con </he form a < od=\"POST\" > meth e\" /> =\"Titl /h2> name tle< <h2>Ti ype=\"text\" ea> t textar input n\"></ < riptio /h2> \"Desc tion< escrip s=\"5\" name= h2>D < xtarea row te < h2> olor</ \"Color\"> h2>C d < lect name= ue=\"red\">re een \">gr se val < option alue=\"green < tion v op <> ct </sele </p> bmit\"> e=\"su add new ut typ p <p><in > </form tml http://localhost:7402/apps/firststeps/3_addnew.h > </body > </html www.javapolis.com

Slide 34: list entries itle> ple</t exam ntries 2); e : list ies\", l> >ujax /entr <htm <title tsteps <head> /firs ontent t(\"/c [...] Conten .get t> <scrip ntries=ujax var e pt> </scri '); or+'\"> y.Col <div> '+entr { olor: ries) t> ound-c ; <scrip ar a in ent es[a]; ackgr for (v entry=entri iv style=\"b le+'</h3>') Tit '<d var write( h2>'+entry. on); nt. docume .write('< pti Descri y. nt docume .write(entr nt docume ){ .Image ry if(ent [...] } '\\'\"> /\\'+a+ >'); tml\" '</div tries ist.h write( a href=\"4_l '/mydata/en nt. docume .write('< ent(\\ veCont nt docume =”ujax.remo k onclic a>'); list entries </ remove http://lo calhost:7 </a> 402/apps/ }> dd new firststep ml\">a s/4_list. t /scrip 3_addnew.ht html < f=\" <a hre </div> > </body > </html www.javapolis.com

Slide 35: templates %> .Title ..] tNode [. curren <%= [...] t> <scrip wizard(); ujax. pt> </scri [...] rd(); w iza x. ! Rja ! ript> </sc resource or ! iented urls http://l ocalhost :7402/co ntent/fi rststeps .list.ht ml www.javapolis.com

Slide 36: Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com

Slide 37: Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com

Slide 38: Weblog in 15 minutes - goals - - seen before? ...a bunch of forms & a datamodel. - something (almost) useable www.javapolis.com

Slide 39: Weblog in 15 minutes - goals - Confession I am not a Blogger . www.javapolis.com

Slide 40: Weblog in 15 minutes - goals - Confession I am not a Blogger . cchi’s azzo ano m type” stef “lino www.javapolis.com

Slide 41: Weblog in 15 minutes - goals - » » Transform “Stefano’s Linotype” into a jax and JCR backed Blog. LS! TOtOitor & NO ll tex ed (we owser ;) ) br ...but an audience full of buddy co ders www.javapolis.com

Slide 42: DEMO

Slide 43: If you remember only 2 thing. I dev.day.com Download CRX and play with ujax. keep an eye on “ apache sling” 2 ly! ious ser www.javapolis.com

Slide 44: Q&A View JavaPolis talks @ www.parleys.com

Slide 45: Thank you for your attention