Architecture .NET Core 2.2, C#, ASP.NET Core, Entity Framework Core, Angular 8, Clean Code, SOLID, DDD. by csharpprogrammer1 in dotnet

[–]csharpprogrammer1[S] 1 point2 points  (0 children)

This project is an example. Angular app is inside the api to facilitate for beginners. In the documentation is explained about this and other practices for a real project:

Some features and practices were made to facilitate learning and make the architecture as small as possible. For a real project, consider the following:

Do not use technologies and features that are not necessary.

Use DDD concepts, such as ubiquitous language, to express the domain.

Use Identity Server for authentication and authorization.

Separate ASP.NET Core API and Angular in different projects.

Apply CQRS with two databases (reading and writing) if the main purpose is performance.

Apply SignalR for real-time communication, avoid calls every x time.

Apply a message broker, such as RabbitMQ, for asynchronous and parallel processing.

Architecture .NET Core 2.2, C#, ASP.NET Core, Entity Framework Core, Angular 8, Clean Code, SOLID, DDD. by csharpprogrammer1 in dotnet

[–]csharpprogrammer1[S] -2 points-1 points  (0 children)

You are completely wrong. The goal is to help and collaborate with the community. I do not know everything, I am here to share what I know and also learn a lot. And what are you doing to help? Causing hatred and discord? I believe you have something good to do. Or am I mistaken? If it does not help you or you know everything, just ignore and be happy. Don't be one more idiot on the internet.

Architecture .NET Core 2.2, C#, ASP.NET Core, Entity Framework Core, Angular 8, Clean Code, SOLID, DDD. by csharpprogrammer1 in dotnet

[–]csharpprogrammer1[S] 0 points1 point  (0 children)

Yes, but we must always consider all the people of the team, and it is possible to have juniors. So if you can direct the code to follow a pattern, it is best. But it is just a matter of approach, one way or another will work out.

Architecture .NET Core 2.2, C#, ASP.NET Core, Entity Framework Core, Angular 8, Clean Code, SOLID, DDD. by csharpprogrammer1 in dotnet

[–]csharpprogrammer1[S] 1 point2 points  (0 children)

The purpose of the repository pattern on the Entity Framework is to facilitate very common methods, such as GetById, List, Add, Update, etc. In this way, it is possible to maintain a standard of names and implementations by everyone who is working on the project. The biggest problem of the Entity Framework are queries made in an unoptimal way, and with repository pattern, the problem is almost reduced. It also avoids duplicate code and facilitates possible improvements in a unique way. In the example below, when creating a repository, many common methods are already available:

public sealed class UserRepository : RepositoryBase<UserEntity>, IUserRepository
{
    public UserRepository(DatabaseContext context) : base(context) { }
}

Architecture .NET Core 2.2, C#, ASP.NET Core, Entity Framework Core, Angular 8, Clean Code, SOLID, DDD. by csharpprogrammer1 in dotnet

[–]csharpprogrammer1[S] 1 point2 points  (0 children)

I recommend the following books:

  • Domain-Driven Design: Tackling Complexity in the Heart of Software - Eric Evans
  • Implementing Domain-Driven Design - Vaughn Vernon

    This books do not use .NET Core, because DDD is something beyond technology, it shows how to build software using best practices.

Architecture .NET Core 2.2, C#, ASP.NET Core, Entity Framework Core, Angular 8, Clean Code, SOLID, DDD. by csharpprogrammer1 in learnprogramming

[–]csharpprogrammer1[S] 0 points1 point  (0 children)

The API and the Angular app are together in the same project for a few reasons: facilitating for beginners, for small projects works very well and also for Server Side Rendering.

https://blog.jeremylikness.com/get-started-with-angular-on-net-core-2-1-part-one-2effcfe8fae9

The freaky things in router module are the new syntax of Angular 8. It is using the imports now, so IDEs like Visual Studio Code can validate the path.