filmov
tv
Refactoring to the Repository Pattern
Показать описание
So instead of measuring I ended up refactoring, migrating from MutableList to a repository object that is much more amenable to implementation with a database, even if in the tests we still actually hold data in an ArrayList.
In this episode
* 00:00:44 Our current model is MutableList of Customer
* 00:02:09 REST is also a model
* 00:02:49 Fixing the response for an empty list
* 00:04:46 What is the problem with MutableList?
* 00:05:40 Start by introducing a typealias for MutableList of Customer
* 00:07:12 Now make the type alias an interface
* 00:08:31 IntelliJ import bug
* 00:10:44 We can't serialize our custom type, but we can sidestep
* 00:11:58 Implement findById
* 00:15:00 Implement addCustomer
* 00:16:08 Implement deleteById
* 00:17:09 Now make Customers not a List
* 00:17:21 Lean on the compiler to find issues
* 00:17:36 Distinguishing between production and test operations
* 00:20:36 Some final tidying and conveniences
* 00:22:47 Customers now lets us see the operations we are using
* 00:23:17 There is a problem with suspend though
* 00:23:58 that we'll punt into next week
Refactoring to the Repository Pattern
Have you replaced your DB because of the Repository Pattern?
Repository Pattern Explained: Can You Afford to Skip It?
Should you use the Repository Pattern? With CQRS, Yes and No!
How I Use The Generic Repository Pattern In Clean Architecture
July 10, 2018 - Refactoring and the Repository Pattern | C# | ASP.NET Core
Refactoring code is less stressful if you do this
3 Ideas on Refactoring
BDD & TDD Coding Backend Demo, with Cucumber
Understanding the Repository Pattern in C#
ASP.NET Core Web API .NET 8 2024 - 11. Refactor To Repository
DevConf36 • Richard Klees: Refactoring with the Repository Pattern
3 Ideas on Refactoring by Martin Fowler
Repository Pattern With Entity Framework Core | Clean Architecture, .NET 6
Your Repository Pattern Probably Needs a Fix - Here’s How!
RailsConf 2019 - ActiveRecord, the Repository Pattern, and You by Craig Buchek
Generic Repository Pattern With EF Core - Why It Sucks
You're Using ORMs Wrong - Repository Pattern
Explore a Use Case for The Repository Pattern
How to Use Repository Pattern in Under 3 Minutes
Strategy Pattern, The Best Software Design Pattern
01 10 Repository Pattern
EFRT 1312: Refactor Developer home page to Repository Pattern
065 The Repository Pattern
Комментарии