[PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

51 messages Options
Embed this post
Permalink
1 2 3
Donna Snow (SnowWrite)-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
Awesome Martin..that's all I needed to hear. :-)

I'll do this on occasion btw..ask for clarification on a level an integrator can understand and I hope that's ok...

Please.. don't forget to involve us (integrators) in trying it out when the code is ready :-)

I'm really excited about this.. yay!

(I'll hush now and let you guys get back to it..you guys are great!)

Best Regards,
Donna M. Snow, Principal
C Squared Enterprises
illuminate your web
http://www.csquaredtech.com
(408)866-1300


On Feb 16, 2008 1:49 PM, Martin Aspeli <[hidden email]> wrote:
Donna Snow wrote:
> Quick question... is this the TTW content type model Alec introduced at
> PSPS?

Yes.

> I can't follow all of the discussion.. and I apologize.. but from what
> I'm gathering this'll allow the integrator to create a content type
> ttw.. then "push a button" that'll push it out to the filesystem?? Is
> this the high level concept? Or am I totally off base here?

Yep. They won't even need to push a button to push it to the filesystem
to make it usable. The filesystem aspect should only come into play if
you want a developer to be able to do more specific/advanced things with
Python.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
Donna Snow wrote:

> Awesome Martin..that's all I needed to hear. :-)
>
> I'll do this on occasion btw..ask for clarification on a level an
> integrator can understand and I hope that's ok...
>
> Please.. don't forget to involve us (integrators) in trying it out when
> the code is ready :-)
>
> I'm really excited about this.. yay!
>
> (I'll hush now and let you guys get back to it..you guys are great!)

We're a long way away from anything even remotely testable, but you'll
be the first to know. For now, we need to get agreement that this is a
good idea, and then decide on how best to do it.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Ricardo Alves-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
Martin Aspeli wrote:
>
> A programmer can run a 'paster' command to create a new package housing
> a content type. Before paster generates the skeleton, he is asked for
> the URL to a web service that describes the type as created through the
> web (this requires a running site and must be subject to security). The
> web service gives paster enough information to generate a package that
> is equivalent to has been managed TTW. The schema and type properties
> are held in an XML file and loaded dynamically as necessary.

Maybe I'm missing something here, but wouldn't it be better to simply
provide the XML file? I mean, the user downloads the file, then runs
paster and is asked for a path.


This looks really exciting BTW :)


Ricardo

--
Ricardo Alves <[hidden email]>
Eurotux <http://www.eurotux.com>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
Ricardo Alves wrote:

> Martin Aspeli wrote:
>> A programmer can run a 'paster' command to create a new package housing
>> a content type. Before paster generates the skeleton, he is asked for
>> the URL to a web service that describes the type as created through the
>> web (this requires a running site and must be subject to security). The
>> web service gives paster enough information to generate a package that
>> is equivalent to has been managed TTW. The schema and type properties
>> are held in an XML file and loaded dynamically as necessary.
>
> Maybe I'm missing something here, but wouldn't it be better to simply
> provide the XML file? I mean, the user downloads the file, then runs
> paster and is asked for a path.

I think there needs to be a bit more information than what'd naturally
sit in this file. That's not to say this can't be done via a download of
some kind.

However, moving to a pattern of providing key information and operations
via web services (say, a RESTful API) makes a lot of sense in terms of
making Plone easier to integrate with other systems. The "web service"
bit here is only a small piece of the puzzle, though, and is merely one
possible implementation choice.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Bill Schindler

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
Martin Aspeli wrote:
> There are a few such things - link integrity,
> iterate ... basically things that are depending on AT references. I've
> tried to look at these and it seems that "catching up" would not be
> impossible, but it's obviously a lot of work.

In the bookstore code, I have an adapter that makes all my z3 content AT
referenceable. It wasn't that much work. It turns out to be a rather
simple adapter, in fact. (Even though three people told me -- after I
wrote it -- that it wasn't possible to do.)

And that echoes what Sidnei said about adapting AT objects.

--
Bill / bitranch


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
George L

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
Martin Aspeli wrote:
The main area I'm championing is "Through-the-Web content types" - the  ability to define content types directly from Plone. However, I'd like
to expand on that and call it "model-driven content types".
Hi, some questions.

(1) How does Drupal do TTW content types, and how similar / different is it to what Dexterity would be doing?

(2) If I understand ArchGenXML correctly, it generates code and leaves sections of it "protected." If I understand one motive behind Dexterity correctly, it's to allow pushing content type definitions from TTW into filesystem products -- I presume to allow for customizing the product further since there a gazillion things you may want to do to a content type (add custom methods, etc.) that wouldn't fit in the TTW model. How would these customizations co-exist and stay in sync with the TTW-defined aspects of a content type?

Peace,
George
Lennart Regebro-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
On Sat, Feb 16, 2008 at 3:12 PM, Martin Aspeli <[hidden email]> wrote:
>  I suspect performance would be better (no need to look up a persistent
>  schema all the time),

I was thinking that you could reload it from the data in the ZODB, in
which case using it wouldn't be much slower than if it was on disk.
Possibly it would be slower in development mode as checking he
modification time of a ZODB object possibly is slower than checking
the modification time of a file.

>  and my gut feel was that it'd be easier to work
>  with an XML file on disk that was always "in sync" than a file that'd
>  need to be exported/imported all the time.

That is absolutely true.

--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Lennart Regebro-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Max M
On Sat, Feb 16, 2008 at 3:22 PM, Max M <[hidden email]> wrote:
>  When the system is in development mode, you can design models online,
>  and it will create content types on the file system.

But you also need to be able to modify schemas that are in products
that are not yours. And the only way I can see how that can be done in
a secure and easy way is to store those schemas in the ZODB.

--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Roché Compaan

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
There have been a couple of attempts to do TTW content types with Plone
in the past, like ATSchemaEditorNG and GenericPloneContent.

These efforts were never encouraged or met with any interest in the
past. What changed? In fact TTW content types have always been
discouraged by Plone developers (maybe because ZClasses were such a
mess). If the answer to my question is "because Martin is the champion
of this effort" then it is a completely acceptable answer ;-)

For what its worth, I have always believed that there is a "market" for
TTW content types or at least TTW editing of schemas, simply because
customers ask for it. I think the popularity and success of PloneFormGen
proves that users want more power TTW, and when they start using
PloneFormGen they quickly ask how they can save the form data in Plone
in a structured way and do more with it.

--
Roché Compaan
Upfront Systems                   http://www.upfrontsystems.co.za


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Lennart Regebro-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
On Sun, Feb 17, 2008 at 9:08 AM, Roché Compaan
<[hidden email]> wrote:
>  These efforts were never encouraged or met with any interest in the
>  past. What changed? In fact TTW content types have always been
>  discouraged by Plone developers (maybe because ZClasses were such a
>  mess).

ZClasses are TTW programming. Having TTW schemas is not programming.
Maybe that's a difference? (I don't know enough of the mentioned
products to say).

--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Matthew Wilkes

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Roché Compaan

On Heisei 0020-02-17, at 080810GMT, Roché Compaan wrote:

> There have been a couple of attempts to do TTW content types with  
> Plone
> in the past, like ATSchemaEditorNG and GenericPloneContent.
>
> These efforts were never encouraged or met with any interest in the
> past. What changed?

To me the difference is ATSchemaEditorNG (all we need is CMF for a  
full house) and similar always had very narrow objectives whereas  
Dexterity seems to be taking the "think big" approach.  Previous  
attempts have seemed like bolt-ons that subvert the architecture to do  
TTW editing instead of working with it.

I don't know that dexterity will be any different, but it's certainly  
marketed differently.

Matt
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Ricardo Alves-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
Martin Aspeli wrote:

> This makes the model much less accessible to external tools or
> introspection outside Zope. Code generation is very hard and there is a
> huge amount of scope for things to go wrong as people try to be clever
> (or try to copy code from somewhere else) and end up confusing the system.
>
> Note that the idea is that if you're a programmer, you'll still have all
> kinds of programming constructs to build your type, including
> side-stepping any kind of declarative schema configuration if you really
> want to. The schema as defined through graphical tools, though, is
> definitely *data*, not code, and data should not be stored in
> programming language code.

Avoiding code generation looks nice. But, if Dexterity defines a content
type in some declarative way (no python code), and stores that
definition in the ZODB, how will it be for file system development? Will
the programmer need to define form interfaces, etc (write python code),
or just create some XML file(s) added to the ZODB with GenericSetup?


Ricardo

--
Ricardo Alves <[hidden email]>
Eurotux <http://www.eurotux.com>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
Ricardo Alves wrote:

> Martin Aspeli wrote:
>> This makes the model much less accessible to external tools or
>> introspection outside Zope. Code generation is very hard and there is a
>> huge amount of scope for things to go wrong as people try to be clever
>> (or try to copy code from somewhere else) and end up confusing the system.
>>
>> Note that the idea is that if you're a programmer, you'll still have all
>> kinds of programming constructs to build your type, including
>> side-stepping any kind of declarative schema configuration if you really
>> want to. The schema as defined through graphical tools, though, is
>> definitely *data*, not code, and data should not be stored in
>> programming language code.
>
> Avoiding code generation looks nice. But, if Dexterity defines a content
> type in some declarative way (no python code), and stores that
> definition in the ZODB, how will it be for file system development? Will
> the programmer need to define form interfaces, etc (write python code),
> or just create some XML file(s) added to the ZODB with GenericSetup?

The original thought is that the programmer would have an XML file on
the filesystem that defines the schema in a declarative way, as well as
the FTI properties (like we have now with GenericSetup). Whether some or
all of this is actually done in a GS profile I'm a bit unsure about yet,
but really, to the programmer, that's pretty unimportant.

The programmer - once the type has been hooked up to a package on the
filesystem and ceases to live only in the ZODB - will also have at least
some marker interface to hook adapters onto, and a way to write an
adapter that determines how fields are stored and calculated.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Lennart Regebro-2
Lennart Regebro wrote:
> On Sat, Feb 16, 2008 at 3:22 PM, Max M <[hidden email]> wrote:
>>  When the system is in development mode, you can design models online,
>>  and it will create content types on the file system.
>
> But you also need to be able to modify schemas that are in products
> that are not yours. And the only way I can see how that can be done in
> a secure and easy way is to store those schemas in the ZODB.

Yep - or to connect them to another package that starts off with a clone
of the original. The way Alec and I spoke about this before, there'd be
a thin layer of abstraction between a schema that came from some
site-specific part of the ZODB, and a schema loaded from a file on the
filesystem (but still installed in a site). It'd be a "local", editable
schema anyway (unless it was explicitly locked).

The idea is that developers will find it easier to work with a real file
that they can touch and modify, and it makes it easier for others tools
to use this file transparently. Having that "transparency" take place
with explicit GS-style import/export is not necessarily a bad idea, but
I think it may be easier if it works more like page templates in skin
layers when Zope's in debug mode - the file can be edited and changes
picked up immediately. Just imagine that there's also a TTW GUI that can
edit that file (unless it's locked, and with some versioning solution to
avoid mistakes breaking everything).

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bill Schindler
Bill Schindler wrote:

> Martin Aspeli wrote:
>> There are a few such things - link integrity,
>> iterate ... basically things that are depending on AT references. I've
>> tried to look at these and it seems that "catching up" would not be
>> impossible, but it's obviously a lot of work.
>
> In the bookstore code, I have an adapter that makes all my z3 content AT
> referenceable. It wasn't that much work. It turns out to be a rather
> simple adapter, in fact. (Even though three people told me -- after I
> wrote it -- that it wasn't possible to do.)

Nice - I'd like to see that!

> And that echoes what Sidnei said about adapting AT objects.

Did you mix in Referenceable or is it really just an adapter? The
problem I could see is that things expect to be able to call
context.UID() or what not, they don't adapt to IReferenceable and *then*
call UID() on that adapter...

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by George L
George Lee wrote:

>
> Martin Aspeli wrote:
>> The main area I'm championing is "Through-the-Web content types" - the
>> ability to define content types directly from Plone. However, I'd like
>> to expand on that and call it "model-driven content types".
>>
>
> Hi, some questions.
>
> (1) How does Drupal do TTW content types, and how similar / different is it
> to what Dexterity would be doing?

I'm not best placed to answer this. Matt Bowen might be. :)

The inspiration here came from Sharepoint and similar systems.

> (2) If I understand ArchGenXML correctly, it generates code and leaves
> sections of it "protected." If I understand one motive behind Dexterity
> correctly, it's to allow pushing content type definitions from TTW into
> filesystem products -- I presume to allow for customizing the product
> further since there a gazillion things you may want to do to a content type
> (add custom methods, etc.) that wouldn't fit in the TTW model. How would
> these customizations co-exist and stay in sync with the TTW-defined aspects
> of a content type?

Try not to think of a content type as a bundle of Python code. Code
generation and protected code sections is a recipe to a mess, and we
need this to be *very* stable since we really want non-programmers to be
able to use it and not make mistakes.

Instead, think of a declarative schema of fields and some type
properties (like we have in GS/FTIs now), as well as a list of
"behaviours" that can be enabled/disabled (like "lockable",
"versionable", etc). All those things are declarative and can be managed
in one or more data files (XML).

Dexterity would provide a general content class that would be able to
support new content types created TTW. Each would get a new persistent
FTI in portal_types, a factory, some views etc.

Dexterity would then allow that to be "connected" to a filesystem
package. The schema/behaviours would move to a file on the filesystem to
make it easier to distribute, but the TTW GUI would still be able to
modify it (unless locked down). The type would be associated with a
proper marker interface so that a programmer can register adapters and
event handlers and views on it. The programmer would also be able to
override the default adapter that takes care of getting and setting type
fields, if necessary (e.g. to override the standard storage model.

Note that we're now sliding into a lot of implementation details that
are not fully worked out yet. I'm trying to get a proper proposal
together that includes a workable design for the code, it's just taking
some time.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Lennart Regebro-2
Lennart Regebro wrote:

> On Sun, Feb 17, 2008 at 9:08 AM, Roché Compaan
> <[hidden email]> wrote:
>>  These efforts were never encouraged or met with any interest in the
>>  past. What changed? In fact TTW content types have always been
>>  discouraged by Plone developers (maybe because ZClasses were such a
>>  mess).
>
> ZClasses are TTW programming. Having TTW schemas is not programming.
> Maybe that's a difference? (I don't know enough of the mentioned
> products to say).

Spot on. :)

TTW programming is troublesome, because it's hard to redistribute, hard
to version and hard to collaborate on. When you move from TTW
programming to filesystem programming, you may hit a vertical cliff and
end up rewriting all your code.

The thought behind Dexterity is to generalise the boilerplate and let
people worry about a *model* of their type - a schema, behaviours, basic
type properties. That model can be declarative, which means it can be
manipulated with sensible tools - it's not programming. Then, when you
*do* need programming, there'll be a clean, well-documented way of
attaching new behaviour to the type.

The other reason this hasn't been done before is that we now have much
better infrastructure to support this kind of thing.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Wichert Akkerman

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
Some javascript/style in this post has been disabled (why?)
Martin Aspeli wrote:
Wichert Akkerman wrote:
  
Previously Martin Aspeli wrote:
    
However, there are a few things that I am quite sure about:

  - It won't use Archetypes
      
I have one remark on this: that means LinguaPlone will no longer be
supported. Unless there is an alternative that means an important use
case will no longer be possible.
    

I thought plone.app.multilingual would supercede LP and be more general, 
but maybe that's stagnated?
  

It's been stalled for months. Ramon was side-tracked on getting plone.relations working in Plone 3. By the time that was resolved he was out of time and has not been able to continue working on multilingual.

Wichert.

This is also why I don't really think of this as a direct successor to 
Archetypes. It's more an effort to think about new and better ways to 
build content types, making this a task that's accessible to 
administrators and power users, not just programmers. I don't really 
want to be constrained by the current way AT works, at least not in the 
initial design/thinking.
  

Sure, however we need to take into account that we should not end up in a situation where we will need two multilingual systems (LP for AT types, something else for dexteriy), two linkintegrity systems, two schema extension mechanism, etc. Telling people that if they want to extend an AT type they need to use solutions A but if they want to extend a dexterity type they will need to use solution B. We will be dealing with systems that use both AT and non-AT types for a few years so AT support is paramount.

Wichert.

-- 
Wichert Akkerman [hidden email]   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Wichert Akkerman

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Aspeli-2
Some javascript/style in this post has been disabled (why?)
Martin Aspeli wrote:
Laurence Rowe wrote:
If the package is installed in the Plone site where the type was 
originally defined, the installer will reconcile the two type 
definitions. If both have changed in incompatible ways, the user will be 
asked to choose whether to override the TTW version or the filesystem 
version. Once the two have been connected, they are one and the same

Future modifications to the schema TTW will edit the model on the 
filesystem. When edited TTW, the model will be automatically versioned, 
using a system such as Mercurial, to allow roll-back to a previous state 
if necessary.
      
There will necessarily be many changes to the model through the 
development process. I don't think it need be necessary to import/export 
all the time.
    

Right, that was my thinking (although Lennart brought up a good point - 
is it not easier to store it in the ZODB all the time?). Alec just 
suggested that we do some kind of implicit versioning when we edit the 
filesystem XML from the TTW GUI, otherwise accidental changes would be 
non-recoverable.
  

I'm not a fan of automatic updates of filesystem things. Automatically hooking in a version control system makes things quite complex and you'll suddenly need to support 10 different source control systems. Then there are different filesystem layouts, Plone sites that do not have filesystem write access, etc. I would much prefer to edit only TTW and have a 'dump to filesystem' option. That also solves some of the undo problems: you can have a simple 'revert to filesystem version' button to undo changes.

Other things I can imagine doing through the web are defining 
validators, invariants and dynamic defaults.
    

Mmmm.... Maybe. I was thinking more like picking these from pre-defined 
lists. Having people type Python into a textbox kind of goes against 
this. I'd rather then that the filesystem developer made such things 
available for inclusion in the schema.
  

Agreed. I think the list of constraints offered by XSD are useful here: they are simple things like 'much these upper and lower limits', 'much be at most N characters' and 'must satisfy this regexp'. If you need anything more complex you should know python and just do this on the filesystem. And there is already a well defined serialisation of XSD :)

