Reactive programming in Python ?

2010-04-16 Thread pca
Dear all,

Could “reactive programming” still increase the productivity and joy
of Python programming?  I’d like to hear your thoughts on the idea
that object-oriented “programming by formula”, as in a spreadsheet,
would simplify our work, because we would not have to worry about the
sequence of program execution anymore.

In fact, I have seeded an open-source project, Yoopf, that enables
programming by formula within Python, with the goal of dramatically
accelerating the development of the model view in the MVC model.
Declarative-style programming has accelerated the development of the
presentation layer (with HTML, CSS) and the Database layer (with SQL),
so why not take advantage of it for the Business Logic layer too?

You can find more information on this project at www.yoopf.org.  Your
comments are more than welcome!

Best regards,
P. Carbonnelle
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Reactive programming in Python ?

2010-04-16 Thread pca
On Apr 16, 8:28 pm, Stefan Behnel  wrote:
> pca, 16.04.2010 17:18:
>
> > In fact, I have seeded an open-source project, Yoopf, that enables
> > programming by formula within Python, with the goal of dramatically
> > accelerating the development of the model view in the MVC model.
>
> Looks like the example on the main page would work better with the "any"
> builtin than with the "sum" builtin.
>
> Stefan

Stefan,

I'm not sure what you mean.  The example formula in the main page of
http://www.yoopf.org calculates the total amount of an order as the
sum of the amount of each order line: why the 'any' ?

By the way, Mike is right.  The URL should be http://www.yoopf.org
(not http://www.google.com/www.yoopf.org)  Sorry for that.

Pierre C.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Reactive programming in Python ?

2010-04-17 Thread pca
On Apr 17, 8:09 am, Stefan Behnel  wrote:
> pca, 16.04.2010 22:02:
>
> > On Apr 16, 8:28 pm, Stefan Behnel wrote:
> >> pca, 16.04.2010 17:18:
>
> >>> In fact, I have seeded an open-source project, Yoopf, that enables
> >>> programming by formula within Python, with the goal of dramatically
> >>> accelerating the development of the model view in the MVC model.
>
> >> Looks like the example on the main page would work better with the "any"
> >> builtin than with the "sum" builtin.
>
> > I'm not sure what you mean.  The example formula in the main page of
> >http://www.yoopf.orgcalculates the total amount of an order as the
> > sum of the amount of each order line: why the 'any' ?
>
> I guess I misinterpreted the phrase "only when one of its order line has
> been added or deleted" as meaning that a change to any of the amounts would
> trigger an event. It wasn't clear to me that the example actually presented
> a calculation that would be evaluated based on that event.
>
> You might want to give potential users a better idea of what this tool
> does. Neither your announcement nor the homepage made that clear to me.
>
> Stefan

Thanks for the feedback, Stefan.  I have rephrased the sentence as
follows.  Is that more clear ?

"For example, this formula is fed to the library to define the total
amount of each Order object as the sum of the amount of its order
line:

"Order.amount = sum(Order.order_lines.amount)

"At the end of a transaction, the formula calculator is run : it will
calculate the formula only for the Order objects that need
recalculation (e.g because one of its order line has been added or
deleted, or the amount of a line has been changed).

Thanks.
Pierre C.
-- 
http://mail.python.org/mailman/listinfo/python-list


Declarative programming for the Model part of an application

2010-04-21 Thread pca
Dear all,

Last week, I raised the question "Could declarative programming be
useful for the Model part of an application ?", and I suggested an
open-source project, Yoopf, to provide such a paradigm in Python.
Stefan told me that the proposal lacked clarity.  I have thus updated
the description, and he now finds it much clearer.  You can find it at
http://www.yoopf.org

So, I would appreciate your feedback again on such a project : can
declarative programming be useful for the Model part of an
application ?  Do you think that Yoopf and its "programming by
formula" paradigm can bring value to python developments ?  How would
it compare to database triggers and stored procedures, for example ?
What could be some typical applications ?

Many thanks in advance !
Pierre C.
-- 
http://mail.python.org/mailman/listinfo/python-list