Jump to content
  • Advertisement
Sign in to follow this  
athono

[.net] What is a model.cs file?

This topic is 2853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What is a model.cs file?

model.png

This appears in a project I am sharing with other dev's. What is a model.cs file?

I have heard that it looks like the MVVM design pattern. Will MVVM design pattern produce this sort of configuration in the IDE where you have a xaml file with two nested cs files like this?

Share this post


Link to post
Share on other sites
Advertisement
It may depending on what you use, you'd have to use something tightly integrated with vstudio for this (at work we don't so we have the model file separate from the view alltogether).
I think there are frameworks that do this integration and nest it.

Share this post


Link to post
Share on other sites
In the MVVM pattern, it is common to name the model layer objects in a way that the name reflects the actual usage of the object. The name "model" by itself is often used as an example (to underline the architecture layer to which the object bearing it belongs) but in real world, the model classes contain the business logic of the application and will be named in wildly varied ways.

That said, it could be an auto-generated file/class which is uniquely identified by its namespace instead of the actual name. This is not a bad approach for auto-generated tools but it hinders readability for human coders, should they need to manipulate the objects in question.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!