modeling-users Mailing List for Object-Relational Bridge for python (Page 11)
Status: Abandoned
Brought to you by:
sbigaret
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(19) |
Feb
(55) |
Mar
(54) |
Apr
(48) |
May
(41) |
Jun
(40) |
Jul
(156) |
Aug
(56) |
Sep
(90) |
Oct
(14) |
Nov
(41) |
Dec
(32) |
2004 |
Jan
(6) |
Feb
(57) |
Mar
(38) |
Apr
(23) |
May
(3) |
Jun
(40) |
Jul
(39) |
Aug
(82) |
Sep
(31) |
Oct
(14) |
Nov
|
Dec
(9) |
2005 |
Jan
|
Feb
(4) |
Mar
(13) |
Apr
|
May
(5) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(5) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ernesto R. <er...@si...> - 2004-06-24 09:20:32
|
Hi again, Sebastien Bigaret escribió: >>Interesting enough that the following instruction makes it much faster >>causing SQLite to turn off disk sync: >>*PRAGMA default_synchronous = OFF; >> >> > >Yes, but this makes the sqlite-db file very fragile, I believe this can >completely waste your data when some errors happen, or am I wrong? (no >time to check that in details right now) > > > It depends. sqlite writes all changes to a journal file, and when commiting processes the journal file and appends the results to the end of the file. The fragile point is after the journal file has been processed, bu before the data has been written to disk. Of course, this makes it more fragile, but the probability of a system crash is not very high, provided we are using powersupplies and stable OS. If we have a patch for this issue, I'll turn on syncing again. With best regards, Erny >-- Sébastien. > > > > |
From: Duncan M. <du...@ad...> - 2004-06-23 18:41:59
|
Hey folks, I have uploaded a patch to the project site for cx_Oracle support. I am new to Modeling (though already a HUGE fan), so I'm not sure if I missed anything. If anyone is interested in testing it beyond the bounds of my own use (which is fairly limited so far), I would love to get feedback and help improve cx_Oracle support... Thanks! Duncan |
From: Sebastien B. <sbi...@us...> - 2004-06-23 17:55:54
|
John Lenton <jo...@vi...> wrote: > In a project I'm currently working on there is a class that we'd like > to call "User", but we can't call it that and use Modeling in its > current state: it's not quoting the names of entities (nor > attributes), and user is a reserved word. >=20 > I looked into it, and I actually got it working, but I then saw that > in SQLExpression there's a method `externalNameQuoteCharacter'; is the > purpose of this method to be used (something like) this: >=20 > [ in _addTableJoinsForAlias ] >=20 > quoteChar =3D self.externalNameQuoteCharacter() > str +=3D quoteChar + self._internals.entityExternalNameForAlias(alias= ) + quoteChar + ' ' + alias >=20 > ? And to answer this very precisely, I do not feel really comfortable with quoting external names when unneeded; the quoting should IMHO be done only when a whole SQL statement is returned, not during intermediate steps. This makes assembleDelete|Select|UpdateStatement() methods good candidates, doesn't it? -- S=E9bastien. |
From: Sebastien B. <sbi...@us...> - 2004-06-23 17:31:27
|
Ernesto Revilla <er...@si...> wrote: > Dear S=E9bastien, >=20 > could you explain in some words, and with one example how Optimistic Lock= ing > should work? Yes ;) >=20 > I saw your commits, but I thought optimistic locking would protect > automatically the whole object from being updated from another > computer. What does it mean an attribute is used for optimistic locking? > That the attribute is checked that it is not updated by another person or > that it is used to check if another person has changed the object? Say you have obj O (a person) w/ attributes name, age and birthday. 'name' and 'age' are made 'usedForLocking', birthday isn't. In a EC you fetch a person 'p', manipulate/update it, changing whatever attributes, than you save changes. At this point (at saveChanges() time), we make sure that the corresponding row has the same value for columns 'name' and 'age' (which are marked as 'usedForLocking') than the value it had *when the object was fetched*. If values are the same, the updates succeeds, otherwise saveChanges() fails. That's the core of it. Optimistic locking is called optimistic because it makes the assumptions that few conflicts will occur, so the checking is only made at the last moment --when saving. Now two remarks: - if the corresponding person's birthday has been changed in the db by an external process, optimistic locking wont notice because the attribute wasn't used for locking, - within a single *process*, two ECs will never conflict. This is not directly related to the way optimistic locking works, rather to the way the framework handles those updates. When an EC saves its changes, it broadcasts them to others. Default behaviour will be: when an ec receives an update for an object, it applies these updates, then applies back the changes that were made before within this ec. Example: # NB: p1=3Dp2=3DPerson(name=3D'Cleese', age=3D42, birthday=3DNone) p1=3Dec1.fetch(...) p2=3Dec2.fetch(...) # p1, p2 correspond to the same rows =20=20=20=20 p1.name=3D'John Cleese' p1.age=3D24 =20=20=20=20 p2.age=3D12 =20=20=20=20 ec1.saveChanges() # now p2.name=3D=3D'John Cleese', and p2.age=3D=3D12 Of course you'll have delegates at hand to implement your own behaviour to handle these cases. Hopefully this makes things clearer. If not, yell at me ;) -- S=E9bastien. |
From: Sebastien B. <sbi...@us...> - 2004-06-23 17:17:55
|
That's it, you got it right: the intention was to use externalNameQuoteCharacter() into sqlStringForSchemaObjectName(), the latter being the method responsible for quoting (or not). I think we can make externalNameQuoteCharacter a class variable (possibly the empty string), and then sqlStringForSchemaObjectName(name) return the "quoted" name if variable is set, or otherwise the name, intact. Now of course sqlStringForSchemaObjectName() should be called wherever tables', columns' names are referenced... If by now you only need to quote tables' names, I'd suggest you quickly patch the assembleDelete|Select|UpdateStatement...(). Please note this is a quick answer that needs some more thinking, at least for me ;), to determine where and when the quoting should be applied (without too much overhead) -- S=E9bastien. John Lenton <jo...@vi...> wrote: > Hi all. >=20 > In a project I'm currently working on there is a class that we'd like > to call "User", but we can't call it that and use Modeling in its > current state: it's not quoting the names of entities (nor > attributes), and user is a reserved word. >=20 > I looked into it, and I actually got it working, but I then saw that > in SQLExpression there's a method `externalNameQuoteCharacter'; is the > purpose of this method to be used (something like) this: >=20 > [ in _addTableJoinsForAlias ] >=20 > quoteChar =3D self.externalNameQuoteCharacter() > str +=3D quoteChar + self._internals.entityExternalNameForAlias(alias= ) + quoteChar + ' ' + alias >=20 > ? >=20 > What I did was actually add a static method called quotedExternalName, > thus: >=20 > def quotedExternalName(name): > return name >=20 > which I then overrode in PostgresqlSQLExpression, >=20 > def quotedExternalName(name): > return '"%s"' % (name,) >=20 > and in MySQLSQLExpression, >=20 > def quotedExternalName(name): > return '`%s`' % (name,) >=20 > (no idea how sqlite nor oracle do this) >=20 > this and the appropriate modifications where the SQL is computed got > me to where I could use the objects in Modeling once the database was > created (I didn't run extensive tests, however); on looking into what > it took to make mdl_generate_DB_schema quote its chars I came across > that method that I'd overlooked before, which gave me pause, because > obviously S=E9bastien has already thought about this, so he probably has > a preferred way of doing it. >=20 > So... rounding up what shouldn't've become such a long mail: > S=E9bastien, how had you thought you'd do this? >=20 > --=20 > John Lenton (jo...@vi...) -- Random fortune: > Ir contra la corriente, casi nunca es conveniente. |
From: Sebastien B. <sbi...@us...> - 2004-06-23 17:10:08
|
Ernesto Revilla <er...@si...> wrote: > Dear S=E9bastien and everybody else: >=20 > I found SQLite inserts a bit slow. When enabling logging, I found that new > keys are retrieved using the following SQL statement: >=20 > Transaction: BEGIN > Evaluating: UPDATE PK_SEQ_ROOM SET id=3D((select max(id) from PK_SEQ_ROOM= )+1) > Evaluating: select id FROM PK_SEQ_ROOM > Transaction: COMMIT >=20 > Then, after checking the table definition I saw that PK_SEQ_ROOM has just > the id field, and as I read anywhere below, just one row, so the subquery > should not be needed, not? >=20 > (file SQLiteAdaptorChannel.py near line 82) Well, right: in fact, since sqlite db is not mt-safe at all, the subquery has no interest (and BTW the second one should read SELECT LAST_INSERT_ID() in mysql e.g., I need to change that). > On the other hand, changing this does not make it much faster. at least w= ith > my box, committing on each update and read for new primary keys is a bit > slow, but for this delay sqlite has to be blamed. Probably the pb. for you here is that every single new object fetches its own PK; yes, it would be really more efficient to fetch the <n> next PK if we need <n> new values... Could you fill a RFE so that I do not forget? > Interesting enough that the following instruction makes it much faster > causing SQLite to turn off disk sync: > *PRAGMA default_synchronous =3D OFF; Yes, but this makes the sqlite-db file very fragile, I believe this can completely waste your data when some errors happen, or am I wrong? (no time to check that in details right now) -- S=E9bastien. |
From: John L. <jo...@vi...> - 2004-06-22 22:59:23
|
Sender: John Lenton <jo...@ma...> Hi all. In a project I'm currently working on there is a class that we'd like to call "User", but we can't call it that and use Modeling in its current state: it's not quoting the names of entities (nor attributes), and user is a reserved word. I looked into it, and I actually got it working, but I then saw that in SQLExpression there's a method `externalNameQuoteCharacter'; is the purpose of this method to be used (something like) this: [ in _addTableJoinsForAlias ] quoteChar =3D self.externalNameQuoteCharacter() str +=3D quoteChar + self._internals.entityExternalNameForAlias(alias) = + quoteChar + ' ' + alias ? What I did was actually add a static method called quotedExternalName, thus: def quotedExternalName(name): return name which I then overrode in PostgresqlSQLExpression, def quotedExternalName(name): return '"%s"' % (name,) and in MySQLSQLExpression, def quotedExternalName(name): return '`%s`' % (name,) (no idea how sqlite nor oracle do this) this and the appropriate modifications where the SQL is computed got me to where I could use the objects in Modeling once the database was created (I didn't run extensive tests, however); on looking into what it took to make mdl_generate_DB_schema quote its chars I came across that method that I'd overlooked before, which gave me pause, because obviously S=E9bastien has already thought about this, so he probably has a preferred way of doing it. So... rounding up what shouldn't've become such a long mail: S=E9bastien, how had you thought you'd do this? --=20 John Lenton (jo...@vi...) -- Random fortune: Ir contra la corriente, casi nunca es conveniente. |
From: Ernesto R. <er...@si...> - 2004-06-22 22:12:32
|
Dear Sébastien, could you explain in some words, and with one example how Optimistic Locking should work? I saw your commits, but I thought optimistic locking would protect automatically the whole object from being updated from another computer. What does it mean an attribute is used for optimistic locking? That the attribute is checked that it is not updated by another person or that it is used to check if another person has changed the object? With best regards, Erny |
From: Ernesto R. <er...@si...> - 2004-06-22 22:07:55
|
Dear Sébastien and everybody else: I found SQLite inserts a bit slow. When enabling logging, I found that new keys are retrieved using the following SQL statement: Transaction: BEGIN Evaluating: UPDATE PK_SEQ_ROOM SET id=((select max(id) from PK_SEQ_ROOM)+1) Evaluating: select id FROM PK_SEQ_ROOM Transaction: COMMIT Then, after checking the table definition I saw that PK_SEQ_ROOM has just the id field, and as I read anywhere below, just one row, so the subquery should not be needed, not? (file SQLiteAdaptorChannel.py near line 82) On the other hand, changing this does not make it much faster. at least with my box, committing on each update and read for new primary keys is a bit slow, but for this delay sqlite has to be blamed. Interesting enough that the following instruction makes it much faster causing SQLite to turn off disk sync: *PRAGMA default_synchronous = OFF; * With best regards, Erny |
From: Duncan M. <py...@ad...> - 2004-06-22 19:23:54
|
On Jun 22, 2004, at 3:15 PM, Sebastien Bigaret wrote: > > Hi all, > > I'm pleased to announce the release v0.7 of the=20 > NotificationFramework. > > No modification has been made, except of course the license: a > 3-clause BSD license, as announced here two days ago. > > -- S=E9bastien. Thank you so much, S=E9bastien! I can't tell you how greatly our group appreciates this :-) |
From: Sebastien B. <sbi...@us...> - 2004-06-22 19:17:15
|
Hi all, I'm pleased to announce the release v0.7 of the NotificationFramework. No modification has been made, except of course the license: a 3-clause BSD license, as announced here two days ago. -- S=E9bastien. |
From: Sebastien B. <sbi...@us...> - 2004-06-22 18:40:36
|
John Lenton <jo...@vi...> wrote: > hmm... now I'm not so certain the patch actually did what we > wanted. In fact, reading the code, I see that saveChanges is called > when bind_saveChanges_to_zope_transactions is true, and _finish is > called on the ECProxy. AFAICT, saveChanges is *not* called on session > destruction unless that property is set, and then it is called at > every request end, right? Yes, you're right, except that saveChanges() is in fact *never* called upon session destruction. I did not see what your intent was when I read your message; if you want read-only (ie. no saveChanges() being called on a session's ec), then you simply set bind_saveChanges_to_zope_transactions to false. And you're right, too, about the patch, since it has no effect unless saveChanges() is bound to zope txn, in which case it has the same effect (binding saveChange() to the zope txn). Glad you notice, I did not pay enough attention indeed. Now while we're at it (even if I have no use-case in mind for this): maybe the ability to control independently whether a session's ec should be saved upon session destruction might be useful? -- S=E9bastien. > Sender: John Lenton <jo...@ma...> >=20 > On Sun, Jun 20, 2004 at 05:38:29PM +0200, Sebastien Bigaret wrote: > >=20 > > John Lenton <jo...@vi...> wrote: > > > This patch adds a boolean property to the ZEditingContextSessioning > > > zope product that controls whether saveChanges is called upon session > > > destruction. Defaults to true (i.e., do saveChanges). > > >=20 > > > It's a very simple patch, but it does what we needed (building a web > > > application that needs to ensure atomicity of a complex object that is > > > created in multiple stages). > >=20 > > Thanks for the patch, it will be integrated into the next release. > > Before releasing we'll need to update the documentation at > > ZECSessioning/README and MDL/doc/UserGuide/FrameworkTypicalUsage.tex. > > Email me privately if by any chance you think you could find some time > > for this this week. >=20 > hmm... now I'm not so certain the patch actually did what we > wanted. In fact, reading the code, I see that saveChanges is called > when bind_saveChanges_to_zope_transactions is true, and _finish is > called on the ECProxy. AFAICT, saveChanges is *not* called on session > destruction unless that property is set, and then it is called at > every request end, right? >=20 > Pass me the paper bag :( |
From: John L. <jo...@vi...> - 2004-06-21 20:34:23
|
Sender: John Lenton <jo...@ma...> On Sun, Jun 20, 2004 at 05:38:29PM +0200, Sebastien Bigaret wrote: > > John Lenton <jo...@vi...> wrote: > > This patch adds a boolean property to the ZEditingContextSessioning > > zope product that controls whether saveChanges is called upon session > > destruction. Defaults to true (i.e., do saveChanges). > > > > It's a very simple patch, but it does what we needed (building a web > > application that needs to ensure atomicity of a complex object that is > > created in multiple stages). > > Thanks for the patch, it will be integrated into the next release. > Before releasing we'll need to update the documentation at > ZECSessioning/README and MDL/doc/UserGuide/FrameworkTypicalUsage.tex. > Email me privately if by any chance you think you could find some time > for this this week. hmm... now I'm not so certain the patch actually did what we wanted. In fact, reading the code, I see that saveChanges is called when bind_saveChanges_to_zope_transactions is true, and _finish is called on the ECProxy. AFAICT, saveChanges is *not* called on session destruction unless that property is set, and then it is called at every request end, right? Pass me the paper bag :( -- John Lenton (jo...@vi...) -- Random fortune: Government [is] an illusion the governed should not encourage. -- John Updike, "Couples" |
From: Sebastien B. <sbi...@us...> - 2004-06-20 20:28:48
|
The switch to the BSD-like license will be made in two parts. As far as the NotificationFramework is concerned, a new release will be made in the next coming days under the new licence. The Modeling framework will also switch to the new licence in the coming week, but on the CVS main trunk only. The next release will be a v0.9 release candidate, however there is no precise date for this release yet. Until it is released, anyone will be able to get a BSD-licensed version of the framework through anonymous cvs on sourceforge. Every step will obviously be announced here when done. -- S=E9bastien. PS: python files will get the following header: (/modulo/ still possible minor changes) # Modeling Framework: an Object-Relational Bridge for python # Copyright (c) 2001-2004 S=E9bastien Bigaret <sbi...@us...urceforge.n= et> # All rights reserved. # # This file is part of the Modeling Framework. # # This code is distributed under a "3-clause BSD"-style license; # see the LICENSE file for details. and the LICENSE file will contain: ------------------------------------------------------------------------ Modeling Framework: an Object-Relational Bridge for python Copyright (c) 2001-2004 S=E9bastien Bigaret <sbi...@us...> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of its copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ |
From: Sebastien B. <sbi...@us...> - 2004-06-20 20:03:38
|
[Note: technical details and schedule follow in an other post] In short: the Modeling framework is about to switch to a BSD-like license. And now for the long version of it! Hi all, At the end of february a discussion was initiated about the licensing model for the framework. The corresponding threads can be found here: https://sourceforge.net/mailarchive/forum.php?thread_id=3D3884124&forum_id= =3D10674 https://sourceforge.net/mailarchive/forum.php?thread_id=3D3887729&forum_id= =3D10674 First at all, I'd like to thank everyone for the comments, positive feedbacks I received at that time and since, either on the mailing-list or through private emails. Thanks also to all those who took some of their time to give me the necessary clarifications when I needed them: the few papers, discussions and analysis I've read about licenses have regularly thrown me into confusion for the last 4 months! Changing a software's license is not exactly something I like to do (this probably explains why I come back on the subject so lately) ; being a developper and not a lawyer, I simply do not feel comfortable with these things --I'm sure you all know that feeling... As stated in the subject of this post, the decision is taken to switch to a 3-clause BSD-like license, whose template is available at: http://www.opensource.org/licenses/bsd-license.php I'll try to summarize my motivations here. Hopefully this won't be too much cumbersome... However do not misunderstand me: I do not pretend to be a specialist of the question. I just want to express the reasons for my choice and the ideas behind, I want to make it clear once and for all the way I consider people can use framework. So, please, no flame-war ;) First, I'll quote a portion of an email I wrote in a private discussion: My intention is just to give back my contribution to the open-source community, not to prevent people from using the software --I have myself done some business by selling services on open-source software, so I'm definitely not opposed to the idea of a commercial usage of open-source software. Connected to this, there is also the point raised by Ernesto about << finished applications [which] sometimes should not be free >>. At this point, people usually express political & ethical ideas about the choice of a license. I reached this point, obviously ;) | My intention is that I want to make sure that all developpers can | use the framework freely --including earning one's life by selling | products, possibly closed-source, containing the software. The LGPL permits this, however: - I must admit that I prefer a clear and small license that I can fully understand :) - I am *personally* not convinced by the arguments about copyleft: Quoted from http://www.gnu.org/philosophy/x.html: Non-copylefted software is vulnerable from all directions; it lets anyone make a non-free version dominant, if he will invest sufficient resources to add significantly important features using proprietary code --> Any individual, organization, company etc. with enough means and/or willingness can always propose an alternative to any software. Hey, precisely, isn't the framework inspired by the fabulous Enterprise Object Framework(tm) ? Last, even (L)GPL does not garanty that we get anything back, since distributing modifications isn't mandatory --the only obligation is that *if* the modified software is distributed, source code must be available. So I really prefer to stand on the optimist side: people will share, rather than on the pessimistic side, trying to find ways to force people to share. This is an arguable point of view, agreed, but it's mine ;) All these considerations have finally led me to the decision to switch back to the revised BSD license. Hopefully I did answer every questions that showed up since the discussion about this topic began. Now you'll find in the next post technical details and the schedule for the switch. And, naturally, I'll always be pleased to receive testimonials and description of your applications using the framework! -- S=E9bastien. |
From: Sebastien B. <sbi...@us...> - 2004-06-20 15:40:29
|
Hi John & all, John Lenton <jo...@vi...> wrote: > This patch adds a boolean property to the ZEditingContextSessioning > zope product that controls whether saveChanges is called upon session > destruction. Defaults to true (i.e., do saveChanges). >=20 > It's a very simple patch, but it does what we needed (building a web > application that needs to ensure atomicity of a complex object that is > created in multiple stages). Thanks for the patch, it will be integrated into the next release. Before releasing we'll need to update the documentation at ZECSessioning/README and MDL/doc/UserGuide/FrameworkTypicalUsage.tex. Email me privately if by any chance you think you could find some time for this this week. > On the same front, we *might* be building a (very stupid) application > server---rather a Modeling server---for this, to enable simple > creation of multiple complex-object-that-is-created-in-multiple-stages. > I prototyped a readonly version in a night, and I think they liked > it :) That would be great --a "very stupid" application would definitely be better than no sample code at all ;) -- S=E9bastien. |
From: John L. <jo...@vi...> - 2004-06-18 16:14:24
|
and now, the patch. -- John Lenton (jo...@vi...) -- Random fortune: Siempre que te pregunten si puedes hacer un trabajo, contesta que si y ponte enseguida a aprender como se hace. -- Franklin Delano Roosevelt. |
From: John L. <jo...@vi...> - 2004-06-18 15:51:15
|
Sender: John Lenton <jo...@ma...> This patch adds a boolean property to the ZEditingContextSessioning zope product that controls whether saveChanges is called upon session destruction. Defaults to true (i.e., do saveChanges). It's a very simple patch, but it does what we needed (building a web application that needs to ensure atomicity of a complex object that is created in multiple stages). On the same front, we *might* be building a (very stupid) application server---rather a Modeling server---for this, to enable simple creation of multiple complex-object-that-is-created-in-multiple-stages. I prototyped a readonly version in a night, and I think they liked it :) --=20 John Lenton (jo...@vi...) -- Random fortune: Robar las ideas de una persona es plagio; robarlas de muchas es investigaci= =F3n. -- Ley de Felson.=20 |
From: Kevin <py...@pr...> - 2004-06-07 15:45:43
|
Thanks Mario, Thanks Sebastian. I will look these links over, and I will certainly share comparisons that I do as well as others that I find. Thanks again! Kevin |
From: Mario R. <ma...@ru...> - 2004-06-07 08:46:08
|
Hello S=E9bastien! nice to hear from you again... funny I also had a hard disk crash=20 recently ;( A real pain... > Kevin <py...@pr...> wrote: >> Is there a clearing house for information about the different=20 >> application >> frameworks (cherrypy, zope, others) that I could look at? If there=20= >> is a good >> clearing house, please let me know. I have not found many articles=20 >> that go in >> depth about the distintions between the tools, as one might find in=20= >> some of >> the other languages.... (I have looked, just have not been=20 >> successful yet.) > > Sorry, I don't know. A google search for "zope comparison" seems to=20 > show > some documents, and dedicated search "comparison webware" e.g. leads=20= > to > other results. Seems like you have a bunch of separate opinions to=20 > read > and summarize... BTW, you may be luckier if you ask =20 > dedicated > mailing-lists, such as the ones for zope, webware, etc. If by=20= > any > chance you end-up with a link, or even with writing your own, we'll=20= > be > interested here ;) In case you are not aware of these resources: WebProgramming - PythonInfo Wiki http://www.python.org/cgi-bin/moinmoin/WebProgramming Lots of links, also to all known frameworks, plus a new article w.r.t.=20= j2ee The Web Framework Shootout http://colorstudy.com/docs/shootout.html Nice comparison, also with a sample app for some Python Web Programming: Web Application Frameworks http://www.informit.com/articles/article.asp?p=3D26860&redir=3D1 Long article, just discovered it... not read yet. Cheers, mario =20= |
From: Sebastien B. <sbi...@us...> - 2004-06-07 06:40:05
|
Hi all, > On May 30, 2004, at 8:27 PM, Kevin wrote: > > > > Hello- > > I just recently ran into finding the modeling framework. Given my=20 > > history with NeXT / Apple tools, I am pretty excited about it. > > I am looking for tools to build a new application, and have recently=20 > > turned towards python (I am an old Objective C hack) > > > > I am wondering- > > > > 1. What do those of you with similar past (WOF/EOF) use for the web=20 > > application layer? That is, what do you use to map business objects=20 > > to webpages with? > > I still occasionnally do. We discussed this topic here: http://sourceforge.net/mailarchive/forum.php?thread_id=3D3851846&forum_id= =3D10674 Agreed, this is not an extensive description, so feel free to ask for more. To summarize, I'm using pure-python for the business logic, and Products in zope as VC components --Zope Products can be viewed as WO components, the zpt being the .wod+.html stuff, and the python part of the product the component.java. Mario Ruggier <ma...@ru...> wrote: > Hello! >=20 > I know that Sebastien has used modeling with zope, and I'm sure he'll=20 > comment about that shortly... (hey, maybe he is on a well-deserved=20 > holiday?) I wish I was in holidays! In fact some nasty hardware problems hit me on my personal machine, and since I've little time for that things are slowly evolving; most of the datas, incl. current work on the project is now recovered, I still need to reinstall a whole system --big part being reinstalling the test oracle dbs... > > 2. Has anyone used Modeling with plone/zope? Any strong biases about= =20 > > this ("don't do it" or "do this instead")? Well, as you'll read in the thread referenced above my approach w/ zope / plone was MVC-like, w/ business-logic coded in pure python and brought to the zope app. server through dedicated Products. The only problem people are ranting about is the absence of optimistic locking, which hopefully will eventually come up soon. Kevin <py...@pr...> wrote: > Is there a clearing house for information about the different application > frameworks (cherrypy, zope, others) that I could look at? If there is a = good > clearing house, please let me know. I have not found many articles that g= o in > depth about the distintions between the tools, as one might find in some = of > the other languages.... (I have looked, just have not been successful ye= t.) Sorry, I don't know. A google search for "zope comparison" seems to show some documents, and dedicated search "comparison webware" e.g. leads to other results. Seems like you have a bunch of separate opinions to read and summarize... BTW, you may be luckier if you ask dedicated mailing-lists, such as the ones for zope, webware, etc. If by any chance you end-up with a link, or even with writing your own, we'll be interested here ;) -- S=E9bastien. |
From: Kevin <py...@pr...> - 2004-06-02 21:37:50
|
Mario, and others, Is there a clearing house for information about the different application frameworks (cherrypy, zope, others) that I could look at? If there is a good clearing house, please let me know. I have not found many articles that go in depth about the distintions between the tools, as one might find in some of the other languages.... (I have looked, just have not been successful yet.) Thanks for your note! Kevin Mario Ruggier wrote: > Hello! > > I know that Sebastien has used modeling with zope, and I'm sure he'll > comment about that shortly... (hey, maybe he is on a well-deserved > holiday?) I had never worked with the WOF/EOF framework, but was > always attracted to the concept. And, I have never used zope with > modeling either... the last application i used modeling in has been > with the cherrypy.org appserver , and i found the two to work very > nicely together, or rather there is zero interference from one onto > the other. > > Cheers, mario > > > On May 30, 2004, at 8:27 PM, Kevin wrote: > >> >> Hello- >> I just recently ran into finding the modeling framework. Given my >> history with NeXT / Apple tools, I am pretty excited about it. >> I am looking for tools to build a new application, and have recently >> turned towards python (I am an old Objective C hack) >> >> I am wondering- >> >> 1. What do those of you with similar past (WOF/EOF) use for the web >> application layer? That is, what do you use to map business objects >> to webpages with? >> >> 2. Has anyone used Modeling with plone/zope? Any strong biases >> about this ("don't do it" or "do this instead")? >> >> Thanks. >> Kevin > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > >> From Windows to Linux, servers to mobile, InstallShield X is the one > > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Modeling-users mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modeling-users > |
From: Mario R. <ma...@ru...> - 2004-06-02 05:10:52
|
Hello! I know that Sebastien has used modeling with zope, and I'm sure he'll comment about that shortly... (hey, maybe he is on a well-deserved holiday?) I had never worked with the WOF/EOF framework, but was always attracted to the concept. And, I have never used zope with modeling either... the last application i used modeling in has been with the cherrypy.org appserver , and i found the two to work very nicely together, or rather there is zero interference from one onto the other. Cheers, mario On May 30, 2004, at 8:27 PM, Kevin wrote: > > Hello- > I just recently ran into finding the modeling framework. Given my > history with NeXT / Apple tools, I am pretty excited about it. > I am looking for tools to build a new application, and have recently > turned towards python (I am an old Objective C hack) > > I am wondering- > > 1. What do those of you with similar past (WOF/EOF) use for the web > application layer? That is, what do you use to map business objects > to webpages with? > > 2. Has anyone used Modeling with plone/zope? Any strong biases about > this ("don't do it" or "do this instead")? > > Thanks. > Kevin |
From: Kevin <py...@pr...> - 2004-05-30 18:24:03
|
Hello- I just recently ran into finding the modeling framework. Given my history with NeXT / Apple tools, I am pretty excited about it. I am looking for tools to build a new application, and have recently turned towards python (I am an old Objective C hack) I am wondering- 1. What do those of you with similar past (WOF/EOF) use for the web application layer? That is, what do you use to map business objects to webpages with? 2. Has anyone used Modeling with plone/zope? Any strong biases about this ("don't do it" or "do this instead")? Thanks. Kevin |
From: Sebastien B. <sbi...@us...> - 2004-05-11 10:16:23
|
Hi, Clay <ho...@ho...> wrote: > Hi folks, >=20 > First off, let me say that I'm pretty impressed with what you have started > here. I've been in a similar situation a few times, and decided something > like this was sorely needed, but never had the time to put anything quite= so > coherent together to address it. So, nice work. >=20 > I'm trying to get started small, and have hit a question. >=20 > I'm trying to think of this in terms of having the 'pymodel' file be the > central repository for schema related issues. That seems to be the design > intent anyway -- and really how I would like to do things (central locati= on). First at all, thanks for all the positive feedback ;) About the pymodel: yes, it is the main repository for schema-related issues. However, it is not the only on, esp. when some constraints cannot be easily expressed in a Entity-Relationship model, such as custom validation logic (e.g. do not save any Person whose name is 'Cleese' except if his first name is 'John') which is more easily coded in validation methods in python. >=20 > Suppose I'm going to implement /etc/passwd /etc/group type concepts. This > gives 'user' 'group' and 'usergroup' entities, plus associations. Great. >=20 > using groupID and userID as the primary keys, and the correlation table i= s the > tuple of the two. >=20 Fine. > Heres' my issue. Clearly you want to enforce uniqueness of username (str= ings) > as well as user-ids and integer primary keys. Further, this is something= you > need the DBMS to enforce. Since I'm effectively specifying my schema in > pymodel, it would seem reasonable to be able to add this type of constrai= nt to > that specification. >=20 > Either that, or have a coherent way of maintaining them separatly in a > non-disjoint sort of way. Okay, so you need to be able to say to the DB that these attributes are UNIQUE. Unfortunately, this is not in the framework... yet :) We discussed this some time ago w/ Mario, look here for the corresponding thread: http://sourceforge.net/mailarchive/forum.php?thread_id=3D3575938&forum_id= =3D10674 So (unless you're using sqlite), you can ALTER the correspondig table to make the appropriate attributes UNIQUE, and add some validation logic in your objects making sure that e.g. the login is unique; something like this (untested though): def validateLogin(self, value): "Makes sure that the login is unique before saveChanges() happens" =20=20=20=20=20=20 fs =3D 'login=3D=3D"%s"'%self._login if not self.globalID().isTemporary(): # assuming here that User has a PK named 'id' fs +=3D " AND id!=3D%i" % self.globalID().keyValues()['id'] if self.editingContext().fetchCount('User', fs) !=3D 0: raise Validation.ValidationException Hopefully this makes sense. Back on the functionality, maybe it's time to fill in a RFE and integrate something like this in the framework, what do you think? -- S=E9bastien. >=20 > Looking for either something I've missing in the modelling, or a good > technique to handle this class of problem. >=20 > Thanks, > Clay Hopperdietzel |