Hello Andreas,

This mail is don't dead ! (but me nearly killed by work :)

Just to be clear, this mail is just a suggestion, a personnal idea and
surely not a critize or a "super man feeling", I know the big (and good)
work do by the Lenya community.

On Thu, 19 Feb 2009 15:08:09 +0100, Andreas Hartmann <[email protected]>
wrote:
> Hi André,
>
> Florent André schrieb:
>
> […]
>
>>>> If I can do a suggestion, a documentation on "how to create document
>>> from
>>>> scratch" could be useful.
>>> Yes, I also think this is too complex. The DocumentManager is the
>>> original approach, but now I think we should rather add the respective
>>> methods to the repository classes:
>>>
>>> Area.addDocument(…)
>>> SiteStructure.addLink(Node node, Document document)

This methods sound pretty cool !

>>
>> On the same subject, I think that it will be interesting to have this
>> getter/setter in the document API :
>
> thanks a lot for your suggestions!
>
>> document.setVisibleInNav();
>
> IMO this would violate SoC – the visibility of the document itself
isn't
> changed, but the visibility of the link in the site structure. I think
> the current API is sufficient:
>
> document.getLink().getNode().setVisible(boolean)

The api we have : 
getPath() : This is a shortcut to getLink().getNode().getPath().

Yes, getPath just send and information and setVisibleInNav() do an
action... but for a user I think that a direct relation beetween the
document and his visibility in navigation is more affordable...

>
>> document.setMetadata();
>
> What would be the argument(s) of this method?

An xml doc ? A java collection or an hastable can be possible, but IMO the
xml is more in the "spirits" of Lenya/Cocoon, and allow more flexibility.

>
>> document.setContent();
>
> What would be the argument(s) of this method? IMO the methods
> Document.getIn/OutputStream() cover all i/o requirements. We should keep
> the API as orthogonal as possible, e.g. don't add type conversion
> methods (String/InputStream/…) to the Document interface.

IMO, the simplier way to think is : OKAY ! I want to add content in my
document, so I do document.setcontent(xmlDoc).

But, in the current api the way to think is (if I am OK with the coding
way) :
- OKAY, ! I want to add content in my document, so :
-- I have to get the write tool (cocoon.source.sourceUtil.writeDom)
-- and put in : 
---- outputStream (?? An output stream to get content in ??)
---- content (xmlDoc)

And, personally, I find strange to tell a "parent object" (cocoon.source)
to write a content in a "child object" (lenya object)...

I understand the problematic of orthogonal conception, but this is a
problem to have a :
doc.setcontent(dom content);
doc.setcontent(sax content);
?

>
>> document.remove();
>
> Hmm, would that be something different than Document.delete()?

Excuse me, finger and brain are disconnect...

but this make me thinking (caution : I don't learn on this aspect for now,
so I speak without know) :
How do you think about a method like :
- Document.setWorkflowStatus(?? state);


>
>> document.setNavTitle();
>
> Same as with setVisibleInNav().
>
>> document.setTitle();
>
> I guess that would be an implicit mapping to the DC element "title"? I'm
> not sure if this can be generalized. What do the others think?

In my mind : setTitle() = set the navigation title

Usable if we can modify the navigation title and/or create an "empty"
document (like a new document in an office suite)

>
>> document.setParams();
>
> What params would that be?

I think to other params that show in the create a new document UI (creator,
subject, rights and also assets, jobs scheduled,...)and in a more general
way, specific parameters on specific resources.


------------
In fact, the "concept" behind this suggestions is the "user centric
approach".
The spirits of this approach is : if we consider the "user uses cases" -
what a user want to do - how can we make this as "natural" - affordable,
usable, intuitive - as possible ?

A table like that can help to define the what and the how:

What user want to do                          |      How user do
-----------------------------------------------------------------------------
create a document                             |
area|node|sitestructure.create()
-----------------------------------------------------------------------------
add content to the document                   | document.setcontent()
-----------------------------------------------------------------------------
set the document visibility                   | document.setvisibility

etc..


Just some suggestions with my Lenya "baby eyes"...

Have a good day

>
> Again, thanks for your suggestions – come clarifications would be much
> appreciated.
>
> -- Andreas
>
>
> --
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to