SlideShare una empresa de Scribd logo
1 de 45
Descargar para leer sin conexión
Kickstarting the Java
Content Repository
   AJAX meets JCR
obpqof`qba

R   håçï=óçìê=eqji=C=g~î~ëÅêáéí
    e~îÉ=~=î~ÖìÉ=ÅçåÅÉéí=çÑ=~=
    “`çåíÉåí=oÉéçëáíçêóÒ




            www.javapolis.com
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
Overall Presentation Goal




              Learn how
     JCR and Ajax allow for very agile
        application development.




                     www.javapolis.com
Kickstarting JCR
              AJAX meets JCR




What’s JCR (elevator pitch)

                 jax
Introducing                        silve
                                         r



Weblog in 15minutes



                   www.javapolis.com
Kickstarting JCR
              AJAX meets JCR




What’s JCR (elevator pitch)

                 jax
Introducing                        silve
                                         r



Weblog in 15minutes



                   www.javapolis.com
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
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
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
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
What’s JCR?
           - Reality Check -




Task: Write a JSP snippet that
lists “
      documents” in a “folder””
                              .



              www.javapolis.com
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(quot;Titlequot;);
                                                                children = childTable
       %><%= title.getValue() %><b                Enumeration
                                        r/><%                              reElements()) {


                 Task: Write a JSP snippet that
                                                  while(children.hasMo
  }
                                                                                        )e.nextElement();
                                                                 lue child = (LLValue
                             <%
  %> <%                                                     LLVa                          ring(quot;Namequot;);
                                                                 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(quot;Titlequot;);
                                         ++) {                            t ntDo         plevel.getAtom(quot;Titlequot;
                            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(quot;Tit
                                                                         lequot;); 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
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
Java Standardization

                                                        ase:d
                                                    rele mi
                                                inal cted
               Review Ballot
JSR-283 Public                                  fe
                                                exp 2008




                                          ved
                                       ro
                                  pp
                                a




            www.javapolis.com
Java Standardization




        www.javapolis.com
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
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
JCR - Weatherforcast
       -5°                  -8°                -12°
             2009                       2010
2008


                    www.javapolis.com
Kickstarting JCR
              AJAX meets JCR




What’s JCR (elevator pitch)

                 jax
Introducing                        silve
                                         r



Weblog in 15minutes



                   www.javapolis.com
Kickstarting JCR
              AJAX meets JCR




What’s JCR (elevator pitch)

                 jax
Introducing                        silve
                                         r



Weblog in 15minutes



                   www.javapolis.com
Introducing jax

                    Apache Sling
   JCR b
         ac
  ReST- ked
(OSGI devkit
     , OCM                       subtract osgi
           , ...)                subtract ocm


                       microsling
                                  contains


                        microjax
                                                 jax
                         www.javapolis.com
Introducing jax


              JCR
          longterm
     stable &durable
well designed duty
            heavy
 strategic                  16 t
                                ons



      functionally broad

        www.javapolis.com
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
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
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
Introducing jax



“Data First!”
        JCR s
                uppor
   “stru             ts
             cturef
         aswe irst”
(but t           ll.
       hat’s
             mi
           ssing
                   point
                        )




                   www.javapolis.com
DEMO
Getting ready...




                                           test & mount as a drive
download a
          nd install


                       www.javapolis.com
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
simple write example
                                                                                                         title>
                                                                                                   mple</
                                                                                             e exa
                                                                                       e writ                       Tquot;>
                                                                                                              d=quot;POS
                                                                                 simpl
                                                       <html> itle>ujax:                                 metho
                                                                                                  tepsquot;
                                                                <t                           irsts
                                                        <head> body>                  tent/f
                                                                                  /con
                                                                 ><
                                                         </head rm action=quot; -->
                                                                 fo             tle
                                                          
<                                              quot; />
                                                                        !-- ti </h2>                quot;Title
                                                                       <
                                                                                              name=
                                                                
              tle
                                                                       <h2>Ti ype=quot;textquot;
                                                          
                                                                 
               t             >
                                                                        <input cription --
                                                           
                                                                                                               ionquot;>
                                                                  
               s
                                                                          !-- de iption</h2> e=quot;Descript
                                                           
                                                                   
 < >Descr                   nam
                                                                                          s=quot;5quot;
                                                            
            <h2        a row
                                                                   
                                                                            extare a>
                                                             
             t
                                                                    
 < extare
                                                             
             </t        r -->
                                                                               - colo h2>
                                                                            !-
                                                                      
 < >Color</               rquot;>
                                                                                           =quot;Colo redquot;>red
                                                               
            <h2       name
                                                                      
                                                                              select ion value=quot; eenquot;>green
                                                               
                                                                       
<                           quot;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
simple read example
                                                                                                           title>
                                                                                                     mple</
                                                                                               d exa
                                                                                         le rea
                                                                                    simp
                                                          <html> itle>ujax:
                                                                   <t
                                                           <head>                                       ript
                                                                                                 quot;></sc
                                                                ead>                       ax.js
                                                            </h                                                      squot;);
                                                                                     jax/uj                    ststep olor+'quot;>';
                                                                   >              quot;/u
                                                               ody                                        t/fir
                                                                             src=
                                                             <b
                                                                                                   conten or:'+node.C
                                                                  script                      nt(quot;/
                                                                 <
                                                                      ript> ax.getConte kground-col
                                                                  <sc                        bac
                                                                              =uj
                                                                      r node div style=quot;
                                                                   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
add new entry
                                                                                                          tle>
                                                                                                   le</ti
                                                                                             examp
                                                                                      entry
                                                                                 new                         /*quot;
                                                                        x: add                        ntries
                                                     ml>            uja
                                                  ht
                                                 <                                              eps/e
                                                             itle>                       irstst
                                                     ead><t dy>                   tent/f
                                                  <h
                                                        ad><bo ction=quot;/con
                                                   </he
                                                           form a
                                                    
 < od=quot;POSTquot; >
                                                          meth                                         equot; />
                                                                                                =quot;Titl
                                                                                /h2>       name
                                                                           tle<
                                                                  <h2>Ti ype=quot;textquot;                                       ea>
                                                            
                t
                                                                                                                    textar
                                                                     input
                                                      
                                                                                                               nquot;></
                                                             
<                                          riptio
                                                                                         /h2>
                                                      
                                            quot;Desc
                                                                                   tion<
                                                                            escrip s=quot;5quot; name=
                                                                      h2>D
                                                              
 < xtarea row
                                                        
              te
                                                               
<
                                                        
                            h2>
                                                                              olor</ quot;Colorquot;>
                                                                        h2>C                             d
                                                                
 < lect name= ue=quot;redquot;>re een
                                                          
                                            quot;>gr
                                                                         se             val
                                                                 
<             option alue=quot;green
                                                                        
 < tion v
                                                           
                                                                  
              op
                                                                         
 <>
                                                           
                                                                  
               ct
                                                                          </sele
                                                            
                                           </p>
                                                                                                 bmitquot;>
                                                                   
                                                                                           e=quot;su
                                                             

                add new
                                                                                    ut typ
                                                                                   p
                                                                           <p><in
                                                                     
                                                              
              >
                                                                     </form
                                                tml
http://localhost:7402/apps/firststeps/3_addnew.h               
                                                               
                                                                        >
                                                                </body
                                                                         >
                                                                 </html



                                                      www.javapolis.com
list entries
                                                                                                   itle>
                                                                                            ple</t
                                                                                        exam
                                                                                ntries                                   2);
                                                                              e
                                                                      : list                                       iesquot;,
                                                    l>         >ujax                                          /entr
                                              <htm
                                                       <title                                          tsteps
                                               <head>                                             /firs
                                                                                           ontent
                                                                                      t(quot;/c
                                                [...]                          Conten
                                                                          .get
                                                        t>
                                                 <scrip ntries=ujax
                                                     var e
                                                          pt>
                                                  </scri                                                                          ');
                                                                                                                            or+'quot;>
                                                                                                                       y.Col
                                                   <div>                                                         '+entr
                                                                                    {
                                                                                                           olor:
                                                                             ries)
                                                           t>
                                                                                                     ound-c ;
                                                    <scrip ar a in ent es[a];                  ackgr
                                                       for (v entry=entri iv style=quot;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
                                                         [...] }
                                                                                                                             ''quot;>
                                                                                                                       /'+a+
                                                                                           >');          tmlquot;
                                                                                    '</div                        tries
                                                                                                   ist.h
                                                                             write( a href=quot;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
                                                                              mlquot;>a
                                    s/4_list.                      t
                                                            /scrip 3_addnew.ht
                                             html          <
                                                                  f=quot;
                                                           <a hre
                                                            </div>
                                                                   >
                                                             </body
                                                                    >
                                                              </html

                                                     www.javapolis.com
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
Kickstarting JCR
              AJAX meets JCR




What’s JCR (elevator pitch)

                 jax
Introducing                        silve
                                         r



Weblog in 15minutes



                   www.javapolis.com
Kickstarting JCR
              AJAX meets JCR




What’s JCR (elevator pitch)

                 jax
Introducing                        silve
                                         r



Weblog in 15minutes



                   www.javapolis.com
Weblog in 15 minutes
                 - goals -


- seen before?
 ...a bunch of forms & a datamodel.
- something (almost) useable



                 www.javapolis.com
Weblog in 15 minutes
       - goals -

    Confession



I am not a Blogger
                 .




        www.javapolis.com
Weblog in 15 minutes
       - goals -

    Confession



I am not a Blogger
                 .
                                          cchi’s
                                      azzo
                                ano m type”
                            stef “lino




        www.javapolis.com
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
DEMO
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
Q&A
View JavaPolis talks @ www.parleys.com
Thank you for your
    attention

Más contenido relacionado

Más de David Nuescheler

Adobe MAX - WEM: 10 Whirlwind demos
Adobe MAX - WEM: 10 Whirlwind demosAdobe MAX - WEM: 10 Whirlwind demos
Adobe MAX - WEM: 10 Whirlwind demos
David Nuescheler
 

Más de David Nuescheler (20)

The New Marketer?
The New Marketer?The New Marketer?
The New Marketer?
 
Adobe Digital Government Assembly - Technologies that Drive Change.
Adobe Digital Government Assembly - Technologies that Drive Change.Adobe Digital Government Assembly - Technologies that Drive Change.
Adobe Digital Government Assembly - Technologies that Drive Change.
 
evolve13: The Past, Present and Future of AEM
evolve13: The Past, Present and Future of AEMevolve13: The Past, Present and Future of AEM
evolve13: The Past, Present and Future of AEM
 
Adobe MAX: The Future Enterprise Developer
Adobe MAX: The Future Enterprise DeveloperAdobe MAX: The Future Enterprise Developer
Adobe MAX: The Future Enterprise Developer
 
Adobe MAX - WEM: 10 Whirlwind demos
Adobe MAX - WEM: 10 Whirlwind demosAdobe MAX - WEM: 10 Whirlwind demos
Adobe MAX - WEM: 10 Whirlwind demos
 
The Future of ECM
The Future of ECMThe Future of ECM
The Future of ECM
 
NLJUG: Content Management, Standards, Opensource & JCP
NLJUG: Content Management, Standards, Opensource & JCPNLJUG: Content Management, Standards, Opensource & JCP
NLJUG: Content Management, Standards, Opensource & JCP
 
Introducing CQ5.4: Sneak-Peek
Introducing CQ5.4: Sneak-Peek Introducing CQ5.4: Sneak-Peek
Introducing CQ5.4: Sneak-Peek
 
JCP Heartbeat Monitor
JCP Heartbeat MonitorJCP Heartbeat Monitor
JCP Heartbeat Monitor
 
FrOSCamp Zurich: Content Management Standards
FrOSCamp Zurich: Content Management StandardsFrOSCamp Zurich: Content Management Standards
FrOSCamp Zurich: Content Management Standards
 
FrOScamp Zurich: Introducing JCR - 2010
FrOScamp Zurich: Introducing JCR - 2010FrOScamp Zurich: Introducing JCR - 2010
FrOScamp Zurich: Introducing JCR - 2010
 
JSOP in 60 seconds
JSOP in 60 secondsJSOP in 60 seconds
JSOP in 60 seconds
 
Future of WCM - CM Forum Belgium
Future of WCM - CM Forum BelgiumFuture of WCM - CM Forum Belgium
Future of WCM - CM Forum Belgium
 
Agile Edge Valtech
Agile Edge ValtechAgile Edge Valtech
Agile Edge Valtech
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.
 
Valtech Days 2009 Paris Presentation: WCM in 2010 and an intro to CQ5
Valtech Days 2009 Paris Presentation: WCM in 2010 and an intro to CQ5Valtech Days 2009 Paris Presentation: WCM in 2010 and an intro to CQ5
Valtech Days 2009 Paris Presentation: WCM in 2010 and an intro to CQ5
 
JBoye Presentation: WCM Trends for 2010
JBoye Presentation: WCM Trends for 2010JBoye Presentation: WCM Trends for 2010
JBoye Presentation: WCM Trends for 2010
 
Introducing JSR-283
Introducing JSR-283Introducing JSR-283
Introducing JSR-283
 
What's new in JSR-283?
What's new in JSR-283?What's new in JSR-283?
What's new in JSR-283?
 
Top 8 WCM Trends 2010
Top 8 WCM Trends 2010Top 8 WCM Trends 2010
Top 8 WCM Trends 2010
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Javapolis 2007: AJAX meets JCR

  • 1.
  • 2. Kickstarting the Java Content Repository AJAX meets JCR
  • 3. obpqof`qba R håçï=óçìê=eqji=C=g~î~ëÅêáéí e~îÉ=~=î~ÖìÉ=ÅçåÅÉéí=çÑ=~= “`çåíÉåí=oÉéçëáíçêóÒ www.javapolis.com
  • 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
  • 5. Overall Presentation Goal Learn how JCR and Ajax allow for very agile application development. www.javapolis.com
  • 6. Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com
  • 7. Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com
  • 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
  • 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
  • 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
  • 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
  • 12. What’s JCR? - Reality Check - Task: Write a JSP snippet that lists “ documents” in a “folder”” . www.javapolis.com
  • 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(quot;Titlequot;); children = childTable %><%= title.getValue() %><b Enumeration r/><% reElements()) { Task: Write a JSP snippet that while(children.hasMo } )e.nextElement(); lue child = (LLValue <% %> <% LLVa ring(quot;Namequot;); 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(quot;Titlequot;); ++) { t ntDo plevel.getAtom(quot;Titlequot; 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(quot;Tit lequot;); 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
  • 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
  • 15. Java Standardization ase:d rele mi inal cted Review Ballot JSR-283 Public fe exp 2008 ved ro pp a www.javapolis.com
  • 16. Java Standardization www.javapolis.com
  • 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
  • 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
  • 19. JCR - Weatherforcast -5° -8° -12° 2009 2010 2008 www.javapolis.com
  • 20. Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com
  • 21. Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com
  • 22. Introducing jax Apache Sling JCR b ac ReST- ked (OSGI devkit , OCM subtract osgi , ...) subtract ocm microsling contains microjax jax www.javapolis.com
  • 23. Introducing jax JCR longterm stable &durable well designed duty heavy strategic 16 t ons functionally broad www.javapolis.com
  • 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
  • 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
  • 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
  • 27. Introducing jax “Data First!” JCR s uppor “stru ts cturef aswe irst” (but t ll. hat’s mi ssing point ) www.javapolis.com
  • 28. DEMO
  • 29. Getting ready... test & mount as a drive download a nd install www.javapolis.com
  • 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
  • 31. simple write example title> mple</ e exa e writ Tquot;> d=quot;POS simpl <html> itle>ujax: metho tepsquot; <t irsts <head> body> tent/f /con >< </head rm action=quot; --> fo tle < quot; /> !-- ti </h2> quot;Title < name= tle <h2>Ti ype=quot;textquot; t > <input cription -- ionquot;> s !-- de iption</h2> e=quot;Descript < >Descr nam s=quot;5quot; <h2 a row extare a> t < extare </t r --> - colo h2> !- < >Color</ rquot;> =quot;Colo redquot;>red <h2 name select ion value=quot; eenquot;>green < quot;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
  • 32. simple read example title> mple</ d exa le rea simp <html> itle>ujax: <t <head> ript quot;></sc ead> ax.js </h squot;); jax/uj ststep olor+'quot;>'; > quot;/u ody t/fir src= <b conten or:'+node.C script nt(quot;/ < ript> ax.getConte kground-col <sc bac =uj r node div style=quot; 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
  • 33. add new entry tle> le</ti examp entry new /*quot; x: add ntries ml> uja ht < eps/e itle> irstst ead><t dy> tent/f <h ad><bo ction=quot;/con </he form a < od=quot;POSTquot; > meth equot; /> =quot;Titl /h2> name tle< <h2>Ti ype=quot;textquot; ea> t textar input nquot;></ < riptio /h2> quot;Desc tion< escrip s=quot;5quot; name= h2>D < xtarea row te < h2> olor</ quot;Colorquot;> h2>C d < lect name= ue=quot;redquot;>re een quot;>gr se val < option alue=quot;green < tion v op <> ct </sele </p> bmitquot;> e=quot;su add new ut typ p <p><in > </form tml http://localhost:7402/apps/firststeps/3_addnew.h > </body > </html www.javapolis.com
  • 34. list entries itle> ple</t exam ntries 2); e : list iesquot;, l> >ujax /entr <htm <title tsteps <head> /firs ontent t(quot;/c [...] Conten .get t> <scrip ntries=ujax var e pt> </scri '); or+'quot;> y.Col <div> '+entr { olor: ries) t> ound-c ; <scrip ar a in ent es[a]; ackgr for (v entry=entri iv style=quot;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 [...] } ''quot;> /'+a+ >'); tmlquot; '</div tries ist.h write( a href=quot;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 mlquot;>a s/4_list. t /scrip 3_addnew.ht html < f=quot; <a hre </div> > </body > </html www.javapolis.com
  • 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
  • 36. Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com
  • 37. Kickstarting JCR AJAX meets JCR What’s JCR (elevator pitch) jax Introducing silve r Weblog in 15minutes www.javapolis.com
  • 38. Weblog in 15 minutes - goals - - seen before? ...a bunch of forms & a datamodel. - something (almost) useable www.javapolis.com
  • 39. Weblog in 15 minutes - goals - Confession I am not a Blogger . www.javapolis.com
  • 40. Weblog in 15 minutes - goals - Confession I am not a Blogger . cchi’s azzo ano m type” stef “lino www.javapolis.com
  • 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
  • 42. DEMO
  • 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
  • 44. Q&A View JavaPolis talks @ www.parleys.com
  • 45. Thank you for your attention