java design patterns used in AEM

Avatar

Avatar
Validate 1
Level 2
srikanthg212933
Level 2

Likes

4 likes

Total Posts

37 posts

Correct reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
srikanthg212933
Level 2

Likes

4 likes

Total Posts

37 posts

Correct reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
srikanthg212933
Level 2

31-07-2020

Hi Folks,

 

I am trying to explore more on java design patterns(e.g: Factory design pattern, Singleton design pattern or etc).So As an AEM developer I have question which design pattern we mostly use in AEM related use cases(e.g: sling models with services or web services call through sling Servlet...etc) and which could be the best fit to design most of our general AEM use cases.

Let me know if there is reference I can look at it. please enlighten.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
ChitraMadan
MVP

Likes

273 likes

Total Posts

165 posts

Correct reply

67 solutions
Top badges earned
Boost 250
Establish
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 250
MVP
ChitraMadan
MVP

Likes

273 likes

Total Posts

165 posts

Correct reply

67 solutions
Top badges earned
Boost 250
Establish
Ignite 1
Give Back 5
Give Back 3
View profile
ChitraMadan
MVP

31-07-2020

Hi @srikanthg212933 ,

 

Some of the OSGI Patterns are listed here with references and sample examples

http://computepatterns.com/osgi-design-patterns/

 

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

31-07-2020

Hi @srikanthg212933,

We can use any design patterns that we like as OSGi makes CQ5 very modular, so we are free to use whatever suits our needs.Since AEM is built using OSGI, many of the design patterns for OSGI are valid.

 

Some of these design patterns are Singleton (Service), Adapter Service, Resource Adapter Service, and Whiteboard. Reference: https://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager/guides/design-pat...

 

Thanks!!