XAML Alternatives - wpf

I love WPF, but I hate XAML.
XAML is too verbose, has syntax issues when Microsoft tried to extend it (see StringFormat on Bindings), and is difficult to navigate.
Are there any alternatives to XAML?
(These are just my opinions. Feel free to disagree.)

There are alternatives:
XUL, Flash, Delphi resource syntax, C# Form.Designer.cs syntax, VB6 form syntax
Surely there are no compelling alternatives though.
It's like human bodies -- utter rubbish with all its juices and smells but that's by far the best life form known. XAML is clearly really really bad, but there's nothing half as good around.

XAML does seem to be the elephant in the room. While I'm a huge fan of WPF the verbosity of XAML can be a little hard on the eyes. Whilst Blend and VS2010 go long way to reducing the need for coding XAML from scratch, I still find hand editing a necessity in nearly everything I do.
I find power boots easy on the eyes and the CSS like syntax of JavaFX to be quite appealing. These seem to be the insparation for D'oh.
However verbose XAML is, at least there is tooling support to get us 90% of the way, any other alternative would take us back to hand coding all the UI. Not an attractive proposition for this coder.

One alternative is to not do the UI at all and have a designer do it in Blend instead.

This might be something to watch. There is nothing to download from the website yet though.
D'oh: The Super Productive Windows GUI Language
http://doh.xn--majkrsft-e0ab.se/

now I know why your name badge looked familiar at the last Innovation Day.
It would be a lot of work but you could make a small start - there's no reason why you have to use XAML, just need something creating the partial classes.
So, you could code up a DSL replacing XAML with something that was legal C# or go the whole hog and write a VS tool which generated C# the same way the XAML processor does. It depends on how much you want available to the code-behind file at compile-time.
Hmmm, with IronRuby, maybe a DSL in IronRuby
(DSL = Domain Specific Language for anyone reading who is acronymically challenged.)

Related

Who does design and develop Style and Layout while developing silverlight application?

In your company, who does design and develop style, layout in xaml, Designers? or Developers?
Are there enough designers who are able to deal with xaml or blend?
Are they willing to touch Blend?
In my company, Developers do all those jobs except making images.
I am so confused nowadays if this is right direction.
Give me a advice.
I'm the developer and the designer too. I think developers love blend, because it is very simple, and it is easy to create attractive interfaces (the greatest programming/design IDE i've ever seen). But i never met a silverlight designer, who is not a developer too. I think it will be happens in the future, that completely separate design and coding, but not now. Maybe in a new programmer generation :). I think its very important for a silverlight/wpf designer, to know, how this new binding concept works. Programmers knows it already, so it is much easier to do coding and design for yourself, than ask a designer to learn blend and the silverlight/wpf things, because they think it's coding...but blend is simply clicking...but you must learn it, and you must understand xaml hierarchy and syntax and everything...
So i think they must go to a training class, with developers, and learn the new things together. Than they can separate things. Designers are much lazier than developers, but they need learn new things too.
I think i'm lucky, i love design & coding too.
A Coder's perspective:
Silverlight is certainly gaining momentum, but in the design industry it is a relative newcomer.
I personally know of only one UK company that actually uses specialist "XAML designers" side-by-side with their Silverlight coders (but the results there are not anything special). I'm sure there are more but it says something that I have not seen many.
At my current major client, there is a real need for GUI design work, but that will be done by traditional designers (e.g. in Photoshop) and although I am a hard-core coder by trade I will likely be the one that "Blends it". Luckily I really like working with Blend (and Sketchflow). I rate it highly for coders, as it does so much more than the VS 2010 editor, and I tend to do only XAML tweaks in VS 2010 (and all my code of course).
Designers are not lazier. They have a different skill set - one that I do not have myself and have come to admire. The really good ones can produce amazing results, but even the worst ones are much better at pure design than me. I do not expect non-coders to sit at a desk for 12 hours straight solving problems like we are prone to do (but non-coders usually have better social lives) :)

Easing functions in WPF animation

Can you guys tell me is there any good, kind of a sample app where you can try all those easing functions with different parameters and see the changes?
I mean there are two actual reasons why I can't built myself one:
I simply don't have time
I am a damn stupid indolent guy who needs to indulge his laziness
Matthew MacDonald tells about a very good example:
in his book Windows Presentation Foundation in .Net 4
Pretty good though...
You can preview most/all of them in Expression Blend, can't you?
Not exactly a sample app, but most of the easing functions would really depend on what you're animating, wouldn't they? So it'd be easiest to just see them on your code in a designer environment?

Is there a XAML/WPF/Silverlight style guide?

