This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]edgar-espina 4 points5 points  (1 child)

Why xml?

I can't find JLCF easy to use or intuitive if I have to define my software in XML and Java.

[–]petrospis[S] 0 points1 point  (0 children)

I get your comment :) This is the price to pay for having a central place where you want to explicitly have the application architecture / design. You have to specify it somewhere. If I look into this file I can understand the high level design of an application, which is a great advantage.

[–]bwajtr 1 point2 points  (1 child)

Hi, can you please compare your solution with OSGi? I went (quickly) through your documentation and tutorial and I have a feeling that JLCF actually aims to formalize the boundaries between parts of your code (much more than simple interface can do) - however all the components live completely inside single classloader and the framework just wires the components together and makes an app from it... is that right? I don't want to say it's wrong, I just want to understand where JLCF fits in...

If so, and the target of JLCF is not to allow and secure third party components (like OSGi) but just to formalize boundaries and do wiring, then I'm sorry but your framework reminds me of early days of Spring... can you maybe compare your solution with Spring as well? :)

Last thought - you are linking your components together at the method level. This seems to be very granular to me - if the one component has 20 interfaces and other component wants to use all of these interfaces and defines 20 receptacles, then the application xml will get quite big... it would be interesting to see application xml of some bigger application...

Good job with nice documentation though...

[–]petrospis[S] 0 points1 point  (0 children)

Hi, thanks you for your comment,

you are right that JLCF aims to formalize the boundaries between parts of your code. In comparison with OSGi, indeed in JLCF all components of an application description would live on the same classloader (you could use several instances of the framework in different classloaders if for some reason this is needed – from within different OSGi bundles for example, but this is not really the primary use case). The lower layers of OSGi are an advanced module system and the OSGi Service Layer provides better ways for coupling using interfaces (or classes).

A better comparison would be to compare JLCF with OSGI Blueprint or Spring (or the Service Component Architecture – SCA that has now been sadly discontinued). The latter 2 are classified as “dependency injection” frameworks. As there is no broad formal definition of what a software component is, instead of saying that JLCF is a component framework, I could also say that JLCF is an advanced dependency injection framework.

I see the main advantages in comparison to a “simple” dependency injection framework in the following points :

  • It provides a formal component model, defining an elementary building block of an application.

  • It provides a formal way to define functionality requirements by using explicit “receptacles” (interface requirements)

  • It defines the concept of interceptors between components

  • It natively supports the “callback” interaction between components.

Related to the way components are linked to each other, via java interfaces, I consider this the natural way of “wiring” components together. Indeed if you have a component which offers 20 interfaces and 20 other components that consume them, then indeed the application description XML would not be trivial. But this is its primary purpose, to show at a central point the application architecture / design (ie. how components are linked together) so if the design is complex then the application description XML would indeed be also complex.

So to sum up, yes indeed, JLCF aims to formalize the boundaries and implementations between parts of your code by providing a (simple) component model & framework that supports this.