apache sling - the whys and the hows

Post on 24-May-2015

2.237 Views

Category:

Technology

5 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

rmuntean@adobe.com @rombert

Apache Sling - The whys and the hows

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

Robert Munteanu@rombert rmuntean@adobe.com

rmuntean@adobe.com @rombert

Who I am

$DAYJOB Adobe CQ

− Apache Sling− Apache Jackrabbit− Apache Felix

FOSS MantisBT Mylyn Connector

for MantisBT Mylyn Connector

for Review Board

rmuntean@adobe.com @rombert

Why Sling

Bringing back the fun

rmuntean@adobe.com @rombert

Apache Sling architecture

rmuntean@adobe.com @rombert

Why Sling (2)

Non-mainstream technology choices

Standard nonetheless Coherent Opinionated (TM?)

rmuntean@adobe.com @rombert

Why Sling (3)

Content first approach RESTful access to resources Polyglot request handling

Java Javascript JSP Ruby

Access control management Logging ( slf4j )

rmuntean@adobe.com @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/ )

rmuntean@adobe.com @rombert

Why Felix

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

– Dependency Injection

– Eventing

– Configuration Admin

– Modularity

rmuntean@adobe.com @rombert

Why Jackrabbit

rmuntean@adobe.com @rombert

Why Jackrabbit (2)

rmuntean@adobe.com @rombert

Sling use cases

Blogs, news , bug trackers

Digital asset management

Wikis

rmuntean@adobe.com @rombert

And now...

rmuntean@adobe.com @rombert

OSGi component

@Component

@Service(ChaosMonkey.class)

public class DrunkChaosMonkey implements ChaosMonkey {

@Reference SlingRepository repo;

void doWhateverAChaosMonkeyDoes() { … }

}

rmuntean@adobe.com @rombert

Eventing

@Component

@Service(EventHandler.class)

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

class LazyHandler implements EventHandler {

public void handleEvent(Event event) {…}

}

rmuntean@adobe.com @rombert

Project layout

rmuntean@adobe.com @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

rmuntean@adobe.com @rombert

Q&A

rmuntean@adobe.com @rombert

Resources

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

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

top related