Slashdot Mirror


Introduction To XAML

prostoalex writes "It was recently reported that Microsoft will integrate its own XML-based language for application programming into the next edition of Windows (codename Longhorn). This Introduction to XAML (Extensible Application Markup Language) provides an insight into how it's possible to build a Windows application with Microsoft's brand-new XAML language."

68 comments

  1. Question by jsse · · Score: 4, Interesting

    XML is meant to be interoperable.

    How well does XAML achieve in this regard?

    1. Re:Question by borgboy · · Score: 3, Interesting

      That's an interesting question, and should be modded up.

      The possibility - hopefully not a minimal one, is that you could develop an editor that based your gui layouts on XAML. Then your .Net presentation rendering - the big sticking point right now between WinForms and Mono GUIs - would be in an interoperable form. Maybe. Looking at the samples in the FA, I don't see any reason XAML couldn't be implemented for any platform hosting the CLR. Or most modern languages running on a gui platform, for that matter.

      Disclaimer - I am NOT a hardcore GUI developer. I could be full of it. Don Box and lots of other folks seem to be pretty excited about XAML.

      --
      meh.
    2. Re:Question by The+Bungi · · Score: 4, Interesting
      Interoperable with what? If you're hoping that MSFT will port this to some other OS, don't hold your breath.

      OTOH, since it's just XML you can theoretically create an implementation of the engine in any platform where you have an XML parser available, which is pretty much any meaningful platform in existence. Just bind it to your GUI/widget set/rendering engine and you're all set.

      I mean, if Mono can create a complete (or almost complete) CLR implementation that runs on Linux I don't see why they or someone else can implement this as well.

    3. Re:Question by 0x0d0a · · Score: 3, Insightful

      If you're an XML nut, you could have XSLT that converts XAML to whatever XML dialect glade uses and just get GTK interfaces directly. :-)

    4. Re:Question by Anonymous Coward · · Score: 0

      It'll be readable by any (compliant) XML parser.

  2. XML based programming by Kethinov · · Score: 3, Insightful

    'Less I'm mistaken, this means that people will be able to develop fully functional simple Windows executables by writing a few lines of script in XAML? I think that's a good idea. Sure we still need stuff like C for large projects, but why waste your time coding in C when all you want to develop is something like a simple caculator?

    --
    You're right, I wouldn't steal a car. But if it were possible, I sure as hell would download one!
    1. Re:XML based programming by !3ren · · Score: 5, Insightful

      Mmm not so much.
      All this does is abstract the UI from the code.
      (Which is super if you look at the kludgey cra* they have foisted on developers through the VS series of products. I have always liked the ease of use of MS's designers but the resulting code usually made me angry. Nothing like adjusting the attribute of a control in the source and having it crash your IDE.)

      You will still need to write behaviours for any application using XAML.
      I believe there's been a couple of O/S projects that have done the same thing for a couple of years (abstracting UI to XML) but I'm not sure of the names..

    2. Re:XML based programming by gnovos · · Score: 2, Funny

      'Less I'm mistaken, this means that people will be able to develop fully functional simple Windows executables by writing a few lines of script in XAML? I think that's a good idea. Sure we still need stuff like C for large projects, but why waste your time coding in C when all you want to develop is something like a simple caculator?

      Or spell checker. (ducks)

      --
      "Your superior intellect is no match for our puny weapons!"
    3. Re:XML based programming by fredrikj · · Score: 1

      Sure we still need stuff like C for large projects

      No you don't. C is an adequate choice for operating system kernels and isolated performance-critical libraries, but it's really one of the last languages you should look to if you're writing an *application*. XAML is a step in the right direction (out of the C slough), although the implementation may not be the right.

    4. Re:XML based programming by croddy · · Score: 1

      that may be the case, but please don't tell any audio developers about it. :-)

    5. Re:XML based programming by bburns · · Score: 1

      Yes, it is a good idea to simplify GUI programming with scripting languages. I used to work on applications that had screens and screens of text, images, and some forms, carefully designed by graphic artists and customized for multiple clients. We basically did the same thing and designed a scripting language that was interpreted using a UI class library. However, the scripting language and class library were all proprietary and not useful to anyone else.

      It used to take someone with a 4-year CS/CE/IT degree or related experience to put buttons on a form, which is ridiculous. The Web made it easier for UI engineers to design Web apps with some HTML. Maybe XAML will do the same thing for the desktop.

    6. Re:XML based programming by GeckoX · · Score: 1

      Mozilla would be the main one in recent time.

      --
      No Comment.
    7. Re:XML based programming by CharAznable · · Score: 1

      I shudder to think about the horrible software that people will write by writing a few XML tags.. What Microsoft doesn't realize, and doesn't want to realize, is that syntax is almost inconsequential.. the real difficulty is being able to hold algorithms in you head and specify them clearly without errors...no amount of easy syntax and cute RAD tools is going to make that easier. Granted, RAD tools have their place, but you still need to be able to create and specify solid, logical algorithms. That's why no language in the world will be able to make a programmer out of a PHB. COBOL didn't do it, neither did VB.

      --
      The perfect sig is a lot like silence, only louder
    8. Re:XML based programming by Anonymous Coward · · Score: 0

      We have GNUe Forms that aims to be cross-platform
      and it is certainly free!

      You can find it from here:
      http://www.gnu.org/software/gnue/tools/form s.html

  3. Yawn by Usquebaugh · · Score: 1, Funny

    Another language and still no progress. When will CompuSci people stop re-inventing the wheel and go out and invent something.

    1. Re:Yawn by Anonymous Coward · · Score: 0

      Yeah, but wait until you see Wheel 2.0!!! With a totally rewritten client/server architecture, you can share one wheel on any number of axles! (Requires Axel 1.0, to be released in Q4 2004. Multiple axles will require a Site License. Use of this product indicates acceptance of the End-User License Agreement. It is a violation of the EULA to use Wheel on a blue car.).

    2. Re:Yawn by Jerf · · Score: 4, Insightful

      You've been modded "funny" as I write this but really you have an interesting point.

      The answer is that to date, all of our wheels have been spikey and sharp, tending to work poorly and often killing, crushing, and destorying things in its path, rather then working as designed.

      My pet example of this is "Object Oriented Programming". I think OOP is a significant advance, but it took 20 years to start to get implementations of it that were really useful, in C++, in Python, in a couple of other languages. (I take a broad view here. C# probably qualifies, but I haven't used it. Perl does for wizards only; technically the capabilities exist but they're damned hard to really get right. Java is getting there but still borderline, unless you augment it with other tools. Most other implementations tend to hit complexity walls too early to be useful, such as pre-template C++.) Think "design patterns", and the subsequent work being done based on that.

      Finding the best way to do one thing is easy. Finding the best way to do a million things is harder. Iterators or Observers? MVC or something else? Pervasive persistence or request only? (These are of course only sample questions, not meant to be answered or considered as exhaustive.) The only way to answer these questions on a large scale is to try them on a large scale. That takes time, and a lot of what seems like re-invention, as some new combination is tried out with a few subtly different answers from last time.

      The sheer staggering multiplicity of answers on so many dimensions is really unprecendented in any other Engineering field, since they all tend to be able to use "physical locality" to isolate the complexities of their system. Consider the almost uniformity of mainstream CPU design, for instance; is it really so inconceivable that a little 'reinvention of the wheel', i.e., a complete re-thinking of PC architecture, isn't called for?

      Right now, we really don't know as much as Language X bigots ("Language X is the one true way!") would have you think. There's still a lot of room for experimentation. And the only true way to experiment is by building a slightly different wheel, and seeing if it maims its users slightly less then before in a wide variety of situations.

      In this sense, "software engineering" almost approaches a true experimental science, albeit with very engineering-oriented experiments.

    3. Re:Yawn by 0x0d0a · · Score: 1

      Ocaml has been developed. If you can stand programming in functional languages, you already have a fast language suitable for application programming.

      The problem with languages recently is that they aren't driven by CS people, but by businesspeople. Java was not enthusiastically endorsed by language people, but by business technology folks.

    4. Re:Yawn by Anonymous Coward · · Score: 0

      Yeah, but improved roundness won't debut until Wheel 3.0, and the Rational Pi interface got pushed back to Wheel 4.0, so I'm blowing that upgrade right the fsck off.

    5. Re:Yawn by UserGoogol · · Score: 1

      They'll stop inventing languages when you start using Lisp.

      --
      "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor
  4. Wow! by thecampbeln · · Score: 4, Interesting
    Very cool stuff! This is a very cool way to define the layout of a form, it boils it down very effectively (IMHO). Depending on it's implementation, it could allow for cross platform development (assuming that the target platform had a compatible compiler, of course)... But then again it is Microsoft, to them "cross platform" means Win9x, Win 2k and WinXP (see .NET). This will probably step into the same sort of role that VB (has) filled for so many years - quick and dirty applications development. Course that doesn't mean the concept is shit. This seems to be a very cool (and relativity open) means of defining UI layouts, and all the compiler would need is an XML parser!

    If Microsoft was only a technology company and could leave that whole messy marketing evilness out of it. Microsoft has come up with (or outright "borrowed") some very cool RAD technologies over the years. But god help us if they try to integrate any more then the UI elements into this "programming language" (I was once forced to use an ad-hoc XML-based programming language... it sounded ok until you tried to program in it, implementing logic was weird), but for the UI, wow.

    --
    "1984" was ment to be a warning, not a guidebook. You hear that Kim Jong-il!? BushCo?!
    1. Re:Wow! by vudu · · Score: 2, Interesting


      But then again it is Microsoft, to them "cross platform" means Win9x, Win 2k and WinXP (see .NET).

      Sorry... Win9x is no longer supported.

      D'oh.

    2. Re:Wow! by palad1 · · Score: 1

      You mean, cool as. say... XUL?
      The great advantage of XAML over XUL is the fact that the embedded C# code will be compiled, JIT'ed and cached on the fly. AFAIK, XUL's javascript doesn't get the same treatment.
      Feel free to prove me wrong and educate me ! :)

  5. Dear MS, by Strange+Ranger · · Score: 2, Interesting

    Can we get some of the Windows, Outlook, and IE XAML security measures included with the first longhorn release?

    Or are we going to be reactive only, as usual?

    --

    Operator, give me the number for 911!
  6. Isn't this like XUL? by Josh+Booth · · Score: 1, Troll

    Wasn't XUL designed to be the exact same thing? Or is it more like SVG? Either way, I think we've already cracked this nut before. It looks nothing like a programming language, as the article implies, but a way to create Mickey-Mouse-Mode GUIs, for which Visual Studio will have a Wizard for anyway.

  7. Nothing new actually by Mastos · · Score: 5, Informative

    The idea of XML-based interface definition has been around well before XAML. There are a ton of XML user interface languages around: http://xul.sourceforge.net/. Hell, Mozilla is built around it: http://www.hevanet.com/acorbin/xul/top.xul

  8. Yay by Anonymous Coward · · Score: 0

    Another method for virus!

  9. MS's reply to XUL by josepha48 · · Score: 3, Insightful

    This is basically Microsofts answer to Mozillas XUL. What a suprise that they have such an original idea. Of course what they probably haven't realized is that this means that creating GUI interface that are cross platform becomes easier and it then becomes easier to move away from thier OS. If they publish the dtd for the XML then an interpreter for other OS's that can render the XML is all that is needed. Then using .net framework or web services, your applicaiton could run anywhere and work anywhere.

    --

    Only 'flamers' flame!
    Does slashdot hate my posts?

    1. Re:MS's reply to XUL by shaitand · · Score: 1

      They arent' concerned about this anymore. By the time longhorn is released they hope to eliminated any hardware cooporation or capability to boot from competing operating systems.

      At that point they can show what great and wonderful guys they are and how they develop all these great things to ease development for multiple platforms and allow for competition.

    2. Re:MS's reply to XUL by Anonymous Coward · · Score: 1, Informative
      You don't deserve that "insightful" moderation. First of all, XUL isn't an original idea, either. XML for GUI layout is as old as XML itself, and for a GUI layout separate from the code, earlier examples abound. Heck, VB had FRM files which provided layout information that would work just fine without any code inside.

      Second, it's plain stupid to say that MS "probably haven't realized" that this makes cross-platform development easier. As a matter of fact, the only assumption which makes sense is that they must be doing it for this reason. At the very least, it may simplify their huge investments versions of Office which run on both Windows and Mac platforms, for example.

      The fact that you refer to a "DTD" for the XML means you haven't been keeping up with XML. DTD's have been outdated for YEARS now. But that part of your comment in general was simply obvious and redundant. However, it becomes even more ridiculous when we reach your concluding statement, which amounts to, "If you have .NET, you can run .NET stuff." Hey, thanks, Skippy!

  10. Looks like VB.Net by satanami69 · · Score: 1

    This sounds similar to how VB .NET works. Just have the application provide the logic, but let the OS take care of the GUI.

    --
    I really hate Dan Patrick.
  11. To replace VB? by airhed13 · · Score: 1

    On the surface, this looks like it could be the poor man's way to replace VB. (Like your average poor man could afford Windows anyway.) The one thing about Longhorn that intrigues me is the fact that MSFT is apparently trying to abandon a great many outmoded paradigms. XAML is just another example (though not entirely original, as suggested elsewhere). I have to admit a non-trivial amount of morbid curiousity as to seeing how the whole system will ultimately work.

  12. OT: Vector Based theme by ScriptGuru · · Score: 2, Interesting

    Looking at the skewed listbox, is Longhorn's theming going to be vector based? Maybe WVG?

    --
    Yet another signature that refers to itself. The irony and humor is dead.
    1. Re:OT: Vector Based theme by hellswraith · · Score: 1

      If you are seriously asking about it being Vector Based, you would be correct. It IS vector based. The last meeting I went to had a couple MS employees showing off Longhorn and highlighting all the cool stuff which included vector graphics for even icons. Pretty interesting things.

  13. Looks pretty good by spitzak · · Score: 2, Informative

    Definately NOT a new idea, but it may establish a standard, which is just as important as having the idea at all. I don't know if Microsoft realizes that with this text base it is going to be very easy to clone on other platforms. Perhaps they don't care, or perhaps the developers were able to actually write what they wanted, rather than what management told them to write.

    I must point out that I invented the "Grid" layout in 1992 at Sun Microsystems when I was working for the NeWS TNT group (TNT = The NeWS Toolkit). I called it "GridBag" because all collections in TNT were called "bags". I implemented it in NeWS and then copied it to OLIT (an Xt-based toolkit), it appears my OLIT implementation was copied to make the identically-named GridBag in the various Java toolkits (this is evident from the names of variables and methods). It appears Microsoft has copied the functionality for this (since they did not realize that it can do what their "dock" panel does and did not merge them). It does appear that GridBag has the most life of anything I every wrote and I have no complaint, but it would be nice to get some acknoledgement. (legally I cannot demand any acknoledgement, I wrote it while employed at Sun and it belongs to them).

    1. Re:Looks pretty good by Javagator · · Score: 1

      I have always preferred using a good layout manager over a drag and drop GUI builder. Look at most VB dialog boxes. Most of them can't be resized and they have ugly "Chicklet" buttons. The first Grid like layout manager that I used was the Table widget that came with WCL (GUI stuff for X-Windows/Motif). I am looking at the code and it contains the names David Harrison and David Smyth, with dates of 1989 and 1991. I don't mean to belittle your contribution but I just want to add some history to grid style layout managers.

      One interesting extension that I have added to the Java GridBag layout manger is to use an array of components to setup the constraints. Here is an example:

      Component[][] layout =
      {
      {null, resize, resize },
      {resize, Canvas, Canvas },
      {freeze, Button1, Button2 },
      };

      GridBagX bag = new GridBagX(mainWindow, layout);

      The GridBagX layout manager sets up a window where canvas will be resized in both directions and the buttons will only be resized horizontally. The special components freeze and resize are defined in the GridBagX object.

      Thanks for GridBag. It has made my life easier.

    2. Re:Looks pretty good by spitzak · · Score: 1

      I believe my main contributions was that resize was controlled by identifying the rows & columns to resize, rather than individual child widgets. Also the ability to make a widget occupy more than one cell (though there was precedence for occupying an entire row or column).

  14. Source for the original GridBag by spitzak · · Score: 2, Informative

    I tried to post the code but the filter won't let me. Here is instead the "help" I wrote to go with GridBag for TNT: (somewhat mangled to get past the lameness filter). This is dated August 6, 1992

    ClassGridBag

    Frustration with making ClassPanel do what I wanted made me create this new tnt class. It is a subclass of ClassBag and I think very fundemental, for instance ClassBorderBag could be a subclass of this.

    It's layout rules are not as powerful as /Calculated layout but they seem to be sufficient for almost any UI panel I have ever seen. It's response to being resized is much better and controllable.

    Layout is done in a rectangular grid of "cells". But the size of the rows and columns is not fixed or equal! Instead they depend on the maximum of the dimensions of the clients that are in them. Cell 0,0 is in the upper left corner. The grid is dynamic, the lower right cell depends on the current clients.

    [x] [y] /setgaps sets a space between each row and column of cells. The /insets (same as ClassBorderBag) sets a space around the outside of the grid.

    Each client occupies a rectangular set of cells (not just one!). They should not overlap, although ClassGridBag does not enforce this. The client's size and postition is controlled by the outside border of the set of cells, the divisions inside do not affect it. A clever algorithim is used to choose the row and column sizes so they are all as small as possible whatever the arrangement (well, almost).

    When the bag is resized, all the "delta" is divided equally between rows and columns identified by ResizeX and ResizeY. If these are empty the cell array is simply centered in the bag.

    Public stuff:

    /ResizeX array (variable)
    /ResizeY array (variable)

    Arrays of row and column numbers to resize. Negative numbers mean gridsize-abs(x). The default ResizeX is [-1], ResizeY is []. Subclasses would want to override these variables.

    x y /nameforcell name true | false

    Return the name of the (first) client which occupies the given cell. This name can be used to get the actual client.

    [x y w h /type] client /addclient -

    The "layout parameters" of a client are an array of either length 4 or 5. x and y identify the top left cell and w and h are the size of the rectangle.

    To allow access to the dynamic grid size, zero or negative w or h mean max(1,gridsize-abs(n)-x). This means that 0 w or h indicate "to the end of the row/column".

    The /type is optional. If missing the client is resized to the size of it's rectangle. If given the client is left at it's /preferredsize and justified against one of the edges or corners. /type is a compass direction such as /East or /North, or /Center to put it in the middle. Technically the /type is not necessary because the client could justify it's own display but this avoids a huge number of subclasses of controls and labels just to make different justifications.

    The type may also be an integer, this helps C code a lot. The compass points are determined from the array:

    7 8 9 (i.e. 8 is the same as /North).
    4 5 6
    1 2 3

    name /removeclient => client true | false

    Removes the client. The total grid size is recalculated.

    [x...] [y...] /setgaps -

    Sets the gaps between columns and rows of cells.

    /gaps [x...] [y...]

    The current gap settings.

    ninset einset sinset winset /setinsets -

    Sets the insets around the edge of the items, invalidates the panel.

    - /insets ninset einset sinset winset

    Returns the current insets.

  15. Repeat of the worst of HTML by Xife · · Score: 2, Insightful
    Isn't one of the reasons HTML sucks is because it merges content and formatting?

    Have we learned nothing? Are XUL and XAML just for the default layout and values?

    What do these do to make adding/changing/reading user input any easier? Can you assign an independent name/number/resourceid to buttons and such? Did MSFT learn nothing from ripping off Java and the pitiful AWT checking by name that was sooooo fragile? How well does that work with i18n?

    Isn't SVG supposed to do all that graphics stuff?

    Why did they have to reinvent the wheel, and make it a 1980's HTML 2.0 wheel at that? How many people think tables are 'the way' to do layout? Didn't HTML 4.0 change all that with <div> to break free of table layout hell?

    Maybe I can't see the forest through the trees, but it seems like an idea full of compromises. XAML looks like something that needs to be split into two pieces a resource palette and a layout document. Not merged together ala HTML.

    --
    ---- Smokin' another sig.
    1. Re:Repeat of the worst of HTML by Anonymous Coward · · Score: 0

      already way ahead of you.

      XML + CSS -> real code

      It's coming.

  16. XSLT Viruses? by superyooser · · Score: 1
    XSL Transformations can transform a well-formed XML document into another well-formed XML document using DOM manipulation. Since these aren't binary files (i.e. they are scripts interpreted by the browser, not code independently executed by the OS) and IE is embedded in Windows, a transformation wouldn't spawn a separate process that could be detected by an anti-virus program. Your browser would pick up the XSL virus file from a web site and interpret it itself.

    I'm not a security expert, but wouldn't it be easy for a script kiddie to replace a standard Windows XAML GUI file to switch the OK and Cancel buttons in a dialog box or to make them both perform as the same button?

    Internet Explorer dialog box: Do you give permission to install Bonzi H4X0r plugin?

    [OK] [Cancel]
    (Both act as OK)

    I suppose Windows could run a checksum against every OS file on access to make sure it hasn't been altered or replaced, but then you'd have to have a backup of the whole OS including the updated versions of files updated by patches on a hard drive to continue what you were doing without a period of hassle.

    Can XSL files interpreted from web sites even do transformations on local XML files? Hopefully there would at least be a security prompt (dialog box from XAML file? Ha!), but it would be a nifty ability for legitimate web applications.

    1. Re:XSLT Viruses? by Anonymous Coward · · Score: 0

      do you mean that [OK] and [Cancel] button do separate things in windows?

  17. The GUI is just 5% of the application by Frans+Faase · · Score: 1

    When is someone coming up with a real good language for specifying applications. This is yet another language for describing the graphical interface of an application. And as such it adds nothing new! Just another technology for something that we already have dealt with before. I am waiting for the first frame work that gives you the ability to query and edit data in a consistent manner, without having to write code for every single query/insert/delete/update statement myself. That provides you with built in undo/redo functionality and things like locking. A frame work where you specify data manipulation, instead of having to implement it over and over again. A frame work that let you generate single tire, two tire, tree tire, or what ever many tire systems, using any possible web-based or non-web-based communication protocol with the push of a button.

  18. and? by godglike · · Score: 0, Troll

    With Longhorn having been dubbed Longhaul by the Register for stretching even Microsoft's flexible definition of a deadline, how is this important?

    Probably a very nice idea, badly implemented like VB, and will be overtaken like .net before they can get anything useful out of it.

    My impression is that MS will be dead (like IBM is dead) by the time Longhaul ships. If it ships.

  19. About KDE by rikkus-x · · Score: 2, Interesting

    The idea of using XML to describe a user interface is nothing new, though that's not a criticism of Microsoft.

    I think KDE is a good example of how XML can be used in this way successfully. KDE uses XMLGUI to describe the menus and toolbars of a window, for example, here's Konqueror's menu and toolbar structure.

    KDE also uses XML to describe the 'work' area of windows. The XML is created by Qt designer. Example: kcontrol's mouse configuration dialog.

    Qt designer gives the XML a little more power, allowing you to set up connections between GUI elements within the XML itself. For example, you may specify that you will have a method named, e.g. 'addButtonClicked' and make a connection from your 'add' button to that method inside designer, by drawing a line. This connection will then appear in your code at runtime. All you do is implement the method and wait for it to be called. Examples of this can be seen in the above mouse configuration dialog XML.

  20. Only GUI ? by grims · · Score: 1

    Correct me if I am wrong, but looking at the code online, it looks like it is only a GUI placement specification - is it possible to say connect a button to a VB/JavaScript ? If more intelligence is not provided with the controls, whats the use of the controls ?

  21. This is a mess, not for serious coders by Viol8 · · Score: 2, Insightful

    I'm sorry , but I shudder at the thought of having to "code" in this unholy mess of a "language". SGML and HTML upon which XML are based were meant to

    be typesetting/dexcription languages , they were NEVER meant to be coding languages as as such their syntax is not geared towards that use. To try

    and shoehorn coding concepts into XML simple because its the current flavour of the month in marketdroids and other gullible types on the fringes of IT
    does NOT mean it should be used for this. And how exactly is this an advance over other supposed 4GLs anyway? What does it do that they do not? Nothing as far as I can
    see apart from giving the coder a headache. The only possible use I can see for it is all those 3rd raters in the web industry who learnt HTML and suddenly thought they could code
    and now heres a language to try and convince them they're right. Well sorry guys , you're not coders and you never will be until you learn a proper programming language.

    1. Re:This is a mess, not for serious coders by rbolkey · · Score: 4, Insightful

      Although I empathize with your sentiment, you obviously have no clue what your talking about in reference to the actual article submitted(yes, this is slashdot, big shock). The article's comment is a little misleading, this isn't for coding, it's for interface layout, which XML is quite effective at if you've ever touched XUL. XML is heirarchical. As are most, if not all, common GUI components. And separating logic from layout is A Good Thing, which XUL performs more cleanly than most toolkits I've seen (Swing, Windows Forms).

      The true measure of the impact of a technology is how many highly effective solutions you can find that it wasn't really intended for. This is one for XML.

    2. Re:This is a mess, not for serious coders by Viol8 · · Score: 0, Troll

      "And separating logic from layout is A Good Thing"

      Yes thats sounds wonderful unless you require graphics that change during runtime.

    3. Re:This is a mess, not for serious coders by Anonymous Coward · · Score: 0

      "Yes thats sounds wonderful unless you require graphics that change during runtime."

      Don't be silly. There's nothing wrong with specifying, say, a "Picture" control, whose contents can be modified at runtime, while not requiring you to create that control by calling CreatePictureControl (x, y, width, height, picture).

    4. Re:This is a mess, not for serious coders by chicogeek · · Score: 1

      And what makes you think that you won't be able to change the graphics, or control layout at runtime? My understanding is that the XAML represents the layout of the window at the time of creation. After that you're free to add/remove controls from the control container. If you want to change the graphics at runtime, then derive your own control and handle the paint event.

  22. MSDN TV "Lap Around Longhorn" by superdoo · · Score: 1

    Here's a good video introduction to a lot of the new things being worked on for Longhorn. It shows demos of XAML-based apps. Including things like vector scaling and rotating a text box, then spinning it while playing a video in behind and still being able to type. Not practical, but shows the depth/richness of the vector-and-XAML-based engine. Also check out PDC Bloggers for lots of inside info about the new architecture(s).

    I think a lot of this stuff is very interesting, even if you don't live in the MS world.

  23. Hypercard for Windows by narrowhouse · · Score: 1

    Is it just me? More Innovation(TM) out of Redmond! I personally am tired of hearing about XML based things that are XML-based (or worse XML-like) for the sake of "buzz" compliance. This isn't just a slam on Microsoft, it's all the companies that are looking for a way to jam the letters XML into their marketing pamphlets.

    --


    Insert pithy comment here.
    1. Re:Hypercard for Windows by GregK72 · · Score: 1

      I have to agree with the sentiment here. I first discovered XML when creating a Java Servlet based application. I wanted an easy and flexible way to create messages between the servlets in my application. Of course this was when SOAP was still called XML-RPC. I thought that XML was well suited for describing messages and document structure.

      I think rather than replacing VB, XAML could replace the ugly mess of asp: tags in an ASP.NET application. :)

      --
      Now accepting sig suggestions.
  24. Apple Interface Builder.... by Steveftoth · · Score: 1

    Anyone who has used IB is yawning now . A lot.

    IB is Apple's (from Next) tool that allows you to point and click create a UI. Why even bother with XML when you can just point and click to create the gui and hook it up to real code.

    Thus you can have 2 seperate teams, one for designing the nib files and one for the gui. Course this doesn't really seperate out so easily, and the GUI doesn't take much time to create, but the point is that people higher up can create or change the interface without bothering the coders, which is a major goal of this XAML im sure.

  25. What ever happened to the other XAML? by shadowRider · · Score: 1

    What ever happened to "Transaction Authority Markup Language (XAML)"?
    It would appear that the xaml.org website is no longer online.

  26. Re:VB anyone? by E1v!$ · · Score: 1

    Examine my flame!

    ( * )
    V
    V

  27. RAD, scripting, and PHB programs by Latent+Heat · · Score: 1
    I recently found out that Matlab of all things can script Java objects. My PHBs are engineering students -- their tuition pays my salary, their evaluations influence my pay raises -- and yes, I would like them to program rather than rely on canned CAD and simulation software all their lives. They love Matlab, but knowing only Matlab will leave them developmentally disabled, the are required to learn Java, but I would like them to do more with it. Just wait until I show them how easy it is to use their beloved Matlab to create Java object instances and read and write data from those objects and use Matlab to make all kinds of pretty engineering graphs with that data.

    For grins, I did some Googling about what it would take to poke at Java objects from C++. There are a number of commercial and open-source projects to do just that, but golly, the C++ program has to launch a Java JVM, and then you have to create C++ proxy objects for the Java objects, and then you have to fret lifetime management and omigosh, what about thread? Now since C++ and Java are vaguely similar C-like OO languages, you probably are better off doing everything in C++ or everything in Java. But the point is to do something like that, if there was a requirement for it (how about a legacy Windows app using student-written Java plugins -- remember they are required to learn Java, not C++), it would take the better part of the semester to get my flock of PHBs up to speed. The Matlab thing can be handled in one class period.

    Ok, scripts and RAD and such will allow PHBs to sully the reputations of programmers by generating garbage. I will take that risk so I don't have to labor in the salt mines of coding -- I have paid my programming dues writing thousands of lines of Windows API code, and I want to write scripts and use RAD in my lazy old age.

  28. beautiful by megajini · · Score: 1

    ok, i'm maybe the only one around here finding it kind of positive what microsoft is doing here (and that happens only every 2 years...)

    i'm wondering wether it's possible to modify mozilla xul engine so far that it reads this XAML stuff... (ok, bindings are different and so on but:)

    =platform independent UI

    Rule: native windows L&F / modified XUL for the rest of us. this would result in "usable" projects (instead of gtk2 port for windows / qt $$$$$ / slow java / problematic .net|go.mono)

  29. NextStep, Mac OS X, Konfabulator by Slur · · Score: 1

    Since NextStep there has been an interface builder tool, and it has evolved with the Mac OS X developer tools into the modern Interface Builder we use today. Interface Builder lets you build GUIs which are encapsulated into NIB files (stands for NeXT Interface Builder). Well, cool, NIB files are XML files. The GUIs you build in IB can be used to front-end applications written in C, C++, Objective-C, AppleScript, - and I believe perl and python as well using bridge modules.

    Now, of course, on Mac OS X as in other Unix-like OS's, the GUI you build and script can invoke any of the facilities of the OS, command-line, libraries, frameworks, shell scripts, daemons, processes, and doodads. This is of course the kind of power X-Windows coders have enjoyed perhaps longer than anyone else. But a lot of this capability existed in NeXT as well.

    Recently a very interesting and cool desktop widget engine called Konfabulator was released for Mac OS X. And of course, its interfaces are built in XML. The code that primarily interacts with the GUI is written in Javascript (aka ECMAScript). From JavaScript you can invoke any of the facilities of the OS. The possibilities are staggeringly neat. People have programmed everything from "top" front-ends to action games. PNG is the preferred graphics format for building GUIs due to its powers of translucency. But of course you can independently set the translucency and layering behavior of any widget.

    The thing that appeals most to me as a programmer is the systematic reinforcement of the MVC design paradigm at the operating system level. Abstracting the GUI from the code is a good idea and it's good to see MS catching on at last. Earlier attempts at RAD solutions on Windows have always had a kludgy feel, or tied you to a particular framework. Making a modern GUI engine a part of the OS foundation will not only simplify development it ought to eventually lead to a more compact and clean OS in general.

    --
    -- thinkyhead software and media
    1. Re:NextStep, Mac OS X, Konfabulator by bsartist · · Score: 1

      NIB files are XML files.

      No they're not. The objects in a NIB are stored in a binary format that's known only to Apple. That's why GNUStep's AppKit can't read them directly, requiring you to use nibtool first, to convert them to format it can read.

      Perhaps you were thinking of Renaissance? It provides a means of describing a GUI in XML. It works on both Mac OS X and GNUStep, but it's not from Apple and doesn't use NIBs.

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
  30. Umm... by Slur · · Score: 1

    ...It's likely that a visual interface builder tool will write the XML on your behalf. As with most such interface builders it will provide snapping and layout hints to make sure things are well-spaced according to UI guidelines. There should almost never be any need to hand-code an XML description of the GUI. Many coders already build UIs with visual tools, and the use of XML behind the scenes isn't going to make a difference to bad design.

    I base my outlook on the fact that Interface Builder (NeXT, Mac OS X) has long used XML for its GUI description files, and there are unlikely to be a dozen coders in the world who ever hand-edit the suckers. And I personally like both the abstraction of the GUI from my application and the use of XML behind the scenes.

    XML is well-suited to the kind of data pertinent to a GUI, and it's infinitely open-ended, which is good for any evolving framework. It doesn't hurt that it's human-readable either.

    --
    -- thinkyhead software and media
  31. Me Too by Slur · · Score: 1

    I must agree. I do it all the time.

    --
    -- thinkyhead software and media
  32. Can anyone explain to me OS X IB controllers? by Latent+Heat · · Score: 1
    One of the more intriguing concepts in Interface Builder is the IDE support for generating controller objects. Is there a description of IB controllers written more in geek-speak than PHB buzzword-speak? I am trying to figure out what they do without a Mac in front of me because I develop for Windows (like, maybe I can be persuaded to develop for the Mac, heh).

    What I think those controllers are is what GoF calls mediators. The controller can be hooked up to data-model widgets as an observer, and it can be hooked up to display widgets so it can write stuff. Furthermore, it can be plugged in as an observer or plugged in to get access not just to a model or a view widget wholesale but to particular fields of such widgets using some kind of proxy objects that resemble C# delegates.

    Why I think this is important is that VB, Delphi, and their ilk implement Mediator pattern, but the Mediator is wrapped up into the main form -- it is like the controller setup only the main form is the controller and you get only one controller for the entire form. A lot of the complaints about spaghetti code in VB, I believe, have to do with the main form acting as traffic cop for all the communication between widgets on the form. The IB controller seems to separate the mediator function from the main form and allow you to have as many mediator objects as you have data paths.

    One advantage of the one-size-fits-all VB approach is that the mediator needs to be an Observer, and if the mediator is the main form, you know that this Observer is going to stick around for the lifetime of the child widgets being observed. If you allow widgets to directly talk to each other, you have to have some kind of registration/notification mechanism in case widgets are created and destroyed at runtime. How does IB handle this? Or are the widgets on a form fixed by the NIB file and not allowed to be created or destroyed during program execution?

  33. You're out of your mind by Slur · · Score: 1

    You're either lying or uninformed.

    I just opened a NIB package, and opened all the files in it - including "objects.xib" in BBEdit. Every single one is XML. Have you ever looked at a NIB file? Where are you getting your information?

    --
    -- thinkyhead software and media
    1. Re:You're out of your mind by bsartist · · Score: 1

      You're either lying or uninformed.

      Neither, as it turns out. My comments refer to Cocoa nibs, not Carbon. One would think that the reference to GNUStep and Renaissance would have made that clear...

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
    2. Re:You're out of your mind by Slur · · Score: 1

      D'oh! Well, shows how much I know at this stage in my Mac programming career! Okay, then. You're officially truthful and informed.

      Well, damn, now I want to find out more about these mysterious Cocoa NIBs and see where they have analogs to Carbon NIBs....

      --
      -- thinkyhead software and media