Wichert.


-- 
Wichert Akkerman [hidden email]   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Martin Aspeli-2

Re: [PSPS08] Dexterity - a through-the-web, model-driven, friendly content type system

Reply Threaded More More options
Print post
Permalink
In reply to this post by Wichert Akkerman
Wichert Akkerman wrote:

> Martin Aspeli wrote:
>> Wichert Akkerman wrote:
>>  
>>> Previously Martin Aspeli wrote:
>>>    
>>>> However, there are a few things that I am quite sure about:
>>>>
>>>>   - It won't use Archetypes
>>>>      
>>> I have one remark on this: that means LinguaPlone will no longer be
>>> supported. Unless there is an alternative that means an important use
>>> case will no longer be possible.
>>>    
>>
>> I thought plone.app.multilingual would supercede LP and be more general,
>> but maybe that's stagnated?
>>  
>
> It's been stalled for months. Ramon was side-tracked on getting
> plone.relations working in Plone 3. By the time that was resolved he was
> out of time and has not been able to continue working on multilingual.

That's a shame. :-/


>> This is also why I don't really think of this as a direct successor to
>> Archetypes. It's more an effort to think about new and better ways to
>> build content types, making this a task that's accessible to
>> administrators and power users, not just programmers. I don't really
>> want to be constrained by the current way AT works, at least not in the
>> initial design/thinking.
>>  
>
> Sure, however we need to take into account that we should not end up in
> a situation where we will need two multilingual systems (LP for AT
> types, something else for dexteriy), two linkintegrity systems, two
> schema extension mechanism, etc. Telling people that if they want to
> extend an AT type they need to use solutions A but if they want to
> extend a dexterity type they will need to use solution B. We will be
> dealing with systems that use both AT and non-AT types for a few years
> so AT support is paramount.

