whoops, sorry wrong thread :)

On Tue, Feb 2, 2010 at 5:38 PM, Taka Kojima <[email protected]> wrote:

> I'm siding with Steven on this one.
>
> Beno seems to be the worst offender, but it's not just him. It's quite
> clear that he doesn't understand the fundamentals and basics -- that's his
> main problem.
>
> He's working off of a very shallow and glib understanding of things, thus
> it's a recurring issue where he comes to the list and asks for help whenever
> he hits a wall.
>
> Asking for help is not bad, asking for help on questions that you really
> should know the answer to and if you don't you should figure it out on your
> own, is just lazy. Pick up a book on Actionscript and OOP fundamentals and
> then you can start coming to the list to ask for help.
>
>
> On Tue, Feb 2, 2010 at 5:21 PM, Steven Sacks <[email protected]>wrote:
>
>> As a rule, I only put string values that never contain special characters
>> in attributes, otherwise you end up with XML validation errors (like putting
>> ampersands in attributes).
>>
>> Also, I generally put parsing code inside the constructor of the VO class
>> (well, I call deserialize() because code inside constructors are
>> interpreted).
>>
>> public class ValueObject
>> {
>>    public var foo:String;
>>    public var bar:String;
>>
>>    public function ValueObject(node:XML)
>>    {
>>        deserialize(node);
>>    }
>>    private function deserialize(node:XML):void
>>    {
>>        foo = no...@foo;
>>        bar = node.bar;
>>    }
>> }
>>
>> There are exceptions to this rule, but they're rare.
>>
>> It makes it really easy to share VOs between multiple service classes when
>> the parsing logic is contained with the VO instead of each service class
>> (assuming that the xml is homogenized).
>>
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to