|
preaa wrote: Why would you put your UI in painful XML tags when you can use Windows forms?
From MS's point of view it was a move away from the inflexible rectangular window with title bar and close buttons etc. The XAML can be highly stylised: Beatriz Costa - WPF styling demo[^]
preaa wrote: If it were to separate UI completely with the behaviour, aren't the developers doing that already with clean layering architecture with the forms based applications?
Nope, as the many thousands of lines of database access code I've seen in ASP.NET code-behind attest I doubt apps developers are any better.
preaa wrote: load a desktop application on a browser?
?????? This doesn't sound like WPF to me, are you talking about Silverlight? The sad profusion on Flash apps would indicate some people do see the need for this.
Also: Binding.
|
|
|
|
|
Keith Barrow wrote: ?????? This doesn't sound like WPF to me
it does to me, WPF applications can be displayed in a browser.
Source[^]
|
|
|
|
|
Ahhh, I'd read the OP's screed as it only starting in a browser, as per Silverlight (hence the bit about Flash)
|
|
|
|
|
Databinding, and Rich UI and Templating.
|
|
|
|
|
Apart from rich UI that works on dpi based location and sizing, it was made to make my life hell.
|
|
|
|
|
The original idea was to create a single design platform for web and desktop (Silverlight - WPF - WinRT) - it does not succeeded too much...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: The original idea was to create a single design platform for web and desktop (Silverlight - WPF - WinRT) No it wasn't. Originally, the vision was for WPF to be usable everywhere and WinRT wasn't even a twinkle in Steve Sinofsky's eyes at that point - bear in mind that WPF was developed before Vista was released. I guess that no one has read Adam Nathan's books then. The original remit was spelled out there.
|
|
|
|
|
Pete O'Hanlon wrote: no one has read Adam Nathan's books then
Wrong!
Quote: Windows Presentation Foundation (WPF) is
Microsoft’s premier technology for creating Windows graphical user interfaces (...) it’s also the basis for Silverlight, which
has extended WPF technology onto the Web and into devices such as Windows phones
(from the unread book...)
And even Sinfosky went home - he is behind WinRT, which is the next step, as it tries to unify development technologies in the Web-Desktop-Mobile line, based on the same idea of WPF...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
If you had read the book properly, and this goes back to his original version which predates Silverlight, he has a whole chapter devoted to the history. Perhaps you might want to revisit your original answer and cover what the original motivation of WPF was. Of course, I've only been doing WPF since 2008 and was one of the reviewers for his later books, as well as being friends with several members of that team so what do I know about their original motivation.
Kornfeld Eliyahu Peter wrote: based on the same idea of WPF... And there's the kicker - based on the same idea, not developed alongside. Oh, and the WinRT implementation is still way behind what WPF did back in .NET 3.5 when it was released, as was Silverlight until version 5 and as is Windows Phone's implementation.
|
|
|
|
|
Clearly we read different editions (mine is WPF 4 + Silverlight) - but you right, the original goal does not included as much as Web (and for sure WinRT much later, there was no argument there, I was merely pointing out the continuity I see there)...
Quote: Microsoft recognized that something brand new was needed that escaped the limitations
of GDI+ and USER yet provided the kind of productivity that people enjoy with frameworks
like Windows Forms. And with the continual rise of cross-platform applications
based on HTML and JavaScript, Windows desperately needed a technology that’s as fun
and easy to use as these, yet with the power to exploit the capabilities of the local
computer. Windows Presentation Foundation (WPF) is the answer for software developers
and graphic designers who want to create modern user experiences without having to
master several difficult technologies. Although “Presentation” sounds like a lofty term for
what I would simply call a user interface, it’s probably more appropriate for describing the
higher level of visual polish that’s expected of today’s applications and the wide range of
functionality included in WPF!
It seems a paragraph from the original (as Silverlight comes some pages later)...
I also found it interesting (you just made me re-read parts of that book )
Quote: In short, WPF aims to combine the best
attributes of systems such as DirectX
(3D and hardware acceleration),
Windows Forms (developer productivity),
Adobe Flash (powerful animation
support), and HTML (declarative
markup).
Some one may add this book to CP's recommendations (CM started it some time ago), as it explains much about the ideas behind WPF...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
If you have the WPF 4 version, take a look at the inside front cover. And yes, I started Nathan's book at the 3.5 release.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: Windows desperately needed a technology that’s as fun and easy to use as these...
They failed there then.
|
|
|
|
|
Now with added Silverfish. WTF?
|
|
|
|
|
I really enjoy learning new things and I find WPF useful. That being said...it's difficult to explain the benefits of MVVM to management at times, especially since it's not as straight forward as event handling directly in the form code. They just see it as, "takes longer!". Hence, I'm working with Winforms lol.
|
|
|
|
|
Quote: Windows Presentation Foundation (WPF) is the answer for software developers
and graphic designers who want to create modern user experiences without having to
master several difficult technologies.
Ummm... XAML, MVVM, MEF, Prism... jumping off into WPF was the beginning of sorrows.
|
|
|
|
|
Actually it succeed. Silverlight, WPF, and WinRT have use same paradigm on styles, templates, datatemplate, visual state manager, resources.
Sure the API is not EXACTLY the same, the commerical name is different, but I don't think we should keep such expectation when devices and way of using the app is so different accross device.
Most of the code is copy/pastable or reusable through some clever "Add as Link" / #define in your code.
Learn WPF, and you learnt most of what you need to know on WinRT and Silverlight
|
|
|
|
|
Perhaps it's a solution to a problem that didn't exist.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
preaa wrote: If it were to separate UI completely with the behaviour, aren't the developers doing that already with clean layering architecture with the forms based applications? No they aren't. Have you seen how hard it is to get a complete break and clean layering going in Windows Forms?
preaa wrote: and why somebody would like to load a desktop application on a browser? If its a browser based application, it should be developed in ASP.NET Again no. There are much better alternatives to the bloat that is ASP.NET for web based applications, unless you are talking about ASP MVC. You are looking at the state of the world as it exists now, not back in 2003 when WPF was heavily under development. Back then, doing fancy UIs in ASP.NET was extremely limited.
The reason that WPF was invented, and this is from the team that wrote it in the first place, was because Microsoft wanted to provide developers to create the types of applications that people were used to seeing in films and TV shows, but which were not easily achievable in the technologies that were around at the time such as Windows Forms and MFC. They offered several advances over these technologies, including breaking away from using GDI/GDI+ for rendering, display independence, a sophisticated binding mechanism, animation, markup extensions, dependency properties and so on.
I would suggest that you start by reading Adam Nathan's excellent WPF Unleashed, as well as articles by Josh Smith, Sacha Barber, Dan Vaughan, Karl Shifflett, Jesse Liberty and so on.
|
|
|
|
|
Pete O'Hanlon wrote: he types of applications that people were used to seeing in films and TV shows
Bloody Minority Report has got a lot to answer for!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
For me, the problem WPF solves was rich UI. I've spent years in the MFC trenches writing owner-draw code and sophisticated layout management. I hate going back and maintaining those applications now, because WPF is so much simpler and more expressive.
Thanks, Pete. Those of us who actually like WPF appreciate it.
Software Zen: delete this;
|
|
|
|
|
As always, I enjoy and learn from your thoughtful remarks, Pete.
I think an issue anyone ... who's not already committed to, in the thick of ... WPF ... today ... faces is evaluating the future potential of investing time and energy to master a given Windows technology stack, like WPF, or ASP MVC, or RT/XAML/C#.
Several months ago, you hinted, in a message here on CodeProject, that you felt some exciting news was coming from Microsoft that might affect the perceptions of the future value of WPF ... information you could not share at the time (I infer) because you were under NDA.
Perhaps all of whatever you hinted at is already revealed; I'm not sure.
So, let me ask you a rhetorical question: if you had a bright young developer asking your advice at this time ... someone who's weighing technology stacks like ASP/MVC, HTML5/CSS3/JavaScript/jQuery/nodejs, Android/whatever, .NET technologies using XAML (WPF, Win RT, et. al.) ... and let's throw IOS in there for good measure ... what advice would you give them about where to invest their energy in learning and mastering a given stack, and getting productive with it ?
I don't mean for this to be "trick" question: obviously, what a person is already knowledgeable about comes into play here; as does whether they are looking to be employee or be an entrepreneur; whether their target platform is desktop, or smart-phones; whether making money is the goal, or achieving "fame and glory" is the goal ... and so on.
I'd really enjoy hearing any speculations you care to make, and I am sure other people here would enjoy them.
yours, Bill
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
Right now, if I were advising a new developer, I would push them towards the MEAN stack (MongoDB, Express, Angular.js and Node.js). While WPF does have some future (sadly, I cannot reveal what it is - you're right that I'm under NDA), this release was probably the last that any new features would make it in; effectively it's now gone into maintenance mode.
So, why would I not recommend the "Metro" stack? Well, I'm just not convinced that Microsoft is going to get enough traction in the consumer device space to make it worthwhile for developers to really push into that space. If I were advising devs on looking at the consumer space, I'd recommend learning Java and pushing for Android, or learning Mono C# and targetting Android/iOS. At the end of the day, it's a numbers game, and until Microsoft change direction in their licensing, they will not make the huge inroads in the consumer space. It's not as though they had a form of monopoly on small form-factor device OS that they had on the PC OS market, so they really have their work cut out.
Realistically, I see Microsoft moving more towards the enterprise space and pushing things like Cloud services (their idea of an OS in the cloud really hints at this direction). I see that there will be a fair move in this space to the web world, which is why I recommend working with the MEAN stack - I'm currently writing an article on it for CP, and it's a really rich environment to work with. To give you an idea, here's one of the bits of code that I'm currently working on:
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var LanguageSchema = new Schema({
language: {type: String, required: true},
display: {type: String, required: true}
});
function languages() {
languageModel:null,
__constructor = function(){
this.languageModel = mongoose.model('language', LanguageSchema);
var languages = [
{language:'Csharp', display:'C#'},
{language:'VB.NET', display:'VB'},
{language:'cpp', display: 'C++'},
{language:'css', display:'CSS'},
{language:'html',display:'HTML'},
{language:'javascript',display:'JavaScript'},
{language:'java',display:'Java'},
{language:'perl',display:'Perl'},
{language:'php',display:'PHP'},
{language:'python',display:'Python'}
];
languages.forEach(function(language) {
this.languageModel.find({language:language.language}, function(err, lang) {
if (lang.length === 0) {
var lang = new languageModel({
language: language.language,
description: language.description
});
lang.save(function(err, myLang){});
if (!err)
console.log('Saved '+myLang.language);
else
console.log(err);
}
});
});
}()
this.findAll = function(req, res) {
return this.languageModel.find(function(err, lang) {
res.jsonp(lang);
});
}
};
module.exports = new languages(); Now, to use this with a RESTful service, all I need to do is this:
var languages = require('./routes/languages.js');
app.get('/languages', languages.findAll); That's how simple it is to create a RESTful API in the Node world. It's easy for new developers to get started with it and is all free. So, that's why I'd recommend it.
|
|
|
|
|
Well I think most of the other members already said why is was formed, but I would like to add the following. Please go and have a look at some of the articles drafted by Sacha Barber[^], which makes use of xaml (wpf, silverlight, metro), then I would like you to ask yourself one simple question; how easy / difficult / impossible would that have been in WinForms...
Kind regards,
|
|
|
|
|
Well thanks a lot again for the kind replies.. I think I should look at Windows RT as well along with WPF..
Best
|
|
|
|
|
WPF has the richest xaml-based feature set.
Silverlight was pretty much a stripped down version of WPF.
WinRT xaml looks like a stripped down version of silverlight ("looks like", because I haven't done anything worthwhile in it yet, it's just first impressions).
In any case, as long as you get the xaml principles down along with MVVM, you'll be up and running on all xaml platforms in no time. The learning curve can be quite steap though, it's a lot to take in at first. But it's real fun imo.
|
|
|
|
|