I've inherited an aem project which has core, ui.apps, it.tests, and ui.frontend modules. The frontend is nodejs. The core module has java codes, but I don't understand what's using it. Search results for "what core module is used for" returns "Core module contains java codes".
CodePudding user response:
Typically the core module will contain Java-based services - primarily OSGi components with implementation/business logic required by the project. This could be just about anything, from custom servlets intended to directly handle user requests, to scheduled tasks, model POJOs, extensions/plugins for OOTB or third-party frameworks, and many others.
Is this module required? That's hard to answer, since it depends on the project, but generally speaking most non-trivial AEM projects will have some amount of Java implementation.
Most projects nowadays will be using a framework known as HTL (a.k.a. Sightly) which is an HTML-esque template language that can invoke Java/server-side code via special HTML attributes. If you see any Java classes that extend WCMUsePojo
, these will be providing domain logic for some front-end component(s).
If you see classes annotated with @Component
/@Service
(there are other annotations but these two are the most common) then those will be providing some kind of back-end functionality. You'd need to look at them case-by-case as they could be doing just about anything.
It really is a broad topic, and you'd be wise to read up on AEM development in general if you've inherited a project. Hopefully you also inherited a copy of AEM you can spin-up locally to familiarise yourself with the platform and your project.