[Subversion] / PEAK / docs / core_tutorial / binding.tex  

Log of /PEAK/docs/core_tutorial/binding.tex

Parent Directory

No default branch
Bookmark a link to HEAD: (view) (download) (as text)


Revision 1573 - (view) (download) (as text) - [select for diffs]
Modified Sun Dec 28 00:14:24 2003 UTC (20 years, 3 months ago) by pje
File length: 42430 byte(s)
Diff to previous 1407
MAJOR API REFACTORING for 'peak.config', to support iterating over
configuration keys, 'n2' navigability of properties, and much more.
Many APIs are now DEPRECATED or renamed; please see CHANGES.txt for
a complete description.  A few highlights:

 - 'config.lookup()' replaces 'findUtility' and 'getProperty'

 - 'config.iterValues()' replaces 'findUtilities'

 - 'config.iterKeys()' finds keys in a specific namespace

 - NEW: 'config.parentProviding()' and 'config.parentsProviding()'
   APIs to find parent components that support a protocol.

 - NEW: You can now use 'peak n2 config:' to explore the default
   property namespace.  For example 'ls -l peak.naming.schemes'
   will list all defined naming schemes.

Please see CHANGES.txt for the list of deprecated or removed APIs.

Revision 1407 - (view) (download) (as text) - [select for diffs]
Modified Fri Oct 3 23:06:06 2003 UTC (20 years, 5 months ago) by pje
File length: 42437 byte(s)
Diff to previous 1392
Semi-futile attempt to fix up the tutorial for the new binding API.  We're
probably going to have to scrap the tutorial altogether soon, it's aging
far too rapidly relative to the capabilities of the codebase.  :(

Revision 1392 - (view) (download) (as text) - [select for diffs]
Modified Tue Sep 9 23:53:42 2003 UTC (20 years, 6 months ago) by pje
File length: 41877 byte(s)
Diff to previous 1199
Update misc. notes re: deprecated binding APIs.

Revision 1199 - (view) (download) (as text) - [select for diffs]
Modified Fri Jun 20 16:39:18 2003 UTC (20 years, 9 months ago) by pje
File length: 41937 byte(s)
Diff to previous 1190
Doc fixes: name -> attrName.

Revision 1190 - (view) (download) (as text) - [select for diffs]
Modified Wed Jun 18 15:48:52 2003 UTC (20 years, 9 months ago) by pje
File length: 41882 byte(s)
Diff to previous 1188
Fixup interfaces/docs to reflect 'offerAs' API changes.

Revision 1188 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 16 22:24:52 2003 UTC (20 years, 9 months ago) by pje
File length: 41922 byte(s)
Diff to previous 1187
Fixed spelling error.

Revision 1187 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 16 22:04:31 2003 UTC (20 years, 9 months ago) by pje
File length: 41921 byte(s)
Diff to previous 1174
Tweak tutorial error message to match current reality.

Revision 1174 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 9 22:20:49 2003 UTC (20 years, 9 months ago) by pje
File length: 41954 byte(s)
Diff to previous 1148
Updated tutorial to cite PyProtocols manual, and added info about Twisted
interfaces.  Cleaned up "see alsos" related to interfaces, and added a link
to a Twisted "howto" document on interfaces and adapters.

Revision 1148 - (view) (download) (as text) - [select for diffs]
Modified Thu May 29 20:11:03 2003 UTC (20 years, 10 months ago) by pje
File length: 41529 byte(s)
Diff to previous 1113
Misc. content corrections in preparation for alpha 2 release.

Revision 1113 - (view) (download) (as text) - [select for diffs]
Modified Tue May 13 00:26:48 2003 UTC (20 years, 10 months ago) by pje
File length: 41204 byte(s)
Diff to previous 1108
And so we bid a fond farewell to introspection as well.  'isImplementedBy'
is now a thing of the past.  Refactored anything that used it, to now
use adapt(), which has now opened up a lot of extension possibilities in
places that were previously not extensible without modifying PEAK core
code.  See below.  Also, the interface module has been refactored to support
'classProvides()' in a clean and kludge-free fashion, along with support for
faster adaptation of old and new-style classes (by caching lookups, and by
safely adding '__conform__' methods to classic classes), and the ability for
classes to manage their own "implements" information.  The core interface
code is now quite elegant in the way it uses its own adaptation system as
the basis for implementing adaptation.  :)

'binding.Acquire()' now accepts a 'default' value argument, and
'binding.New()' no longer accepts the 'bindToOwner' flag.

There is a new 'binding.IComponentKey' interface that is used to implement
'IComponent.lookupComponent()'.  Now you can implement this interface,
or create an adapter for it, in order to make an object usable as an
argument to 'binding.lookupComponent()' - and therefore usable as a key
for 'binding.bindTo()' or 'binding.bindToSequence()'.  Not that it's
necessarily very useful to do so; you're probably better off simply
creating a naming scheme.  But it might be useful for lookups done
in the context of classes, since naming schemes aren't usable there.
(It was actually added in order to factor out all the type testing that
'lookupComponent' used to do, so it doesn't matter if it's useful for
much else.)

PEAK has been refactored to avoid the use of 'isImplementedBy()' and
similar introspection, in favor of 'adapt()'.  As a result, some
'peak.naming' interfaces have changed.  This should not affect you
if you are only subclassing PEAK-provided naming components and not
implementing these interfaces "from scratch".  However, the various
'isAddress', 'isAddressClass', 'isResolver', and 'isName' APIs have
also been removed, as they were based on 'isImplementedBy()'.

The ability to use 'isImplementedBy()' with interfaces declared by PEAK is
REMOVED.  You can still use 'isImplementedBy()' with Zope interfaces, of
course, but we recommend you switch to 'adapt()', which will work with both
PEAK and Zope interfaces.

Revision 1108 - (view) (download) (as text) - [select for diffs]
Modified Sat May 10 21:29:49 2003 UTC (20 years, 10 months ago) by pje
File length: 41660 byte(s)
Diff to previous 1060
Farewell, 'zope.interface'.  You served us well.

Revision 1060 - (view) (download) (as text) - [select for diffs]
Modified Thu May 1 16:32:39 2003 UTC (20 years, 11 months ago) by pje
File length: 41653 byte(s)
Diff to previous 1058
Paramegeddon!  Adjusted API signatures so that all calls that have a
context component, have it as the first parameter.  Changed functions,
methods, and classes are:

* binding.acquireComponent()

* binding.lookupComponent()

* config.getProperty()

* config.findUtility()

* config.findUtilities()

* config.PropertyMap.getValueFor()

* config.IConfigSource._getConfigData()

* config.PropertySet()

* naming.lookup()

* naming.parseURL()

Also, renamed 'config.LazyLoader' -> 'config.LazyRule' to reduce confusion
with 'storage.LazyLoader', which has a very different purpose/function.

Revision 1058 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 30 23:58:14 2003 UTC (20 years, 11 months ago) by pje
File length: 41657 byte(s)
Diff to previous 1044
Tutorial edits to sync w/current API.

Revision 1044 - (view) (download) (as text) - [select for diffs]
Modified Tue Apr 29 17:33:02 2003 UTC (20 years, 11 months ago) by pje
File length: 41037 byte(s)
Diff to previous 941
Replace uses of the deprecated 'binding.Base' with 'binding.Component'.
Updated tutorial for this and other binding.interfaces name changes; note
that the tutorial has *not* been fully reviewed for semantic issues yet.

Revision 941 - (view) (download) (as text) - [select for diffs]
Modified Mon Mar 24 21:24:03 2003 UTC (21 years ago) by pje
File length: 41340 byte(s)
Diff to previous 932
Fixed typos/other errors found by Radek Kanovsky and Vladimir Bormotov.  I
guess there's something to this whole "many eyes make shallow bugs" theory
after all...  :)

Revision 932 - (view) (download) (as text) - [select for diffs]
Modified Sun Mar 2 22:19:07 2003 UTC (21 years, 1 month ago) by pje
File length: 41332 byte(s)
Diff to previous 774
Fixed errors in example code.

Revision 774 - (view) (download) (as text) - [select for diffs]
Modified Mon Dec 2 22:47:16 2002 UTC (21 years, 3 months ago) by pje
File length: 41319 byte(s)
Diff to previous 773
Fixed %&)(#&%$ tabs and other errors in copying transcripts from IDLE.

Revision 773 - (view) (download) (as text) - [select for diffs]
Modified Mon Dec 2 22:17:28 2002 UTC (21 years, 3 months ago) by pje
File length: 41305 byte(s)
Diff to previous 771
Added a couple pages to tutorial chapter two, covering various ways to hook
into the binding framework without using the supplied base classes, to
define alternative behavior for getComponentName()/getParentComponent(),
etc.

Revision 771 - (view) (download) (as text) - [select for diffs]
Modified Mon Dec 2 20:38:32 2002 UTC (21 years, 4 months ago) by pje
File length: 33559 byte(s)
Diff to previous 761
Update docs and error messages for the departure of 'ActiveDescriptor' base
and 'ActiveDescriptors' metaclass.

Revision 761 - (view) (download) (as text) - [select for diffs]
Modified Thu Nov 28 00:55:12 2002 UTC (21 years, 4 months ago) by pje
File length: 33585 byte(s)
Diff to previous 712
Remove references to deprecated or moved classes

Revision 712 - (view) (download) (as text) - [select for diffs]
Modified Wed Nov 20 01:00:22 2002 UTC (21 years, 4 months ago) by pje
File length: 33610 byte(s)
Diff to previous 709
Minor edits/fixes to tutorial.

Revision 709 - (view) (download) (as text) - [select for diffs]
Modified Tue Nov 19 22:27:16 2002 UTC (21 years, 4 months ago) by pje
File length: 33475 byte(s)
Diff to previous 689
Started new tutorial section on working with component hierarchies; misc.
other edits.

Revision 689 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 17 01:27:14 2002 UTC (21 years, 4 months ago) by pje
File length: 29922 byte(s)
Diff to previous 685
Misc. typo fixes

Revision 685 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 15 20:58:05 2002 UTC (21 years, 4 months ago) by pje
File length: 29938 byte(s)
Diff to previous 680
Fleshed out "Creating Attribute Bindings" section, added more outline text.

Revision 680 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 15 17:20:23 2002 UTC (21 years, 4 months ago) by pje
File length: 25734 byte(s)
Diff to previous 677
Fleshed out "Getting Started With PEAK" with more API and package details.
Also, misc. formatting and cosmetic cleanups.

Revision 677 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 15 00:17:00 2002 UTC (21 years, 4 months ago) by pje
File length: 25711 byte(s)
Diff to previous 676
Moved "Getting Started with PEAK" from Chapter 2 to Chapter 1

Revision 676 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 15 00:14:16 2002 UTC (21 years, 4 months ago) by pje
File length: 30516 byte(s)
Diff to previous 675
Fleshed out package overviews.  This entire section (Getting Started with
PEAK) should probably be moved to chapter 1, as it's sort of interrupting
the flow of chapter 2.

Revision 675 - (view) (download) (as text) - [select for diffs]
Modified Thu Nov 14 22:27:36 2002 UTC (21 years, 4 months ago) by pje
File length: 27887 byte(s)
Diff to previous 667
Fix typo; add more outlining for work to be done

Revision 667 - (view) (download) (as text) - [select for diffs]
Modified Tue Nov 12 15:31:39 2002 UTC (21 years, 4 months ago) by pje
File length: 27385 byte(s)
Diff to previous 666
Misc. phrasing edits; additonal outlining

Revision 666 - (view) (download) (as text) - [select for diffs]
Modified Tue Nov 12 01:21:03 2002 UTC (21 years, 4 months ago) by pje
File length: 27141 byte(s)
Diff to previous 511
Added tutorial sections for binding.Once and on how bindings really work.

Revision 511 - (view) (download) (as text) - [select for diffs]
Modified Thu Sep 19 23:01:52 2002 UTC (21 years, 6 months ago) by pje
File length: 22312 byte(s)
Diff to previous 510
Fixed misc. awkward turns of phrase.  Fixed formatting of double-quoted
phrases.  Added document formatting convention subsection.  Changed
car make names to 'aCar' and 'anotherCar' to avoid needing to include
trademark disclaimer.  :)

Revision 510 - (view) (download) (as text) - [select for diffs]
Modified Tue Sep 17 01:02:29 2002 UTC (21 years, 6 months ago) by pje
File length: 22211 byte(s)
Diff to previous 508
Some proofing, editing, and commenting out of stuff to run drafts faster,
but mainly added 2 new pages of (very) rough draft material on the basics
of attribute bindings.  My main worry about this new material is that it
goes into way too much detail about some things, at least for people who
just want to get in and do stuff.  When I try to be less detailed, I end up
worrying about the people like me who insist on knowing exactly how things
work.  Sigh.  I think I'll just have to get outside opinions on it.
Anyway, once again, this is new and unproofed material.

Revision 508 - (view) (download) (as text) - [select for diffs]
Modified Sun Sep 15 18:23:15 2002 UTC (21 years, 6 months ago) by pje
File length: 16310 byte(s)
Diff to previous 507
Added another 2.5 (printed) pages of material, on composing applications,
the Service-Element-Feature pattern, and an introduction to the PEAK
package layout and API conventions.  Standardized on combining \citetitle
and \url to cite online references, since in printed form you can't click
on hyperlinks, and they don't seem to be working in .PDF versions either.
This set of additions still needs more proofreading, but I'd just as soon
check things in after every few pages for safety's sake.

Revision 507 - (view) (download) (as text) - [select for diffs]
Modified Sun Sep 15 00:15:23 2002 UTC (21 years, 6 months ago) by pje
File length: 7138 byte(s)
Diff to previous 506
Added subsection on component interface concepts, and citations for
the Zope Interface package's documentation and the Zope 3 Component
Architecture tutorial.  Went back and marked the first appearance of
important terms with \strong{}.  This makes things clearer to the reader,
and it should also help tracking down index terms later!  I should probably
add a document conventions section to the intro chapter, but that's really
the only convention that exists so far, so I'll wait until there's more to
say about the subject.

Revision 506 - (view) (download) (as text) - [select for diffs]
Added Sat Sep 14 14:55:48 2002 UTC (21 years, 6 months ago) by pje
File length: 4815 byte(s)
Started a basic concepts introduction for the "binding" chapter of the
tutorial.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help