Tag Archives: Winforms

Thoughts on Windows 8 Details

Yesterday at All Things D, Microsoft announced Windows 8 (codename of course) details, and a first glimpse on video
 

Windows 8 Video #1

My initial reactions to this, as a consumer and as a development manager of an app that at this time is completely windows desktop .NET based:

HTML5/JS Apps

First reaction? Why not just use a browser? and How are they going to interact with the OS? What level’s of rights will they have to read/write file system, etc, etc. Also, what happens to Silverlight? C++/Winforms apps? Yeah they show old apps running “behind” the new UI, but what is MIcrosoft’s stance on development of these other technologies? WPF? They have told devs to build using these tech’s for desktop for years, now, lets go HTML5/JS? WTF? Will apps run in browser too? On a mac? iOS?

Tiles

First reaction? Looks like an exploded Windows Phone UI, WP7. Which at first blush looks cool but I have found usability to be painful. Seems to be more of a shell UI on top of Windows 7 (or whatever). They should call it Windows Blinds Smile

In General

I think that this will be a good refresh for the OS, but it might take a few iterations for this new UI to be used heavily. My take? Users will get the OS installed and (hopefully there will be an option to) turn off the new UI and go back to what they have used for years. Slowly but surely the new UI will take hold with some cool apps and more and more people will use that and get used to it, abstracted away from the core OS explorer, etc.

Looking forward to trying it out in beta, and when it goes live. I will give MSFT this, they keep things changing so devs have to keep learning! Oh yeah, and PDC is no longer, it is now BUILD – http://www.buildwindows.com/

Winforms DevExpress Grid

In the current agile sprint for the dev team I manage, we decided to start replacing ListViews (custom ones at that) and grids with the XtraGrid from DevExpress.

Now, normally I shy away from 3rd party controls, or want to vet them, but I knew there was no way we could do the same functionality in the default grid in .NET. One of the guys on the team did a story the sprint before to do a proof of concept comparing various grids and showing the pros and cons. DevExpress came out ahead, functionality and performance.

What we are seeing now is huge gains. We can use the new grid and functionality we couldn’t even begin to think of, is there by default. Grouping, searching, filtering, FAST performance, print preview and formatting, etc, etc, etc. Tons of options.

In fact, there are TOO many options. It makes it hard for us to digest all the possibilities in what we want to turn off, or how to integrate with existing forms, etc. A good problem to have.

All I know, is if you are doing any serious .NET work (Winforms, WPF, even Web/Silverlight) – it might make some sense to take a look at DevExpress. Focus on your business rules and integrating other parts of your systems, not reinventing the wheel with a crazy custom grid.

In the coming months I will try to talk about other areas that you can “outsource” to 3rd parties, where it makes sense. (And no, I don’t get anything from DevExpress for this post. Just calling it how I see it).

Windows 7 Winforms ActiveX DEP and TFS

Wow, what a title. Deserving for the debacle it involves. If you are using an older ActiveX/COM component that doesn’t support DEP (Data Execution Prevention) – you might run into this.

Your app will compile file, and when users try to run it, it runs fine, yet when you use the control you get an error about shared and corrupt memory. The ActiveX control might not support DEP and you don’t have any way to go around it. You can have the users turn off DEP but that isn’t a viable solution.

What you can do is set a post-build step to turn off DEP for your exe which works great.

here is the post build step from the link:

call $(DevEnvDir)..toolsvsvars32.bat
editbin.exe /NXCOMPAT:NO $(TargetPath)

But then you go to check it into TFS and your build fails. Why? Because there is no environment variable for $(DevEnvDir) when team build (msbuild) builds your solution.

In order to fix that, you need to add an environment variable on the build controller to

64bit: C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE  

32bit: C:Program FilesMicrosoft Visual Studio 10.0Common7IDE

and then reboot your build controller, and it should build.

Thoughts on the Future of Microsoft Development #pdc2010

The PDC was last week. I have never been (was scheduled once but didn’t end up going), but I try to keep up with everything that they have online, and now even more the blogs and tweets. Here are my thoughts after digesting everything I could.

Strategy

