This Java software provides a straightforward solution to develop services by offering a framework that implements dependency injection. With its simple interface, users can easily create services and manage dependencies to enhance their applications.
One of the best things about Ylvi is that it uses convention over configuration to find service APIs and corresponding implementations. All you need to do is to put ylvi.jar to your classpath, initialize Ylvi, and start using it – it's that simple. To start, you should know that Ylvi services should always end with the keyword Service, and the Default keyword in a service implementation is used to mark this as the default implementation if there are more than one implementation available.
There are a few other things you need to keep in mind when using Ylvi. First, service implementations must always be singletons, and their methods have to be thread-safe. Service implementations that require additional work during start and stop of the service must implement the Startable interface.
To configure service variables, use the @Config annotation, define a default value, and use it without worrying about when and how it will be configured later. For defining a dependency to another service API, use the @Inject annotation on a variable. The correct service implementation is automatically injected and can be used in the service methods.
If there are more than one implementation, you need to provide a hint to specify what usage the implementation supports. Use the @Lazy annotation on the @Inject annotation if you have several service implementations, so you can bind the correct service implementation later. Ylvi also provides some utility methods that are useful in other projects.
Testing Ylvi services with JUnit is trivial and part of the main concept. Ylvi also offers an elegant mechanism for mocking dependent services. Lastly, Ylvi is a library that has no dependencies on other libraries, making it a useful tool for developers.
Version 1.0.111: N/A