-
Notifications
You must be signed in to change notification settings - Fork 1
Which are design patterns used?
I used Singleton design pattern for different situations where is necessary to have one instance of class shared in one app.
Magnolia permits defining module XML where you can define instations for interface and who implemented that will define singleton.
These components will be instantiated one time for the lifecycle of the app and can share the state of services reducing the number of resources.
In particular, that will be configured on boot loading app, for example, cacheService that maintains all cache for the entire life of the app, reducing time access to information.
This solution in particular it’s necessary for intensive use of reflection that simplifies a lot of implementation but can be a bottleneck when you use it widely.
As we discuss in the previous paragraph, we use intensive annotations and implement them for writing a framework for add supporting to a new source.