Search This Blog

Friday, February 15, 2008

Yet Another Computer Language

"...Microsoft is designing yet another computer language... it's a
declarative language [but] 'Declarative' is an awfully broad term, with
multiple meanings. Standard ML is considered declarative, and so are
its derivatives OCAML and F#. Prolog and rule-based AI systems are
considered declarative. You declare the rules: the logic engine decides
how to run them. SQL queries are declarative: you describe the data you
want to see, and the query optimizer figures out how to get it out of
the database. Haskell is considered declarative as well as functional,
not to mention that it has monads... XAML is a declarative language for
the domain of graphics. It was designed as an extension of XML. It's
such an expressive language that Charlie Petzold, arguably one of XAML's
most vocal proponents, built himself a alternative to Microsoft's XAMLPad
called XAML Cruncher, so that he could 'interactively type XAML code and
see the object it creates.' In Visual Studio 2008, Microsoft included a
bidirectional, split-screen XAML designer, so that you can create XAML
by dragging and dropping objects and by typing XAML code, with the ability
to freely switch back and forth between the two methods. I freely admit
to needing these tools; I can almost never write XAML that will display
correctly on the first try. Watching the Connected Systems Division (CSD)
at Microsoft over the years, it has been clear that they have been on a
code-reduction path. Why? SOAP was invented by Don Box and others to be
an XML-based lingua franca for communication among disparate computer
applications and systems. The functional deficiencies of SOAP were
addressed by the WS-* series of standards, to give it security,
authentication, reliability, and so on. All of those standards made it
harder to write conformant client and server code, raising the complexity
by orders of magnitude..." From Microsoft's "XAML Overview" document:
"XAML simplifies creating a UI for the .NET Framework programming model.
You can create visible UI elements in the declarative XAML markup, and
then separate the UI definition from the run-time logic by using
code-behind files, joined to the markup through partial class definitions.
The ability to mix code with markup in XAML is important because XML by
itself is declarative, and does not really suggest a model for flow
control. An XML based declarative language is very intuitive for creating
interfaces ranging from prototype to production, especially for people
with a background in web design and technologies. Unlike most other
markup languages, XAML directly represents the instantiation of managed
objects. This general design principle enables simplified code and
debugging access for objects that are created in XAML." More Information See also the XAML Overview: Click Here

No comments: