Is Windows Forms Application still a good option? [closed] - c#

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have not created Windows forms applications (using C# and .NET) since 2005 so I am not sure if it is still a good option for rich client applications. Also I do not know if there is any (comparatively) new framework for building Windows apps other than Composite Application Block.
We have a small team (3 people) in our company who manage the content (e.g. musics, mobile games etc) and I want to build a tool for them. Since there are only a few people who will use this tool I am thinking of creating a Windows app so that rather than spending time and effort on creating a rich Web UI (e.g. using ajax, jquery etc) I focus on the business logic.
I understand that WPF is another option but from my knowledge it is a bit more complicated and time consuming to build an app using WPF.
If Windows forms is my best option, is there any fairly new framework for building Windows apps? 10 years ago I used to use Microsoft's composite application block but it seems to me that it's something for the past!

Building an app using WPF is a bit double edged. It's extremely quick for building something simple, hence why so many tutorials can cover specific behaviours without being gigantic. It's excellent for having automatic layouts, and being able to build said layouts in XAML will feel a thousand times better than setting up alignments in forms, especially if you've done web development. However, deviating from the beaten path (smooth datatypes, good-or-error validation, hardcoded database fields...) will leave you with a steep learning curve, as I find digging around the guts of WPF to be a nightmare.
Note that there are also a number of options available for Mono, most of which also work on Windows without indcident.
EDIT: Since I'm still getting upvotes on this answer, apparently, I'll add that it doesn't seem mono is maintaining the attached page, and the only framework from the above list which appears to have ongoing support is Xwt.

Related

Should i use Chromium Embedded Framework or .net for my desktop apps? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I see a lot of applications made with HTML for UI in Chromium Embedded Framework and I don't understand why they don't use XAML like WPF or something similar.
Should I use Chromium Embedded Framework over this? At the same time this uses C++ which is limiting because I only know C#.
tl;dr
Writing client apps in HTML/Javascript is good for cross-platform support.
Details
WPF is a good framework for developing rich client-side applications for Windows. This limitation is important. Developing client-side code in .NET, especially with a framework that's so tied to a single OS, ties you to one specific operating system. The example apps you bring, Steam and Spotify, are both cross-platform apps that have clients for Windows, MacOS and Linux and even browser-based web apps.
It makes sense, when you aim for cross-platform support, to share as much code as you can. There's no point in writing the same login flow, the same network access code, the same logic again and again, once in C# for Windows, in Swift for MacOS and in, say, Python/Qt on Linux. You want to find a common, shared platform that only needs minor modifications on each platform. HTTP/JS using a browser-based app framework (CEF, Electron or whatever) makes sense.
I use CEFSharp because I know a few JavaScript libraries that I really like for graphs (D3), charts (HighCharts), and datagrids (ag-Grid), and I wanted to use them in a desktop application. You say the Chromium Embedded Frameword (CEF) uses C++, and that is true, but you can use CEFSharp to work with it in C#. The cool part is that I can leverage the knowledge I already have with those JavaScript libraries and apply it when creating a desktop application.
I did not use XAML, WPF, etc. because I don't know them well, nor could I find the libraries I wanted to use.
The desktop application I created using CEFSharp and ag-Grid: EtwViewer

Can we port android application built on Xamarin(without Xamarin.forms) to iOS ? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am starting a project in Xamarin. As of now it will be Android only but later I am planning to port it to iOS. Should I start with Xamarin.forms (that will require me to buy an Indie license) or should I first finish up android application and later port it to iOS ?
It depends...
The best way - extract logic to the crosplatform PCL project. Then create 2 solutions for ios and android where you will make UI part + our crosplatform logic.
In any way using Xamarin.forms it's good desicion only for small simple projects, in my opinion in most cases native UI code it's the better solution
Xamarin.Forms is no silver bullet and I would not recommend it for all apps. Maybe, I would even not recommend it for most apps. As mentioned in my comment to your opening question, the answer is primarily opinion based.
To me, Xamarin.Forms is a nice tool to create simple proof of concept apps, also a way of creating prototype apps. However, as soon as you need to do something more complicated. Like, very custom UI or something that inherently is difficult to do on all the supported platforms. Then, you will have to battle the framework and write code for all platforms anyways. So using Xamarin.Forms, at least in my opinion, really depends on the application you are making.
Now, I am super biased towards MvvmCross and the likes, but in any case you should strive to cram in as much logic and behavior into a shared base. For this I usually use the MVVM pattern inside of a PCL. So all my ViewModels, classes for fetching data, behavior etc. goes inside of that PCL.
All views go into the platform specific Application project. So in the end the platform specific project will in best cases only contain UI + some platform specific services such as how to access sensors etc.
There are several MVVM framworks for Xamarin apps. Some of them are MvvmCross, MvvmLight, ReactiveUI and MugenMVVM.
Which approach you take is entirely up to you. However, before you commit to something, consider trying out various things to get a feel for it yourself.

Windows Forms vs. WPF [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've developed Windows Forms applications for 5 years now. A lot of people say that I should look into WPF. I have a few questions about WPF vs Windows Forms to determine which one is best. WPF is newer than Windows Forms and many people say it'll be the future. Others say that Windows Forms is older and therefor more secure. I am not sure what will be the future. I have googled advantages and disadvantages, but I hope that you can give me a more in dept answer to these questions:
Which one is better based upon performance?
What are the top advantages of using WPF instead of Windows Forms?
What are the top advantages of using Windows Forms instead of WPF?
Which one is more used/liked by businesses?
How hard is it to switch from Windows Forms to WPF?
Which parts of WPF should I definitely look into?
There is no meaning to say that WPF is better than windows forms or vice versa. It depends on many factors:
What kind of UI you are building.
Obviously, the complexity of the views you are designing will factor in to performance on both platforms. They have different layout and rendering pipelines.
How effectively you optimize for performance on each platform.
Advantages of using WPF instead of Windows forms:
XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.).
It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP).
Databinding, which allows you to get a more clean separation of data and layout.
Uses hardware acceleration for drawing the GUI, for better performance.
Top advantages of using Windows forms instead of WPF:
WPF's in-box control suite is far more limited than that of WinForms.
There's greater support in the 3rd-party control space for WinForms. (That's changing, but for now by advantage of time, WinForms has greater support in the community.)
The major drawback of WPF is that Mono doesn't really support it for cross-platform (e.g., it doesn't work on Linux and Mac). Originally, Xamarian/Novella said they weren't going to implement it due to the complexity of implementation. I haven't seen anything to the contrary. Not saying it isn't, but their recommendation is to write model classes and then do a OS-specific front end. Even with WPF being open sourced, it may be built on something that isn't easily ported.
https://social.msdn.microsoft.com/Forums/en-US/e134134a-352f-435b-943a-eda7a2b14fc0/wpf-vs-windows-forms-2015?forum=wpf
Depends upon your learning ability.
Which parts of WPF should I definitely look into?
XAML: Learn about XAML and how it is used in WPF applications.
Layout: Learn about layout panels and how they are used to construct user interfaces.
Data binding: Learn how WPF data binding works and how it can be used.
Data templates and triggers: Learn how data templates and triggers work and how they can be used.
Styles: Learn about how UIs can be styled in WPF.
For more information refer below mentioned URL
Windows Form Vs WPF Windows

