Coffeehouse Thread

15 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

XAML going the way of XHTML?

Back to Forum: Coffeehouse
  • User profile image
    W3bbo

    I've been reading up into XAML a bit

    ...The developers said they were inspired by HTML to create XAML (somewhere on the internet... or that HTML had an influence on the development of XAML)

    Thing is... HTML is based on SGML and isn't XML, thats XHTML

    That aside... Aparently you use "tables" to layout XAML apps.

    I disagree with this practice completely... Have they learned nothing from history? When the W3C said that the <table> element could be used to layout webpages back in 1995, the WWW became a mess from that day forward. Its only now that we're seeing people get their act together and separate layout from content and leave positioning and styling to CSS

    IMHO, Microsoft should rethink XAML and devise a way to fully separate presentation from logic from data. Otherwise we're in for a trouble later on.

    And if any of you guys think the <table> element is meant to layout pages, then you are clearly mistaken. The W3C HTML3.02 specification says it CAN be used for this purpose, but that it isn't advised. In XHTML it is strictly forbidden.

    My thoughts...
    -W3bbo

  • User profile image
    shreyasonli​ne

    I absolutely agree.

    Also, I would like to raise one more point again. Converting XML, HTML and all similar formats into binary format so that it becomes fast, efficient & easy to code. Well, any human can read the binary just by decompiling it into a TXT XML format again for debuging.

  • User profile image
    littleguru

    shreyasonline wrote:
    I absolutely agree.

    Also, I would like to raise one more point again. Converting XML, HTML and all similar formats into binary format so that it becomes fast, efficient & easy to code. Well, any human can read the binary just by decompiling it into a TXT XML format again for debuging.


    Xaml is compiled into Baml as i know. Baml is binary code. I don't know exactly if it's MSIL. Does anybody know what Baml is exactly?

    Why should XML, HTML and other markup languages being compiled to binary code? It's fine the way it is right now.

    I agree with W3bbo not to use "tables" for layout stuff.

  • User profile image
    shreyasonli​ne

    littleguru wrote:
    shreyasonline wrote: I absolutely agree.

    Also, I would like to raise one more point again. Converting XML, HTML and all similar formats into binary format so that it becomes fast, efficient & easy to code. Well, any human can read the binary just by decompiling it into a TXT XML format again for debuging.


    Xaml is compiled into Baml as i know. Baml is binary code. I don't know exactly if it's MSIL. Does anybody know what Baml is exactly?

    Why should XML, HTML and other markup languages being compiled to binary code? It's fine the way it is right now.

    I agree with W3bbo not to use "tables" for layout stuff.


    When XML is used by applications to communicate, then why they need to speak a TXT Human readable format, which takes large size (large is a comparative word, it takes more space than it must take), <TAGS>difficult to parse human readable tags</TAGS>

    Let computers communicate in their basic language i.e 1's & 0's

  • User profile image
    littleguru

    shreyasonline wrote:
    When XML is used by applications to communicate, then why they need to speak a TXT Human readable format, which takes large size (large is a comparative word, it takes more space than it must take), <TAGS>difficult to parse human readable tags</TAGS>

    Let computers communicate in their basic language i.e 1's & 0's


    I think when converting it to a binary format you will loose a lot of the flexibility.

    Usually when creating a binary format for a file type you say: from offset x to offset y is this type of data (let's say X).
    But with an XML document you have no offsets. It's totally dynamic. You can add stuff where the parser (or the algorithm that is parsing it) wouldn't even expect it to be.

  • User profile image
    shreyasonli​ne

    littleguru wrote:
    shreyasonline wrote: When XML is used by applications to communicate, then why they need to speak a TXT Human readable format, which takes large size (large is a comparative word, it takes more space than it must take), <TAGS>difficult to parse human readable tags</TAGS>

    Let computers communicate in their basic language i.e 1's & 0's


    I think when converting it to a binary format you will loose a lot of the flexibility.

    Usually when creating a binary format for a file type you say: from offset x to offset y is this type of data (let's say X).
    But with an XML document you have no offsets. It's totally dynamic. You can add stuff where the parser (or the algorithm that is parsing it) wouldn't even expect it to be.


    Not necessary... you can have all the flexibility you had in TXT XML, in binary format (How, its how we design the standard binary format). Hence, its not an issue.

  • User profile image
    Marsella

    Xaml (atm) uses different layout tags such as gridpanel and flowpanel as well as document.  It's more based on XML more than HTML.  Also the code will eventually become 1's and 0's once it's compiled or parsed, as all code is. 

    The question is how high the level of abstraction should be in the source code, the higher the closer to how humans would define code, the lower the closer to machine code.  The speed of machines and the compiler parser optimizations today negate the need for us to program in low level code (some exceptions). 

    Xaml is a very powerful declaritive language and allows some non trival applications with very few lines of code.  If we had to write these in C, or Assembly then yes it might run slighlty faster but it would take much much longer and much more lines of code.

  • User profile image
    Minh

    W3bbo wrote:
    That aside... Aparently you use "tables" to layout XAML apps.

    I disagree with this practice completely...

    They say a little knowledge is a dangerous thing, so here' where I'm dangerous. I'm sure flow layout will be available in XAML, but it's not the only layout. Actually, the first available layout is the kind you're seeing today, in WinForms, in VB forms, etc...

    W3bbo wrote:
    Have they learned nothing from history? When the W3C said that the <table> element could be used to layout webpages back in 1995, the WWW became a mess from that day forward.

    Oh, really? I didn't know <table> was so bad.

    W3bbo wrote:
    Its only now that we're seeing people get their act together and separate layout from content and leave positioning and styling to CSS

    You're probably too young to remember when no one has thought of CSS yet. Knowledge has to evolve, too, you know.

  • User profile image
    eagle

    XAML inspired Avalon, there are some great things being done with XAML.

  • User profile image
    Alexm

    XAML is a way of describing a tree heirarchy of visual elements - I don't see how it will be slower than winforms after compilation unless JIT compilation is used and even that would be a relatively small hit.

    Certainly I've seen no evidence of it being particulary table based - in fact most examples I've seen have either been free flowing (html style) or absolute (Winforms). Due to the freeform nature of Avalon; resizing to fit content, dpi and localisation I'd expect something of a mix of those too.

    Additionally XAMl uses a theme based system which has already been demonstrated where a theme can be imposed on the form structure to acheive the same results as CSS but moreso.

  • User profile image
    Sampy

    Alexm wrote:
    XAML is a way of describing a tree heirarchy of visual elements


    Actually, it's just a way of describing a heirarchy of .Net objects. Visual presentation is what Avalon uses it for.

  • User profile image
    W3bbo

    IRT Sampy:

    Likewise, XHTML is used to describe the hierachy and structure of a document, not how it appears

    CSS is used for appearance
    JavaScript is used for interactivitiy

    XAML presently combines higher-end equivalents of all 3... this cannot bode well

    Mozilla's XUL format separates them, and it works great, XUL markup is vastly simpler than XAML and easier to work with (from what I've seen)

  • User profile image
    littleguru

    XAML does not do the whole programming stuff. As I know (and have seen) there is always some sort of codebehind file where you put your C# or VB.NET code...

  • User profile image
    Marsella

    W3bbo wrote:
    IRT Sampy:

    Likewise, XHTML is used to describe the hierachy and structure of a document, not how it appears

    CSS is used for appearance
    JavaScript is used for interactivitiy

    XAML presently combines higher-end equivalents of all 3... this cannot bode well

    Mozilla's XUL format separates them, and it works great, XUL markup is vastly simpler than XAML and easier to work with (from what I've seen)


    No offence, but you should really read a bit more on XAML, XAML != Avalon.  Avalon uses XAML as one of its languauges and does seperate structure from apperance, i.e

    <Style def:Name="MyButton">
         <Button />
         <Style.VisualTree>
        </Style.VisualTree>
    </Style>

    <Button Style="{MylButton}" />

    These styles can be places in seperate files, like external CSS. Only you dont need to learn new syntax as its all XML.

    Behaviour is also seperate, it is implemented by either inline code blocks or in a seperate file (thanks to partial types). It is hooked up to the ui elements via events. 

  • User profile image
    Maurits

    The biggest problem with < table > tags (as I see it)is the inheritance issue.  SGML is inherently a document-tree format, where each tag inherits from a single parent.  But tables are inherently a two-parent idea - where each cell is simultaneously a member of its row, and its column.  There isn't really an easy way to reconcile these.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.