Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-25 Thread Jason Spisak

Ender writes:

Point taken.


> Jason Spisak wrote:
> > 
> > Ender writes:
> > 
> > > Jason Spisak wrote:
> > > >
> > > > The only problem I am dealing with is size.
> > > > What kind of a transaction will that be?
> > > > Huge, no doubt.
> > > >
> > > > I would run out of space to buffer it.  Does Zope do subtransactions now,
> > > > or is that still just the ZCatalog?
> > >
> > > zope has done subtransactions for a while, i'm not sure if this predates
> > > zcatalog or not ( i assume'd it does).
> > >
> > > just call get_transaction.commit(1) to save work. and call
> > > get_tranaction.commit() when you're done. i'm in the process of writing
> > > an advanced transaction how-to which will hopefully give some more
> > > enlightenment on this process, but i've been busy with work so i don't
> > > expect to have it public for another week.
> > >
> > > > Also, I am running on stock RH6.2 linux and to double my ZODB puts me near
> > > > the 2 gig file limit.  Not as much of a concern as a pain in my neck.  Is
> > > > it faster to modify my installation to allow > 2GB or create from
> > > > xml/export?
> > >
> > > you could create the python product instances in a mounted db.
> > >
> > 
> > I looked into this.  The webpage is very exclamitory about it's volitility,
> > and yet Zope.org uses it.  Worth a shot.
> 
> do make a backup, i hosed something in my zodb using it.
> 
> kapil


Jason Spisak

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-25 Thread Jason Spisak

Ender writes:

> Jason Spisak wrote:
> > 
> > The only problem I am dealing with is size.
> > What kind of a transaction will that be?
> > Huge, no doubt.
> > 
> > I would run out of space to buffer it.  Does Zope do subtransactions now,
> > or is that still just the ZCatalog?
> 
> zope has done subtransactions for a while, i'm not sure if this predates
> zcatalog or not ( i assume'd it does).
> 
> just call get_transaction.commit(1) to save work. and call 
> get_tranaction.commit() when you're done. i'm in the process of writing
> an advanced transaction how-to which will hopefully give some more
> enlightenment on this process, but i've been busy with work so i don't
> expect to have it public for another week.
> 
> > Also, I am running on stock RH6.2 linux and to double my ZODB puts me near
> > the 2 gig file limit.  Not as much of a concern as a pain in my neck.  Is
> > it faster to modify my installation to allow > 2GB or create from
> > xml/export?
> 
> you could create the python product instances in a mounted db.
> 


I looked into this.  The webpage is very exclamitory about it's volitility,
and yet Zope.org uses it.  Worth a shot.

Thanks

Jason Spisak

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-25 Thread Jason Spisak

Toby Dickenson:

Thanks for the advice.
I have looked at that before, and having a hybrid ZClass/Python product
seemed to place a lot of design considerations heavily in the python base
class.  I've looked _holdOntoYourButts before as well.

Thanks again,


> On Tue, 24 Oct 2000 20:16:30 GMT, "Jason Spisak" <[EMAIL PROTECTED]>
> wrote:
> 
> >I am trying to address shortcomings like not having a
> >"dictionary" type property in Zope properties, etc.
> 
> Aha! in that case you dont really need to convert from ZClass to
> python class; you only need to modify your existing ZClass so that it
> has an extra python base class.
> 
> * No need to trawl through your database to convert each instance
> 
> * No need to rewrite the bits that work well as a ZClass
> 
> 
> You can do this using the method _setBasesHoldOnToYourButts defined in
> ZClass.py, and you may be able to find some instructions in the list
> archives.
> 
> (Its often safer to create a special python base class for each new
> ZClass, even if that class is empty, just in case)
> 
> Toby Dickenson
> [EMAIL PROTECTED]
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
> 


Jason Spisak

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-25 Thread Toby Dickenson

On Tue, 24 Oct 2000 20:16:30 GMT, "Jason Spisak" <[EMAIL PROTECTED]>
wrote:

>I am trying to address shortcomings like not having a
>"dictionary" type property in Zope properties, etc.

Aha! in that case you dont really need to convert from ZClass to
python class; you only need to modify your existing ZClass so that it
has an extra python base class.

* No need to trawl through your database to convert each instance

* No need to rewrite the bits that work well as a ZClass


You can do this using the method _setBasesHoldOnToYourButts defined in
ZClass.py, and you may be able to find some instructions in the list
archives.

(Its often safer to create a special python base class for each new
ZClass, even if that class is empty, just in case)

Toby Dickenson
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Ender

Jason Spisak wrote:
> 
> The only problem I am dealing with is size.
> What kind of a transaction will that be?
> Huge, no doubt.
> 
> I would run out of space to buffer it.  Does Zope do subtransactions now,
> or is that still just the ZCatalog?

zope has done subtransactions for a while, i'm not sure if this predates
zcatalog or not ( i assume'd it does).

just call get_transaction.commit(1) to save work. and call 
get_tranaction.commit() when you're done. i'm in the process of writing
an advanced transaction how-to which will hopefully give some more
enlightenment on this process, but i've been busy with work so i don't
expect to have it public for another week.

> Also, I am running on stock RH6.2 linux and to double my ZODB puts me near
> the 2 gig file limit.  Not as much of a concern as a pain in my neck.  Is
> it faster to modify my installation to allow > 2GB or create from
> xml/export?

you could create the python product instances in a mounted db.

Kapil

> Jason
> >
> > It should be Really Easy (TM) to write an external method that grabs
> > the data from your zclasses, and then creates a new instance of your
> > python object with the zclass data.  It's just a big for loop.
> > -Brett
> >
> > > "Jason" == Jason Spisak <[EMAIL PROTECTED]> writes:
> >
> > Jason> Shane:
> > >> Jason Spisak wrote:
> > >> > > > And now the big question...
> > >> > > >
> > >> > > > How do you migrate and existing application from ZClasses to Python
> > >> > > > products?  I've got about 50,000 objects.  Can it be done or am I 
>stuck
> > >> > > > with ZClasses?
> > >> > >
> > >> > > Andy McKay writes:
> > >> > >
> > >> > > Well the number of objects doesnt really matter, but migrating it from
> > >> > > ZClass to Python - Ive never heard of that happening. It would be a cool
> > >> > > project though.
> > >>
> > >> The hard part (which probably isn't very hard after all :-) ) is writing
> > >> the product that performs the same function as the ZClass. Once that's
> > >> done, a fifteen-line external method (that doesn't use any special
> > >> voodoo) can convert all instances.
> > >>
> > >> Shane
> >
> >
> > Jason> Perhaps what I should do is just get the data out, and create new 
>instances
> > Jason> all via an external method.  The migration isn't really a 1 for 1
> > Jason> situation. I am trying to address shortcomings like not having a
> > Jason> "dictionary" type property in Zope properties, etc.. So the 
>implementation
> > Jason> will be different anyway.  I guess an export to XML gives me all the 
>data
> > Jason> in the objects, right?  Then I could use that as a map to construct new
> > Jason> instances in a different implementation.
> >
> >
> > Jason> Thanks for all the answers,
> >
> > Jason> Jason
> >
> > Jason> ___
> > Jason> Zope-Dev maillist  -  [EMAIL PROTECTED]
> > Jason> http://lists.zope.org/mailman/listinfo/zope-dev
> > Jason> **  No cross posts or HTML encoding!  **
> > Jason> (Related lists -
> > Jason>  http://lists.zope.org/mailman/listinfo/zope-announce
> > Jason>  http://lists.zope.org/mailman/listinfo/zope )
> >
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Jason Spisak

Brett Carter writes:

The only problem I am dealing with is size.
What kind of a transaction will that be?
Huge, no doubt.

I would run out of space to buffer it.  Does Zope do subtransactions now,
or is that still just the ZCatalog?

Also, I am running on stock RH6.2 linux and to double my ZODB puts me near
the 2 gig file limit.  Not as much of a concern as a pain in my neck.  Is
it faster to modify my installation to allow > 2GB or create from
xml/export?

Jason
> 
> It should be Really Easy (TM) to write an external method that grabs
> the data from your zclasses, and then creates a new instance of your
> python object with the zclass data.  It's just a big for loop.
> -Brett
> 
> > "Jason" == Jason Spisak <[EMAIL PROTECTED]> writes:
> 
> Jason> Shane:
> >> Jason Spisak wrote:
> >> > > > And now the big question...
> >> > > >
> >> > > > How do you migrate and existing application from ZClasses to Python
> >> > > > products?  I've got about 50,000 objects.  Can it be done or am I stuck
> >> > > > with ZClasses?
> >> > >
> >> > > Andy McKay writes:
> >> > >
> >> > > Well the number of objects doesnt really matter, but migrating it from
> >> > > ZClass to Python - Ive never heard of that happening. It would be a cool
> >> > > project though.
> >> 
> >> The hard part (which probably isn't very hard after all :-) ) is writing
> >> the product that performs the same function as the ZClass. Once that's
> >> done, a fifteen-line external method (that doesn't use any special
> >> voodoo) can convert all instances.
> >> 
> >> Shane
> 
> 
> Jason> Perhaps what I should do is just get the data out, and create new 
>instances
> Jason> all via an external method.  The migration isn't really a 1 for 1
> Jason> situation. I am trying to address shortcomings like not having a
> Jason> "dictionary" type property in Zope properties, etc.. So the implementation
> Jason> will be different anyway.  I guess an export to XML gives me all the data
> Jason> in the objects, right?  Then I could use that as a map to construct new
> Jason> instances in a different implementation.
> 
> 
> Jason> Thanks for all the answers,
> 
> Jason> Jason
> 
> Jason> ___
> Jason> Zope-Dev maillist  -  [EMAIL PROTECTED]
> Jason> http://lists.zope.org/mailman/listinfo/zope-dev
> Jason> **  No cross posts or HTML encoding!  **
> Jason> (Related lists - 
> Jason>  http://lists.zope.org/mailman/listinfo/zope-announce
> Jason>  http://lists.zope.org/mailman/listinfo/zope )
> 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Jason Spisak

Shane:

> Jason Spisak wrote:
> > > > And now the big question...
> > > >
> > > > How do you migrate and existing application from ZClasses to Python
> > > > products?  I've got about 50,000 objects.  Can it be done or am I stuck
> > > > with ZClasses?
> > >
> > > Andy McKay writes:
> > >
> > > Well the number of objects doesnt really matter, but migrating it from
> > > ZClass to Python - Ive never heard of that happening. It would be a cool
> > > project though.
> 
> The hard part (which probably isn't very hard after all :-) ) is writing
> the product that performs the same function as the ZClass. Once that's
> done, a fifteen-line external method (that doesn't use any special
> voodoo) can convert all instances.
> 
> Shane


Perhaps what I should do is just get the data out, and create new instances
all via an external method.  The migration isn't really a 1 for 1
situation. I am trying to address shortcomings like not having a
"dictionary" type property in Zope properties, etc.. So the implementation
will be different anyway.  I guess an export to XML gives me all the data
in the objects, right?  Then I could use that as a map to construct new
instances in a different implementation.


Thanks for all the answers,

Jason

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Shane Hathaway

Jason Spisak wrote:
> > > And now the big question...
> > >
> > > How do you migrate and existing application from ZClasses to Python
> > > products?  I've got about 50,000 objects.  Can it be done or am I stuck
> > > with ZClasses?
> >
> > Andy McKay writes:
> >
> > Well the number of objects doesnt really matter, but migrating it from
> > ZClass to Python - Ive never heard of that happening. It would be a cool
> > project though.

The hard part (which probably isn't very hard after all :-) ) is writing
the product that performs the same function as the ZClass. Once that's
done, a fifteen-line external method (that doesn't use any special
voodoo) can convert all instances.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Jason Spisak

Andy McKay writes:

Cool Project...
That means I'm screwed. :)

> > And now the big question...
> >
> > How do you migrate and existing application from ZClasses to Python
> > products?  I've got about 50,000 objects.  Can it be done or am I stuck
> > with ZClasses?
> 
> Well the number of objects doesnt really matter, but migrating it from
> ZClass to Python - Ive never heard of that happening. It would be a cool
> project though.
> 
> > Hopefully,
> >
> > Jason Spisak
> > CIO
> > HireTechs.com
> > 6151 West Century Boulevard
> > Suite 900
> > Los Angeles, CA 90045
> > P. 310.665.3444
> > F. 310.665.3544
> >
> > Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
> > address may not be added to any commercial mail list with out my
> > permission.  Violation of my privacy with advertising or SPAM will
> > result in a suit for a MINIMUM of $500 damages/incident, $1500 for
> > repeats.
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >
> 


Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Andy McKay

> And now the big question...
>
> How do you migrate and existing application from ZClasses to Python
> products?  I've got about 50,000 objects.  Can it be done or am I stuck
> with ZClasses?

Well the number of objects doesnt really matter, but migrating it from
ZClass to Python - Ive never heard of that happening. It would be a cool
project though.

> Hopefully,
>
> Jason Spisak
> CIO
> HireTechs.com
> 6151 West Century Boulevard
> Suite 900
> Los Angeles, CA 90045
> P. 310.665.3444
> F. 310.665.3544
>
> Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
> address may not be added to any commercial mail list with out my
> permission.  Violation of my privacy with advertising or SPAM will
> result in a suit for a MINIMUM of $500 damages/incident, $1500 for
> repeats.
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Migrating from ZClasses to Python Products

2000-10-24 Thread Jason Spisak

And now the big question...

How do you migrate and existing application from ZClasses to Python
products?  I've got about 50,000 objects.  Can it be done or am I stuck
with ZClasses?

Hopefully,

Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )