The main reason for LIFERAY to move into module framework is,
- Creating small modules (Tightly coupled)
- Publish and consume other modules features (Inflexible)
- Working without static dependencies (Dynamic dependencies)
To use module framework,
You mainly need to understand below 3 concepts :
- Modules
- Components
- Application Lifecycle
Module:
Module is something which is group of Java classes, other optional resources, and a MANIFEST.MF file, packaged together as into a single JAR file. Liferay 7 uses three modules/bundles.
Modules can have multiple components.
Component:
Component is nothing but implementation of interface like the way we were doing with *LocalServiceImpl class in older fashion. So here what you need to do is, you just will have to load components through annotations in implementation class.These loaded/declared components would be part of modules.
Here Lifecycle of modules and component will be handled through Liferay's OSGi based module framework.