What's the best way to write a Windows client

2020-04-05 20:46发布

I'm trying to evaluate whether I should make the .NET Framework a requirement for my new Windows app. I believe .NET is the best and most efficient way to write Windows client apps, so it comes down to how painful the next best alternative is. Specifically, I'm trying to avoid the installation of the .NET Client Profile, which downloads 28MB and if it's like the regular .NET Framework installer, takes forever.

I've used wxWidgets and WTL before and think both are good options. Statically linked wxWidgets executables are 30MB, but it will be packaged. WTL has a small footprint but is created with ugly code. I've used a few MSI creators but it not WiX or NSIS, which seem to be best free options.

I'm looking for any recommendations, experiences with the Client Profile installer, experiences with small, custom business apps, or any relevant advice.

Edit: I'm only making a few thousand bucks here, so I'm looking for something free or cheap (after Visual Studio, which I already own). I don't mind learning in a new language, but I'd prefer one that's growing in use.

16条回答
淡お忘
2楼-- · 2020-04-05 21:16

Ultimately the answer is in the widget framework, the easiest frameworks wrap up the windows windowing api for you. In my experience the easiest frameworks are...

1./ Windows Forms with either c# or VB.NET (.NET)

2./ Visual Component Library (VCL) with either Delphi or C++ Builder (added advantage of being a native app, and no additional library requirements)

3./ Windows Presentation Framework (or foundation) with either C# or VB.NET

4./ MFC - (Shudder) with Visual C++

Then there are a host of other less used frameworks, like PowerBuilder etc.

查看更多
来,给爷笑一个
3楼-- · 2020-04-05 21:16

I'd also recommend REALbasic. I use it to create a lot of Windows client applications and it works quite well for the most part.

查看更多
手持菜刀,她持情操
4楼-- · 2020-04-05 21:20

Even easier than writing .NET, and with a much smaller footprint than the .NET runtime - is to write the application in Visual Basic 6.

Of course, the reason why no-one has mentioned it is that it's a dying language now. But just thought I would mention it as no-one else had.

查看更多
家丑人穷心不美
5楼-- · 2020-04-05 21:21

Under the category of Relevant advice:

There's a reason why the .NET platform was built, and it wasn't because Win32 was easy to program for. There is Delphi, there is Tcl/TK, and there is MFC, but unless any of those options are easier to design and deploy than .NET, you'd be far better off swallowing the 28Mb download and designing in .NET.

With .NET (at the risk of sounding like a cheerleader), you get

  • Drag-And-Drop UI design,
  • The power of the .NET framework (let's face it, you're building for Windows -- having them do the heavy lifting is a major bonus)
  • Near platform independence (depending on how good Mono is)
  • Low-Cost

So if time is a consideration, then develop in .NET. If Time isn't a consideration, you need raw power, and you're very comfortable with C++ and MFC, then use that. Delphi is also a possibility, but the cost of their development platform is a bit steep for me.

查看更多
趁早两清
6楼-- · 2020-04-05 21:22

You should strongly consider Delphi or C++Builder from Codegear.

Both generate compact, native Win32 applications, built using a great two-way RAD system and the VCL framework. There's a large range of free and commercial third-party components, an active user community, and Codegear now seem fully committed to native development while keeping active in the .NET arena with the new Delphi Prism system from RemObjects.

Edit: Gortok asks "With the cost of the Delphi IDE, how can you suggest Delphi?"

Simple. I think it's worth it. I don't know how much your time is worth/charged at, but you can do the math. Delphi 2009 costs $874 list. I think Visual Studio 2008 Pro is similarly priced.

If you really have no money, then you can get Turbo Delphi free, as in beer. It's basically a cut-down version of Delphi 2006, so a bit buggier and behind, feature-wise - but still definitely usable.

查看更多
迷人小祖宗
7楼-- · 2020-04-05 21:22

If you're concerned about the runtime download, just use .NET 1.1 instead of the latest and greatest .NET Framework. I think XP (or at least one of the service packs) came with it pre-installed. At some point, you have to say that if someone's using Windows 2000 or earlier, there's not much you can do for 'em.

查看更多
登录 后发表回答