Discussion:
[Modeling-users] Greetings and questions
Matthew Patton
2004-01-22 14:21:44 UTC
Permalink
Hi,
I came across Modeling as a result of discovering WebObjects just
recently. I read through the docs on how to build web apps in WebObjects
and how to build and use Enterprise Objects, and I was very pleased with
the well-designed architecture of the EOF. It truly is the most
sophisticated and powerful Enterprise Object architecture that I have
seen.
My motivation for looking for a good Enterprise Object framework
is that for the past year and a half, I have been programming in PHP and I
have been very frustrated with the lack of good tools like WebObjects for
PHP. Unless I want to write very disorganized and unmaintainable code, I
need tools like a solid Object-relational layer and a good MVC framework.
I actually tried to do this myself (www.sf.net/projects/doulos), and met
with some success (I just finished my first project in this framework, a
conference registration system), but I found that I lacked the solid
design ideas that WebObjects has.
I debated rewriting WebObjects (in a highly simplified form) for
PHP, but since PHP works by instantiating a new process in Apache that
lives for a little while, returns some HTML and then dies, the idea of
creating something like WebObjects that depends on a constantly running
server for PHP is probably not a good idea. Its possible to do this, but
it would be using PHP to write a server, something it was never intended
for.
So, I turned to Python, and I discovered your excellent initiative
to take the great ideas in WebObjects and make them freely available
through the GPL. What you are working on is exactly what I need, and I
want to try to understand how I can best utilize your work.
I have the following questions:

1. Is it your long-term goal to try to reproduce in Python everything that
Apple did in their EOF?

2. Roughly speaking, how much of their functionality have you reproduced
to this point, and what remains?

3. I understand you use Zope as your application server for your test
projects. Do you have any code for a sample project that utilizes your
O/R layer with Zope? What I mean is, do you have a web program that
allows the user to interact with the DB using Modeling? Your examples in
the tests/ dir seemed be just the setting up of the Modeling classes, not
the actual usage of them in a program. I noticed you also discussed this
in your user guide, but it would be really helpful to see all of the code
for a full project. How does Zope compare to the web components approach
of WebObjects?

4. As a follow-up question, have you written any full-fledged
production-level products using Modeling?

5. I noticed that Apple has the full API to WebObjects accessible online.
Did you have any other sources for figuring out how to reverse engineer
WebObjects?

Thanks a lot for your thoughts! I am going to try and get something
working in Modeling now!

Matt


______________________________________________________________
Matthew Patton ***@dm.org
DiscipleMakers Headquarters: (814)234-7975 x32
Sebastien Bigaret
2004-01-23 15:35:32 UTC
Permalink
Hi,
Post by Matthew Patton
Hi,
I came across Modeling as a result of discovering WebObjects just
recently. I read through the docs on how to build web apps in WebObjects
and how to build and use Enterprise Objects, and I was very pleased with
the well-designed architecture of the EOF. It truly is the most
sophisticated and powerful Enterprise Object architecture that I have
seen.
I know the feeling, and that's why the project started, when I had to
switch to python+Zope!

[...]
Post by Matthew Patton
So, I turned to Python, and I discovered your excellent initiative
to take the great ideas in WebObjects and make them freely available
through the GPL. What you are working on is exactly what I need, and I
want to try to understand how I can best utilize your work.
1. Is it your long-term goal to try to reproduce in Python everything that
Apple did in their EOF?
2. Roughly speaking, how much of their functionality have you reproduced
to this point, and what remains?
It is my goal to keep enhancing the framework as users' requests come
in. Sometimes this can take a lot of time, but the dev. is oriented by
users requests. And I do not like the term "reproduce", because therte's
no reason to blindly stick to what the EOF does, or how a particular
pb. is addressed. For example, there's a patch that will soon be
integrated into the framework that allows dynamic building of the models
AND the associated classes. The fact is, python offers sometimes more
choices than ObjC or Java does --at the cost of performance sometimes,
but that's probably also the coder's fault :/

As far as "how much functionality" still needs to be done, I have recently
posted a little roadmap for immediate/mid-term future development, see it at:
https://sourceforge.net/mailarchive/forum.php?thread_id=3739727&forum_id=10674

You can also refer to the TODO list, distributed w/ the framework and
available at:
http://cvs.sourceforge.net/viewcvs.py/modeling/ProjectModeling/Modeling/TODO?rev=1.16&view=auto

(Keep in mind, however, that cleaning and publishing this todo list is a
todo item too :)

