Apache Sling - The whys and the hows

18
[email protected] @rombert Apache Sling - The whys and the hows Apache Sling – The whys and the hows OSGi, JCR, REST, BCP Robert Munteanu @rombert [email protected]

description

Brief into to Sling presented to the Bucharest JUG, 2nd edition, 22-06-2012

Transcript of Apache Sling - The whys and the hows

Page 1: Apache Sling - The whys and the hows

[email protected] @rombert

Apache Sling - The whys and the hows

Apache Sling – The whys and the howsOSGi, JCR, REST, BCP

Robert Munteanu@rombert [email protected]

Page 2: Apache Sling - The whys and the hows

[email protected] @rombert

Who I am

$DAYJOB Adobe CQ

− Apache Sling− Apache Jackrabbit− Apache Felix

FOSS MantisBT Mylyn Connector

for MantisBT Mylyn Connector

for Review Board

Page 3: Apache Sling - The whys and the hows

[email protected] @rombert

Why Sling

Bringing back the fun

Page 4: Apache Sling - The whys and the hows

[email protected] @rombert

Apache Sling architecture

Page 5: Apache Sling - The whys and the hows

[email protected] @rombert

Why Sling (2)

Non-mainstream technology choices

Standard nonetheless Coherent Opinionated (TM?)

Page 6: Apache Sling - The whys and the hows

[email protected] @rombert

Why Sling (3)

Content first approach RESTful access to resources Polyglot request handling

Java Javascript JSP Ruby

Access control management Logging ( slf4j )

Page 7: Apache Sling - The whys and the hows

[email protected] @rombert

Why Sling (4)

Apache Top-level project High-profile Sling adopters

Sakai Project ( sakaiproject.org ) Adobe CQ ( adobe.com/products/cq.html) Idium Web ( idium.no/web/ )

Page 8: Apache Sling - The whys and the hows

[email protected] @rombert

Why Felix

Sling is a set of OSGi bundles Builds on support from Apache Felix

– Dependency Injection

– Eventing

– Configuration Admin

– Modularity

Page 9: Apache Sling - The whys and the hows

[email protected] @rombert

Why Jackrabbit

Page 10: Apache Sling - The whys and the hows

[email protected] @rombert

Why Jackrabbit (2)

Page 11: Apache Sling - The whys and the hows

[email protected] @rombert

Sling use cases

Blogs, news , bug trackers

Digital asset management

Wikis

Page 12: Apache Sling - The whys and the hows

[email protected] @rombert

And now...

Page 13: Apache Sling - The whys and the hows

[email protected] @rombert

OSGi component

@Component

@Service(ChaosMonkey.class)

public class DrunkChaosMonkey implements ChaosMonkey {

@Reference SlingRepository repo;

void doWhateverAChaosMonkeyDoes() { … }

}

Page 14: Apache Sling - The whys and the hows

[email protected] @rombert

Eventing

@Component

@Service(EventHandler.class)

@Property(name=”event.topics”, value=”some/event/queue”)

class LazyHandler implements EventHandler {

public void handleEvent(Event event) {…}

}

Page 15: Apache Sling - The whys and the hows

[email protected] @rombert

Project layout

Page 16: Apache Sling - The whys and the hows

[email protected] @rombert

Think in content, not in tables

/content/myblog/posts/iphone_shipping/attachments/front.jpg

[Blog]

- blogId

- author

[Post]

- postId

- blogId

- title

- text

- date

[Attachment]

- attachmentId

- postId

- filename

+ resource (nt:resource)

In-depth discussion at http://wiki.apache.org/jackrabbit/DavidsModel

Page 18: Apache Sling - The whys and the hows

[email protected] @rombert

Resources

Apache Sling – http://sling.apache.org Apache Felix – http://felix.apache.org Apache Jackrabbit –

http://jackrabbit.apache.org @rombert{,w}