Re: [Zope3-Users] 2nd edition of Zope 3 book available!

2006-12-02 Thread Christophe Combelles
Thanks for this book, that's just what I was waiting for since I started 
learning zope3 this summer. I've been reading and reading again everything I've 
found online on the subject, but it is not engough. It will bring me some fresh 
air. It's been 1 week since I ordered one, and I hope it's already on the way to 
my mailbox!


BTW, is there any plan to publish some translated versions?

regards
Christophe

Philipp von Weitershausen wrote:
I'm proud to announce that -- as the first Zope book ever -- my book 
titled Web Component Development with Zope 3 has been released as a 
second edition and is now available from online and local bookstores.


Like the first edition, the new book is targeted at all web developers 
who want to get into Zope 3 or learn more about Zope 3 and Zope 3 
technology than they already know.  It's accompanied by an extensive 
example application that's extended throughout the book.


*Unlike* the first edition, the second edition is...

- up-to-date.

  The book covers the latest Zope 3 release, Zope 3.3, which has only
  been released recently. All chapters, all examples, and the appendices
  have been revised to match the most current Zope 3 codebase.

- bigger.

  Five (!) new chapters, all describing new features in Zope, have been
  added, many others were extended notably. In total, the book is more
  than 80 pages thicker than the old one -- at the same price as the old
  one.

- better.

  With the second edition, the book has been completely revamped. My
  excellent reviewers from the Zope and Plone community have done a
  tremendous good job at improving the book's language and technical
  details. I also improved the didactics in various places.

- for you!

  No matter if you're a Zope 3 developer or just starting to get into
  Zope 3, I suggest you keep the book under your pillow. Even as a Zope
  2 or Plone developer, you'd be surprised how much Zope 3 technology
  you can now use in Zope 2 -- and this book tells you how! This makes
  it a must-buy especially for Plone developers as Plone 3.0 is using
  Zope 3 components for all new development.

Find out more at http://worldcookery.com.

Philipp




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] schema field for an Image?

2006-12-02 Thread Tom Dossis
Sascha Ottolski wrote:
 I'm wondering if anything already exists, that would allow me to define 
 a schema like (pseudo)
 
 IPerson(Interface):
 
 image = File(
 max_size=100,
 )
 
 Person(Persistent):
 implements(IPerson)
 
 image = FileProperty(form_fields['image'])
 
 with the result, that the image attribute behaves pretty much like an 
 IImage, that is, has contentType and size associated with it, and might 
 be easily displayed with the help of something like 
 zope.app.file.browser.image.ImageData.
 
 I already tried to create such a Property, as well as using 
 schema.Object, but wasn't really successfull :-(

Hi Sacha, I've used something like this...

class IPerson(Interface):
  image=schema.Object(
schema=zope.app.file.interfaces.IImage,
required=False, # You may need this depending on validation needs..
)

class Person(Persistent):
  implements(IPerson)
  image=FieldProperty(IPerson['image'])


If you want to make the image attribute traversable (via the url) the
z3c.traverser package can do the job.

 
 Of course, I can do all this by hand for each content object by adding 
 a contentType attribute and providing some views, but I have the 
 feeling that there would exist a smarter way to to this.
 
 Adding to this, is there a way to register views with fuzzy names? 
 Think of a class
 
 Person:
 
 resume = File()
 
 Now, to help the logfile analyzer, I would like to have a view 
 named resume.%s', so that if resume is a Word document, it could be 
 accesed as /person1/resume.doc, if resume is PDF, access would 
 be /person1/resume.pdf. I could register several views for common 
 suffixes, but than there comes a buy with one no one thought of. May be 
 this is a stupid idea anyway :-)

Have a look at zope.publisher.interfaces.IPublishTraverse to hook in
your own handler for traversing a Person object.

regards,
-Tom

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users