내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

java design patterns used in AEM

Avatar

Level 3

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.

 

 

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @srikanthg212933 ,

 

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

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

 

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @srikanthg212933 ,

 

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

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

 

Avatar

Employee

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!!

Avatar

Level 7

This is good question or thread ...

 

Want to hear more on that ..

 

My views :

 

Singleton desgin pattern can be used in aem as well like if you want to do storing or acching any thing in object 

Any how Services in AEM is singletonclasses only .

 

Factory Desgin pattern --> Any use case where we can use this in AEM Prespective ?