Re: [Zope-CMF] [dev] some small changes

2013-07-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/05/2013 04:48 AM, yuppie wrote:
> Hi!
> 
> 
> I plan to work on the following changes. Please let me know if you
> have questions or objections.
> 
> 
> Fix dotted names of CMF interfaces: 
> ===
> 
> CMF defines many interfaces, so we added some submodules like
> _content and _tools. This was meant as a transparent implementation
> detail, it's recommended to import from interfaces, not from the
> submodules. But unfortunately the full path shows up in several
> places, e.g. on the Interfaces tab you see
> Products.CMFCore.interfaces._content.IFolderish instead of
> Products.CMFCore.interfaces.IFolderish.
> 
> GenericSetup has a special _getDottedName() method that tries to find 
> the short version. This hides the issue in profile exports.
> 
> AFAICS this could be fixed by setting __module__ explicitly for each 
> interface, e.g. for IFolderish
> 
> __module__ = 'Products.CMFCore.interfaces'
> 
> Is this the right approach or will this cause new trouble?
> 
> 
> Add 2 new portal types for member areas in CMFDefault: 
> ==
> 
> - 'MemberArea' will be a special folder type that uses the normal
> Portal Folder class, but a different factory that replaces parts of
> the createMemberArea() method. And a different default view that
> replaces the 'index_html' Document currently added by
> createMemberArea().
> 
> - 'Members' will be a special folder type that uses the normal Portal 
> Folder class, but limits sub-items to 'MemberArea' objects and has a 
> special default view that replaces the 'index_html' DTML Method 
> currently added to the members folder.
> 
> 
> Simplify content views in CMFDefault: 
> =
> 
> - remove registration and lookup of "schema adapters" (e.g. 
> DocumentSchemaAdapter, LinkSchemaAdapter). Use these adapters
> directly in getContent().
> 
> - rename '@@view.html' to '@@view', '@@properties.html' to 
> '@@properties' and so on. This allows to remove some method aliases.

That all sounds fine to me.


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlHW4h0ACgkQ+gerLs4ltQ4Q3ACffh7hOfwQd5AaRPT/0ebwFsdx
X1kAoNbayTq+p53HRbenMG0nG6rqSHxI
=zEdB
-END PGP SIGNATURE-

___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


[Zope-CMF] [dev] some small changes

2013-07-05 Thread yuppie
Hi!


I plan to work on the following changes. Please let me know if you have
questions or objections.


Fix dotted names of CMF interfaces:
===

CMF defines many interfaces, so we added some submodules like _content
and _tools. This was meant as a transparent implementation detail, it's
recommended to import from interfaces, not from the submodules. But
unfortunately the full path shows up in several places, e.g. on the
Interfaces tab you see Products.CMFCore.interfaces._content.IFolderish
instead of Products.CMFCore.interfaces.IFolderish.

GenericSetup has a special _getDottedName() method that tries to find
the short version. This hides the issue in profile exports.

AFAICS this could be fixed by setting __module__ explicitly for each
interface, e.g. for IFolderish

__module__ = 'Products.CMFCore.interfaces'

Is this the right approach or will this cause new trouble?


Add 2 new portal types for member areas in CMFDefault:
==

- 'MemberArea' will be a special folder type that uses the normal Portal
Folder class, but a different factory that replaces parts of the
createMemberArea() method. And a different default view that replaces
the 'index_html' Document currently added by createMemberArea().

- 'Members' will be a special folder type that uses the normal Portal
Folder class, but limits sub-items to 'MemberArea' objects and has a
special default view that replaces the 'index_html' DTML Method
currently added to the members folder.


Simplify content views in CMFDefault:
=

- remove registration and lookup of "schema adapters" (e.g.
DocumentSchemaAdapter, LinkSchemaAdapter). Use these adapters directly
in getContent().

- rename '@@view.html' to '@@view', '@@properties.html' to
'@@properties' and so on. This allows to remove some method aliases.


Cheers,

Yuppie

___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests