Webtuesday Zurich

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite & 1 Group

    Webtuesday Zurich - Presentation Transcript

    1. WebTuesday: µjax in 30 minutes. apache sling (...?!) Lars Trieloff .... “me” instead Product Manager Day Software Technology Presentation 1
    2. 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 Content-Centric Infrastructure 2
    3. obpqof`qba R håçï=óçìê=eqji=C=g~î~ëÅêáéí e~îÉ=~=î~ÖìÉ=ÅçåÅÉéí=çÑ=~= “`çåíÉåí=oÉéçëáíçêóÒ=~åÇ=“obpqÒ
    4. WebTuesday: Sling in 30 Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
    5. WebTuesday: Sling in 30 Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
    6. What’s JCR? gpoJNTM `çåíÉåí=oÉéçëáíçêó=Ñçê= g~î~qj=íÉÅÜåçäçÖó=^mf péÉÅJiÉ~ÇW a~ó=pçÑíï~êÉ pí~íìëW= cáå~ä=oÉäÉ~ëÉ=NTJàìåJOMMR bñéÉêí=dêçìéW
    7. What’s JCR? gpoJNTM gpoJOUP `çåíÉåí=oÉéçëáíçêó=Ñçê= g~î~qj=íÉÅÜåçäçÖó=^mf=îOKM péÉÅJiÉ~ÇW a~ó=pçÑíï~êÉ pí~íìëW= mìÄäáÅ=oÉîáÉï=`äçëÉÇ=ëÉéJOMMT bñéÉêí=dêçìéW
    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. data base file s ys t e m hier- integ archi rity structu re es read streams tx write access query locking control multi- value un-structured obser- versioning “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. <% childCount = node.getConten for(int i=0;i<childCount;i tCount(); ++) { <% JCR What’s Check - ? LAPI_DOCUMEN - Reality TS documents = new LA LLValue childTable = PI_DOCUMENTS(session new LLValue(); s(volumeID, folderID , ); documents.ListObject JCR API IContent child = node.getCo E, childTable); Property title = child.getP ntent(i); null, null, LA PI_DOCUMENTS.PERM_SE ropertyByName(\"Title\"); .enumerateValues(); %><%= title.getValue() %><b Enumeration children = childTable r/><% reElements()) { } while(children.hasMo )e.nextElement(); %> <% <% LLVa lue child = (LLValue ring(\"Name\"); fndocs Stri ng <% tle = child.toSt ti = new fnfold IFnObj NodeIterator children = node.getNodes(); SetDua PageIterator% %><%= title %><br/>< children = page.getPages(); int nu lPr while (children.hasNex er.get while (children.hasNext()) { Conten oxy( Task: Write a JSP snippet that mDocs } t()) { for (i = fndo ts(idm Page child = children nt i = cs. Fo %> .nextPage(); 1; i < getCount(); lderContent. Node child = children.nextNode(); Container toplevel = IFnDoc = numD idmFol child.getContent(); umentD ocs; i derCon om title = to At e new IF IFnPro ua Property title = child.getProperty(\"Title\"); nDocum l fndoc = entDua ++) { t ntDo cume plevel.getAtom(\"Title\" %><%= title nt));r /><% %><b ); lists “ documents” in a “folder”” . pe lPr %><%= title %><br /><% IFnPro rtiesDual pr oxy(fndocs.g pe o et } %> String rtyDual idmT pset = fndoc Item(new In %><%= title title } i . te = idmT tleProp = pr getPropertie ger(i))); itlePr op.get opset.getIte s(); if (co %> mClean <br/><% up) {%> <% Value( ); m(\"Tit le\"); entsProxy(binder.getDo cuments()); cleane s = new IDocum } r.rele ase(fn IDocuments document } doc); documents.cache(); (); documents.getCount %> in t documentCount = { cumentCount; i++) ItemByIndex(i)); fo r (int i = 0; i<do umentP roxy(documents.get document = new IDoc ment.getTitle() String title = docu ><% %><%= title %><br/ } %> +800
    12. What’s JCR? - Functional Elevator Pitch - sql locking obser- tx versioning vation opt ion al level 2 write, import, access control read, export, level 1 query
    13. Java Standardization JSR-283 Public Review Ballot ro ved app
    14. Java Standardization
    15. Known compliant Repositories * using third party connector * * Exo Microsoft Apache Jackrabbit Oracle XML DB ECMS Platform Sharepoint OpenText Livelink * Day CRX IBM FileNet P8 Xythos Repository Alfresco ECM Vignette V7 * * any ors ow mvendd? H S e Interwoven +hund DBMou ne R do y r s Repository IBM CM EMC Documentum regiede of TCKs st
    16. Some known JCR Applications Fast BEA Portal Sun Oracle Portal Enterprise Search JBoss Portal Interface 21 OpenPortal Day Communique Spring Framework magnolia WCMS DAM Apache Sling Day Communique Alfresco ECMS Mindquarry Collab Collaboration Apache Tapestry QSLabs Apache Compliance Day Communiqué Cocoon WCMS IBM FileNet Artifactory medic-2-medic WebSiteManager Apache James Maven Proxy mapofmedicine Exo ECMS Platform TYPO3 GX WebManager v5.0 WCM InfoQ Hippo Liferay Nuxeo ECM Online Community CMS Enterprise Portal Jahia Sakai Percussion Framework E-learning Rhythmix QuickWCM Sourcemix WCMS Lutece Sourcemix
    17. JCR - Weatherforcast 2008 -5° 2009 -8° 2010 -12°
    18. WebTuesday: Sling in 30 Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
    19. WebTuesday: Sling in 30 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 2005 rele a 1.0 r v ele ased sed y +300 pages 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 lazy strategic 16 t ons short-sighted functionally broad 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 ac ReST- ked (OSGI Webkit , OCM Apache Sling , ...) jsp groovy ... esp contains ruby scala ormerly r st f e antiwn as”: “th k o sling.js & .jst jax
    25. I browser & sling.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 Browser I 16 t ons very simple js A PI to 2 Sling Servlets translating requests read content, Fo to JCR calls to write contenrms t 3 JCR Compliant Content Repository
    26. It’s the web, baby! URLs matter . .../product.jsp?id=12346 Mistake 1 : Mistake 2: Mistake 3: Addressing the .j “Script”sp? What the heck? Passing in “this”
    27. Reclaiming the web. Sling URL decomposition. /cars/audi/s4.details.html Content ...selects a Repository epository Path R particular scrip t
    28. “Data First!” JCR s “stru uppor cturef ts (but t aswe irst” hat’s mi ll. ssing point )
    29. Getting ready... download a nd install test & mount as a drive
    30. hello, world. le> rld</tit ello, wo <h tml> >sling:h <title <head> > > rld</h2 </head 2>hello, wo <h <body> > </body > </html drag, drop, done http://localhost:7402/ apps/firststeps/0_hell o.html
    31. simple write example itle> exam ple</t le write ST\"> > <html itle>sling : simp method=\"PO <t first steps\" <head> body> ntent/ >< /co </head rm action=\" --> fo itle < <!-- t e</h2> e\" /> tl name =\"Titl <h2>Ti ype=\"text\" t > <input cription -- on\"> !-- des ption</h2> =\"Descripti < >Descri name <h2 ws=\"5\" rea ro <texta rea> a </text or --> ol <!-- c r</h2> lo \"> <h2>Co name=\"Color ed\">red t \"r <selec tion value= reen\">green op \"g < tion value= op < > ct </sele > </form > </body write me! > </html irststeps/1_write.html http://localhost:7402/apps/f
    32. simple read example itle> exam ple</t simpl e read <html> tle>sling: <ti <head> ipt > g.js\"></scr </head m/slin s\"); <body> src=\"/syste t/firststep lor+'\">'; <s cript nt(\"/conten r:'+node.Co <scr ipt> ng.ge tConte ground-colo de=Sli style=\"back var no '<div v= ; var di .write(div) nt docume > pt </scri cript> tle); h2 ><s (node.Ti < ument.write doc </h2> n); </s cript> t> riptio rip e.Desc <p><sc t.write(nod n docume /p> t>< </scrip /div> < > </body read me! http://localhost:7402/apps /firststeps/2_read.html </html >
    33. add new entry le> xample</tit new entry e > <html itle>sling : add es/*\" t steps /entri <head>< ody> ntent /first </h ead><b action=\"/co form < od=\"POST\" > meth /> le</h 2> ame=\" Title\" h2>Tit pe=\"text\" n < put ty area> <in ion\"></text iption</h2> e=\"Descript h2 >Descr ows=\"5\" nam < xtarea r te < </h2> h2 >Color e=\"Color\"> >red < lect nam \"red\" <se n value= reen\">green <optio value=\"g option < > ct </sele ></p> pe=\"submit\" add new http://localhost:7402/apps/firststeps/3_addnew.html < </form p><in > put ty > </body > </html
    34. list entries le> xampl e</tit t ent ries e 2); <htm l> >slin g: lis s/entries\", <title ststep <head> conten t/fir [...] nt(\"/ t> g.ge tConte <scrip ntries=Slin var e pt> </scri or+'\"> '); <div> y.Col t> ries) { olor: '+entr <scrip ar a in ent es[a]; ackgr ound-c ; for (v entry=entri iv style=\"b le+'</h3>') var '<d Tit nt. write( h2>'+entry. on); docume .write('< Descri pti nt y. docume .write(entr nt docume ){ ry.Image if(ent [...] } '\\'\"> '</div >'); ist.h tml\" tries/\\'+a+ nt. write( a href=\"4_l '/mydata/en docume .write('< ent(\\ nt veCont docume =”ujax.remo k onclic a>'); http://lo list entries calhost:7 remove </ 402/apps/ } > </a> firststep s/4_list. t ml\">add new html </scrip 3_addnew.ht f=\" <a hre v>
    35. templates %> [. ..] tNode.Title <%= curren [...] t> <scrip .wizard(); Sling pt> </scri [...] w izard(); ! Rja x. ! </script> resource or ! http://l iented urls ocalhost :7402/co ntent/fi rststeps .list.ht ml
    36. WebTuesday: Sling in 30 Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
    37. WebTuesday: Sling in 30 Web Development What’s JCR (elevator pitch) REST meets JCR meets Ajax silve r Building TSS as a Content App
    38. Essentially: builds a Re- ” a SS++ t app. “T ten con
    39. TheServerSide.com as a content Application. - goals - » » Transform “TheServerSide.com” into a jax and JCR backed Content App. TOtOitor &LS! NO ll tex ed (we owser ;) ) br
    40. Buddy coding: eer for B Bug.
    41. DEMO Content-Centric Infrastructure
    42. If you remember only 2 things. I visit us: dev.day.com th & t boo cha register for JCR Cup 2008 fireside 2 Make your next Application a Content Application
    43. Q&A Content-Centric Infrastructure
    44. Thank you for your attention Content-Centric Infrastructure

    + David NueschelerDavid Nuescheler, 2 years ago

    custom

    2094 views, 1 favs, 2 embeds more stats

    content repository, jsr-170, jsr-283, jcr, ajax, ap more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2094
      • 1974 on SlideShare
      • 120 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 25
    Most viewed embeds
    • 119 views on http://dev.day.com
    • 1 views on http://localhost

    more

    All embeds
    • 119 views on http://dev.day.com
    • 1 views on http://localhost

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events