You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Óscar Bou - GOVERTIS <o....@govertis.com> on 2017/01/19 11:44:57 UTC

Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Hi all.

I’m sure the Isis Domain meta-model can add a lot of value to Domains developed in another frameworks.

It’s different from reflection in the way it allows you to determine, for example:
- which public methods are effectively domain actions.
- which Java properties should be considered “Domain” properties.
- which actions or properties are available depending on the business logic.
- etc.

And all that with the ability to properly test it.

Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the JDO-based persistence, the custom injection mechanism, …

But I’m pretty sure it could be really useful when using other platforms/frameworks.

Do you agree?

How should we quantify the tasks and effort?


Cheers,

Oscar






Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Feb 2, 2017 at 12:37 AM, Óscar Bou - GOVERTIS <o....@govertis.com>
wrote:

>
> You guessed !!! ha ha ha !!
>
> I’m closely monitoring your Twitter activity, more than Putin & Trump
> altogether !!! xD xD
>
> Avoiding that anemic Domain would be the goal here, and Apache Isis comes
> to the rescue !!
>
> Where do you consider should be the best place to initialize the Isis
> metamodel as Dan pointed out?
> Inside a filter?
> Perhaps there are more Spring-specific candidates, such as a custom
> @Component on a new isis-spring jar, to use it for Spring webapps, testing,
> etc. ?
>

I think the best would be to create a Bean for this.
This way you have a lot of flexibility.
- do it eagerly: @Bean public MyClass isisMetaModel(Dependency1 d1,
Depencency2 d2, ...) {return new MyClass().doTheWork();}
- do it when all the beans are initialized: MyClass#postConstruct()
- or even org.springframework.beans.factory.config.BeanPostProcessor
/ org.springframework.beans.factory.config.BeanFactoryPostProcessor

isis-spring.jar would provide all beans that an application may need.
isis-spring-boot-starter.jar could provide @EnableIsis to do the default
auto-configuration


