Suitable Design pattern for building a 3D model [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 9 years ago.
Improve this question
I have implemented a 3D model application using DirectX api and C# .NET. Initially started with an intention to make the 3D model working and by now, all the code logic and UI stuff everything is in one *.cs file i.e., in main form.
Could you please anyone suggest me which design pattern is suitable for segregating my code in a proper way?
As MVVM (Model-View-ViewModel) pattern is suitable for WPF application, Im under the impression that the same design pattern can be suitable for 3D rendering application.
Please suggest me if any other design pattern is well suitable for my 3D modeling application. Thanks in advance.
Regards,
Kumar

MVVM design pattern is for frameworks with data binding, such as WPF and Silverlight, if you are using windows forms I'd suggest Model View Presenter or Model View Controller patterns

Related

Understanding MVVM for Converting Process [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 3 years ago.
Improve this question
I am in the Process of converting a VB project to C# WPF. We are planning to do with MVVM concept and I am in the learning process. To my understanding each form in VB is a View. Each view should have a corresponding Model and ViewModel.
For the Second Form, another view and a corresponding Model and ViewModel.
If there are n Forms in VB, there will be n Views, n Models and n ViewModels in C#.
I am not sure what I asked here is right or not. Experts here please help
As far as the view is concerned, you're right. Each form will have a view for presentation and a view model for presentation logic, or how your models should interact with the view. These are not necessarily one-to-one with models. You might have a model that encapsulates some data and business logic that you want to reuse. I suspect you VB projects had such classes.
MVVM Light is a simple and effective framework you may want to look into. This is a pretty good summary of MVVM using this framework.

WPF and MVVM tips [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 6 years ago.
Improve this question
I'm new to WPF and MVVM pattern. I've been reading about it and I come to a little doubt.
I'll build an WPF application that mainly does access to a database (oracle), but this access is done by an WebService (DataService). My question is in the Model part.
Should I create a class to each table on the database, on my Model, or should I just use the entities that the service provides me?
My guess is use the entities of the service, and then just do the CRUD operations in my application. But I want your opinion.
Thanks in advance.
It is always a good practice to use your own Models. That way, if the Service changes the structure, you will only need to change one point (where you map the item to your own entity), else you would have to change your whole application

Which class should be Singleton in WPF, MVVM structure? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I know my question is subjective and context dependent, but being a beginner to MVVM, I came to know that generally one of the MVVM class is made singleton. Can anybody please tell me if I have Model, ViewModel and View class, generally people prefer which class as singleton and why is it so?
Technically, the Application class is really the only "required singleton" in a WPF application, and that's mainly because WPF will create it for you.
Otherwise, I typically avoid singletons in my WPF applications completely - there is no reason to introduce them.

winform or wpf for entity framework? [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 8 years ago.
Improve this question
I want to know which one is the best natural choice while working with SQL and Entity framework, c# Winform or the WPF? Assume that skilled resources available for both the technologies (Winforms and WPF).
Entity Framework doesn't care which UI technology you use on top of it.
There's no natural choice - use whatever you're comfortable with and whichever works for your needs
After working with both, I strongly recommend WPF, since it gives you a far better code/UI separation. Using MVVM makes the code more readable and easier to maintain (and read).
SQL and EF don't care how the layers above are implemented, it's your choice alone.
EF not dependand any one like if you used winfrm or WPF. but there is a difference between winform and WPF.
if you want to know then you can use the mentioned link Click here
If you want better Presentation of your application then I would recommand you to go with WPF.

How would you create a WPF control using the MVVM pattern? [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 9 years ago.
Improve this question
So I'm having trobule figuring out the best way to use the MVVM pattern while creating a WPF control dynamically within
my code. Would this even make sense or is it better to avoid the MVVM pattern all together?
If it does make sense then please share code examples of the view model.
In general, if you're using MVVM, controls will only be created "dynamically" in response to the data changing. If you have an ItemsControl bound to a collection, for example, the controls to represent the items will automatically be created for you.
If you're talking about making a custom control in general, custom controls are really "pure view", so MVVM doens't really make sense in this scenario. The main goal of creating a custom control is to build it in a way so that it can be used by code developed with MVVM, which typically means building the control with proper Dependency Properties (so data binding works properly), etc.

Categories