.NET or WinAPI

I am trying to create a desktop application. The biggest requirement is that it should be as minimal as possible. For Windows users, is it better to build it in .NET or WinAPI? I am not from software, so forgive me if this is a nonsensitive question, but I heard that with .NET there is a possibility that some Windows users may not have it on their computers, in which case they will be necessary to download most of software, whereas this will never be the case with winAPI. It is right? What percentage of Windows might not have .NET 2.0 on their computers? Also, I've heard that developing this small application in WinAPI will take more effort. Is it worth it, or does .NET give you almost the same number of users? Thanks to

PS. I'm new to this forum (and, as I mentioned above, from a non-programmatic background), but I must say this forum is the best I've found for making some fundamental decisions about the application I'm trying to build. But the point is, the more I learn, the more not. questions I am running into .. thanks for helping everyone :-)

0


a source to share


8 answers


The biggest requirement is that it should be as small as possible.

If this requirement is legal, it pretty much forces you to go to the win32 API level. But I really doubt this claim. These days, multiple MB downloads are not what they used to be, and there are ways to mitigate the problems if most of your user base is still in dial-up mode. Comparing this with the increased complexity (and therefore time) for development for Win32 and .Net can make a lot of sense.



What percentage of Windows might not have .NET 2.0 on their computers?

It is difficult to get real penetration numbers and I have seen stats above> 90% and only 20%. So it all comes down to what you want to believe. If this is really that big deal you can design for mono and use it for runtime static linking.

+5


a source


Take a look at this question.



But if you want a really tiny executable, without having to install the full .NET framework, go for Win32. You don't have the .NET framework preinstalled on Windows XP.

+1


a source


Most computers nowadays have .NET in one form or another thanks to Windows Update and other programs that the user may have installed. If you are new to coding, I would definitely use WinForms / .NET for direct coding for Windows API. It's much easier, even bigger.

+1


a source


Also, I've heard that developing this small application in WinAPI will take more effort.

Okay, imagine you have to build a car.

  • Go to the auto parts catalog, you order the correct number of valves, pistons, gears, fan, radiator, etc. for the engine. You order all the lubricants, teeth, bearings, nuts and bolts needed to assemble the gearbox. You order headlights, bulbs for lanterns, therefore for burst lamps, turn signals, reverse lights.

You order enough steel to weld the chassis, order some seats, some kind of fabric for their upholstery, gear, pedals, switches for lights, doors, glass for windows, and finally a rearview mirror.

Everything will come and you have to put it all together. The chassis is as strong as the strongest weld, and you have a gigantic challenge to put it all together and the room for error is huge. It’s only after you put it all together that you realize you didn’t order wheel hubs or tires.

It is Win32, windows api.

  1. You enter the catalog of auto parts, you order a chassis with seats, lights, wheels, etc. You order the engine and gearbox. Three points come. You still have to tweak the motor and hook up the gear (not trivial tasks), but this is a much simpler proposal.

This is the .net framework.

If the project is bigger than a remote controlled car for a small child, grab a distribution and use .net

+1


a source


Definitely use "native code" if it should be kept to a minimum. However, it is much more complicated, especially if you are not from software.

Maybe it's better to outsource this work?

0


a source


Writing your own (unmanaged) code that calls WinAPI will give you a smaller footprint with no .NET dependencies.

But if you want to reduce deployment of the .NET environment, have a look at the .NET client profile . All .net assemblies you normally use in a 28MB area. (With a 200kb boot block that only installs things that are not already on the client machine)

See also this blogpost .

0


a source


Is "as little as possible". The most important requirement? By following this route, you will have fewer dependencies (and therefore fewer deployable components), but your development costs and time will increase.

I'm going to go to a limb and say that most Windows PCs already have the .NET platform installed (either through Windows Update or pre-installed). If you are developing against XP or Vista, this will certainly be the case.

But more importantly, is the size of the final packet as important as the time-to-value? It will be much easier for you to find developers who can quickly write good code in .NET. WinAPI development can be tedious, slow, and time-consuming to debug. This does not mean that WinAPI developers are not very good at what they do, but .NET is an advancement in software development that allows you to focus more on business issues and less on the technical area.

If you are the prime minister or project manager, you may need to do a cost analysis to determine what really matters in your decision.

0


a source


Use Silverlight. Lightness .Net and not dependent on local software configuration. In some cases, even Linux will work just fine. And on the phones to some extent :)

0


a source







All Articles