Hopefully those two elements will help you see what remains. Roughly,
I'll summarize that in: flattened relationships, vertical mapping,
compound PKs, support for stored procedures, allow delegates to
fine-tune any part of the processes, add more db adaptors.
Post by Matthew Patton
3. I understand you use Zope as your application server for your test
projects. Do you have any code for a sample project that utilizes your
O/R layer with Zope? What I mean is, do you have a web program that
allows the user to interact with the DB using Modeling? Your examples in
the tests/ dir seemed be just the setting up of the Modeling classes, not
the actual usage of them in a program. I noticed you also discussed this
in your user guide, but it would be really helpful to see all of the code
for a full project. How does Zope compare to the web components approach
of WebObjects?
Yeap, the tests/ dir contains test units for the whole framework, so it
is not that useful as an example of use... Unfortunately, there is no
sample app. Making a tutorial is on the TODO list, but at this point I
must admit that I lack time for that. In other words, help needed! and
I'll be happy to participate in the design of a sample app. supporting
a tutorial ;)

Back on Zope: I've no preference and usually start to design my apps. in
pure python (test-driven dev.), than I take whatever action is needed to
do the GUI and in case this is a web-app, I usually use Zope, yes. I'd
say that you can do very clean dev. w/ Zope, the C & V part of MVC being
done in, resp., products and products' pages (ZPT e.g.). This is quite
difficult to compare WO to Zope, but both application servers have a
clean and elegant architecture and allow elegant developments ;) with WO
as a complete IDE at hand that Zope do not really have, but that's not
that important (at least to my eyes).
Post by Matthew Patton
4. As a follow-up question, have you written any full-fledged
production-level products using Modeling?
Absolutely, they are up and running for more than a year now, you'll
find a description here: http://modeling.sourceforge.net/status.html

Maybe someone else can also comment here?-)
Post by Matthew Patton
5. I noticed that Apple has the full API to WebObjects accessible online.
Did you have any other sources for figuring out how to reverse engineer
WebObjects?
I'm sure you do not mean "reverse engineer" (which is illegal), rather
"understanding the underlying concepts", don't you?-)) Apart from
Apple's resources available online, I can't see any source --but I've
quit developping w/ WO for a long time now, so I'm not the right person
to ask that. Maybe you could ask the community at omnigroup.com e.g.

Hopefully the answers were not too short, I did not have much time to
answer --feel free to ask for more, esp. after your first experiments.
I'll be offline some days from now, and will be back in the middle of
next week.


-- Sébastien.
Federico Heinz
2004-01-30 23:41:19 UTC
Permalink
Post by Sebastien Bigaret
Hopefully those two elements will help you see what remains. Roughly,
I'll summarize that in: flattened relationships, vertical mapping,
compound PKs, support for stored procedures, allow delegates to
fine-tune any part of the processes, add more db adaptors.
As the person who probably did the most noise towards the need to
implement vertical mapping, I want to say that upon closer inspection,
it probably doesn't matter so much --- at least for us, so we wouldn't
care if vertical mapping went back to the bottom of the to-do (although
flattened attributes would still be very useful).

What *would* be very cool indeed, and in my opinion far more important,
is completion of the optimistic locking logic.
Post by Sebastien Bigaret
[...] Unfortunately, there is no
sample app. Making a tutorial is on the TODO list, but at this point I
must admit that I lack time for that. In other words, help needed! and
I'll be happy to participate in the design of a sample app. supporting
a tutorial ;)
We might be contributing a sample app soon, as part of an
Appkit-inspired widget set we're in the process of developing for our
GPL'ed application.
Post by Sebastien Bigaret
I'm sure you do not mean "reverse engineer" (which is illegal)
Don't worry, reverse engineering is legal in most places, including such
fascist, backwards and dictatorial countries such as the US! In Europe,
I understand it is very heavily protected. Even the draconian DMCA has
special provisions to allow for reverse engineering.

