[Zope-CMF] folder_factories length

seb bacon seb@jamkit.com
Tue, 5 Jun 2001 17:44:08 +0100


* Chris Withers <chrisw@nipltd.com> [010605 16:49]:

<snip>

> > Well, isn't the above a solution?  ;-p
> 
> Can you explain how it is? I see how it helps with file-like objects, but
> what about things like news items, portal polls, etc and what about when
> you're not creating the object from a file?

Aha!  A mist has cleared from before my eyes.  I evidently didn't
state my problem clearly to start off with: I'm *only* talking about
doing all this with File-like types.  Links, Documents, etc, would
remain just as they are.  Word, Excel, Powerpoint would be congealed
into a single automagic File type.  Sorry, I'm feeling a bit woolly
today...

Now observe as our differences magically resolve into agreement ;-)

> > Word, an image and an embedded excel chart are different objects with
> > different implementations, but to the user, they *should* be presented
> > as just Things You Can Do Stuff With>
> 
> At this level, you just end up talking about objects, and there's not a lot
> on you do on _every_ object, so you need to differentiate...

Yes, but you don't need to differentiate Files Which You Upload, since they
can be worked out automatically, and can all present the same
interface.  (i.e. a 'view as HTML' version and their own
'SearchableText'). 

> > object from one location to another.  What if each time you wanted to
> > copy a file in Explorer, you had to tell Windoze what program to open
> > it with?
> 
> Well, the first time you open a file with a given extension, you do ;-)
> And the mapping that's built up by you doing this is exactly the type of
> mapping a PUT_factory performs. The 'generic upload form' could do exactly
> the same thing...

Yes!

> > Another analogy is the 'Save file as...' issue.  Users just don't get
> > it at all, they just want to save the file and be done with it.
> 
> Sorry, I don't follow this at all :-S

I meant, users never understand the whats and whys of "save as...".
They just want to "Save".  They hardly even know 'Save as' exists.
It wasn't a particularly relevant point, anyway ;)

> > Finally, there is an issue of Type default fallbacks.  This is a minor
> > issue, and more of an example to illustrate what I mean about hiding
> > complexity.
> >
> > A WordDoc should try to create a CMF-friendly version, but it might fail
> > (e.g. Word XP non-compatibility?  A binary file with the wrong
> > extension?)  In this case, it'd be nice for the CMF to create a File
> > type and stuff it into the user's folder anyway.
> 
> Yup, the above makes sense, but isn't the following contractory?
> 
> > If the user had
> > originally tried to upload a WordDoc but got a File, they'd be
> > confused.

Well, they wouldn't be confused if they tried to upload a File which
happened to be a word document, and got a WordDoc.  And they wouldn't
be confused if they tried to upload a word document, and got a File.
The only difference as far as they can see is that one has a Word icon
next to it and can be viewed as HTML, but the other you can only
download.  But both have metadata, show up in searches, have the right
names, and can be downloaded.  

Hmmm. They might not be confused but my sentences certainly are.
 
> > > Well, how about creating an 'Upload' form and stick it at the bottom of
> > > folder_contents?
> > > This could take anything and feed it to the PUT_factory :-)
> >
> > Well exactly :-)  I think there should be an 'upload' form, and that
> > this would completely obviate the need for any 'File'-like objects.
> 
> Hmmm, I think their should be an 'upload' form which "does the right thing"
> with the files you upload there. You would still need a Type for each of the
> file-types you wanted to store, otherwise you're contradicting what you said
> in the first paragraph of one of your mails:

I agree, I certainly would be contradicting myself ;-)

So, what do you think?  A single 'upload file' field that replaces
File, and a PUT_factory-like call to deduce which type to create, with
File being the default?

I hope I've explained myself now.  If not, I'd better just give up
today as a bad job...

cheers,

seb