Introduction To XAML 68
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."
Question (Score:4, Interesting)
How well does XAML achieve in this regard?
Re:Question (Score:4, Interesting)
The possibility - hopefully not a minimal one, is that you could develop an editor that based your gui layouts on XAML. Then your
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.
Re:Question (Score:4, Insightful)
Re:Question (Score:4, Interesting)
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.
XML based programming (Score:4, Insightful)
Re:XML based programming (Score:5, Insightful)
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..
Re:XML based programming (Score:2)
Re:XML based programming (Score:3, Funny)
Or spell checker. (ducks)
Re:XML based programming (Score:2)
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.
Re:XML based programming (Score:1)
Re:XML based programming (Score:1)
It used to take someone with a 4-year CS/CE/IT de
Re:XML based programming (Score:1)
RAD, scripting, and PHB programs (Score:2)
Yawn (Score:1, Funny)
Re:Yawn (Score:5, Insightful)
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.
Re:Yawn (Score:2)
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.
Re:Yawn (Score:1)
Re:VB anyone? (Score:2)
( * )
V
V
Wow! (Score:5, Interesting)
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.
Nothing new actually (Score:5, Informative)
Re:Wow! (Score:2, Interesting)
But then again it is Microsoft, to them "cross platform" means Win9x, Win 2k and WinXP (see
Sorry... Win9x is no longer supported.
D'oh.
Re:Wow! (Score:2)
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 !
Dear MS, (Score:3, Interesting)
Or are we going to be reactive only, as usual?
Isn't this like XUL? (Score:2, Troll)
MS's reply to XUL (Score:4, Insightful)
Re:MS's reply to XUL (Score:2)
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.
Re:MS's reply to XUL (Score:1, Informative)
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
Looks like VB.Net (Score:2)
To replace VB? (Score:1)
OT: Vector Based theme (Score:2, Interesting)
Re:OT: Vector Based theme (Score:1)
Looks pretty good (Score:3, Informative)
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).
Source for the original GridBag (Score:3, Informative)
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
Re:Looks pretty good (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 st
Re:Looks pretty good (Score:2)
Repeat of the worst of HTML (Score:2, Insightful)
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 di
XSLT Viruses? (Score:2)
I'm not a security expert, but wouldn't it
The GUI is just 5% of the application (Score:2)
About KDE (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.org].
KDE also uses XML to describe the 'work' area of windows. The XML is created by Qt designer. Example: kcontrol's mouse configuration dialog [kde.org].
Qt designer gives the XML a little more power, allowing y
Only GUI ? (Score:1)
This is a mess, not for serious coders (Score:3, Insightful)
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.
Re:This is a mess, not for serious coders (Score:5, Insightful)
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.
Re:This is a mess, not for serious coders (Score:1, Troll)
Yes thats sounds wonderful unless you require graphics that change during runtime.
Me Too (Score:2)
Re:This is a mess, not for serious coders (Score:1)
Umm... (Score:2)
I base my outlook on the fact that Interface Builder (NeXT, Mac OS
MSDN TV "Lap Around Longhorn" (Score:2)
I think a lot of this stuff is very interesting, even if you don't live in the MS
Hypercard for Windows (Score:2)
Re:Hypercard for Windows (Score:1)
I think rather than replacing VB, XAML could replace the ugly mess of asp: tags in an ASP.NET application.
Apple Interface Builder.... (Score:1)
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
What ever happened to the other XAML? (Score:1)
What ever happened to "Transaction Authority Markup Language (XAML)" [coverpages.org]?
It would appear that the xaml.org website is no longer online.
beautiful (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 [mozilla.org] 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)
NextStep, Mac OS X, Konfabulator (Score:2)
Now, of course, on Mac OS X as in
Can anyone explain to me OS X IB controllers? (Score:2)
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
Re:NextStep, Mac OS X, Konfabulator (Score:2)
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 [gnustep.it]? 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.
You're out of your mind (Score:2)
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?
Re:You're out of your mind (Score:2)
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...
Re:You're out of your mind (Score:2)
Well, damn, now I want to find out more about these mysterious Cocoa NIBs and see where they have analogs to Carbon NIBs....