Posts

Showing posts with the label framework

Object Binding with remap in Java

Image
Object binding or mapping is something as old as Java. Sometimes you need to use this technique in order to isolate your core domain from your contract or with your persistence layer. It's always a good idea to have a clean and separated core.  DDD calls it an Anti-Corruption Layer . SOC(Separation of concerns) is always a good idea. As time passes Services and Services teams kind of lose that great Architectural and SOA Principles no wonder things are harder them before.  So today I want to talk a bit and show some code about a library called remap . Which provides declarative mapping. It's super easy to use and really will boost you productivity. So Let's get started!

Google Guice 3.0

Google Guice is a very interesting framework. Some folks look him as a replacement for Spring Framework . I really don't think that is the case, Spring is a great kick ass framework really big with lots of utilities like a swiss army knife. Spring have a huge ecosystem, Guice is not a replacement, IMHO I see Guice as a very lightweight simple object register dependency resolution engine.  It can be very cool and useful in some specific scenarios like coding a Android solution or even a Java web application. It's really fast and simple to use it. Guice embrace Java annotations implementing the JSR330 for Java common annotation and dependency injection annotations like @Inject, @Qualifier, @Singleton, @Named, @Scope and others. You use annotations to wire up your components & POJOs and use a simple DSL to define your object graph dependencies. This dependencies can be assemble with lots of ...