Having two ways to do things would indeed suck. At least if they are
things that integrators and developers would be expected to have to do.

I'm not sure built-in Dexterity-creates-AT support is *necessarily* the
right answer, though it's definitely something we should investigate
properly.

I worry that we'll spend a lot of time fighting the framework if this is
AT based, since AT just wasn't designed for this kind of thing. I tried
to make AT use proper IFactory utilities in a backwards-compatible way
once, for example, and had to give up. Add forms is really tricky. The
reference engine implementation is slow and the API is a mess. I would
also *really* like for the in-memory/introspectable schema to be based
on something generic like zope.schema, not
Products.Archetypes.Schema.Schema.

If we *do* ever want to contemplate slowly migrating away from an
AT-centric view of content in Plone, then this is probably the right
place to do it, when we are trying to rethink some of the paradigms
around content types.

Here's my list of things that I think depend on AT right now, with some
notes about how tied in they really are:

  - Inline validation (has largely transparent, non-AT equivalent in 3.1)

  - Inline editing (has largely transparent, non-AT equivalent in 3.1)

  - Reference engine (has non-AT, more sane equivalent in
plone.app.relations; a mostly-backwards-compatible refactoring of AT to
use plone.app.relations should be possible, but 100% compatibility may
be hard)

  - Transforms (will be generalised into plone.transforms, should be
possible to have generalisable PortalTransform fascade)

  - Version-on-edit (should work if we just add an event handler)

  - Staging w/ iterate (will require a new adapter for the reference
between baseline and working copy, otherwise not AT specific)

  - Link integrity (will require a new adapter to extract text, should
use plone.app.relations for keeping track of references rather than AT
references)

  - Multiple fieldsets w/ standard fields ala ATCT (mostly done with
plone.fieldsets)

  - Field injection/schema extender (will need a formlib-based equivalent)

  - Multi-lingual support (will need plone.multilingual to pick up again)

  - Custom fields and widget that have no AT equivalent (may be able to
bridge the gap here with Fate)

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
1 2 3