Calling Windows 10 APIs from a WinForms or WPF application
blogs.windows.com
blogs.windows.com
So, of course, if they have to focus on supporting only one, archaic platform, they never move forward or create anything new or improved. Which doesn't make sense. So you continue to create newer, better platforms, but continue to support the old ones for years to come. Eventually, older ones fall out of use and can eventually be retired.
"Sure we can update from Win32 to $modern. We estimate it to take between thirteen to seventeen man-months. You know the usual rate for a man-month, let us know when you want to start the project."
This will probably never change.
Given that the union I was talking about above is specifically one that would be formed by ISVs to protect its member employees from being coerced into bad working conditions by their managers or the clients their demands come on the part of, I assume that "not having to maintain software in perpetuity with increasing labor-load" is probably one such ideological point they'd be likely to stand behind, among others. (Or it might not be; either way, I still think "union that can disbar programmers" is an interesting solution to the problems that programmers do care most about, whatever they may be.)
Remember, the point isn't to punish the disbarred engineer--they likely were coerced into the practice. The point is to signal to the companies who would attempt such coercion, that it will result in their engineers being removed from them, so they shouldn't bother. (Yes, the company's name might also be blackballed in the industry, but that might not matter to the company if they're still able to make money. On the other hand, having no engineers who would ever want to work for you, for fear of what it would do to their careers, would matter.)
- Half of your apps are no longer supported
I think mostly everyone who uses their computer to make their living (ie the prime audience of MS) does not consider this a good trade-off
Deprecating all but one GUI framework doesn't mean breaking all but one. It just means picking one option and adopting it wholeheartedly. How different would all these Microsoft frameworks have been if they were only finalized after gaining the experience of porting over the entire OS? Microsoft might have ended up with a solution that could unify the landscape on its own merits.
Apple's OS X/macOS has always had an evolving look and feel with notable first-party apps that don't conform, but it's never been half as inconsistent as Windows has gotten.
We already know that the Office and Windows teams have different GUI toolkits from reports from inside the company. But there is evidently a lot more fragmentation than just those 2 groups.
What I find more interesting is that Google products are starting to feel similarly fragmented. Project fi, Android, Plus, and Search all look and behave differently. My damn phone gets SMS on Hangouts and the Messenger app, my voicemails come on the phone and hangouts. None of it makes sense.
We can all agree that inconsistent GUIs are bad, but it seems like a problem you have to solve from a top down organizational perspective, which might not obviously align with the business.
The tooling you look for is probably Blend.
But Microsoft tipping point was Win7, everything beyond 2009 was put the former UI and UX guidelines to the trash bin and it seems color blind designers and managers with no taste and understanding are working on the Windows UI. Win8 and Win10 are now and inconsistent mess of dozens of legacy UI frameworks. The little maintained Win32 API is still the most used and best in class - like 99% of applications are coded in C/C++ with Win32API. All the small scale enterprise dotNet apps with legacy WinForm or legacy WPF in legacy dotNetFramework or the new dotNetCore mess are used rarely outside of a small niche market. (all of my hundreds of applications on Win7 are Win32, I see no dotNetFramework in ProcessExplorer - would be highlighted in yellow). And the new WinRuntime aka UniversalRuntime seems to be a trainwreck as well, with limited to to the failing WinStore - clearly a success story ;) Oh and there is the failed Silverlight and the non-public UI API from Win7+ that is used in various new UI elements like Help, Addon dialog of IE10+.
It would be so nice if they once again focus on a nice looking UI theme, and focus on an consistent UI again. In Win95 to WinXP (or Win7) days everything looked to familar and nice put together. If one knew one Windows application, he knew how to use all other applications without searching around or reading a manual. Please surprise me with a nice UI, do away with thr evil phone home features and show that you value the user as your customer and not as dump sheep products. For this to ever happen, they need a major management change and turn-around.
I'm all web now, and I love it too, but sometimes I just wish I could go back to the good old WPF days!
The extensive tooling involved with frontend web development and the constant religious wars between frameworks can get exhausting.
Couldn't be happier and dread of the next time I will have to switch customers, because of the high probability to return to web.
The web should be HTML/CSS for hyperlinked documents only, for everything else native apps.
It's like assembling a castle from bricks of lego where each brick changes shape every 6 months. Jesus. I feel burnt out before I barely begin! And when I've settled on something, it's about the toolchain and distribution models. "Is it Webpack or Gulp or Browserify and what is a docker image anyway or should I just use Meteor..."
There _are_ options for people like me. Angular 2, EmberJS, big hunking frameworks like those. But then the problem instead becomes that it's hard to grow your web apps organically. The startup... You have to build a huge garden of Eden surrounding it, and only then can you ship your "Hello world". So exhausting before I've barely got started. Besides, what do these big frameworks even _do_ for me behind the curtains? I don't understand the underpinnings. I just have to trust the docs and that they don't change.
So then I tell myself "oh f all that" and build a fun Web API in Python and Flask. And hack raw HTML and CSS in a text editor. The minimalist, pretty code and lack of 100 MB's of dependencies is too alluring. I feel like I'm forced to give up. How in the world will I have enough spare time and energy after full time job days to get even just average experience in the main JS frameworks of today and keep up with "what you have to know in 2017/18/19"? I also feel like the JS world suffers a lot from not settling down, from experience hugely underestimated. It takes time to mature, and create a high quality, broad ecosystem and community. I sometimes think of the waste from the community being this fragmented, keeping to reinvent the wheel.
The biggest problem isn't just that, it's that those big frameworks change fairly frequently too.
I've witnessed web projects go from backbone to angular to react in the span of a year.
I'm mainly a Qt dev, however I needed to add a Cesium component to the application I'm working on. What a mess. Everything about the javascript ecosystem seems to be in a constant state a flux. I tried to make it better with Typescript, but after trying that for ages I realized I was only complicating things for myself, many of my libraries didn't ship typescript definitions, the main one I was working with needed to be generated based on the documentation and once that was done was severely lacking in much of its functionality.
From crashing editors that wipe your files to dependencies that have breaking updates every few days. And there's a dozen options for everything, at least 5 different module loading systems, of which I had to use several in order to get something compatible with both Cesium and node since both use different module formats and I needed a loader that would support both.
Then there's the packing tools which didn't support what I wanted to do at all without a lot of manual hacks.
Eugh, I don't want to touch it again, the whole thing just made me feel incompetent and thrown around.
But I know I have to, and now I'm sitting here asking myself if React or Backbone would help clean up some messy UI code...
Might be the relatively reasonable size of the projects I have going. But it works well for a lot of stuff.
I think a lot of the problem comes from fear of projects becoming obsolete. Ultimately JS/CSS/HTML isn't going to fundamentally transform in short order.
That said, having built a Backbone app, and then gotten into React+Redux, I'm all in on React and Redux as a better way to build apps. It's a much more consistent mental model, and makes tracing data flow much easier.
I'm actually hoping to write a blog post in the next few weeks discussing how to use Cesium with React+Webpack: basic setup, using React to render Cesium primitives, and then advanced Webpack setup for code splitting.
Say i want to use a UWP file manager on Windows 10. Out of the box the folders i can access are limited, and adding more require that i use the age old Win32 file picker window.
Similarly both Google and Mozilla stopped developing a UWP native UI for their web browsers, as it would only be active if the browser was set as the default one. Something that is not always desirable.
So from a user perspective, UWP feels bolted on rather than a integrated part.
CoreWindow lets you recolor the window decorations without having to owner-draw the entire thing. But that's all i've got.
Also a reason why .NET is AOT compiled to native code on UWP.
WPF text stack -> DirectWrite
WPF visual layer -> Direct2D, Windows.UI.Composition
WPF UI layer -> WinRT XAML
.net type system/metadata -> WinRT metadata
CAS/partial trust/other .net security stuff -> AppContainer
ClickOnce -> AppX
If you compare what .net was supposed to be around 3.0 with what .net Core is now, they've basically stripped out all of the "OS-like" stuff - UI frameworks, app model/packaging, security - and taken the stance that those are the responsibility of the OS. UWP is just the Windows native implementation of the stuff that was stripped out of .net to be left up to each OS
But as someone that follows Windows development since 3.0, and had the pleasure to being introduced to Oberon, I think one of the biggest reasons for Longhorn's failure was the wars between DevTools and WinDev.
To build on your mappings, many other components shown up as COM in Vista and since then the majority of Windows APIs are actually COM based, not Win32 C style ones.
Reading the paper about Ext-VOS, .NET's genesis, and doing the comparisasion with how WinRT looks like, was quite interesting.
The downside with UWP is that it lives in the runtime sandbox so it's limited in how it can interact with the os (for good and bad). On the plus side there's some really nice integration with OS notifications, app services, handover and stuff like that. I really hope the composition stuff comes to WPF however
Actually when my S3 dies, I will most likely keep using one of those ones instead.
Woha. That is pretty crazy.
Although, I never got Intellisense working in VS if I declare #using <windows.winmd> in C++/Win32 projects.
A simpler and a lot more interesting alternative (for Win32) is the excellent cppwinrt library[1]
[0] https://software.intel.com/en-us/articles/using-winrt-apis-f...
cppwinrt is ISO C++.
I wouldn't use it for production code until it reaches feature parity with C++/CX.
Just the same, it's cool that it can be added without having to completely migrate/rework an application.
This is nice because it encapsulates both OS version API differences and device capabilities.
https://blogs.windows.com/buildingapps/2015/09/15/dynamicall...
using Windows.Foundation.Metadata;
if(ApiInformation.IsTypePresent("Windows.Media.Playlists.Playlist"))
{
await myAwesomePlaylist.SaveAsAsync( ... );
}
if(ApiInformation.IsApiContractPresent("Windows.Media.Playlists.PlaylistsContract"), 1, 0)
{
// Now I can use all PlayList APIs
}The article has an example.