TDD & DDD from the Ground Up Live Coding by Chris Simon

preview_player
Показать описание
Are you interested in using Domain-Driven Design (DDD) to create maintainable and scalable software, but not sure how to get started? Or perhaps you've heard that DDD is only suitable for complex domains - and when starting out, you're not sure if your project will need it?

Join me for a live coding demonstration that will show you how to apply Test-Driven Development (TDD) from the very beginning of a project so you can bring DDD in when you need it.

We'll start with the simplest possible implementation - a basic CRUD system to help a university handle student enrolments. We'll gradually add more complex requirements, such as the need to ensure courses don't become over-enrolled - which will prompt us to do some code-smell refactoring, strangely enough arriving at things that start to look like the DDD tactical patterns of repositories, aggregates and domain services.

In implementing these requirements, inspiration will strike! What if the model were changed - what if we allowed all enrolments and then allocated resources to the most popular courses as required so we never have to prevent a student from enrolling? We'll now see how the TDD tests and the neatly refactored domain models make it much easier to embark on this dramatic change - in other words, how much more maintainable our DDD codebase has become.
Рекомендации по теме
Комментарии
Автор

Chris is an excellent speaker and this talk has been featured in the last issue of Tech Talks Weekly newsletter 🎉 Congrats!

TechTalksWeekly
Автор

Great talk, this talk is a excellent as a crash course for TDD.

devenwen
Автор

Im glad tdd and ddd are still being practiced. I was worried there for a few years that it would be forgotten for newer shiny toys. It is solid fundamental knowledge IMHO. Cheers

Eddie-oznq
Автор

2:07
3:30 meaning of unit in unit test
3:38
3:48 code demo
4:03 start with a blank application

ruixue
Автор

Currently reading a book titled Implementing Domain-Driven Design by Vaughn Vernon and this talk has just brought some of the concepts I have read in the book so far to life. Thank you for this wealth of knowledge shared

mrowox
Автор

Really good and excelent talk. In particular explaining in very simple and easy way how event sourcing is working etc.

khmarbaise
Автор

Great video. Not only the how of starting with TDD in a conceivable situation, but also the why of not only TDD, and the next step, but also the size of the steps.

sauliustb
Автор

I liked TDD part of this talk but I do not know if it's only me but I have some doubts about the way how DDD was presented here. Some of the presented building blocks and patterns are quite odd and do not follow clean code rules IMO. Or maybe it was just simplified for sake of live presentation 🤔

Anotender
Автор

Nice stuff. Learnt first time breaking things makes more sense rather than doing in one go, as you rightly expressed about balance between testing vs implementation. I have one question, . how do you see REST (Resource) + DTO vs Domain... how they go or should go from your view ?

sagarrout
Автор

Before DDD there must have been an assembler code only. At least this conclusion can be drawn from DDD fans. Talking with business stakehilders or making a domain model is not DDD. We used to do it before, you know.

besides that, good talk. I could only argue that its more of an integration test than unit test. which is good for small apps. for bigger system i would separate module tests from integration tests.

seNick
Автор

Nice presentation. By the way, shouldn't concurrency be handled by use of proper SQL transaction isolation level (I think Repeatable Read is what you need in that case)? And then if transaction commit failed because of the isolation level (meaning that some of the values you've read has been modified concurrently), you just execute your controller method (or a method in the enrollment service if all of the logic is there) once again from scratch.

IlyaDenisov
Автор

I liked the demo but I can't help but feel that it's too much on the happy path which does not help show how TDD helps you course correct immediately when something doesn't feel right.

PaulSebastianManole
Автор

How contextive is different to just comments or javadoc comments? Looks like the same goal can be achieved here.

maksimmuruev
Автор

26:22 Shouldn't the calls to get the room and including the course to the catalog be in a CourseService class to better implement the Ports and Adapters architecture? That way you're only passing the room ID string and course name to the CourseService class. Then the Controller which is the Adapter can be easily replaced with something else for example an Adapter class which get's a message from a queue. This new Adapter would then just call the CourseService class passing it the room ID and course ID? The CourseService class would throw and exception if there's a problem and the REST controller would convert that into a HTTP 400 Bad Request return code. Also the response should ideally have a body with the error message.

samfromuk
Автор

Can you send me the link address of the project? thks

张志-gu
Автор

Intellij IDEA really screams at me when I pass optional as method argument.

IvanRandomDude
Автор

I like the demo, but i have some questions.

Why in your domain not appear Enrolment?

And why the class Enrolment has studentId and courseId, and not has a instance of Student and a instance of Course?

Thanks!!

cobrab
Автор

TDD is amazing! It only takes 3x as long to get out some working code! It gets 3x as expensive, stakeholders start complaining, but let's do full TDD anyway!

CheeseStickzZ
Автор

It's sad that he started from the UI

dileepa_ra
Автор

Miller Brian Johnson Melissa Wilson Michelle

harryskennedy
visit shbcf.ru