>
>
> Will take a look at MVC Reactive.
>
> Thanks!
>
>
>
>
>
> El 1 feb 2017, a las 15:45, Martin Grigorov <mg...@apache.org>
> escribió:
>
> Hi Oscar,
>
> How do you know that I use Spring Boot at the moment ? Do you have access
> to my laptop ?! :-)
> OK, I guess you have seen some retweets by me! :-)
>
> Spring Boot provides the autoconfiguration of your application based on
> the jars available in the classpath, your config settings
> (application[-profile].yaml) and custom @Configuration's and @Component's.
> The real work would be done by Spring Data, I imagine. But my experience
> with Spring Data is that the domain object is anemic and the logic is in
> the repository class (generated, most of the time). The contrary of what
> Isis promotes.
> Spring Data REST could replace the Restful viewer.
> Obviously Spring could replace Guice for dependency injection.
> Latest version of Hibernate-Search provides good integration with
> Elasticsearch. I remember this being discussed few times here.
> Spring Boot also provides nice monitoring endpoints, the Actuators. One
> can use them for health checks, metrics, runtime reconfiguration, ...
> There are many goodies!
>
> Instead of Play I'd explore Spring MVC Reactive (still in development for
> Spring 5, so you need to use Spring Boot 2.0 milestones)
>
> Let me know if you have more specific question!
>
> Cheers!
> Martin
>
> On Wed, Feb 1, 2017 at 12:31 PM, Óscar Bou <al...@gmail.com> wrote:
>
>>
>> Yes ..!!!  xD xD xD
>>
>> Just planning to explore Boot and Play, and missing my beloved Domain
>> metamodel !!!
>>
>> If you want to guide me I’ll be more than delighted ;)
>>
>>
>> Martin seems to be actively working with Boot currently also.
>>
>> @Martin
>> Any comments about what could we used this with Boot?
>>
>>
>> Thanks!
>>
>>
>>
>> El 1 feb 2017, a las 10:47, Dan Haywood <da...@haywood-associates.co.uk>
>> escribió:
>>
>> When you say "let's", are you volunteering? :-)  I'd like to see the
>> output of this.
>>
>> I've just committed to do a mini-book for InfoQ over the next few months;
>> I could see that this would make a nice topic to include?
>>
>> D
>>
>> On Wed, 1 Feb 2017 at 09:30 Óscar Bou - GOVERTIS <o....@govertis.com>
>> wrote:
>>
>>> Hi Dan,
>>>
>>> Thanks for pointing me there.
>>>
>>> It would be really nice to have all metamodel info. available on Spring
>>> Boot, for example.
>>>
>>> The Services Injector, in your taxonomy, should correspond to the
>>> runtime, so it should be a responsibility of Spring Boot.
>>> If Isis need it for its own runtime, a Spring-based implementation would
>>> be needed.
>>>
>>> But I was just trying to know if it would be possible to have a Domain
>>> Metamodel, and seems feasible.
>>>
>>> Let’s explore it.
>>>
>>> Thanks!
>>>
>>>
>>>
>>> El 1 feb 2017, a las 1:04, Dan Haywood <da...@haywood-associates.co.uk>
>>> escribió:
>>>
>>> Hi Oscar,
>>>
>>> One can think of the framework as breaking into two:
>>> - the metamodel  ... Isis' reflection stuff, cf java.lang.Class
>>> - the runtime  ... Isis' object mgmt stuff, leaning heavily on
>>> JDO/DataNucleus, cf java.lang.Object.
>>>
>>> The metamodel piece is relatively decoupled from the runtime piece, so it
>>> should be fairly easy to embed it.
>>>
>>> In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
>>> see the code:
>>>
>>>        final AppManifest manifest =
>>> InstanceUtil.createInstance(this.appManifest, AppManifest.class);
>>>
>>>        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
>>> IsisSessionFactoryBuilder(manifest);
>>>        IsisSessionFactory isisSessionFactory =
>>> isisSessionFactoryBuilder.buildSessionFactory();
>>>
>>> from which you can call:
>>>
>>>        final SpecificationLoader specificationLoader =
>>> isisSessionFactory.getSpecificationLoader();
>>>        final ServicesInjector servicesInjector =
>>> isisSessionFactory.getServicesInjector();
>>>
>>> The SpecificationLoader is the internal (private) API to the entire
>>> metamodel.
>>>
>>> The ServicesInjector can be used to inject services into any arbitrary
>>> object (annotated with @javax.inject.Inject).  One caveat: some services
>>> are implemented by the runtime, which probably won't be available.
>>>
>>> These are all basically singletons.
>>>
>>> Probably the easiest thing to do is to write a simple servlet or Spring
>>> boot app, then embed the above code somewhere in the bootstrapping, and
>>> see
>>> how you get on.
>>>
>>> HTH
>>> Dan
>>>
>>>
>>>
>>> On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o....@govertis.com>
>>> wrote:
>>>
>>>
>>> Hi all.
>>>
>>> I’m sure the Isis Domain meta-model can add a lot of value to Domains
>>> developed in another frameworks.
>>>
>>> It’s different from reflection in the way it allows you to determine, for
>>> example:
>>> - which public methods are effectively domain actions.
>>> - which Java properties should be considered “Domain” properties.
>>> - which actions or properties are available depending on the business
>>> logic.
>>> - etc.
>>>
>>> And all that with the ability to properly test it.
>>>
>>> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
>>> JDO-based persistence, the custom injection mechanism, …
>>>
>>> But I’m pretty sure it could be really useful when using other
>>> platforms/frameworks.
>>>
>>> Do you agree?
>>>
>>> How should we quantify the tasks and effort?
>>>
>>>
>>> Cheers,
>>>
>>> Oscar
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Óscar Bou Bou
>>> Socio - IT & GRC Management Services Director
>>> m: +34 620 267 520 <+34%20620%2026%2075%2020>
>>> s:  <http://www.govertis.com/>www.govertis.com e: o.bou@govertis.com
>>>
>>> LinkedIn: https://www.linkedin.com/in/oscarbou
>>> Twitter:  @oscarbou <https://twitter.com/oscarbou>
>>>
>>>
>>>
>>> Este mensaje y los ficheros anexos son confidenciales. Los mismos
>>> contienen información reservada que no puede ser difundida. Si usted ha
>>> recibido este correo por error, tenga la amabilidad de eliminarlo de su
>>> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
>>> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
>>>
>>> Su dirección de correo electrónico junto a sus datos personales constan
>>> en un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya
>>> finalidad es la de mantener el contacto con Ud. Si quiere saber de qué
>>> información disponemos de Ud., modificarla, y en su caso, cancelarla, puede
>>> hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su
>>> D.N.I. a la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda
>>> Cortes Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la
>>> Castellana, 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar
>>> que este mensaje o sus archivos adjuntos no contengan virus informáticos, y
>>> en caso que los tuvieran eliminarlos.
>>>
>>>
>>
>
>
> Óscar Bou Bou
> Socio - IT & GRC Management Services Director
> m: +34 620 267 520 <+34%20620%2026%2075%2020>
> s:  <http://www.govertis.com>www.govertis.com e: o.bou@govertis.com
>
> LinkedIn: https://www.linkedin.com/in/oscarbou
> Twitter:  @oscarbou <https://twitter.com/oscarbou>
>
>
>
> Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
>
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad
> es la de mantener el contacto con Ud. Si quiere saber de qué información
> disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo
> enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a
> la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes
> Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana,
> 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este
> mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso
> que los tuvieran eliminarlos.
>
>

Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Óscar Bou - GOVERTIS <o....@govertis.com>.
You guessed !!! ha ha ha !! 

