CAL (OpenQuark) and enterprise

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

CAL (OpenQuark) and enterprise

frantisek kocun
Hi Haskellers and CALers,
I have the feeling that a lot of code in my jee application can be done better by using functional programming. There is a lot of searching in object trees, transforming objects to another objects, aggregation functions... All written in java. Sequential logic can by done declarative with statemachines and workflows (not handcoded, dut drawed) all other with functions. Has somebody experience with this? Or is that a bad idea? Should I use pure functions, or imperative-functional language such as Scala? Is somebody here using CAL (OpenQuark) in jee application? What is your experience
Reply | Threaded
Open this post in threaded view
|

Re: CAL (OpenQuark) and enterprise

Neil Mitchell
Hi

> There is a lot of searching in
>  object trees, transforming objects to another objects, aggregation
>  functions...

Sounds like you want:

Either Uniplate: http://www-users.cs.york.ac.uk/~ndm/uniplate/

Or SYB: http://www.cs.vu.nl/boilerplate/

Read through both papers for various examples of what you might want to do,


> Should
>  I use pure functions, or imperative-functional language such as Scala?

On the Haskell list I think its fair to say everyone recommends you
should use Haskell.

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: CAL (OpenQuark) and enterprise

Miles Sabin
On Wed, Jul 9, 2008 at 6:28 PM, Neil Mitchell <[hidden email]> wrote:
> On the Haskell list I think its fair to say everyone recommends you
> should use Haskell.

Not necessarily. If the OP has a significant body of existing Java
code (s)he has to work with (which is what the question suggests) then
Scala would most likely be a very good place to look.

Cheers,


Miles
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: CAL (OpenQuark) and enterprise

frantisek kocun
And what if writing new application? Has anybody experience with enterprise application in functional language? Is it really clearer? I can see a advantage in using Scala but it doesn't have some features from Haskell or CAL or requires more code to write. Or better has anybody experience with the same and functional language for JVM? And what about ORM (e.g. Hibernate)? And what about objects, they are stateful itself. And CRUD is a very common part of enterprise applications and I think it's easier in imperative style (client is declarative of course but it assigns values to fields). I am interested in ours opinions/experience in business logic (not any infrastructure or client stuff) for apps such as accounting/bank/insurance/document management... systems in functional languages. Sometimes the rules for these kind of apps is more complex that it seem to be and such systems are maintained for many years (some even decades) so it needs to be readable. Rule engines are very popularized among java community now but I think many logic can be expressed clearer in functions. It is maybe useful for some kind of logic (e.g. calculate price with discounts) but for what I do I can write the same clearer in java that in rule engine (and much clearer in Haskell and I am only beginner. What will come after few years coding;).


Miles Sabin wrote
On Wed, Jul 9, 2008 at 6:28 PM, Neil Mitchell <ndmitchell@gmail.com> wrote:
> On the Haskell list I think its fair to say everyone recommends you
> should use Haskell.

Not necessarily. If the OP has a significant body of existing Java
code (s)he has to work with (which is what the question suggests) then
Scala would most likely be a very good place to look.

Cheers,


Miles
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: CAL (OpenQuark) and enterprise

Daniil Elovkov
fero wrote:

> And what if writing new application? Has anybody experience with enterprise
> application in functional language? Is it really clearer? I can see a
> advantage in using Scala but it doesn't have some features from Haskell or
> CAL or requires more code to write. Or better has anybody experience with
> the same and functional language for JVM? And what about ORM (e.g.
> Hibernate)? And what about objects, they are stateful itself. And CRUD is a
> very common part of enterprise applications and I think it's easier in
> imperative style (client is declarative of course but it assigns values to
> fields). I am interested in ours opinions/experience in business logic (not
> any infrastructure or client stuff) for apps such as
> accounting/bank/insurance/document management... systems in functional
> languages. Sometimes the rules for these kind of apps is more complex that
> it seem to be and such systems are maintained for many years (some even
> decades) so it needs to be readable. Rule engines are very popularized among
> java community now but I think many logic can be expressed clearer in
> functions. It is maybe useful for some kind of logic (e.g. calculate price
> with discounts) but for what I do I can write the same clearer in java that
> in rule engine (and much clearer in Haskell and I am only beginner. What
> will come after few years coding;).
>

You may start writing more obscure code.

Look at this:
http://www.willamette.edu/~fruehr/haskell/evolution.html

This is humour, of course.

>
> Miles Sabin wrote:
>> On Wed, Jul 9, 2008 at 6:28 PM, Neil Mitchell <[hidden email]>
>> wrote:
>>> On the Haskell list I think its fair to say everyone recommends you
>>> should use Haskell.
>> Not necessarily. If the OP has a significant body of existing Java
>> code (s)he has to work with (which is what the question suggests) then
>> Scala would most likely be a very good place to look.
>>

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: CAL (OpenQuark) and enterprise

frantisek kocun
Nice:)


Daniil Elovkov wrote
fero wrote:
> And what if writing new application? Has anybody experience with enterprise
> application in functional language? Is it really clearer? I can see a
> advantage in using Scala but it doesn't have some features from Haskell or
> CAL or requires more code to write. Or better has anybody experience with
> the same and functional language for JVM? And what about ORM (e.g.
> Hibernate)? And what about objects, they are stateful itself. And CRUD is a
> very common part of enterprise applications and I think it's easier in
> imperative style (client is declarative of course but it assigns values to
> fields). I am interested in ours opinions/experience in business logic (not
> any infrastructure or client stuff) for apps such as
> accounting/bank/insurance/document management... systems in functional
> languages. Sometimes the rules for these kind of apps is more complex that
> it seem to be and such systems are maintained for many years (some even
> decades) so it needs to be readable. Rule engines are very popularized among
> java community now but I think many logic can be expressed clearer in
> functions. It is maybe useful for some kind of logic (e.g. calculate price
> with discounts) but for what I do I can write the same clearer in java that
> in rule engine (and much clearer in Haskell and I am only beginner. What
> will come after few years coding;).
>

You may start writing more obscure code.

Look at this:
http://www.willamette.edu/~fruehr/haskell/evolution.html

This is humour, of course.

>
> Miles Sabin wrote:
>> On Wed, Jul 9, 2008 at 6:28 PM, Neil Mitchell <ndmitchell@gmail.com>
>> wrote:
>>> On the Haskell list I think its fair to say everyone recommends you
>>> should use Haskell.
>> Not necessarily. If the OP has a significant body of existing Java
>> code (s)he has to work with (which is what the question suggests) then
>> Scala would most likely be a very good place to look.
>>

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe