IMO, having two copies of this code is better than breaking people's apps.

However, I'm not sure how often RPCUIDUtils is actually imported and used
in other people's apps.  I haven't looked at the code, but there might be
an option 3 where UIDUtils.getUID has a "soft reference" to the class
dependencies in the framework.  We do that elsewhere.  Instead of just
writing:

        If (foo is SomeCLass)

We do:

        Var someClass:Class = ApplicationDomain.getDefinition("SomeClass");
        If (foo is someClass)

Actually, there is more to it to handle exceptions and stuff, but that's
the basic idea.

I think #1 is the least amount of work.  If you choose another option, you
also have to move UIDUtils to core.swc.  The idea was that folks with
AS-only projects can just import core.swc and rpc.swc and use
HTTPService/RemoteObject (without MXML, of course).

-Alex

On 10/30/13 8:29 AM, "Maurice Amsellem" <maurice.amsel...@systar.com>
wrote:

>Got it.
>
>In effect, UIDUtils has dependencies to framework.swc from the additional
>getUID() function that is not in RPCUIDUtils.
>
>So I see two options:
>Option 1) keep the redundancy, and just port the optimizations to
>RPCUIDUtils.
>
>Option 2) split UIDUtils in two parts,  maybe UIDUtils and UIDFlexUtils,
>with the latter containing only the getUID() function
>
>Option 1) is safe, but not "clean".
>Option 2) is a breaking change, because getUID() is a public API.
>
>What do you suggest?
>
>Maurice 
>
>
>-----Message d'origine-----
>De : Alex Harui [mailto:aha...@adobe.com]
>Envoyé : mercredi 30 octobre 2013 15:47
>À : dev@flex.apache.org
>Objet : Re: UIUtils vs RCPUIDUtils
>
>Well, so far, I believe every Apache Flex release has allowed it, but I
>haven't tested to make sure we haven't added unwanted dependencies.  It
>was the main reason behind core.swc.
>
>-Alex
>
>On 10/30/13 7:00 AM, "Maurice Amsellem" <maurice.amsel...@systar.com>
>wrote:
>
>>Thanks Alex, that must be the reason.
>> 
>>Do we have this constraint anymore in Apache Flex ?
>>
>>Maurice
>>
>>-----Message d'origine-----
>>De : Alex Harui [mailto:aha...@adobe.com] Envoyé : mercredi 30 octobre
>>2013 14:16 À : dev@flex.apache.org Objet : Re: UIUtils vs RCPUIDUtils
>>
>>Without looking, it may be that RPCUIDUtils exists to allow the RPC SWC
>>to have fewer dependencies on other Flex classes.  It was a goal to
>>have folks use RPC in non-Flex apps (certain AS-only projects).
>>
>>On 10/30/13 2:09 AM, "Maurice Amsellem" <maurice.amsel...@systar.com>
>>wrote:
>>
>>>Hi team,
>>>
>>>Benoit Wiart has ported the UIDUtil optimization to RPCUIDUtil
>>>https://issues.apache.org/jira/browse/FLEX-33852
>>>
>>>However, looking at the code, the two classes have the exact same
>>>behavior, except the additional getUID(item:Object):String in UIDUtils
>>>
>>>I don't know why there were two classes in the first place, but isn't
>>>it possible to remove now the redundant RPCUIDUtil class and only use
>>>UIDUtils ?
>>>
>>>Maurice
>>>
>>>
>>
>

Reply via email to