C# application in a web browser? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Say I coded some application in C# using visual studio. Is there anyway I can take this application and embed it into a website so folks can use it from a website in the same way I would use it from my desktop?
If you coded a console application - no.
If you coded a winforms application - no.
If you coded a WPF application - yes
Two options:
Migrate it to silver light and it will only work on browsers which can install the silver light plug in. keep in mind that silver light is being disbanded by Microsoft, so it is not considered a recommended practice anymore even by MS. also consider that not everyone would agree to install silver light plugin for their browser.
You can also migrate your WPF to become a browser application - but this will require the client machine to have .Net installed on it - so this is like a replacement solution to what once was achieved by ActiveX technology.
Main difference between those two options is that the 1st one is cross-platform/cross-browser solution and the 2nd one is not.. however this might change in the future as .net is becoming available to Linux too..
If you coded ASP.Net - it is already designed for developing web applications.
I'm not sure what exactly you are trying to achieve but I think the WPF/Browser APP is what you looking for, you can read more about it in How to: Create a New WPF Browser Application Project
Edit:
I thought I'd mention if you have a Console or Winform app that people wish to use remotely (ie via a web browser) don't forget they can use Remote Desktop to access the application. Many large enterprises do this using Citrix. Often this is more practical when the cost of rewriting legacy applications is not feasible.

Creating a Windows desktop app not a metro/store app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I realize this may be a misplaced question on this forum but most other forums are less that useless!
I've been searching for tutorials on creating a Windows Desktop program, not a Windows Metro/Store app. All I can find is metro and store.
Can someone point me in the right direction for getting started on this? This is what I have chosen in VS2012:
vs2012 new windows empty project
I will eventually be importing an API but for now I want to get working on a GUI layout. Any pointers/clarification would be great.
If you want to create a Windows GUI app, you should use either Windows Forms Application or WPF Application. These are the primary two ways in which Windows desktop applications are created in C#. Note that the controls offered through these are different from one another, and the basic fashion in which the UI is constructed is totally different as well.
Windows Forms is fairly simple, and uses a visual designer to add controls to the form. WPF relies much more strongly on a complex markup based language, XAML, in which the UI is written in code. WPF offers a great deal more options as far as customizing controls and their appearances, but in order to use it to its greatest potential you have to spend a decent amount of time and frustration understanding how binding works within XAML.

Categories