Why are companies still using Windows Forms and WPF applications instead of web applications?
I don't want a discussion. I want only the reasons, because in the last few days I have had a lack of confidence in my job (Windows Forms/WPF)开发者_StackOverflow中文版, and I think it is good way to change technology/job.
Windows applications have the best user interface and features, but they are available to the smallest audience, while web applications have the most limited user interface features, but they are available to the broadest audience.
It's up to the companies to decide between web and Windows applications that they must develop for their growth...
Some possible reasons:
- Desktop applications are easily made available offline (obviously this is changing with new HTML5 stuff)
- Some things are just easier in desktop applications (think complex 3D visualisations, granted you could write some Flash to do some of this stuff)
- You may need to access local files / system information / other applications that are not possible from a web application
- You can use the local processing power more effectively with native code than via JavaScript (again, changing as browers become better)
- The scope of skills required for desktop applications is generally less than the web (think C# vs HTML, CSS, JavaScript, Flash, HTTP, etc.) so it may suit the development resources available
Companies are still using Windows Forms because it allows communication with Windows on a lower level than a web application.
WPF also allows greater data binding and has easier tools to handle complex tasks.
We still use WinForms and WPF because we need to deal with lots of data and need fast performance. And one other thing : We don't want to store our data on web servers (or in the cloud)!
Windows applications are more secured from the external world.
In my case I develop desktop applications because I need to access local resources. It can be file system, databases, native application APIs, COM components, etc.
The only web solution is to run an inhouse web server, but most of my customers don't have IT staff to maintain that. It is much easier to just ship an EXE file to the customer (via e.g. ClickOnce).
I would love to use Silverlight for the distribution. Silverlight 4 adds access to local COM resources, but access to native code seem to be far away.
WPF and Windows Forms are starting to lose relevance in a lot of use cases. The only places where they still are a compelling presence, would be deep within the Windows/Windows Server ecosystem. For instance, you still can't write professional-grade Office plug-ins, without using WPF or WinForms.
In a more general use case, such as a classic CRUD application, for instance, you could get away with an app written in Angular or React. If you require OS-level privileges, it's easy enough to convert over to Ionic, React Native, or Electron, and get that deep functionality. Sometimes the functionality truly exceeds what you get "out-of-the-box" from WPF or WinForms (toasters, for instance are way more functional with Electron, since it leverages the next-gen HTML5 notifications). The coding experience is more REPL, and the actual code that you have to write is a lot less ceremonial (IMHO) than WPF or WinForms, so that's a big draw.
It's interesting to note, that VS Code is written in Electron. In fact, there is a significant, growing number of mainstream Electron apps.
Well, a Windows or WPF application is by far more powerful in many ways and faster to develop a richer application that is more responsive. Web applications need little more than a log on from almost anywhere but you will usually find then far more clunky and limited in functionality. So, you want a powerful Windows application with easy to use web connectivity? Simple, just create onw. We did and we can deploy a fully powered Windows based application (well WPF with amazing graphics and functionality), that our customers can log in from anywhere with the speed of a web application but without any thin client or expensive networks. My vote, stick to a windows app and leave the grunt of a web solution that provides little to those who want to develop in that technology. Having said that web is the only way depending upon what you are trying to do but if you are delivering a commercial product then say no more.
精彩评论