> On Wed, Feb 17, 2010 at 11:35, Jerome Velociter <[email protected]> wrote:
>>> On Wed, Feb 17, 2010 at 10:45, Jerome Velociter <[email protected]>
>>> wrote:
>>>>> Hi,
>>>>>
>>>>> I'd like to suggest the following strategy for now:
>>>>>
>>>>> * We modify all our vm files to use references (by using the
>>>>> ModelScriptService, see below)
>>>>> * We introduce APIs taking References in api.* (ex: api.Document,
>>>>> api.XWiki)
>>>>> * We _don't_ deprecate existing APIs in api.*. This means we allow
>>>>> users
>>>>> to use the older string APIs for ease of use
>>>>
>>>> Hello Vincent,
>>>>
>>>> Before I can make up my mind, I would like to know:
>>>>
>>>> * What will be the strategy for velocity code in wiki pages (here you
>>>> mention only .vm pages - will the strategy be voted again for wiki
>>>> pages?)
>>>>
>>>> * Considering we use the same strategy for wiki pages, and since we do
>>>> not
>>>> deprecate the old APIs that manipulate strings, what will be the
>>>> 'recommanded' way of say getting a document ? (the one we would
>>>> advertise
>>>> on xwiki.org code examples for example)
>>>
>>> To summarize:
>>> * String based methods: helper methods for users
>>> * EntityReference based methods: what we are supposed to use or anyone
>>> that want to write proper code
>>
>> OK, that's what I wanted to know :)
>>
>> I share this vision, and would be -1 to deprecate string based APIs
>> (unless of course replaced with new string based helpers). I think it's
>> important that we keep (velocity) simple scripting accessible to
>> non-developers and that was my concern. You don't want to force users to
>> know/understand what a reference resolver is for instance.
>>
>> As for what we do for velocity code in our own wiki pages (not .vms), I
>> would tend to think we should keep it simple to read for users (so with
>> string based APIs) but I'm a bit undecided.
>
> I don't agree with that, using strings generate a lot's of bugs. We
> are supposed to write good application so we should use proper APIs
> and anyway better give references based examples than string based
> examples.
>
> Also reference based code is not unreadable when already written it's
> just a little more difficult for the use to know how to create the
> proper reference to deal with reference based APIs.

I read that : "you have to be a developer" :)

Jerome.

>
>>
>> Jerome
>>
>>
>>>
>>>>
>>>> Thanks,
>>>> Jerome
>>>>
>>>>
>>
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>


_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to