Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Sling Model | AEM Community Blog Seeding




Sling Model by Techinnovia



After reading this article, you should have an

Understand of Sling Models
Benefits of Sling Models
Understand how to use Sling Models in an HTL template
Development Goals

Sling Models are available since AEM 6.0 but can also be installed in CQ 5.6.1.
Main advantages of using Sling Models are

You can write your code based on design patterns. If you use Sling Models you can remove all business logic from JSP and do not scriplets.

It’s easier to test Sling Models, because they are Java classes and can be covered with unit test. Also, it’s easier to add logging.

Costs for introducing of new developers are lower And development is faster.
What is Sling Models? – Old Approach

public class OldModel {
private String title;
private String decription;
public String getTitle(){ ... }
public void setTitle(String title){ ... }
public String getDescription(){ ... }
public void setDescription(String description){ ... }

Let’s get familiar with the life before Sling Models. Let’s look at this eg. Let’s say you need to Adapt a resource to the class which has number of properties, such as title & description for that we need to create a Java bean with private fields, getters & setters.

Read Full Blog

Sling Model


Please use this thread to ask the related questions.


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies