I'm very much new to software development. I think layered architecture is a great way to reduce the complexities that arise in the process of object oriented software development and, not to mention, to keep your code organized.
I'm interested to learn about Domain Driven Design approach and I've run into some problems to get myself introduced to it (of course, beginner level ones).
Here it is -
I want to build an application to save person related data in database and display person details in a WPF DataGrid (I know, DDD is definitely not for the apps of such scale, but just to keep things simple for an amateur like me). So, I created a domain class "Person", something like –
public class Person
{
public Person(dataType paramA)
{
this.PropertyA = paramA;
}
private dataType _fieldA;
public dataType PropertyA
{
//encapsulates _fieldA
}
public dataType PropertyX
{
//some code that manipulates private field
}
private dataType MethodPQR(dataType param)
{
//some code
}
}
Now, my understanding of DDD says the architecture (the simplest version of it) should be as follows (please, correct me if I'm wrong) -
Note:
I want the
DataGridto be bound to someObservableCollection, to reflect any kind of changes instantly.It's a WPF application but not necessarily be in MVVM pattern and I deliberately want to use the code behind.
My questions are -
What kind of codes belong to the
Application Layer?My guess is, I should definitely not bind an
ObservableC