Sell yourself I write code I do design/architecture I lead teams I make development teams better.
And that's a good thing because these are often things that we want to define.
I want to build a website that people can go to and enter content. Without training, intuitive
Lots of product options. Each has it's benefits Many can be stood up quickly out of the box. But what if I want to customize?
Wait you just said the C word Customizing a product can be death by 1000 cuts depending on what you're doing.
Frameworks offer a middle ground. They solve a problem but still grant you the flexibility to customize.
So lets talk about sling
Combination of open source projects to make content driven sites easier.
Kind of a chicken or egg thing here. David Neuschler of Day Software created the JSR for JCR. They build Day CQ. Then donated the Sling framework to Apache. A number of Day (now Adobe) employees still run the community for it.
Very different mind set than your typical Web App. Content not MVC runs the show.
So Sling is RESTful by design HTTP request to get data in and out GET - retrieve POST – Create/Modify
Run simple curl commands Note we're creating a multi value field Display the urls through curl
The most sophisticated part of the system. And the hardest to learn. But once you get it. Some incredibly hard problems become easy.
Resource Path – just like your typical web app. Where to retrieve information from. Selectors – Identifies specific content and acts as a parameter passer. Great for SEO. Extention – helps identify the script we're running. Suffix – a second path that is useful to identify additional content.
Note that the multi field is missing. A Bug? Maybe I should submit a jira :).
JCR is the persistence for sling. Underlying it is a file system or a Database. Can run on several Dbs. OOTB it's HSQL.
Eclipse provides a plugin to view and do some simple JCR modifications. One way to administer. Also could use WebDav to move files. Or maven or json/xml with sling.
Lets trace what a homepage request will look like in our soon to be live CMS.
Here is the structure Bot extend the JCR root Apps directory contains scripts: JSP, GSP, ESP.. could be more. Content directory contains content nodes.
Request comes into sling and resolves to a node. That node looks at it's type then tries to resolve a script
That type searches the apps directory (also could go to the libs directory) Once it gets to the folder it wants then it tries to resolve to a script using selectors and extentions. Script executes but wait theirs a sling include tag
Ok we're looking for a node content that's a child of the node we asked for. Child also then resolves it's type
Back to the script directory Selectors and extensions are once again used. If none are provided they are inherited from the parent. Page returns.
It's a polygot programmers playground
Build Your Own CMS with Apache Sling
“Build your own CMS with Apache Sling” By Bob Paulin Paulin Solutions LLC
Independent Developer/Architect/Lead Focused on:Web Centric Application Development Mobile Development Support
Stuff Sling doesnt give youBYO...Robust Login SecurityXSS ProtectionWYSIWYG Editors
The Problem:I want to create a content driven website.
Installing Sling 1) Place JAR in Directory 2) java -jar -Xmx1024m -XX:MaxPermSize=256m-agentlib:jdwp=transport=dt_socket,address=30 303,server=y,suspend=n org.apache.sling.launchpad-6-standalone.jar