I’m closely monitoring your Twitter activity, more than Putin & Trump altogether !!! xD xD

Avoiding that anemic Domain would be the goal here, and Apache Isis comes to the rescue !!

Where do you consider should be the best place to initialize the Isis metamodel as Dan pointed out? 
Inside a filter? 
Perhaps there are more Spring-specific candidates, such as a custom @Component on a new isis-spring jar, to use it for Spring webapps, testing, etc. ?


Will take a look at MVC Reactive. 

Thanks!





> El 1 feb 2017, a las 15:45, Martin Grigorov <mg...@apache.org> escribió:
> 
> Hi Oscar,
> 
> How do you know that I use Spring Boot at the moment ? Do you have access to my laptop ?! :-)
> OK, I guess you have seen some retweets by me! :-)
> 
> Spring Boot provides the autoconfiguration of your application based on the jars available in the classpath, your config settings (application[-profile].yaml) and custom @Configuration's and @Component's.
> The real work would be done by Spring Data, I imagine. But my experience with Spring Data is that the domain object is anemic and the logic is in the repository class (generated, most of the time). The contrary of what Isis promotes.
> Spring Data REST could replace the Restful viewer.
> Obviously Spring could replace Guice for dependency injection.
> Latest version of Hibernate-Search provides good integration with Elasticsearch. I remember this being discussed few times here.
> Spring Boot also provides nice monitoring endpoints, the Actuators. One can use them for health checks, metrics, runtime reconfiguration, ...
> There are many goodies!
> 
> Instead of Play I'd explore Spring MVC Reactive (still in development for Spring 5, so you need to use Spring Boot 2.0 milestones)
> 
> Let me know if you have more specific question!
> 
> Cheers!
> Martin
> 
> On Wed, Feb 1, 2017 at 12:31 PM, Óscar Bou <altairpolar@gmail.com <ma...@gmail.com>> wrote:
> 
> Yes ..!!!  xD xD xD 
> 
> Just planning to explore Boot and Play, and missing my beloved Domain metamodel !!!
> 
> If you want to guide me I’ll be more than delighted ;)
> 
> 
> Martin seems to be actively working with Boot currently also. 
> 
> @Martin
> Any comments about what could we used this with Boot?
> 
> 
> Thanks!
> 
> 
> 
>> El 1 feb 2017, a las 10:47, Dan Haywood <dan@haywood-associates.co.uk <ma...@haywood-associates.co.uk>> escribió:
>> 
>> When you say "let's", are you volunteering? :-)  I'd like to see the output of this.
>> 
>> I've just committed to do a mini-book for InfoQ over the next few months; I could see that this would make a nice topic to include?
>> 
>> D
>> 
>> On Wed, 1 Feb 2017 at 09:30 Óscar Bou - GOVERTIS <o.bou@govertis.com <ma...@govertis.com>> wrote:
>> Hi Dan,
>> 
>> Thanks for pointing me there.
>> 
>> It would be really nice to have all metamodel info. available on Spring Boot, for example.
>> 
>> The Services Injector, in your taxonomy, should correspond to the runtime, so it should be a responsibility of Spring Boot.
>> If Isis need it for its own runtime, a Spring-based implementation would be needed.
>> 
>> But I was just trying to know if it would be possible to have a Domain Metamodel, and seems feasible.
>> 
>> Let’s explore it.
>> 
>> Thanks!
>> 
>> 
>> 
>>> El 1 feb 2017, a las 1:04, Dan Haywood <dan@haywood-associates.co.uk <ma...@haywood-associates.co.uk>> escribió:
>>> 
>>> Hi Oscar,
>>> 
>>> One can think of the framework as breaking into two:
>>> - the metamodel  ... Isis' reflection stuff, cf java.lang.Class
>>> - the runtime  ... Isis' object mgmt stuff, leaning heavily on
>>> JDO/DataNucleus, cf java.lang.Object.
>>> 
>>> The metamodel piece is relatively decoupled from the runtime piece, so it
>>> should be fairly easy to embed it.
>>> 
>>> In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
>>> see the code:
>>> 
>>>        final AppManifest manifest =
>>> InstanceUtil.createInstance(this.appManifest, AppManifest.class);
>>> 
>>>        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
>>> IsisSessionFactoryBuilder(manifest);
>>>        IsisSessionFactory isisSessionFactory =
>>> isisSessionFactoryBuilder.buildSessionFactory();
>>> 
>>> from which you can call:
>>> 
>>>        final SpecificationLoader specificationLoader =
>>> isisSessionFactory.getSpecificationLoader();
>>>        final ServicesInjector servicesInjector =
>>> isisSessionFactory.getServicesInjector();
>>> 
>>> The SpecificationLoader is the internal (private) API to the entire
>>> metamodel.
>>> 
>>> The ServicesInjector can be used to inject services into any arbitrary
>>> object (annotated with @javax.inject.Inject).  One caveat: some services
>>> are implemented by the runtime, which probably won't be available.
>>> 
>>> These are all basically singletons.
>>> 
>>> Probably the easiest thing to do is to write a simple servlet or Spring
>>> boot app, then embed the above code somewhere in the bootstrapping, and see
>>> how you get on.
>>> 
>>> HTH
>>> Dan
>>> 
>>> 
>>> 
>>> On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o.bou@govertis.com <ma...@govertis.com>>
>>> wrote:
>>> 
>>>> 
>>>> Hi all.
>>>> 
>>>> I’m sure the Isis Domain meta-model can add a lot of value to Domains
>>>> developed in another frameworks.
>>>> 
>>>> It’s different from reflection in the way it allows you to determine, for
>>>> example:
>>>> - which public methods are effectively domain actions.
>>>> - which Java properties should be considered “Domain” properties.
>>>> - which actions or properties are available depending on the business
>>>> logic.
>>>> - etc.
>>>> 
>>>> And all that with the ability to properly test it.
>>>> 
>>>> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
>>>> JDO-based persistence, the custom injection mechanism, …
>>>> 
>>>> But I’m pretty sure it could be really useful when using other
>>>> platforms/frameworks.
>>>> 
>>>> Do you agree?
>>>> 
>>>> How should we quantify the tasks and effort?
>>>> 
>>>> 
>>>> Cheers,
>>>> 
>>>> Oscar
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 
>> 
>> 
>> Óscar Bou Bou
>> Socio - IT & GRC Management Services Director
>> m: +34 620 267 520 <tel:+34%20620%2026%2075%2020>
>> s:  <http://www.govertis.com/>www.govertis.com <http://www.govertis.com/> e: o.bou@govertis.com <ma...@govertis.com>
>> 
>> LinkedIn: https://www.linkedin.com/in/oscarbou <https://www.linkedin.com/in/oscarbou>
>> Twitter: 	@oscarbou <https://twitter.com/oscarbou>
>> 
>> 
>> 
>> Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
>> 
>> Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana, 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
>> 
>> 
> 
> 