Fede
--
GnuPG Public Key: gpg --keyserver wwwkeys.eu.pgp.net --recv-key BD02C6E0
Key Fingerprint: 04F4 08C5 14B7 2C3D DB21 ACF8 6CF5 0B0C BD02 C6E0
Sebastien Bigaret
2004-02-02 19:25:00 UTC
Permalink
Post by Federico Heinz
Post by Sebastien Bigaret
Hopefully those two elements will help you see what remains. Roughly,
I'll summarize that in: flattened relationships, vertical mapping,
compound PKs, support for stored procedures, allow delegates to
fine-tune any part of the processes, add more db adaptors.
As the person who probably did the most noise towards the need to
implement vertical mapping, I want to say that upon closer inspection,
it probably doesn't matter so much --- at least for us, so we wouldn't
care if vertical mapping went back to the bottom of the to-do (although
flattened attributes would still be very useful).
Fine, this is probably what will happen then!
Post by Federico Heinz
What *would* be very cool indeed, and in my opinion far more important,
is completion of the optimistic locking logic.
Sure, and thanks for remembering --this is something I forgot in my
previous message and in the roadmap posted earlier. This is an
_unintentional_ lapse of memory although I consider it to be a quite
high priority item. One of the reasons for making it high priority is
that it is tighly related to the long-standing sessioning exposed in
the User's Guide:
http://modeling.sf.net/UserGuide/framework-integration-sessioning-ec.html
Post by Federico Heinz
Post by Sebastien Bigaret
[...] Unfortunately, there is no
sample app. Making a tutorial is on the TODO list, but at this point I
must admit that I lack time for that. In other words, help needed! and
I'll be happy to participate in the design of a sample app. supporting
a tutorial ;)
We might be contributing a sample app soon, as part of an
Appkit-inspired widget set we're in the process of developing for our
GPL'ed application.
That would be great!
Post by Federico Heinz
Post by Sebastien Bigaret
I'm sure you do not mean "reverse engineer" (which is illegal)
Don't worry, reverse engineering is legal in most places, including such
fascist, backwards and dictatorial countries such as the US! In Europe,
I understand it is very heavily protected. Even the draconian DMCA has
special provisions to allow for reverse engineering.
It's just that I hate those legal issues, so I prefer to stand back:
avoiding an unnecessary way keeps the lawyers away ;) However, I
didn't even know it could be legal in most places, interesting.

-- Sébastien.
Matthew Patton
2004-02-04 14:53:04 UTC
Permalink
Hello again,
Post by Federico Heinz
We might be contributing a sample app soon, as part of an
Appkit-inspired widget set we're in the process of developing for our
GPL'ed application.
That would be great! I think it would really add to Modeling's
attractiveness if people could see how everything fits together from HTML
to SQL.
I have a question in this regard: I have Modeling working now
where it generated SQL schema and Ent. Objects based on my Model, and I
have used these objects to do simple tasks like inserting and fetching.
What I am trying to figure out now is how to use Zope to maintain the
state of a program that uses these Enterprise Objects. Basically, how do
I get Zope to give me the POST data that is submitted from a form, access
the appropriate user's session and his editing context in that session,
and then use a templating system to send HTML back? (the basic process of
a web app)
Post by Federico Heinz
Post by Sebastien Bigaret
I'm sure you do not mean "reverse engineer" (which is illegal)
I'm sorry I guess I misused the term. I simply meant what it is you are
doing, where you take what Apple's WebObjects does and reproduce its
functionality in Python.
Thanks for your informative responses!

Matt
Federico Heinz
2004-02-04 16:24:03 UTC
Permalink
Post by Matthew Patton
Post by Federico Heinz
We might be contributing a sample app soon, as part of an
Appkit-inspired widget set we're in the process of developing for our
GPL'ed application.
That would be great! I think it would really add to Modeling's
attractiveness if people could see how everything fits together from HTML
to SQL.
Our framework doesn't do HTML yet... only GUI. It will do HTML later, as
it will do curses and Qt and whatnot, but right now it's just for Gtk (1
or 2).

Fede
--
GnuPG Public Key: gpg --keyserver wwwkeys.eu.pgp.net --recv-key BD02C6E0
Key Fingerprint: 04F4 08C5 14B7 2C3D DB21 ACF8 6CF5 0B0C BD02 C6E0
Sebastien Bigaret
2004-02-06 11:58:22 UTC
Permalink
Hi Matthew,
Post by Matthew Patton
I have a question in this regard: I have Modeling working now
where it generated SQL schema and Ent. Objects based on my Model, and I
have used these objects to do simple tasks like inserting and fetching.
What I am trying to figure out now is how to use Zope to maintain the
state of a program that uses these Enterprise Objects. Basically, how do
I get Zope to give me the POST data that is submitted from a form, access
the appropriate user's session and his editing context in that session,
and then use a templating system to send HTML back? (the basic process of
a web app)
I'm not sure I fully understand your question. Within Zope and given
that you've installed the ZEditingContextSessioning product, you'll be
able to get the session's editing context with:
REQUEST.SESSION.defaultEditingContext().

There no other impact on traditional zope mechanisms: values in forms
are passed to your methods as parameters and/or in REQUEST, and you
can use the objects you get from e.g. ec.fetch() to populate the ZPT
a method returns back.

Last, you can decide if you want to control when sessions' ec save
their changes, or if you want them to save their changes automatically
after each request/response loop by setting the special parameter
'bind_saveChanges_to_zope_transactions', cf.
http://modeling.sf.net/UserGuide/framework-integration-zope-options.html

Hope this helps,

-- Sébastien.

Loading...