From .NET Rocks! Show #488:
Richard Campbell: "In the GDI world we
got a document from Microsoft that
said you will build your apps in
battleship gray and here's now they
should look: File goes here and Help
goes here, and we all got that as
developers. There's no book like that
for WPF. There was this idea I've got
to find the guy in a black turtleneck
and here is his piece of software and
you guys go play nice now."
I think Microsoft now wants every Windows application to look like the ugly, difficult-to-use, hardware-bundled crapware we all hate!
Is there no such best-practices document?
There is a Windows User Experience Interaction Guidelines document that Microsoft makes available. It might be along the lines of what you are looking for, but it isn't specifically a WPF or Silverlight best practices guide.
Nobody has paid much attention to MS ui guidelines in a very, very long time (including MS). It is a big part of the reason why every app on windows looks and behaves different from every other app.
Depends on the guidance you're looking for. The primary reason everything was battleship grey in Winforms was less because the Microsoft guide said it should be (it didn't) and more because that was the default and it was a pain to write it differently. Even now, I would imagine that the bulk of the LOB apps written with Silverlight or WPF will use default colors and styles for exactly the same reasons.
But a lot of the other UI guidelines can still apply. If you want something the looks and feels familiar, there's no reason that you can't make a standard menu bar with File, Edit, View, Help, etc. You can still use the same hotkeys, same commands, same layout for buttons and controls.
Keep in mind though that these guidelines were written with assumptions about software and computers in general that are no longer true. The dominant paradigm has changed and people are far more used to websites with different UI layouts and richer visuals. As a result, visual style is a lot more diverse and people are less likely to be confused by some non-standard layouts and controls. Which doesn't mean that anything goes, just that we should feel less contrained to keeping things in the exact same order and position, lest our customers freak out because they can't find the save button.
In short, the style guide was there because there wasn't enough for a real designer to do but still enough that we developers could make things ugly. Now it's even easier to make really ugly stuff, but there's a lot that a real designer can do to make it nice. So hire one. It's worth it.

WinForm custom controls: now or later?

I'm planning to write my first program (it'll be in C#), and I need help with a decision. I know I'll want to use custom controls in the final version of the program (probably these), but someone advised me to use standard WinForm controls until the program is running right. They said once things are running right, then I could replace the UI with the custom controls I want. Is this the best way for me to do it? Or should I use the custom UI controls from the beginning?
About me:
-Never written a program
-Have some light Access/VBA experience and classroom C++ Logic and non-UI programming
-If it matters, I don't know exactly how to do it yet but I do plan to try to keep the logic and the UI as separate as I possibly can. I know that needs to be a priority.
Thanks.
It depends on some factors:
The complexity: a simple custom-draw control can easily replace the standard winform control but generally custom controls add new features and tend to have differents methods and properties. In this case, switching to the custom control is not a simple task.
Your experience: Since you are pretty new to this, using a custom control can add another level of difficulty. Generally, these controls offers more options than the winform controls. So, it would be wise to start with the simple winform controls.
Since this is your first project, I tend to agree with your friend. While there is nothing inherently wrong with starting with third party controls, you will find that there is much more documentation and help available for the built in controls. In your early development efforts, you will likely hit many stumbling blocks, regardless of the choices that you make. Therefore, starting out with the most well-travelled course may make things easier for you starting out.
Once you have a little more experience debugging some of the issues that you will inevitably experience while learning a GUI framework, then it would make more sense to start bringing in glitzy third party controls.
Just use the standard controls. Keep it simple, Keep it simple, keep it simple. Also know that if you are still programming next year (hopefully on other projects), you will look back at this code in shame -- but that is a good thing.
Never written a program? I would not advise using any third party libs at this point, you are still learning. If you want the benefit of custom controls, why not write them yourself? You get the custom behavior and you actually learn how this stuff works.
Also, this statement is a bit of a red flag:
-If it matters, I don't know exactly how to do it yet but I do plan to try to keep the logic and the UI as separate as I possibly can. I know that needs to be a priority.
Design patterns are great, but until you get some experience it is hard to understand why they are so great. Start like everyone else writing 'bad' code and then come back to the design patterns. That way you will truly realize why they are so important (rather than just being told that they are). Don't try to grok the advanced stuff before being full competent with the fundamentals.

What do I need to excell at Silverlight development?

To be a 'silverlight' developer, is it basically asking for both programming and graphic skills?
Or is it just a matter of implementing the graphics into the silverlight project?
i.e. can you be a silverlight guru and yet not know heads from tails when it comes to graphic design?
To be a silverlight developer, you really only need to know a .NET language, event driven programming, and how to use markup for XAML. It's pretty simple really; the XAML describes UI elements (which can all be handled by the designer) which can then be used in code as a .NET object is created for each UI element.
Knowing graphic design is just a bonus.
If it's anything like Flash (and, from what I understand, the "finished products" can have similar capabilities), you don't necessarily need to be a designer. I'm part-flash developer and I don't have the first idea about anything related to graphic design :)
When I do flash programming, 99% of the work I do is in Actionscript. We have a couple of asset prep guys here who extract the visual elements and add them to a library, which us developers then use in the flash app.
Like I say, this is assuming there are some similarities between Flash and Silverlight (which, for all I know, may not exist). Good luck!
thats the power of xaml, both coder and designer can work in one language ;)
I've done a couple of WPF and Silverlight projects and I have terrible graphic design skills. You can certainly do Silverlight without having that type of skillset.
However, even though you can do some attractive work in those projects without having graphics skills it still very useful to have access to somebody that does have the skills.
For example, adding small animations to glassy-looking buttons can be entirely done by a programmer. But adding attractive backgrounds to form headers (other than gradients) is still better handled by a graphics guy. (In my opinion, of course)
It is not strictly necessary to be a good graphic designer, knowing how to develop .NET applications and XAML is sufficient. However, it's like drawing, all you have to do is to hold a pencil and move your hand, but if you have a good sense for art, the result will be better. Since in Silverlight your potential targets are Internet users and they're used rich user interfacese (maybe Flash based), if you know how to organize your elements, which are the best colors and things like that, your work will be easier.

Resources