Óscar Bou Bou
Socio - IT & GRC Management Services Director
m: +34 620 267 520
s:  <http://www.govertis.com/>www.govertis.com <http://www.govertis.com/> e: o.bou@govertis.com <ma...@govertis.com>

LinkedIn: https://www.linkedin.com/in/oscarbou <https://www.linkedin.com/in/oscarbou>
Twitter: 	@oscarbou <https://twitter.com/oscarbou>



Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.

Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana, 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.



Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Martin Grigorov <mg...@apache.org>.
Hi Oscar,

How do you know that I use Spring Boot at the moment ? Do you have access
to my laptop ?! :-)
OK, I guess you have seen some retweets by me! :-)

Spring Boot provides the autoconfiguration of your application based on the
jars available in the classpath, your config settings
(application[-profile].yaml) and custom @Configuration's and @Component's.
The real work would be done by Spring Data, I imagine. But my experience
with Spring Data is that the domain object is anemic and the logic is in
the repository class (generated, most of the time). The contrary of what
Isis promotes.
Spring Data REST could replace the Restful viewer.
Obviously Spring could replace Guice for dependency injection.
Latest version of Hibernate-Search provides good integration with
Elasticsearch. I remember this being discussed few times here.
Spring Boot also provides nice monitoring endpoints, the Actuators. One can
use them for health checks, metrics, runtime reconfiguration, ...
There are many goodies!

Instead of Play I'd explore Spring MVC Reactive (still in development for
Spring 5, so you need to use Spring Boot 2.0 milestones)

Let me know if you have more specific question!

Cheers!
Martin

On Wed, Feb 1, 2017 at 12:31 PM, Óscar Bou <al...@gmail.com> wrote:

