Your SlideShare is downloading. ×
  • Like
  • Save
Non Cms For Web Apps
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Non Cms For Web Apps

  • 2,326 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,326
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Non CMS WebApps. Using JCR, REST and AJAX. David Nuescheler CTO / Day Software Technology Presentation 1
  • 2. David Nuescheler JSR-170 Spec Lead jsr-170-comments@jcp.org David Nuescheler hief Technology Officer C david.nuescheler@day.com David Nuescheler Jackrabbit Committer / Member uncled@apache.org Content-Centric Infrastructure 2
  • 3. RESTRICTED R Know your HTML & Javascript Have a vague concept of a “Content Repository” and “REST”
  • 4. Content beyond CMS Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
  • 5. Content beyond CMS Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
  • 6. What’s JCR? JSR-170 Content Repository for JavaTM technology API Spec-Lead: Day Software Status: Final Release 17-jun-2005 Expert Group:
  • 7. What’s JCR? JSR-283 JSR-170 Content Repository for JavaTM technology API v2.0 Spec-Lead: Day Software Status: Public Review Closed sep-2007 Expert Group:
  • 8. 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.” ?
  • 9. Best of both worlds. le s ys te m data base fi hie archir- integ es re rity structu read streams tx access write locking query control multi- value g sionin ver obser- un-structured “full-text” sort vation order content repo sit or y
  • 10. JCR? What’s Check - - Reality Task: Write a JSP snippet that lists “ documents” in a “folder”” .
  • 11. JCR? What’s Check - <% TS(session); <% nts = new LAPI_DOCUMEN LAPI_DOCUMENTS docume childCount = node.getContent - Reality Count(); ; new LLValue() LLValue childTable = for(int i=0;i<childCount;i ++) { folderID, stObjects(volumeID, JCR API IContent child = node.getC childTable); ontent(i); uments.Li doc I_DOCUMENTS.PERM_SEE, null, null, LAP Property title = child.get numerateValues(); PropertyByName(quot;Titlequot;); = childTable.e Enumeration children %><%= title.getValue() %>< br/><% { en.hasMoreElements()) } while(childr ment(); = (LLValue)e.nextEle <% LLValue child %> <% ng(quot;Namequot;); toStri String <% le = child. fndocs tit NodeIterator children = node.getNodes(); = new Pag %><br/><% IFnObj title eIterator children = page.getP %><%= Se int nu fnfolder.get tDualProxy( ages(); while (children.hasNe while (children.hasNext()) { Task: Write a JSP snippet that xt()) { } mDocs Conten = 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 m title = top um Ato new IF entDual fndo Property title = child.getProperty(quot;Titlequot;); ++) { tent level.getAtom(quot;Titlequot; %><%= Document))br />< ); nDocum c= title %>< ; entDua % IFnPro lists “ documents” in a “folder”” . %><%= title %><br /><% lProxy } pertie (fndoc sDual IFnPro s.get pro %> pe String rtyDual idmT pset = fndoc Item(new In } teger( .getPr itlePr title %><%= i))); o o = idmT itlePr p = propset. perties(); title %> %><br/ if (co op.get getIte cuments()); ><% mCle Value( m(quot;Tit lequot; umentsProxy(binder.getDo cleane anup) { <% ); oc documents = new ID ); r.rele IDocuments } ase(fn doc); documents.cache(); } nt(); = documents.getCou int documentCount %> ntCount; i++) { ByIndex(i)); docume for (int i = 0; i< (documents.getItem new IDocumentProxy document = ment.getTitle() String title = docu r/><% %><%= title %><b } %>
  • 12. What’s JCR? - Functional Elevator Pitch - obser- sql tx locking versioning vation optio nal level 2 write, import, access control level 1 read, export, query
  • 13. Java Standardization 83 Public Review Ballot JSR-2 ved pro ap
  • 14. Java Standardization
  • 15. 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 * * ny maendors How S v ed? M RDBo you ne +hund d Interwoven rs regiede of TCKs IBM CM EMC Documentum Repository st red
  • 16. 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
  • 17. JCR - Weatherforcast -5° -8° -12° 2009 2010 2008
  • 18. Content beyond CMS Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
  • 19. Content beyond CMS Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
  • 20. REST over JCR REST -> Roy T. Fielding ly JCR: Yours tru 005 ased 2 1.0 rele rele a v 0 pages sed y +30 162 p 2k ages
  • 21. The Problem: JCR longterm stable &durable well designed duty heavy strategic 16 t ons functionally broad
  • 22. The Problem: 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
  • 23. The Silver bullet: JCR de ve lop er ha t av id) me (d silve r sling very simple pro jection: fits the bill
  • 24. JCR b Apache Sling ac ReST- ked (OSGI Webkit , OCM , ...) jsp groovy ... esp contains ruby scala erly istnform art “the know as”: jax sling.js & .jst
  • 25. I browser & sling.js reading: json & resource GET’s writing: form-POST & GET s s J2EE Web Server 3 handles all the h e lifting, particula avy 2 rly security I Browser 16 t ons 2 Sling Servlets very simple js A translating requests read content, FoPI to to JCR calls r to write contenms 3 JCR Compliant t Content Repository
  • 26. It’s the web, baby! URLs matter . .../product.jsp?id=12346 Mistake 2: Mistake 1 Mistake 3: : Addressing the .jsp? What the heck? Passing in “this” “Script”
  • 27. Reclaiming the web. Sling URL decomposition. /cars/audi/s4.details.html ...selects a Content Repository epository Path R particular scrip t
  • 28. “Data First!” JCR s “stru upports cturef irst” (but t aswel l. hat’s mi ssing point )
  • 29. Getting ready... test & mount as a drive download a nd install
  • 30. hello, world. itle> rld</t lo, wo ng:hel ml> i <ht tle>sl ad><ti <he /h2> world< ad> </he ello, ><h2>h <body > </body > </html drag, drop, done http://localhost:7402/ apps/firststeps/0_hell o.html
  • 31. simple write example le> e</tit exampl rite mple w STquot;> od=quot;PO ng: si ml> quot; meth >sli <ht <title teps firsts <head> body> ntent/ /co >< </head rm action=quot; --> <fo le > t tlequot; / !-- ti < >Title</h2> tquot; name=quot;Ti ex h2 < put type=quot;t --> on in < - descripti /h2> nquot;> riptio ption< name=quot;Desc !- < cri h2>Des =quot;5quot; < xtarea rows e t < extarea> </t -> olor - <!-- c r</h2> > o Colorquot; h2>Col d < lect name=quot; ue=quot;redquot;>re een >gr <se val quot; quot;green option < tion value= op <> ect /sel < /form> < > </body write me! ml> </ht firststeps/1_write.html http://localhost:7402/apps/
  • 32. simple read example itle> ple</t d exam rea simple html> tle>sling: < <ti <head> pt </scri g.jsquot;> head> lin </ quot;); stem/s tsteps >'; <body> pt src=quot;/sy t/firs de.Color+'quot; nten i (quot;/co olor:'+no <scr ontent t> c <scrip =Sling.getC background- e=quot; ode var n '<div styl v= ; var di .write(div) nt docume > pt </scri cript> ); .Title h2><s .write(node < ument doc 2> pt></h ); iption </scri ript> .Descr (node p><sc < ument.write c do t></p> /scrip < /div> < > </body read me! l> </htm http://localhost:7402/apps/ firststeps/2_read.html
  • 33. add new entry le> e</tit exampl entry d new /*quot; ng: ad ntries ml> li <ht itle>s teps/e <t rsts <head> body> ent/fi quot;/cont ad>< = </he action <form POSTquot; > =quot; method quot; /> quot;Title h2> itle</ textquot; name= h2>T < put type=quot; > xtarea quot;></te <in ption 2> Descri ion</h script =quot;5quot; name=quot; h2>De < xtarea rows te < 2> lor</h quot;> <h2>Co name=quot;Color edquot;>red e=quot;r ect en nquot;>gre sel n valu < <optio value=quot;gree option <> t /selec > tquot;></p < quot;submi pe= add new put ty <p><in /form> < l http://localhost:7402/apps/firststeps/3_addnew.htm > </body l> </htm
  • 34. list entries le> e</tit exampl tries ist en 2); riesquot;, ing: l ml> ps/ent <ht e>sl <titl tste t/firs <head> conten nt(quot;/ [...] tConte ing.ge ipt> <scr Sl tries= var en pt> </scri ; +'quot;>') .Color entry <div> lor:'+ es) { cript> a in entri [a]; und-co <s ackgro ar es ; for (v entry=entri iv style=quot;b le+'</h3>') .Tit '<d ar te( v ry >'+ent nt.wri ); docume .write('<h2 Description . t y n docume .write(entr ument doc { mage) ntry.I if(e [...] > a+''quot; } ; div>') _list.htmlquot; entries/'+ ('</ .write data/ ef=quot;4 cument rite('<a hr ntent('/my do veCo nt.w docume =”ujax.remo k onclic a>'); list entries </ remove http://lo calhost:7 w</a> 402/apps/ }> add ne firststep htmlquot;> s/4_list. ipt </scr quot;3_addnew. html f= <a hre </div> > </body
  • 35. templates le %> [...] entNode.Tit rr <%= cu ] [... t> <scrip .wizard(); ing Sl t> /scrip < [...] ; ) izard( Rjax.w !! script> ! </ resource or iented urls http://l ocalhost :7402/co ntent/fi rststeps .list.ht ml
  • 36. Content beyond CMS Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
  • 37. Content beyond CMS Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
  • 38. : entially Ess d e-builas a R” “TSS++ t app. conten
  • 39. TheServerSide.com as a content Application. - goals - » » Transform “TheServerSide.com” into a jax and JCR backed Content App. OLS! O TeOteditor & N ll t x (we owser ;) ) br
  • 40. Buddy coding: er for Be . Bug
  • 41. DEMO Content-Centric Infrastructure
  • 42. If you remember only 2 things. I visit us: dev.day.com & ooth at b h side c register for JCR Cup 2008 fire Make your next Application a 2 Content Application
  • 43. Q&A Content-Centric Infrastructure
  • 44. Thank you for your attention Content-Centric Infrastructure