I want to check my knowledge as I have seen a project in my company in different way.
What I know is, if we want to use MVC software design pattern in our project, we separate our project like this:
View part is our design UI, which means ui.xaml
file in WPF, ui.designer.cs
in WinForms, ui.xml
in Android, ui.qml
in QtQuick and ui.ui
in XCode.
Controller part is the nearest source file connected to designer file with similar names. Which is ui.xaml.cs
file in WPF, ui.cs
in WinForms, ui.java
in Android, ui.h/ui.cpp
in QtQuick and ui.swift
in XCode.
Model part is any other class that does the main operations. I usually add the suffix Manager
(or something like that) to them to say what is its responsibility.
and for MVVM I also use an interface
or abstract class
that the View is inherited from for its View Model part and consider my former Controller as a part of View.
And one Project is enough for building the whole thing.
But a project in my company has many classes! a folder of separate libraries for designers with the name of UserControl, a folder of another separate libraries with the name of View, and another set of libraries with the name of ViewModel and so is the case for Controller and Model. And they say it is a mixture of MVC and MVVM. The most surprising point is, the whole software has 38 separate projects written by a single programmer and the team is a small one.
Please tell me whether my knowledge is correct? And please tell me if the project in my company is in a right direction?