Best Sling samples for a beginner to look at?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Best Sling samples for a beginner to look at?

Greg Fullard
Hi All

An earlier mail Andy Schaefer actually highlighted something that I've been
struggling with over the last week or so.

I'm very green with Sling (Playing with it during my limited spare time for
the last 2-3 months) and have struggled to find a lot of useful
getting-started material online. The tutorials on the Sling website feels
quite outdated (mostly esp and jps examples) and besides the Sling page
I've really only found a handful of blogs and youtube videos.

I had a look at the samples folder, but most of those samples seem
super-old. The only ones that have been touched in the last year are:
 - Slingshot
 - Slingbucks
 - Fling (the one Andy mentioned)

So my question is:

   - Will any of those samples really provide a useful learning experience
   for a Sling noob?
   - Or should I rather work through something like Chris Millar's Slick-2
   framework (Seems like quite a beast though)

If you feel the learning experience from the samples will be worthwhile,
I'm quite willing to help get some of them updated with Sightly etc.

Appreciate the help

Greg Fullard
--

GREG FULLARD
ARCHITECT ON CALL ///
[image: 8 Bit Platoon Logo]

CELL +27 82 783 3204
EMAIL [hidden email]

WEB 8bitplatoon.com


This email is protected by our email disclaimer
<http://8bitplatoon.com/disclaimer.html>.
[image: Facebook] <https://www.facebook.com/8BitPlatoon> [image: Twitter]
<https://twitter.com/8bitplatoon> [image: LinkedIn]
<https://www.linkedin.com/company/8-bit-platoon?trk=tyah&trkInfo=idx%3A1-1-1%2CtarId%3A1425035050240%2Ctas%3A8+bit+platoon>

--


------------------------------
*Unlock Interaction*
CIC = Correspondence, Interactions & Communications


*8 BIT PLATOON disclaimer*
This e-mail transmission contains confidential information, which is the
property of EOH Holdings Limited and its subsidiaries (“EOH”). No person,
other than the recipient (so indicated by the sender) may use or disclose
the contents of this message, links or attachments hereto, to any person
whatsoever. Unauthorised disclosure and/or use may result in civil and
criminal liability.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorised to
state them to be the views of any such entity.
The disclaimer forms part of the content of this e-mail in terms of section
11 of the Electronic Communications and Transactions Act, 25 of 2002. Refer
to http://www.eoh.co.za/disclaimer 
------------------------------


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Best Sling samples for a beginner to look at?

Bertrand Delacretaz
Hi Greg,

On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard <[hidden email]> wrote:
> ...The only ones that have been touched in the last year are:
>  - Slingshot
>  - Slingbucks
>  - Fling (the one Andy mentioned) ...

I can really only speak about Slingbucks - that one is relevant and up
to date, it's a small thing but demonstrates important basic concepts.

-Bertrand
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Best Sling samples for a beginner to look at?

chrismillar
In reply to this post by Greg Fullard
Slick is very dense, but does showcase nearly everything you can do with
Sling (with zero additional bundles). Slingbucks is a good start and was
primarily what I used to learn Sling. It's based on ESP which can be a
little rough if you want to learn HTL.

If I were just starting out and wanting to learn Sling, I would…

1. Build some basic forms in plain old HTML using the Sling CRUD wiki page
[0] as your guide.

2. These forms should set properties, nested nodes, image uploads, etc.

3. Upload using WebDAV.

4. Login at [1]

5. Submit your forms.

6. Validate the results at [2]

7. Rinse and repeat.

8. Start building HTL pages that consume the properties you made via your
forms. This will be all about resourceTypes.

When you want to bump up to the next level, use the same CRUD guide, but
use the Java API combined with Sling’s excellent Eclipse Plugin / Project
builder [3].

For the next level, contribute to Slick. :-)

There’s probably a need for an “htlblog” now that HTL has matured and ships
with Sling 8 by default.

If you want to learn HTL head to the specification [4] which will be better
than any tutorial online (including my own).

[0]
https://sling.apache.org/documentation/the-sling-engine/sling-api-crud-support.html
[1] http://localhost:8080/
[2] http://localhost:8080/.explorer.html
[3] https://sling.apache.org/downloads.cgi#ide-tooling
[4]
https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Best Sling samples for a beginner to look at?

Andreas Schaefer
In reply to this post by Bertrand Delacretaz
Slingshot and Chris’ Slick are good examples as far as I can tell.

