To view parent comment, click here.
To read all comments associated with this story, please click here.
Well, flex also does style sheets, so you can remove many of the property settings to a global style sheet if you so want - I don't tend to find that helps much, and it can actually makes it a little bit harder to read the code.
In flex I typically do a mix of declarative view definition and XML layout. XML is excellent for describe the high level layout of components - and this is not just personal opinion. Compare my simple login box (property indented) to the declarative equivalent - you understand the XML at a glance - the declarative equivalent - not so much. I don't know how you could argue otherwise. I can throw a brand new programmer (new to the language) at a complex layout, and they just "get" it immediately - visually it's very easy to follow the flow of a layout done in XML.
Sure, from a purist perspective, xml is only "supposed" to describe content - but at a higher level xml describes objects, their attributes, and their relationships - which is a perfect fit for describing a visual layout.
I used to think the way you do - and as a result I wasted a lot of time.






Member since:
2005-07-12
"What exactly do you think HTML is? It's XML. So I guess the entire HTML universe has been wrong this last decade to use XML to describe layout."

I've done lot's of DHTML/Ajax/CSS stuff. For me, the weakest part of that equation is the HTML. HTML was never meant to describe UI. CSS is much better for that - cleaner, easier, more efficient. HTML is markup, and is good as an anchor for content, but not great for describing UI.
"So what exactly you do find wanting in this picture:"
I just don't like it. To me, it's noisy, and I find thing like CSS, or declaritive scripting, or even plain old API calls (like Win32, QT, GTK, Swing, Swt, etc) in language of choice, all much better, and less cumbersome.
For me markup is for, well, markup - an anchor for content. For describing UI and presentation, there much better tools.
But if you like the XML based Flex type stuff, more power to you! Different strokes for different folks.