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

Deep diving into Sling models PT2 | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Deep diving into Sling models PT2 by Digitalum

Abstract

Part 2: How to properly annotate your Sling models
There are two types of developers in this world: those who care about clean code and those who don’t. I like to believe that I’m part of that first group.

Throughout the projects that I’ve worked on, I’ve often seen some mad things in source code that I believe is the result of developers being either extremely lazy or not knowing any better due to a lack of knowledge/training. Here is a list of things I believe to be wrong when you create Sling models:
1. Set the defaultInjectionStrategy to optional
2. Use both SlingHttpServletRequest and Resource as adaptables
3. Use @Inject everywhere
4. No name added to the property using @Named

Read Full Blog

Deep diving into Sling models PT2

Q&A

Please use this thread to ask the related questions.

Topics

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

0 Replies