That said in Sling there are so many ways to do the same thing
that it is very difficult to figure out what is currently the best way.

Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
and not using HTL and Sling Models.

To understand what is going on you probably need to know (sooner
or later) what is in your JCR tree. For that I would recommend using
Composum (comes with Sling 9) otherwise you need to install it
into Sling 8.

I would start with generating a Sling Initial Content Bundle using the
Sling Maven Archetype. Then, as Chris mentioned, adding new
stuff to it one by one making sure you understand what is going on
in the background.

If you have questions then post them here.

Cheers - Andy Schaefer

> On Mar 28, 2017, at 1:56 AM, Bertrand Delacretaz <[hidden email]> wrote:
>
> Hi Greg,
>
> On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard <[hidden email]> wrote:
>> ...The only ones that have been touched in the last year are:
>> - Slingshot
>> - Slingbucks
>> - Fling (the one Andy mentioned) ...
>
> I can really only speak about Slingbucks - that one is relevant and up
> to date, it's a small thing but demonstrates important basic concepts.
>
> -Bertrand

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Best Sling samples for a beginner to look at?

Greg Fullard
Tx Chris, Bertrand, Andreas

I think that gives me a good starting point.

I'll keep a mini-journal of my experiences which might give some insights
into where the learning curve gets a bit steep.

Perhaps it even turns into a tutorial of sorts.

Cheers

Greg



On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. <[hidden email]>
wrote:

> Slingshot and Chris’ Slick are good examples as far as I can tell.
>
> That said in Sling there are so many ways to do the same thing
> that it is very difficult to figure out what is currently the best way.
>
> Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
> and not using HTL and Sling Models.
>
> To understand what is going on you probably need to know (sooner
> or later) what is in your JCR tree. For that I would recommend using
> Composum (comes with Sling 9) otherwise you need to install it
> into Sling 8.
>
> I would start with generating a Sling Initial Content Bundle using the
> Sling Maven Archetype. Then, as Chris mentioned, adding new
> stuff to it one by one making sure you understand what is going on
> in the background.
>
> If you have questions then post them here.
>
> Cheers - Andy Schaefer
>
> > On Mar 28, 2017, at 1:56 AM, Bertrand Delacretaz <[hidden email]>
> wrote:
> >
> > Hi Greg,
> >
> > On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard <[hidden email]>
> wrote:
> >> ...The only ones that have been touched in the last year are:
> >> - Slingshot
> >> - Slingbucks
> >> - Fling (the one Andy mentioned) ...
> >
> > I can really only speak about Slingbucks - that one is relevant and up
> > to date, it's a small thing but demonstrates important basic concepts.
> >
> > -Bertrand
>
>


--

GREG FULLARD
ARCHITECT ON CALL ///
[image: 8 Bit Platoon Logo]

CELL +27 82 783 3204
EMAIL [hidden email]

WEB 8bitplatoon.com


This email is protected by our email disclaimer
<http://8bitplatoon.com/disclaimer.html>.
[image: Facebook] <https://www.facebook.com/8BitPlatoon> [image: Twitter]
<https://twitter.com/8bitplatoon> [image: LinkedIn]
<https://www.linkedin.com/company/8-bit-platoon?trk=tyah&trkInfo=idx%3A1-1-1%2CtarId%3A1425035050240%2Ctas%3A8+bit+platoon>

--


------------------------------
*Unlock Interaction*
CIC = Correspondence, Interactions & Communications


*8 BIT PLATOON disclaimer*
This e-mail transmission contains confidential information, which is the
property of EOH Holdings Limited and its subsidiaries (“EOH”). No person,
other than the recipient (so indicated by the sender) may use or disclose
the contents of this message, links or attachments hereto, to any person
whatsoever. Unauthorised disclosure and/or use may result in civil and
criminal liability.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorised to
state them to be the views of any such entity.
The disclaimer forms part of the content of this e-mail in terms of section
11 of the Electronic Communications and Transactions Act, 25 of 2002. Refer
to http://www.eoh.co.za/disclaimer 
------------------------------


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Best Sling samples for a beginner to look at?

Vlad Bailescu
Hi Greg,

There's also Nate Yolles' Publick blog [5]

Best,
Vlad

[5] https://github.com/nateyolles/publick-sling-blog

On Wed, Mar 29, 2017 at 10:41 AM, Greg Fullard <[hidden email]>
wrote:

