可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened,
visit the help center for guidance.
Closed 6 years ago.
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.
回答1:
It depends on how you're distributing the app. If you have an option for cd or other physical media you can distribute the runtime via that media and 28Mb is nothing.
Otherwise you do have that 28Mb download to deal with. Your other option is to give up on .Net and choose another toolkit. The C++ Builder/Delphi option used to be pretty attractive, but I don't know what their platform looks like these days.
[update]
I've heard rumblings recently that mono is getting good enough you can use it to compile and statically link a .Net app as a native *.exe file. We'll have to see if this turns out to be a good option.
回答2:
You can actually make a MFC app with fairly substantial use of large libraries (eg: boost) which will compile to under 10MB statically linked, depending on how much code you include and what features you use. Even a large-ish 32bit app is unlikely to exceed 28MB without a lot of binary resources included. The benefit of that path will likely be highly dependent on your experience with C++ and MFC, but it's certainly an option (and, as a bonus, you're not dependent on a specific version of any framework being pre-installed, or forcing any system changes at all).
回答3:
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.
回答4:
What about Qt? It produces small footprint apps, it's very easy to learn, it supports full integration with VS200x and (what you maybe don't need) it's platform independent - and even runs on WinCE without (big) changes.
回答5:
Have you ever tried Delphi?
Delphi is very good for rapid application development (RAD). You can build forms, like dotNet, dragging and dropping components. In my opinion it is perfect for business apps.
The only problem is that you will have to learn Pascal, but it should not be a problem. Delphi is compiled and very fast (similar to c++).
Why dont you download Delphi´s trial version and try it?
One plus I can think of is that you don't need to install any additional package to run your app (not dotNet runtime or c++ redistributable).
Another good point to remember is that, it has dotNet support and there is Prism.
回答6:
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.
回答7:
What about RealBasic.
It has a managed runtime (similar to .NET but not as powerfull) and runs on windows/linux/mac and the runtime size is about 3MB
The language used is a dialect of BASIC and has a nice WYSIWYG designer with drag n drop support.
回答8:
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.
回答9:
I agree, you should just code with WTL in C++ using wtlbuilder.com
回答10:
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.
回答11:
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.
回答12:
I suggested U++ for another question:
What are some of the "best" cross-platform C++ UI toolkits today?
If you like C++, once you try out and work with U++, you'll be amazed by its beauty, elegance, lightweight, .NET-free as your requirement calls for and agressive use of C++.
回答13:
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.
回答14:
The Open source Free Pascal compiler with Lazarus IDE might be an option. I compile and test most of my Delphi components and libraries also with Free Pascal. For the user interface, Lazarus offers its own visual component library, FCL.
回答15:
Go with Realbasic. It's the easiest, quickest, and needs no dependencies. (Because its small runtime is included within your exe)
回答16:
Another option is to use Mono with mkbundle. Mkbundle takes your app and all the assemblies it references and packages them into a single binary package.
Here is a link to one of the Mono pages about it.