Sign in to follow this  

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

This topic is 2634 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?

[IMG]http://i67.photobucket.com/albums/h292/Athono/microsoft/model.png[/IMG]

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
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

This topic is 2634 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this