Building Web APIs Part 3

  Рет қаралды 9,302

Microsoft Visual Studio

Microsoft Visual Studio

Күн бұрын

Пікірлер: 25
@cesarh.delgado4069
@cesarh.delgado4069 5 жыл бұрын
Security with Oauth2 please!!
@RedScare.
@RedScare. 5 жыл бұрын
19:08 Double call of _chinookSupervisor.GetAlbumByIdAsync() does not look right. 21:10 async/await usage overhead
@TPersistent
@TPersistent 5 жыл бұрын
So much boilerplate for such a simple application. I see where it all comes from, but the feeling is that the tooling is all wrong; pounding a square peg into the round hole type of thing. The system should have some reasonable defaults, instead of having to mindlessly redefine every single thing again and again every step of the way.
@SoyUnEmilio
@SoyUnEmilio 5 жыл бұрын
The ViewModel sounds like a web application. I would use DTO instead.
@6freeborn
@6freeborn 5 жыл бұрын
DTO = ?
@SoyUnEmilio
@SoyUnEmilio 5 жыл бұрын
@@6freebornit stands for data transfer object.
@reneschindhelm4482
@reneschindhelm4482 5 жыл бұрын
+1 for the KISS example
@truman5652
@truman5652 5 жыл бұрын
Superviser it's actually UnitOfWork. I don't see any reason to test CRUD operations in this application. And what about validation and audit of data?
@BenHayat
@BenHayat 5 жыл бұрын
VM or API Model doesn't really apply for Web API. It's standard name is DTO. Why not use DTO. And for the supervisor, it is called "UnitOfWork".
@heiko3169
@heiko3169 5 жыл бұрын
A good guide for starters ..probably.., BUT I strongly criticise the supervisor class! Actually I would call it a bad habbit, because it violates the SOLID principles. You could have gone with provider classes for each of the models. IAlbumProvider that has the methods to retrieve albums, either all or by id or by whatever search parameter.... and so on for all the other viewmodels you have. ..even more advanced you would go for CQRS and you would have QueryHandlers and CommandHandlers (but thats probably out of the scope of this guide which should be a help for starters).
@nico-toscani
@nico-toscani 5 жыл бұрын
Supervisor and repositories... I don't think that is necessary. Repos were 'fun' when we had to use the SqlDataReader....
@heiko3169
@heiko3169 5 жыл бұрын
I agree that the supervisor class is in question (actually I would call it a bad habbit, because it violates the SOLID principle). Repositories on the other hand is absolutely fine and recommended to use, even with EF ! Why? Because first of all it provides those data functions you WANT to provide to the domain, and nothing more. The Domain model should NEVER contain query syntax against data entities. That's what repositories provide as function! Second, repositories are better for unit testing: they are mockable, and testable itself.
@JJZune
@JJZune 5 жыл бұрын
Am I missing something here? This all kind of seems a bit ... clunky. Plus from my understanding the EFCore documentation seems to discourage implementations of the repository pattern (see: docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/advanced?view=aspnetcore-2.0#repository-and-unit-of-work-patterns)
@gligom
@gligom 5 жыл бұрын
I think that for this simple project they just write to much code. All over the Internet in all teaching stuf, they say about DRY, KISS amd here i just see alot of same code...
@alfredcsdinc
@alfredcsdinc 5 жыл бұрын
Please Make the Part 1, 2 and 3 Links available
@ChrisWoodruff
@ChrisWoodruff 5 жыл бұрын
Part 1 channel9.msdn.com/Shows/Visual-Studio-Toolbox/Building-Web-APIs-Part-1 Part 2 channel9.msdn.com/Shows/Visual-Studio-Toolbox/Building-Web-APIs-Part-2
@AungBaw
@AungBaw 5 жыл бұрын
channel9.msdn.com/Shows/Visual-Studio-Toolbox/Building-Web-APIs-Part-1
@AungBaw
@AungBaw 5 жыл бұрын
channel9.msdn.com/Shows/Visual-Studio-Toolbox/Building-Web-APIs-Part-2
@EricJavierHernandezSaura
@EricJavierHernandezSaura 5 жыл бұрын
It is amazing how a project so simple, can be done so wrong !! I had to stop counting how many principles and best practices get violated in this video.
@ryanconnollyatwork1356
@ryanconnollyatwork1356 5 жыл бұрын
What are some of the ones that stood out for you?
@EricJavierHernandezSaura
@EricJavierHernandezSaura 5 жыл бұрын
@@ryanconnollyatwork1356 That supervisor class is a mess, for example, it breaks the open close principle, the single responsibility principle and make almost impossible to scale that project in the future. Please don't take the criticism the bad way it is what it is
@ryanconnollyatwork1356
@ryanconnollyatwork1356 5 жыл бұрын
@@EricJavierHernandezSaura Yeah, I agree with that one for sure. It was a god class that needed to be refactored. He said he didn't like it either, maybe that was a sign.
@Xenas2127
@Xenas2127 5 жыл бұрын
@Eric Javier Hernandez Saura I'm quite new to the whole api thing. What would be a better implementation?
@ryanconnollyatwork1356
@ryanconnollyatwork1356 5 жыл бұрын
@@Xenas2127 There are a lot of great examples of clean architecture like this one github.com/ardalis/CleanArchitecture
@MustaphaCM
@MustaphaCM 5 жыл бұрын
first
Building Bots Part 1
37:06
Microsoft Visual Studio
Рет қаралды 31 М.
Supercharging your Web APIs with OData and ASP.NET Core
19:49
Microsoft Developer
Рет қаралды 86 М.
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 127 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 52 МЛН
Unit Testing: Existing Code
29:50
Microsoft Visual Studio
Рет қаралды 10 М.
.NET Framework vs .NET Core vs .NET vs .NET Standard vs C#
25:14
IAmTimCorey
Рет қаралды 554 М.
Clean Architecture with ASP.NET Core 2.1 | Jason Taylor
49:20
SSW TV | Videos for developers, by developers
Рет қаралды 309 М.
Dependency Injection
45:17
Microsoft Visual Studio
Рет қаралды 147 М.
Full stack web development with ASP.NET Core 3.0 and Blazor - BRK3017
59:10
Microsoft Developer
Рет қаралды 166 М.
Correcting Common Async/Await Mistakes in .NET - Brandon Minnick
1:00:11
NDC Conferences
Рет қаралды 166 М.
RESTful API with .NET Core (.NET 7) - Full Course for Beginners
2:32:39
DotNetMastery
Рет қаралды 187 М.
SOLID Design Patterns
57:18
Microsoft Visual Studio
Рет қаралды 251 М.
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 127 МЛН