>
> Yes ..!!!  xD xD xD
>
> Just planning to explore Boot and Play, and missing my beloved Domain
> metamodel !!!
>
> If you want to guide me I’ll be more than delighted ;)
>
>
> Martin seems to be actively working with Boot currently also.
>
> @Martin
> Any comments about what could we used this with Boot?
>
>
> Thanks!
>
>
>
> El 1 feb 2017, a las 10:47, Dan Haywood <da...@haywood-associates.co.uk>
> escribió:
>
> When you say "let's", are you volunteering? :-)  I'd like to see the
> output of this.
>
> I've just committed to do a mini-book for InfoQ over the next few months;
> I could see that this would make a nice topic to include?
>
> D
>
> On Wed, 1 Feb 2017 at 09:30 Óscar Bou - GOVERTIS <o....@govertis.com>
> wrote:
>
>> Hi Dan,
>>
>> Thanks for pointing me there.
>>
>> It would be really nice to have all metamodel info. available on Spring
>> Boot, for example.
>>
>> The Services Injector, in your taxonomy, should correspond to the
>> runtime, so it should be a responsibility of Spring Boot.
>> If Isis need it for its own runtime, a Spring-based implementation would
>> be needed.
>>
>> But I was just trying to know if it would be possible to have a Domain
>> Metamodel, and seems feasible.
>>
>> Let’s explore it.
>>
>> Thanks!
>>
>>
>>
>> El 1 feb 2017, a las 1:04, Dan Haywood <da...@haywood-associates.co.uk>
>> escribió:
>>
>> Hi Oscar,
>>
>> One can think of the framework as breaking into two:
>> - the metamodel  ... Isis' reflection stuff, cf java.lang.Class
>> - the runtime  ... Isis' object mgmt stuff, leaning heavily on
>> JDO/DataNucleus, cf java.lang.Object.
>>
>> The metamodel piece is relatively decoupled from the runtime piece, so it
>> should be fairly easy to embed it.
>>
>> In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
>> see the code:
>>
>>        final AppManifest manifest =
>> InstanceUtil.createInstance(this.appManifest, AppManifest.class);
>>
>>        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
>> IsisSessionFactoryBuilder(manifest);
>>        IsisSessionFactory isisSessionFactory =
>> isisSessionFactoryBuilder.buildSessionFactory();
>>
>> from which you can call:
>>
>>        final SpecificationLoader specificationLoader =
>> isisSessionFactory.getSpecificationLoader();
>>        final ServicesInjector servicesInjector =
>> isisSessionFactory.getServicesInjector();
>>
>> The SpecificationLoader is the internal (private) API to the entire
>> metamodel.
>>
>> The ServicesInjector can be used to inject services into any arbitrary
>> object (annotated with @javax.inject.Inject).  One caveat: some services
>> are implemented by the runtime, which probably won't be available.
>>
>> These are all basically singletons.
>>
>> Probably the easiest thing to do is to write a simple servlet or Spring
>> boot app, then embed the above code somewhere in the bootstrapping, and
>> see
>> how you get on.
>>
>> HTH
>> Dan
>>
>>
>>
>> On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o....@govertis.com>
>> wrote:
>>
>>
>> Hi all.
>>
>> I’m sure the Isis Domain meta-model can add a lot of value to Domains
>> developed in another frameworks.
>>
>> It’s different from reflection in the way it allows you to determine, for
>> example:
>> - which public methods are effectively domain actions.
>> - which Java properties should be considered “Domain” properties.
>> - which actions or properties are available depending on the business
>> logic.
>> - etc.
>>
>> And all that with the ability to properly test it.
>>
>> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
>> JDO-based persistence, the custom injection mechanism, …
>>
>> But I’m pretty sure it could be really useful when using other
>> platforms/frameworks.
>>
>> Do you agree?
>>
>> How should we quantify the tasks and effort?
>>
>>
>> Cheers,
>>
>> Oscar
>>
>>
>>
>>
>>
>>
>>
>>
>> Óscar Bou Bou
>> Socio - IT & GRC Management Services Director
>> m: +34 620 267 520 <+34%20620%2026%2075%2020>
>> s:  <http://www.govertis.com/>www.govertis.com e: o.bou@govertis.com
>>
>> LinkedIn: https://www.linkedin.com/in/oscarbou
>> Twitter:  @oscarbou <https://twitter.com/oscarbou>
>>
>>
>>
>> Este mensaje y los ficheros anexos son confidenciales. Los mismos
>> contienen información reservada que no puede ser difundida. Si usted ha
>> recibido este correo por error, tenga la amabilidad de eliminarlo de su
>> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
>> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
>>
>> Su dirección de correo electrónico junto a sus datos personales constan
>> en un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya
>> finalidad es la de mantener el contacto con Ud. Si quiere saber de qué
>> información disponemos de Ud., modificarla, y en su caso, cancelarla, puede
>> hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su
>> D.N.I. a la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda
>> Cortes Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la
>> Castellana, 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar
>> que este mensaje o sus archivos adjuntos no contengan virus informáticos, y
>> en caso que los tuvieran eliminarlos.
>>
>>
>

Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Óscar Bou <al...@gmail.com>.
Yes ..!!!  xD xD xD 

Just planning to explore Boot and Play, and missing my beloved Domain metamodel !!!

