polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: Application Code Management tool
Date Fri, 24 Apr 2015 13:51:43 GMT
Niclas Hedhman a écrit :
> I first started out by having command line, as so...
>    #> qi4j create-project MyProject
>    #> qi4j add-layer config
> and so on.
> Then Sandro was suggesting "Gradle Plugin", I want to use Qi4j for the
> modelling, so I would need to get Qi4j up and running on Groovy to do that.
> So, then, why not use the Groovy Shell directly, without Gradle...
>    qi4j {
>       project(name: "MyProject") {
>           layer(name: "Config" ) {
>               module( name: "Config" ) {
>                   assemble DefaultConfigurationModule
>               }
>           }
>           layer(name: "Infra", uses:["Config", "Security"] {
>               module( name: "Store" ) {
>                   assemble CassandraStoreModule
>               }
>               module( name: "Identity" ) {
>                   assemble LdapModule
>               }
>           }
>       }
>   }
> or whatever the syntax looks like in detail.
> Then it was, so why generate the code and not allow the application
> structure to be created with Groovy code instead of Java, that would
> alleviate some of the messy assembly in Java, to the extent (I think) where
> some rather simple templating of build scripts, directory structures and
> initial classes.
> Ok, but if the above is happening in Groovy, should/could therefor the
> entire Bootstrap phase simply be groovy as well??
> qi4j { .... }
> qi4j.activate
> Ok, that shouldn't be too hard either, but we can script it quickly in
> Groovy Shell.
> But why Groovy? Wouldn't Scala be equally well suited, as it also has a
> REPL and a flexible syntax....
> My head is spinning, and suffering from decision anxiety.
> Niclas

About assembly and language support. We have ApplicationBuilder that,
thanks to J8 lambdas is pretty comfy to use from pure Java. Should be
pretty nice from groovy/scala too. More idiomatic assembly plumbing
should then be put in language support modules. In 3.0 we shall work on
more J8 idiomatic assembly leveraging lambdas.

I don't like the idea that the tool that aim to ease Qi4j usage could
force users to use something else than Java.

Focusing on the "it's hard to start with Qi4j, to setup a working
project etc...". Templating + generators seems like a good choice.

Looking for inspiration in other ecosystems I found:

- https://github.com/pledbrook/lazybones
- https://github.com/n8han/giter8
- https://github.com/yeoman/yeoman

LazyBones is the closest to Qi4j as it's Gradle based. But don't support
"after initial generation generators". Not sure if they are needed to
help the community bootstrap with Qi4j development tough.

Using an approach similar to theses tools, or simply reusing one of
them, could allow us to provide a few officially supported project
templates/skeletons/whatever-the-name and provide a paved way to produce
others to the community.

Unsure, but I hope this helps making your head stop spinning :)



View raw message