> Tx Chris, Bertrand, Andreas
>
> I think that gives me a good starting point.
>
> I'll keep a mini-journal of my experiences which might give some insights
> into where the learning curve gets a bit steep.
>
> Perhaps it even turns into a tutorial of sorts.
>
> Cheers
>
> Greg
>
>
>
> On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. <[hidden email]>
> wrote:
>
> > Slingshot and Chris’ Slick are good examples as far as I can tell.
> >
> > That said in Sling there are so many ways to do the same thing
> > that it is very difficult to figure out what is currently the best way.
> >
> > Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
> > and not using HTL and Sling Models.
> >
> > To understand what is going on you probably need to know (sooner
> > or later) what is in your JCR tree. For that I would recommend using
> > Composum (comes with Sling 9) otherwise you need to install it
> > into Sling 8.
> >
> > I would start with generating a Sling Initial Content Bundle using the
> > Sling Maven Archetype. Then, as Chris mentioned, adding new
> > stuff to it one by one making sure you understand what is going on
> > in the background.
> >
> > If you have questions then post them here.
> >
> > Cheers - Andy Schaefer
> >
> > > On Mar 28, 2017, at 1:56 AM, Bertrand Delacretaz <
> [hidden email]>
> > wrote:
> > >
> > > Hi Greg,
> > >
> > > On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard <[hidden email]>
> > wrote:
> > >> ...The only ones that have been touched in the last year are:
> > >> - Slingshot
> > >> - Slingbucks
> > >> - Fling (the one Andy mentioned) ...
> > >
> > > I can really only speak about Slingbucks - that one is relevant and up
> > > to date, it's a small thing but demonstrates important basic concepts.
> > >
> > > -Bertrand
> >
> >
>
>
> --
>
> GREG FULLARD
> ARCHITECT ON CALL ///
> [image: 8 Bit Platoon Logo]
>
> CELL +27 82 783 3204
> EMAIL [hidden email]
>
> WEB 8bitplatoon.com
>
>
> This email is protected by our email disclaimer
> <http://8bitplatoon.com/disclaimer.html>.
> [image: Facebook] <https://www.facebook.com/8BitPlatoon> [image: Twitter]
> <https://twitter.com/8bitplatoon> [image: LinkedIn]
> <https://www.linkedin.com/company/8-bit-platoon?trk=
> tyah&trkInfo=idx%3A1-1-1%2CtarId%3A1425035050240%2Ctas%3A8+bit+platoon>
>
> --
>
>
> ------------------------------
> *Unlock Interaction*
> CIC = Correspondence, Interactions & Communications
>
>
> *8 BIT PLATOON disclaimer*
> This e-mail transmission contains confidential information, which is the
> property of EOH Holdings Limited and its subsidiaries (“EOH”). No person,
> other than the recipient (so indicated by the sender) may use or disclose
> the contents of this message, links or attachments hereto, to any person
> whatsoever. Unauthorised disclosure and/or use may result in civil and
> criminal liability.
> Any views expressed in this message are those of the individual sender,
> except where the message states otherwise and the sender is authorised to
> state them to be the views of any such entity.
> The disclaimer forms part of the content of this e-mail in terms of section
> 11 of the Electronic Communications and Transactions Act, 25 of 2002. Refer
> to http://www.eoh.co.za/disclaimer
> ------------------------------
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Best Sling samples for a beginner to look at?

Bertrand Delacretaz
In reply to this post by Andreas Schaefer
On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. <[hidden email]> wrote:
> ...Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
> and not using HTL and Sling Models....

FWIW it's always been important for Sling to avoid imposing too much
in terms of scripting languages and let users select what works best
for them.

So although there's probably many more people using HTL and Sling
Models than ESP today, I don't think this makes ESP outdated - it's
different ways of working, for different purposes and styles.

-Bertrand
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Best Sling samples for a beginner to look at?

Jason Bailey
Bertrand,

I can't you how relieved I am to here that there is a desire to be scripting language agnostic. I hope this continues.

-----Original Message-----
From: Bertrand Delacretaz [mailto:[hidden email]]
Sent: Wednesday, March 29, 2017 6:39 AM
To: users <[hidden email]>
Subject: Re: Best Sling samples for a beginner to look at?

On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. <[hidden email]> wrote:
> ...Slingbucks is ok but it is outdated (as far as I can tell) using
> ESPs and not using HTL and Sling Models....

FWIW it's always been important for Sling to avoid imposing too much in terms of scripting languages and let users select what works best for them.

So although there's probably many more people using HTL and Sling Models than ESP today, I don't think this makes ESP outdated - it's different ways of working, for different purposes and styles.

-Bertrand
Loading...