I’m not sure this much of one.. but Microsoft is still trying to figure out and find their development strategy. From back in the 90’s when it was Win32 then MFC and ASP Classic with VBScript + Office/VBA, to then Managed code (.NET C#/VB.NET, and ASP.NET Stacks).. and then WPF/Silverlight, they still and always will keep changing so that developers have to keep learning new things and looking at the next shiny object. There hasn’t been much of a convergence or steady path though. It seems once a developer or team picks up a technology it is already outdated, and I am guessing this will never change.

Anyways, after watching the videos and seeing discussion, this is what I think..

1. HTML5

The web! Ahh, the web. The one place there are no restrictions. Apple is saying, develop under our restrictions, or go out to the web with HTML5, and Microsoft is going to follow suit. If it was ASP Classic, or ASP.NET WebForms, and then MVC, and now HTML5, the web will be around for a while and Microsoft doesn’t want to get left behind. For a while they were touting Silverlight as the “new web” or whatever, but that seems to have changed.

Web applications are good for some things – well, a ton, but not everything. You can’t do some of the richer things you can do on a client on the web, deeper integrations. You can’t really run a web app offline either, no matter what people say, it just won’t be the same as a fat client. Anything I hear from MSFT that says, it does “X” if you use IE9 and I just cringe. Forget IE, let’s make it work for all browsers.

2. Silverlight

If you are developing for the WP7 Phone (who has one? yeah – I thought so), you use Silverlight, other than that, not 100% sure where they are going with this. Use it for video streaming? Games? Flash killer? Basic RIA application that needs a little more integration with the desktop than a standard web app, but less than a fat client. The problem is, what you can and cannot do in Silverlight changes every release – In my opinion they should open it up more, let you do more things with the desktop. Let devs focus on just one set of rules. I have a feeling that Silverlight might just be used as a “glue” technology instead of a “main” technology. The glue between Web and Windows?

3. WPF

Unknown here. Not much at PDC, but some talks. Winforms (like Webforms) is a forgotten technology at MSFT, so to all the people who jumped on those trains, sorry, you need to hurry up and get on the new trains. I have read some places that WPF is the future for desktop/fat client apps at MSFT, and other places where there is no Product Manager, there is barely a team, no support, they are letting it die (ala Winforms), but who knows for sure. What should a developer do? Enterprise and Line of Business applications that need desktop integrations can’t be created in Web or Silverlight, and .NET developers really don’t want to fall back to C++ (although Evernote did – and saw a huge performance gain). Microsoft needs to instill some confidence in developers that a technology they would choose isn’t neglected – to me that is just piss poor business practices. On one hand let’s market the hell out of it (which with WPF really hasn’t been the case, but marketed way more than Win32 or Winforms) and get everyone on the bandwagon, and then let it die, and 2 years later say “X” is the brand new toy you need to focus on. They finally are doing some things at MSFT in WPF, but to what extent? Black magic embedding WPF controls in Winforms or Win32 apps? To me, seeing the pretty awesome data binding stuff with WPF makes it a no brainer. Why not extend the enhanced data binding to Winforms? Why make devs switch?

 

Like I said, more convergence of tools. Use expression blend for front ends? Yes! – but it should be for everything, Windows/Web/RIA, not just Windows/RIA. Language constructs getting to the same level no matter where you code? Yes – sounds like a good thing to me, so why is it so tough?

The new Async framework looks sweet, what else for Windows devs on the .NET side? Can we get some more detailed strategy from Microsoft on where things are going? What to focus on? Companies and developers are stuck making a leap of faith when choosing which technology to use – to make sure they aren’t left in the dust. On the Apple side, it is pretty clear – use Objective C and you can code for Mac, iPhone, iPad, etc. use HTML5 for the web. Should we all be using Java? or C++? Why have .NET devs struggle to figure out what technology to use? So bottom line..

 

1. Web – HTML5/ASP.NET MVC, WCF services, etc

2. Mobile – Silverlight (aside: what ever happened to the .NET CF?)

3. Windows – WPF, WPF, WPF (but don’t forget about console apps and windows services!)

It would be interesting to go to Microsoft dev shops around the globe and do surveys..

“Hey there – what are most of your websites and web services written in?”

    Answer: “Webforms and ASMX services -  we are looking at MVC”

“Hello, what are you doing for mobile development?”

    Answer: “Well, since WP7 phone just came out and who knows if it will take off, we do everything in Objective C for iOS devices or just have a mobile website in ASP.NET webforms, or we have some Java based Android app, and some crappy Blackberry apps or something..”

“Hola, what are you doing for your LOB desktop apps, etc?”

    Answer: “Well we have a few legacy VB6 apps, some Win32 apps, and we have poured tons of time into Winforms over the last 7-8 years, but we want to start looking at WPF”

I bet a majority of the answers would be similar to the ones above. Who the hell is doing anything in Silverlight? Niche apps/markets? What about WPF? A few, and some proof of concepts, but yeah, even the MVC stuff is probably on a slower adoption rate then MSFT would like. Not sure how they solve this problem. One way would be to STOP CHANGING THINGS EVERY TWO YEARS so that dev shops can focus and incrementally move to the new technologies, but I don’t see that happening.

Where do we go from here? Well, I am pretty excited to see what .NET 5 brings. :)

Looking to Hire…

I have been managing two different groups @ Trek -  (Business Intelligence and .NET Software Development) for a while now, and we have some openings we are trying to file, so that is why I am putting this out here.

First role, looking to hire a Microsoft .NET Windows Forms developer, or someone with web experience looking to get into Windows Forms and eventually WPF/Silverlight, and also Windows Services. C# is the language.

Second role, looking for a Microsoft Business Intelligence Developer/DBA – SSAS/SSIS/SSRS, DBA experience preferred. Working on cubes, and ETL’s and reports and DBA stuff.

Shoot me an email at steve_novoselac@trekbikes.com with your resume and info.