Re: [flexcoders] The Flex DOM?

2010-05-25 Thread Nick Middleweek
Cheers Jake - thanks for the reply.

@Oleg: I was trying to find out if there was a 'DOM' within Flex to easily
access to the Containers and other Objects but I guess the more correct way
to ask, would've been to question how Flex manages components but I didn't
want to open the doors about the component life cycle. Apologies if I got
the terminology wrong - I'm still getting my head round certain things and I
saw a thread yesterday about looping through dynamically added TextInputs to
which Valdor replied and it made me think how I used to do similar
operations with JavaScript and the HTML-DOM and was thinking could I apply
similar concepts?... (I've got another question and it's not abut squares :)
but I'll create another thread).

@Paul - I'll have a quick search, thanks.


Cheers guys,
Nick




On 24 May 2010 22:30, Jake Churchill reyna...@gmail.com wrote:



 It's kind of like a DOM.  It's just a hierarchical relationship of
 components and controls.


 On Mon, May 24, 2010 at 4:01 PM, Nick Middleweek n...@middleweek.co.ukwrote:



 Hi,

 Might be a silly one but Flex doesn't have a DOM does it... or does it?

 I'm pretty sure I've seen a debugger app that shows a hierachical view
 starting from the Application level and displays all the containers and
 objects within.


 Thanks,
 Nick


  




-- 
Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774
035 5424, blog: http://blog.middleweek.co.uk } );


Re: [flexcoders] The Flex DOM?

2010-05-25 Thread Oleg Sivokon
Sorry if I caused disruption :)
Yes, the terminology you used is confusing. What you are referring to is
Flex framework, but it is not the only way to go about visual components in
Flex, other component frameworks exist. It is also not uncommon to write
components yourself (unlike in desktop development).
You may draw a parallel between Flex framework and HTML DOM, but they are
distant relatives and the underlying architecture is different. It is rather
often that the technique used for HTML DOM manipulation applied to AS3
display list will give you a suboptimal solution. If you want an analogue
from other technologies, think SWing or WPF, although these may be more
robust then what we have in AS3 and Flex framework, conceptually, they are
more similar than HTML and Flex framework.

On the other hand, DOM if not used in context of HTML display may have quite
a few of other meanings. For instance, in Java it would relate to
different techniques of processing XML data, where DOM would be a processing
of already parsed XMLs as opposed to SAX, which allows you to handle parsing
events. In .NET DOM would be applied to XmlDocument as opposed to XML
processing using XmlReader or LinQ, and so on. If you seek an analogy to
this in AS3, then there's XMLDocument class, which is a DOM implementation,
however, there's also XML class (E4X), which is a different approach to XML
processing, more similar to LinQ and FluidInterface concepts.

Best.

Oleg


[flexcoders] The Flex DOM?

2010-05-24 Thread Nick Middleweek
Hi,

Might be a silly one but Flex doesn't have a DOM does it... or does it?

I'm pretty sure I've seen a debugger app that shows a hierachical view
starting from the Application level and displays all the containers and
objects within.


Thanks,
Nick


Re: [flexcoders] The Flex DOM?

2010-05-24 Thread Jake Churchill
It's kind of like a DOM.  It's just a hierarchical relationship of
components and controls.

On Mon, May 24, 2010 at 4:01 PM, Nick Middleweek n...@middleweek.co.ukwrote:



 Hi,

 Might be a silly one but Flex doesn't have a DOM does it... or does it?

 I'm pretty sure I've seen a debugger app that shows a hierachical view
 starting from the Application level and displays all the containers and
 objects within.


 Thanks,
 Nick

  



Re: [flexcoders] The Flex DOM?

2010-05-24 Thread Oleg Sivokon
Erm, where you looking for yet another XML class? In that case there are two
of them in AS3. But, of course, you can write more of those if you want. Or
did you mean that how Flex framework manages components? If so, it hardly is
a DOM, well, it's way more complex than that. Document Object Model is a
very wide definition which is above framework or even language concepts. On
the other hand it may be implemented using almost any programming language.
So, essentially, what you asked sounds more like do computers have
squares? - well, one can answer, sure they do, but this won't be a helping
answer, because it's obvious that the question was meant to ask something
different.

Best.

Oleg


Re: [flexcoders] The Flex DOM?

2010-05-24 Thread Paul Andrews

On 24/05/2010 23:28, Oleg Sivokon wrote:



Erm, where you looking for yet another XML class? In that case there 
are two of them in AS3. But, of course, you can write more of those if 
you want. Or did you mean that how Flex framework manages components? 
If so, it hardly is a DOM, well, it's way more complex than that. 
Document Object Model is a very wide definition which is above 
framework or even language concepts. On the other hand it may be 
implemented using almost any programming language. So, essentially, 
what you asked sounds more like do computers have squares? - well, 
one can answer, sure they do, but this won't be a helping answer, 
because it's obvious that the question was meant to ask something 
different.


The OP asked about the DOM which would be taken by 99% of the 
development community as meaning the Javascript DOM for HTML documents. 
Seems a very reasonable question and easy  interpretation to me. Of 
course I could be wrong, but even so I won't be making any comments 
about computer squares. Fortunately, others have provided helpful answers.


To help the OP more - google flex display list - it's a tree that 
represents the display in a similar manner to the DOM and you can walk 
that tree looking for components. While there are similarities with the 
Javascript DOM, they are tenuous and the techniques that would work well 
using the Javascript DOM and CSS will need to be revisited with Flex - 
it's very different.





Best.

Oleg







Re: [flexcoders] The Flex DOM?

2010-05-24 Thread Oleg Sivokon
Well, this really depends on the background and jargon you are used to...
Most of PHP / C# people I know would use DOM for things like DOMDocument or
XmlDocument. Also, it's not uncommon to mean Flex SDK when you say Flex,
and not Flex visual components. I wouldn't bet on percentage though :)