ScalaModules is an elegant and intuitive domain specific language for OSGi development written in the Scala programming language.
In this podcast, Neil Bartlett examines the differences between java and scala osgi implementations. He also shared his views on the advantages of scalamodules for osgi.
5. Dr Alan Kay
“OOP to me means only
messaging, local
retention and protection
and hiding of state-
process, and extreme
late-binding of all things.”
6. Late Binding with
Services
• Services answer the question:where do I
get an implementation of this interface?
• The registry decentralises the architecture.
55. Java
ServiceTracker tracker = new ServiceTracker(context, Greeting.class.getName(),
new ServiceTrackerCustomizer() {
public Object addingService(ServiceReference reference) {
Greeting greeting = (Greeting) context.getService(reference);
ServiceRegistration reg = context.registerService(IFoo.class.getName(),
new Foo(greeting), null);
return reg;
}
public void modifiedService(ServiceReference reference, Object service) {
}
public void removedService(ServiceReference reference, Object service) {
ServiceRegistration reg = (ServiceRegistration) service;
reg.unregister();
}
});
56. ScalaModules
val greetingTrack = context track classOf[Greeting] on {
case Adding(greeting) => context createService (classOf[IFoo],
new Foo(greeting))
case Removed(_, reg) => reg unregister
}
57. Plan
• Started moving the code & docs to Eclipse
• 19 March: M1
• 7 May: M2
• 28 May: RC1
• 11 June: RC2
• 23 June: ScalaModules 2.0 Release &
Graduation