If you want to guide me I’ll be more than delighted ;)


Martin seems to be actively working with Boot currently also. 

@Martin
Any comments about what could we used this with Boot?


Thanks!



> El 1 feb 2017, a las 10:47, Dan Haywood <da...@haywood-associates.co.uk> escribió:
> 
> When you say "let's", are you volunteering? :-)  I'd like to see the output of this.
> 
> I've just committed to do a mini-book for InfoQ over the next few months; I could see that this would make a nice topic to include?
> 
> D
> 
> On Wed, 1 Feb 2017 at 09:30 Óscar Bou - GOVERTIS <o.bou@govertis.com <ma...@govertis.com>> wrote:
> Hi Dan,
> 
> Thanks for pointing me there.
> 
> It would be really nice to have all metamodel info. available on Spring Boot, for example.
> 
> The Services Injector, in your taxonomy, should correspond to the runtime, so it should be a responsibility of Spring Boot.
> If Isis need it for its own runtime, a Spring-based implementation would be needed.
> 
> But I was just trying to know if it would be possible to have a Domain Metamodel, and seems feasible.
> 
> Let’s explore it.
> 
> Thanks!
> 
> 
> 
>> El 1 feb 2017, a las 1:04, Dan Haywood <dan@haywood-associates.co.uk <ma...@haywood-associates.co.uk>> escribió:
>> 
>> Hi Oscar,
>> 
>> One can think of the framework as breaking into two:
>> - the metamodel  ... Isis' reflection stuff, cf java.lang.Class
>> - the runtime  ... Isis' object mgmt stuff, leaning heavily on
>> JDO/DataNucleus, cf java.lang.Object.
>> 
>> The metamodel piece is relatively decoupled from the runtime piece, so it
>> should be fairly easy to embed it.
>> 
>> In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
>> see the code:
>> 
>>        final AppManifest manifest =
>> InstanceUtil.createInstance(this.appManifest, AppManifest.class);
>> 
>>        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
>> IsisSessionFactoryBuilder(manifest);
>>        IsisSessionFactory isisSessionFactory =
>> isisSessionFactoryBuilder.buildSessionFactory();
>> 
>> from which you can call:
>> 
>>        final SpecificationLoader specificationLoader =
>> isisSessionFactory.getSpecificationLoader();
>>        final ServicesInjector servicesInjector =
>> isisSessionFactory.getServicesInjector();
>> 
>> The SpecificationLoader is the internal (private) API to the entire
>> metamodel.
>> 
>> The ServicesInjector can be used to inject services into any arbitrary
>> object (annotated with @javax.inject.Inject).  One caveat: some services
>> are implemented by the runtime, which probably won't be available.
>> 
>> These are all basically singletons.
>> 
>> Probably the easiest thing to do is to write a simple servlet or Spring
>> boot app, then embed the above code somewhere in the bootstrapping, and see
>> how you get on.
>> 
>> HTH
>> Dan
>> 
>> 
>> 
>> On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o.bou@govertis.com <ma...@govertis.com>>
>> wrote:
>> 
>>> 
>>> Hi all.
>>> 
>>> I’m sure the Isis Domain meta-model can add a lot of value to Domains
>>> developed in another frameworks.
>>> 
>>> It’s different from reflection in the way it allows you to determine, for
>>> example:
>>> - which public methods are effectively domain actions.
>>> - which Java properties should be considered “Domain” properties.
>>> - which actions or properties are available depending on the business
>>> logic.
>>> - etc.
>>> 
>>> And all that with the ability to properly test it.
>>> 
>>> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
>>> JDO-based persistence, the custom injection mechanism, …
>>> 
>>> But I’m pretty sure it could be really useful when using other
>>> platforms/frameworks.
>>> 
>>> Do you agree?
>>> 
>>> How should we quantify the tasks and effort?
>>> 
>>> 
>>> Cheers,
>>> 
>>> Oscar
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
> 
> 
> 
> Óscar Bou Bou
> Socio - IT & GRC Management Services Director
> m: +34 620 267 520 <tel:+34%20620%2026%2075%2020>
> s:  <http://www.govertis.com/>www.govertis.com <http://www.govertis.com/> e: o.bou@govertis.com <ma...@govertis.com>
> 
> LinkedIn: https://www.linkedin.com/in/oscarbou <https://www.linkedin.com/in/oscarbou>
> Twitter: 	@oscarbou <https://twitter.com/oscarbou>
> 
> 
> 
> Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> 
> Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana, 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
> 
> 


Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
When you say "let's", are you volunteering? :-)  I'd like to see the output
of this.

I've just committed to do a mini-book for InfoQ over the next few months; I
could see that this would make a nice topic to include?

D

