Integrating WPF and Windows Forms Projects in one Solution [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 4 years ago.
Improve this question
I have a big Windows Form Application which works as a machine configuration software and that interacts with the user, collects the data from the machine and operates on a SQL Database with 15 sub projects associated with it. It was developed with a singleton pattern long back.
Additionally I have a WPF Application developed recently with MVVM which is used to interact with the Database with a back-end project to get data from the database and display meaningful results to the user.
Now, I would like to know, if it is a good programming practice to combine both WPF and Windows Forms Projects under one solution. Will it result in longer loading and build times ?
I am using Visual Studio 2017 currently.

Now, I would like to know, if it is a good programming practice to combine both WPF and Windows Forms Projects under one solution. Will it result in longer loading and build times ?
It's common to have several different projects, including several different client applications, in the same Visual Studio solution. You may still deploy each executable separately.
Obviously the total build and load time will increase (at least in theory) for each project that you add to the solution but this shouldn't be an issue considering that you only need to re-build projects that have actually changed since the last build during development.
To answer your question, it's not considered a bad practice to have several client application projects in the same solution.
You may also have several solution files, e.g. one solution that contains all projects and a WPF solution that only contains projects that the WPF application uses and so on. This is what I usually do when the solution consists of 100+ projects.

Related

Is it better to learn windows forms or WPF knowing that i will be using syncfusion to make my UI controls? [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
The project is directed to provide finance based solutions (specially concerning stocks).
for back end the technologies i am planning to learn and use are web C# based web API and SQL server for database. which is best to use as a webAPI asp.net or core or mvc for my api?
bonus questions: since i am learning these technologies, is it better to learn a cross platform based frameworks like react-native and xamarin. and which do you think is best platform that generates mobile apps in addition to windows application, if performance is a key factor?
To answer your first question, WinForm is much simpler than WPF to learn, but WPF is way more powerful and flexible (in my opinion). So I suggest to start directly by learning WPF.
CrossPlatform frameworks like xamarin are good way to rapidly deploy solutions in all platforms. But, if you're creating custom views, you'll have to create a custom view for each platform anyway.
Xamarin.Forms (cross-platform) is much slower than using the native language of each platform.
Last thing, if you want to deploy your app for Windows + Android + iOS, you should use Xamarin.Forms, it's pretty similar to WPF and it gives you some UI elements to share with each platform (Labels, Switchs, StackLayout, ...) and all the libraries that C# can give you, while it stays outside of native code.
Hope this helps,
All the best.

Why should i use JUST ONE solution for different projects? [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 5 years ago.
Improve this question
I will create four projects each other works together.
desktop program ( as User Interface for entering datas )
web site ( for reporting )
web service ( for connecting database - from desktop program and reporting portal )
windows service ( for sending datas which are entered by users via desktop program to database )
Should i create one Visual Studio Solution which contains these four projects, or should i create different solutions for each of them?
What are the advantages of creating just one solution ?
Thank you.
For what it's worth, here are some significant pros and cons which may affect you:
If you put them all in the same solution, it will be very easy to share code between them-- e.g. projects in a solution can reference another project assembly in the solution as a reference directly, making debugging very nice. Nuget packages will share a common folder if they are shared, and you can see everything nicely at the same time.
However, if you these are programs that run independently but interact with each other, debugging is sometimes easier if they are in separate solutions, so separate copies of visual studio can be debugging the separate pieces simultaneously.
With one solution you will need to start only one VisualStudio instance, where you access code from different projects at once.
All possible refactorings(renaming, signature changing etc) can be easily done when you using one solution. With different solution you will never know if you remove/rename some code used by project from another solution.
You will be able to build all projects at once. Execute all possible unit and integration tests (if you have such)

Is my software developing architecture not good [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
For my company, I have developed one winform application, that handles Unified COmmunication.
It's been 1 year in development. I Just write global functions in seperate classes, and write the code in either form or class. Now They wanted me to make three seperate copies(UI of each changed) of the same Software. I have changed all UI and everything needed, and made 3 copies. But now, I feel it very difficult to correct any issues, or add any features. I have to change it in my all three copies. How can I solve this. Thanks.
I'll assume the three versions are very similar. First off, it's of the utmost importance that you keep your project under source control.
Personally, I would have created a dev branch for the main version, and then create two other branches for the 2 other versions (e.g., dev-v1 and dev-v2), created off the main branch.
Then, whenever I had to apply a patch to all 3 versions, I'd do it on the dev branch, and then merge dev with dev-v1 and again with dev-v2.
So far I only addressed the source control issue, but as CSharpie pointed out in the comments, you should definitely separate the presentation layer (i.e., forms) from the business logic. Furthermore, these two should also be separated from the data layer.
Take a look at Multitier architecture.
Separation doesn't necessarily mean different projects or solutions. Having a logical separation (e.g., having sets of classes with very well defined purposes, following the SOLID principles etc.) is often enough. In your case, however, it seems that the presentation layer should be in a different project than the other two.

the best way to build a Business Application in .NET [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
We are building a new Business Application using .NET technologies. First we started looking at some Javascript frameworks as we are basically converting a windows app to a web app so we thought using JS would give the same user experience as win forms.
We looked at many including Angular (no rich controls), KendoUI and WIJMO but ended up writing lots of JS and our prototype project became complicated as we used the SPA (Single page application) approach.
Is there is a way to get the simplicity of ASP.NET MVC and the great user experience of JS frameworks? Has anyone had any experience with building a Business Application? What are the recommendations?
Thanks
Yes, we use a mixture of these technologies and a simple eventing strategy for communication between the server/client
SignalR - for a persistent event pipe (transport)
Angular - DOM manipulation/data binding
Bootstrap - Great starting point.
MVC - awesome asset pipe-lining in .net, allows for the bundling of lots of js files into one, and partials allow for sane management of a very componentized page structure.
TypeScript - at scale js is very hard to maintain, refactor and debug, typescript removes an entire class of run-time errors and allows for very good code completion and refactoring tools in Visual Studio with ReSharper.
Look into Ext JS from Sencha.
Ext JS uses an MVC architecture and has a whole bunch of nice user interface widgets.
Disclaimer: I am not affiliated with Sencha in any way. My company, however, does use their framework in our applications.

What technology can I use to write one view for my C# application? [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 9 years ago.
Improve this question
I'll soon be looking into writing a small business workflow application that I'd like my userbase to use across all devices - iOS Tablet, Windows PC, Windows Tablet, Mac, Android Tablet are the key targets.
I'm fairly new to the 'app' dev space and I don't know much about what frameworks and industry standards are forming around PC and mobile friendly applications, if any?
I'll be writing the core of the application in C# and I'm looking for technologies (HTML5, JS, etc) and even frameworks (I saw Xamarin might be okay?) that implement the View of the application. The tighter its tied to C# the better it'll be for me and the cleaner the transition between my chosen platforms the better.
I just created one using Jquery Mobile, and an odata C# webservice. Its just what work wanted me to but I see the framework being used alot. So pretty much get the data with the webservice then use javascript and html5 to display it.
If you want to write your application in C#, and not implement it as a web service, then I think the only option is Xamarin for the iOS / Android platforms (and .NET / Mono on Windows / OS X).
This does not mean using a single technology for the View, though, as Xamarin UI code is not portable across iOS and Android (this has pros and cons involving the age-old native feel versus shared UI debate).
If you are flexible on implementing it as a web service, then your server logic can be written in C#, with a shared HTML 5 client across all platforms.
If you are flexible on using C#, then you have more options outside the scope of this question.

Categories

Resources