Clojure service engine

2021-01-18 Thread Eugen Stan

Hello,

I would like to explore (and in the future propose for addition ?!) a 
Clojure service engine implementation.


I would like to ask for feedback on this topic. Guidance as to how 
approach this process is very much appreciated.


I use Clojure as my daily language and it has IMO a lot of feature that 
make it a great language. I would very much like to have the ability to 
write OFBiz services (and other components) using Clojure.


Arguments for Clojure:

- a single library with VERY good backward compatibility - Clojure 
(lisps in general) hasn't change much

- it is dynamic like Groovy
- has immutable data structures by default - a big win for developing 
safe code

- seamless inter-op with Java and JVM languages
- a very nice development experience using the REPL
- simple syntax - once you get the hang of lisp style


Clojure uses Maps, Sets and sequences (Collections) to process data so 
it is an excellent fit since services use map arguments.



I will explore this and see the integration points that we have.
For starters, I would like to be able to use a Clojure function as a 
service.



Regards,
--
Eugen Stan
+40720 898 747 / netdava.com


Re: Developing groovyScripts in the IDE

2021-01-18 Thread Girish Vasmatkar
Hi Daniel

I am on Eclipse most of the time and use the gradle eclipse plug-in to just
build the classpath. I have not faced this issue on Eclipse so can't speak
to that.

That said, I see no issues with selecting SDK or compiler for the Groovy
files. I do it on eclipse and it works without generating dupes. I launch
OFBiz from within IDE and can navigate to other OFBiz classes as well.

I'll also give it a try on IntelliJ and let you know how it goes.

Best,
Girish




On Mon, Jan 18, 2021 at 1:32 PM Pritam Kute 
wrote:

> Hello Emad,
>
> I have tried those changes and can confirm that those are working as
> expected. Thanks!
>
> Kind Regards,
> --
> Pritam Kute
>
>
> On Sun, Jan 17, 2021 at 9:01 PM Daniel Watford  wrote:
>
> > Hello,
> >
> > I use IntelliJ for ofbiz development, but have found it awkward to work
> > with groovyScript files.
> >
> > Each time I would view a groovyScript file IntelliJ would display a
> warning
> > that the file was not associated with a Groovy SDK and prompt me to
> select
> > one. Further, I couldn't navigate from a groovyScript file to other ofbiz
> > classes.
> >
> > IntelliJ imports the project script from the build.gradle file, so any
> > changes I might have manually made to ease IDE development of
> groovyScript
> > files were lost as soon as I reimported build.gradle.
> >
> > To address this I needed to add the groovyScript files to the gradle
> build
> > in some way, while at the same time preventing the files from being built
> > and turned into classes.
> >
> > Some minor changes to the build.gradle file have been added to a branch
> > here -
> > https://github.com/danwatford/ofbiz-framework/tree/groovyScript-gradle
> >
> > I have tested these build.gradle changes in IntelliJ and can now navigate
> > from groovyScript to ofbiz classes.
> >
> > Please could other IDE users (eclipse, netbeans, etc0 try out the changes
> > in the branch to see if the developer experience is improved when
> importing
> > the ofbiz project structure from the gradle build file.
> >
> > Thanks,
> >
> > Dan.
> >
> > --
> > Daniel Watford
> >
>


Re: Developing groovyScripts in the IDE

2021-01-18 Thread Pritam Kute
Hello Emad,

I have tried those changes and can confirm that those are working as
expected. Thanks!

Kind Regards,
--
Pritam Kute


On Sun, Jan 17, 2021 at 9:01 PM Daniel Watford  wrote:

> Hello,
>
> I use IntelliJ for ofbiz development, but have found it awkward to work
> with groovyScript files.
>
> Each time I would view a groovyScript file IntelliJ would display a warning
> that the file was not associated with a Groovy SDK and prompt me to select
> one. Further, I couldn't navigate from a groovyScript file to other ofbiz
> classes.
>
> IntelliJ imports the project script from the build.gradle file, so any
> changes I might have manually made to ease IDE development of groovyScript
> files were lost as soon as I reimported build.gradle.
>
> To address this I needed to add the groovyScript files to the gradle build
> in some way, while at the same time preventing the files from being built
> and turned into classes.
>
> Some minor changes to the build.gradle file have been added to a branch
> here -
> https://github.com/danwatford/ofbiz-framework/tree/groovyScript-gradle
>
> I have tested these build.gradle changes in IntelliJ and can now navigate
> from groovyScript to ofbiz classes.
>
> Please could other IDE users (eclipse, netbeans, etc0 try out the changes
> in the branch to see if the developer experience is improved when importing
> the ofbiz project structure from the gradle build file.
>
> Thanks,
>
> Dan.
>
> --
> Daniel Watford
>