Getting started with Windows programming

Discussion in 'Programming' started by Carson Dyle, Nov 25, 2012.

  1. Carson Dyle

    Carson Dyle Diamond Member

    Joined:
    Jul 2, 2012
    Messages:
    5,699
    Likes Received:
    32
    I'm a professional programmer, going back 20 years or so. I have experience with C, some C++, and a handful of scripting languages like Perl. But I've never developed GUI apps for Windows. Mostly what I've done for the past 13 years is web programming. And, frankly, I'm sick of it.

    What tools are considered standard for developing commercial Windows desktop applications? I've seen and used plenty of apps on Windows with oddball user interfaces, strange widgets, very unconventional ways of doing things, and I'm not interested in going there, even to start out. And then... what is the least expensive route to acquiring the tools? I would guess some kind of Microsoft Technet subscription or other.
     
  2. Merad

    Merad Platinum Member

    Joined:
    May 31, 2010
    Messages:
    2,485
    Likes Received:
    2
    The Visual Studio Express versions are free downloads. C# is probably the easiest way to go about GUIs at present. Should be easy to pick up if you aren't too rusty on the C/C++.
     
  3. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    What Merad said. Once you have the environment look into Windows Forms (the older technology), or Windows Presentation Foundation (the newer whiz-bang technology). You can also look into Silverlight, which can create applications that run in either a browser plugin or on the desktop.
     
  4. EagleKeeper

    EagleKeeper Discussion Club Moderator<br>Elite Member
    Staff Member

    Joined:
    Oct 30, 2000
    Messages:
    42,600
    Likes Received:
    0
    See, Mark is such a youngster that he considers Windows Forms old.

    Completely forgetting about MFC and the underlying Win32 API for graphics. (1990's) :p
     
  5. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    Hah. Yeah, MFC I have actually removed from my memory via intensive therapy. The Win32 API is like the sewer system in NYC... it's there, but you don't think about it.
     
  6. Carson Dyle

    Carson Dyle Diamond Member

    Joined:
    Jul 2, 2012
    Messages:
    5,699
    Likes Received:
    32
    Most/all of the above is suggesting using .NET, correct? I admit that I haven't been paying attention much to Windows development over the years. Is .NET more of a 'quick and dirty' development environment, or are real life commercial software products utilizing it?
     
  7. DaveSimmons

    DaveSimmons Elite Member

    Joined:
    Aug 12, 2001
    Messages:
    38,754
    Likes Received:
    33
    Some high-performance programs like games still use "unmanaged" C/C++ without the .NET runtime, but a lot of commercial programing and most corporate programming is done with .NET these days.

    .NET is now more than a decade old, so MS has had the 3 revisions needed to get it right :) (Actually C# is version 5 now, and .NET is v. 4.5)
     
  8. Sureshot324

    Sureshot324 Diamond Member

    Joined:
    Feb 4, 2003
    Messages:
    3,369
    Likes Received:
    0
    Do you want to get a job developing commercial windows GUI apps, are are you looking to develop your own and possibly selling them?

    High end commercial software that is also sold to consumers like photoshop, 3D modeling/animation, and audio production apps are not going to be using .NET anytime soon because customers won't be happy paying thousands for software that takes the easy but less efficient way and uses .NET, even if it's just for the UI. I think most of that software still uses straight Win32 API, or a library that sits on top of it like Qt or (shudder) MFC.

    If you want a job developing Windows GUI apps, the vast majority are going to be C# .NET corporate apps, and this is not going to be much different from developing corporate web apps.

    If I were going to get into developing desktop apps myself, I would use a library like Qt or GTK. This is more efficient than .NET and makes it easy to port your app to Linux/MacOS.
     
    #8 Sureshot324, Nov 30, 2012
    Last edited: Nov 30, 2012
  9. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    I agree with your conclusion, but not with your description of the motivation. For the most part end users neither know, nor care, what framework a program is written on. Most of these kinds of apps have been around a long time and are built on huge legacy code bases. If someone were writing a new CAD package in Windows I wouldn't be surprised if they built the front-end on .NET. There would not be any "efficiency" downside to doing so, and it would be a lot faster to build.

    The idea of using a cross-platform lib like Qt is a bigger decision. If you want to, or might want to, sell on those other platforms then it might make sense, but everyone who has done that knows that what you end up with is not the best of both worlds, and the result can be disappointing to users on all the platforms.
     
  10. Sureshot324

    Sureshot324 Diamond Member

    Joined:
    Feb 4, 2003
    Messages:
    3,369
    Likes Received:
    0
    The .NET runtime is a virtual machine with a JIT (just in time compiler) similar to Java. .Net apps are compiled to byte code and when the application runs certain 'hotspots are compiled to native machine code and the rest of the byte code is translated as it runs. Like Java, this means higher startup time to compile the hotspots, and slower execution of the non hotspots.

    There are are new windows apps still being made that use native GUI code. The windows version of Google chrome uses WTL. WTL is basically Microsoft's successor to MFC and is probably a good choice for the OP.
     
  11. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    The vast majority of GUI code sits in a message loop doing essentially nothing, waiting on the slowest component in the system, i.e. the user. The only aspect of performance that matters is the perceived "snappiness" of windows and controls, and .NET has no issues there, unless the code is poorly written.

    Having written GUI applications in every flavor of the windows API from Win16 onward I would choose .NET in a heartbeat if I had to do a new one, and in fact the last one I did was a digital media manager/player in .NET 3.5/WPF. That app was written for a major media company, and has something like 3m users at this point. As far as I'm concerned the only downside to it was the necessity of the additional download/install of the framework, which has largely receded as an issue since vista.
     
  12. brandonb

    brandonb Diamond Member

    Joined:
    Oct 17, 2006
    Messages:
    3,731
    Likes Received:
    1
    #12 brandonb, Dec 2, 2012
    Last edited: Dec 2, 2012
  13. Leros

    Leros Lifer

    Joined:
    Jul 11, 2004
    Messages:
    21,881
    Likes Received:
    5
    Why do you dislike XAML? Laying out UI with XML makes much more sense to me than doing it in code. I wish there was something like XAML for Java.
     
  14. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    "Getting started with Windows programming"

    Simply put: don't.

    Unless you're in the corporate world, already writing .Net apps, I don't know why you'd use .Net in this day and age.

    The posterboy of .Net (C#) is taking steep dives in usage and popularity http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

    MS is backing away from .Net http://arstechnica.com/information-...tware-developers-the-longhorn-dream-reborn/2/

    I think .Net's partial abandon is also evidenced with the absence of a new XNA release (the latest is 2 years old discounting the 'refresh').

    All signs outside of the corporate world are pointing more towards higher level languages to increase programmer productivity (Python and Ruby) or more low level (C / C++). Personally I'd pick something high level if you want a crossplatform GUI app. If you want to prepare yourself for a career in corporate enterprise, by all means... hop into a $500 copy of Visual Studio.
    Not saying you can't do anything in .Net... just don't know why you'd pay for Visual Studio and wait for them to drop more technology..

    I've seen things dropped from Silverlight, VB6, Sourcesafe, whatever you build your company on and become entrenched in, they'll drop it when no longer in their interests.
    Rely on the open source world. If nothing else you can maintain your own product after MS decides you don't need it any longer by hiring a C/C++/Python programmer (or do it yourself).

    All that said, to dissuade you from a platform being backed away from (.Net) from a sole-source providers (MS).. C# is a great language itself. Has nothing to do with the rest of my argument though.
    Since GUI apps are becoming more and more legacy apps in the age of webapps, Python should be fine. If you need more performance (Photoshop-level, something hardcore), forget .Net/C#, go straight to C++ and be done with it.
     
  15. Carson Dyle

    Carson Dyle Diamond Member

    Joined:
    Jul 2, 2012
    Messages:
    5,699
    Likes Received:
    32
    How many corporations are developing Windows based apps these days? I would think the vast majority of in-house apps today are browser based. Along with online browser apps, that's essentially what I've been doing for the past 15 years, and it's gotten old.

    I'm a little more interested in developing shrink-wrapped applications. Perhaps some shareware, perhaps get involved with some open source projects.
     
  16. Leros

    Leros Lifer

    Joined:
    Jul 11, 2004
    Messages:
    21,881
    Likes Received:
    5
    There are ton's of companies that write purely Windows based applications. The corporate/enterprise world is still very Window's focused. But yes... things are moving towards are browser-based apps.
     
  17. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    Agreed, big time. It's a nice analog with the way ASP.NET decomposes web pages. It's also a hell of a lot faster to develop slick custom interfaces in XAML.
     
  18. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    Interesting that the top five languages on that chart are all C or derivatives of C.

    If C# is dropping in popularity (I don't know how they come up with those numbers) then it is likely due to the shift toward mobile platforms and Microsoft's lack of a viable solution in that realm.
     
  19. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    A lot as Leros said. I've done both in different roles, webapp and local. It really depends on the need. I'd probably make something local if it wasn't used by a ton of people or needed to be reached by a lot of employees.
    We have more advanced local apps that do some stuff that webapps aren't suitable for (software upgrades for example). Basic text input, stuff that would've been done with paper files years ago are webapps, at least the ones I've created.

    I wouldn't start on .Net stuff today though, local or webapps. Unless its for financial incentive for a job, there's no shortage of MS stack jobs and there's nothing wrong with them or that fact. There's also no shortage of PHP jobs and nothing wrong with that either.
    I use Mono (not much, but it's free). Why not install MonoDevelop and get your feet wet. Honestly, I prefer it for a lighter weight install than VS. Seems everytime I install VS there's no getting rid of it and it's heavy as can be. It's just invasive, its screwed up Windows installs of mine before. While its the best IDE out there, I just don't like it unless its on a company provided machine.

    I'd like to expand on this comment. Instead of getting into C++ for a GUI app, I'd prefer to use Python + Cython, you'll still get the performance increase. Not sure on the limitations to Cython vs working on C++ but it's where I'd look. That's just me, it's always easier to use what you already know.

    I'd guess it's because the mobile realm has no dominant player other than Objective-C, and since they won't use that, they adopted HTML5+JS. Brings in a lot more guys than just the C# crowd. No one's corporate backed language besides Obj-C is really taking off. In fact, unless the OP wants a corporate-drone job hacking away on C# GUI apps all day, ObjectiveC would probably be the better investment of time and effort.

    Getting into ObjC, C# on Mono or Python costs nothing and 1st class apps are written with all 3. Paying to develop seems like a huge favor to company X both upfront, then with the dependence / lock-in later on, not to mention the validation you give their pay-to-develop platform.
     
  20. Ken g6

    Ken g6 Programming Moderator, Elite Member
    Moderator

    Joined:
    Dec 11, 1999
    Messages:
    11,914
    Likes Received:
    75
  21. Ken g6

    Ken g6 Programming Moderator, Elite Member
    Moderator

    Joined:
    Dec 11, 1999
    Messages:
    11,914
    Likes Received:
    75
    Orly? Don't you need Apple stuff to do ObjC?
     
  22. douglasb

    douglasb Diamond Member

    Joined:
    Apr 11, 2005
    Messages:
    3,163
    Likes Received:
    0
    I think that some of you have a misunderstanding of what these statistics are. These are the most searched-for languages across several search engines. It is not necessarily a list of most-used languages. For example, C is at the top, followed by Java. Guess which 2 languages are used most by universities for teaching students Computer Science. Java and C. It stands to reason, then, that there are lots of Java and C "rookies" out there googling up a storm so they can complete their assignments. It doesn't mean that C is the most-used language in the real world, because clearly it is not.

    This statistic is basically meaningless in terms of real-world usage.
     
    #22 douglasb, Dec 2, 2012
    Last edited: Dec 2, 2012
  23. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    Good point. You need at least a Macbook and a device, so a couple of grand.
     
  24. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    You can get into Objective-C with GCC for free and whatever OS and hardware you want. You only need Apple equipment if you want to use it to make iOS apps.
     
  25. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,687
    Likes Received:
    8
    True, but I can't imagine any other reason for wanting to learn it.
     
Loading...