Latest Posts

Archives [+]

Sling Cheat Sheet

My approach to learning a new technology (or-relearning something that changed several times since I last spend time with it) is writing documentation. As I wanted to write a small Sling application using the newly released Apache Sling 1.0, I decided to create a one-page documentation of the Script-resolution process in Sling. This is the frontside of my cheat sheet. It shows you how to get from HTTP request to content node, from content node to resource type, from resource type to script and what scripting variables are available.

On the flipside of the cheat sheet I documented all the hidden, but powerful request parameters you can use when dealing with the SlingPostServlet, the default handler for all POST requests that gives you endless options for creating, modifying, deleting, copying and moving nodes in your repository.

Click on the thumbnails to get a high-resolution PDF version of either side (3,7 and 1,7 MB) or download the PDF version (300 KB) here.

 

COMMENTS

  • By Felix Meschberger - 12:08 PM on Jul 24, 2008   Reply
    Hi Lars,<br/><br/>Thanks for this ! Great thing. Just two things to note: (1) The resource type resolution does not fall back to sling:resourceSuperType if there is not sling:resourceType property. Instead it first tries a pluggable mechanism (nothing there by default) and finally uses the primary node type. The resource super type is only used in the next step of script resolution if the resource type is already known. (2) The functionality of the Sling POST Servlet is not really hidden. All the parameters are documented at http://incubator.apache.org/sling/site/manipulating-content-the-slingpostservlet.html
    • By Renaud Richardet - 8:00 AM on Sep 05, 2008   Reply
      hi Lars,<br/>Thanks for the cheatsheet, very helpful!<br/>cheers, Renaud
      • By John - 4:23 PM on Nov 04, 2008   Reply
        Very nice cheat sheet Lars. <br/><br/> I do have a question though... How would this defend against an attack? If a user were to say change some of the names of the fields in form then submit, would that in turn change your model that you expect in your repository?<br/><br/>Please understand that I haven't had a great deal to time to look into Sling, but it looks very interesting and would like to learn more. <br/><br/>Respectfully,<br/>John
        • By Jamie Moon - 6:38 AM on May 16, 2011   Reply
          I'm learning out Sling & JackRabbit(S&JR) for commerical project.
          I hope it will help me a lot to understand S&JR more.
          • By Manchester Escort Agency - 2:39 PM on Jan 09, 2012   Reply
            It is useful because it was very helpful to me about things is much appreciated. - http://www.manchester-rendezvous.co.uk
            • By Furniture Stores Melbourne - 8:51 AM on Jan 11, 2012   Reply
              Nice One! It is really great that you share for us such useful stuff.
              • By Melbourne Furniture Stores - 8:54 AM on Jan 11, 2012   Reply
                It is useful because it was very helpful to me about things is much appreciated.
                • By Furniture Stores in Melbourne - 8:56 AM on Jan 11, 2012   Reply
                  Great article, very informative. I didn't know this information before, so this was very curious to read. Thanks!
                  • By New Design Clothes - 7:15 AM on Mar 22, 2012   Reply

                    I'm looking for some Wholesale Shoes,finally I also find different Wholesale Clothes and Cheap handbags.They offer me so much Cheap Clothes with Wholesale Jeans,fit with suitable New Design handbags,It makes me feel so amazing.


                    • By china wholesale - 7:16 AM on Mar 22, 2012   Reply

                      Hi, the article is so wonderful, I am interested in it. I will pay attention to your articles.
                      • By eGo-T - 8:30 AM on Apr 04, 2012   Reply
                        he article is so wonderful, I am interested in it. I will pay attention to your articles.
                        • By snapbacks for sale - 7:07 AM on Apr 07, 2012   Reply
                          It would be advisable to purchase Snapback hats on sale, from online stores due to the great deals and discounts you get. Online shopping is now very competitive and provides you with discounts that are unheard of, in any other traditional store. Online shopping gives you the advantage of checking out all the details of the colour, material and cost, before you make a purchase. You may compare costs of different snapbacks for sale by simultaneously checking different websites. In order to attract customers, online shopping stores have made online shopping very convenient for the buyer.

                          ADD A COMMENT