On Wed, 1 Feb 2017 at 09:30 Óscar Bou - GOVERTIS <o....@govertis.com> wrote:

> Hi Dan,
>
> Thanks for pointing me there.
>
> It would be really nice to have all metamodel info. available on Spring
> Boot, for example.
>
> The Services Injector, in your taxonomy, should correspond to the runtime,
> so it should be a responsibility of Spring Boot.
> If Isis need it for its own runtime, a Spring-based implementation would
> be needed.
>
> But I was just trying to know if it would be possible to have a Domain
> Metamodel, and seems feasible.
>
> Let’s explore it.
>
> Thanks!
>
>
>
> El 1 feb 2017, a las 1:04, Dan Haywood <da...@haywood-associates.co.uk>
> escribió:
>
> Hi Oscar,
>
> One can think of the framework as breaking into two:
> - the metamodel  ... Isis' reflection stuff, cf java.lang.Class
> - the runtime  ... Isis' object mgmt stuff, leaning heavily on
> JDO/DataNucleus, cf java.lang.Object.
>
> The metamodel piece is relatively decoupled from the runtime piece, so it
> should be fairly easy to embed it.
>
> In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
> see the code:
>
>        final AppManifest manifest =
> InstanceUtil.createInstance(this.appManifest, AppManifest.class);
>
>        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
> IsisSessionFactoryBuilder(manifest);
>        IsisSessionFactory isisSessionFactory =
> isisSessionFactoryBuilder.buildSessionFactory();
>
> from which you can call:
>
>        final SpecificationLoader specificationLoader =
> isisSessionFactory.getSpecificationLoader();
>        final ServicesInjector servicesInjector =
> isisSessionFactory.getServicesInjector();
>
> The SpecificationLoader is the internal (private) API to the entire
> metamodel.
>
> The ServicesInjector can be used to inject services into any arbitrary
> object (annotated with @javax.inject.Inject).  One caveat: some services
> are implemented by the runtime, which probably won't be available.
>
> These are all basically singletons.
>
> Probably the easiest thing to do is to write a simple servlet or Spring
> boot app, then embed the above code somewhere in the bootstrapping, and see
> how you get on.
>
> HTH
> Dan
>
>
>
> On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o....@govertis.com>
> wrote:
>
>
> Hi all.
>
> I’m sure the Isis Domain meta-model can add a lot of value to Domains
> developed in another frameworks.
>
> It’s different from reflection in the way it allows you to determine, for
> example:
> - which public methods are effectively domain actions.
> - which Java properties should be considered “Domain” properties.
> - which actions or properties are available depending on the business
> logic.
> - etc.
>
> And all that with the ability to properly test it.
>
> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
> JDO-based persistence, the custom injection mechanism, …
>
> But I’m pretty sure it could be really useful when using other
> platforms/frameworks.
>
> Do you agree?
>
> How should we quantify the tasks and effort?
>
>
> Cheers,
>
> Oscar
>
>
>
>
>
>
>
>
> Óscar Bou Bou
> Socio - IT & GRC Management Services Director
> m: +34 620 267 520 <+34%20620%2026%2075%2020>
> s:  <http://www.govertis.com>www.govertis.com e: o.bou@govertis.com
>
> LinkedIn: https://www.linkedin.com/in/oscarbou
> Twitter:  @oscarbou <https://twitter.com/oscarbou>
>
>
>
> Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
>
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad
> es la de mantener el contacto con Ud. Si quiere saber de qué información
> disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo
> enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a
> la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes
> Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana,
> 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este
> mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso
> que los tuvieran eliminarlos.
>
>

Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Óscar Bou - GOVERTIS <o....@govertis.com>.
Hi Dan,

Thanks for pointing me there.

It would be really nice to have all metamodel info. available on Spring Boot, for example.

The Services Injector, in your taxonomy, should correspond to the runtime, so it should be a responsibility of Spring Boot.
If Isis need it for its own runtime, a Spring-based implementation would be needed.

But I was just trying to know if it would be possible to have a Domain Metamodel, and seems feasible.

Let’s explore it.

Thanks!



> El 1 feb 2017, a las 1:04, Dan Haywood <da...@haywood-associates.co.uk> escribió:
> 
> Hi Oscar,
> 
> One can think of the framework as breaking into two:
> - the metamodel  ... Isis' reflection stuff, cf java.lang.Class
> - the runtime  ... Isis' object mgmt stuff, leaning heavily on
> JDO/DataNucleus, cf java.lang.Object.
> 
> The metamodel piece is relatively decoupled from the runtime piece, so it
> should be fairly easy to embed it.
> 
> In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
> see the code:
> 
>        final AppManifest manifest =
> InstanceUtil.createInstance(this.appManifest, AppManifest.class);
> 
>        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
> IsisSessionFactoryBuilder(manifest);
>        IsisSessionFactory isisSessionFactory =
> isisSessionFactoryBuilder.buildSessionFactory();
> 
> from which you can call:
> 
>        final SpecificationLoader specificationLoader =
> isisSessionFactory.getSpecificationLoader();
>        final ServicesInjector servicesInjector =
> isisSessionFactory.getServicesInjector();
> 
> The SpecificationLoader is the internal (private) API to the entire
> metamodel.
> 
> The ServicesInjector can be used to inject services into any arbitrary
> object (annotated with @javax.inject.Inject).  One caveat: some services
> are implemented by the runtime, which probably won't be available.
> 
> These are all basically singletons.
> 
> Probably the easiest thing to do is to write a simple servlet or Spring
> boot app, then embed the above code somewhere in the bootstrapping, and see
> how you get on.
> 
> HTH
> Dan
> 
> 
> 
> On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o....@govertis.com>
> wrote:
> 
>> 
>> Hi all.
>> 
>> I’m sure the Isis Domain meta-model can add a lot of value to Domains
>> developed in another frameworks.
>> 
>> It’s different from reflection in the way it allows you to determine, for
>> example:
>> - which public methods are effectively domain actions.
>> - which Java properties should be considered “Domain” properties.
>> - which actions or properties are available depending on the business
>> logic.
>> - etc.
>> 
>> And all that with the ability to properly test it.
>> 
>> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
>> JDO-based persistence, the custom injection mechanism, …
>> 
>> But I’m pretty sure it could be really useful when using other
>> platforms/frameworks.
>> 
>> Do you agree?
>> 
>> How should we quantify the tasks and effort?
>> 
>> 
>> Cheers,
>> 
>> Oscar
>> 
>> 
>> 
>> 
>> 
>> 



Óscar Bou Bou
Socio - IT & GRC Management Services Director
m: +34 620 267 520
s:  <http://www.govertis.com/>www.govertis.com <http://www.govertis.com/> e: o.bou@govertis.com <ma...@govertis.com>

LinkedIn: https://www.linkedin.com/in/oscarbou <https://www.linkedin.com/in/oscarbou>
Twitter: 	@oscarbou <https://twitter.com/oscarbou>



Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.

Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana, 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.



Re: Isolating Isis Core to reuse in another frameworks (Spring, Play, JBoss J2EE, ...)

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Oscar,

One can think of the framework as breaking into two:
- the metamodel  ... Isis' reflection stuff, cf java.lang.Class
- the runtime  ... Isis' object mgmt stuff, leaning heavily on
JDO/DataNucleus, cf java.lang.Object.

The metamodel piece is relatively decoupled from the runtime piece, so it
should be fairly easy to embed it.

In IsisMojoAbstract - the superclass for the maven plugin goals - you'll
see the code:

        final AppManifest manifest =
InstanceUtil.createInstance(this.appManifest, AppManifest.class);

        final IsisSessionFactoryBuilder isisSessionFactoryBuilder = new
IsisSessionFactoryBuilder(manifest);
        IsisSessionFactory isisSessionFactory =
isisSessionFactoryBuilder.buildSessionFactory();

from which you can call:

        final SpecificationLoader specificationLoader =
isisSessionFactory.getSpecificationLoader();
        final ServicesInjector servicesInjector =
isisSessionFactory.getServicesInjector();

The SpecificationLoader is the internal (private) API to the entire
metamodel.

The ServicesInjector can be used to inject services into any arbitrary
object (annotated with @javax.inject.Inject).  One caveat: some services
are implemented by the runtime, which probably won't be available.

These are all basically singletons.

Probably the easiest thing to do is to write a simple servlet or Spring
boot app, then embed the above code somewhere in the bootstrapping, and see
how you get on.

HTH
Dan



On Thu, 19 Jan 2017 at 11:45 Óscar Bou - GOVERTIS <o....@govertis.com>
wrote:

>
> Hi all.
>
> I’m sure the Isis Domain meta-model can add a lot of value to Domains
> developed in another frameworks.
>
> It’s different from reflection in the way it allows you to determine, for
> example:
> - which public methods are effectively domain actions.
> - which Java properties should be considered “Domain” properties.
> - which actions or properties are available depending on the business
> logic.
> - etc.
>
> And all that with the ability to properly test it.
>
> Over that, we’ve built the Wicket viewer, the RESTful Objects viewer, the
> JDO-based persistence, the custom injection mechanism, …
>
> But I’m pretty sure it could be really useful when using other
> platforms/frameworks.
>
> Do you agree?
>
> How should we quantify the tasks and effort?
>
>
> Cheers,
>
> Oscar
>
>
>
>
>
>