Are you over 18 and want to see adult content?
More Annotations
Stylowa Łazienka – Wszystko dla Twojej Łazienki
Are you over 18 and want to see adult content?
Realm of History | The Future Lies In The Past
Are you over 18 and want to see adult content?
Ihr Museum in Nürnberg | GERMANISCHES NATIONALMUSEUM
Are you over 18 and want to see adult content?
leballonrond.fr :: Tout sur le football
Are you over 18 and want to see adult content?
Pueblo Ancestral Misak | payan
Are you over 18 and want to see adult content?
SMAKK STUDIOS | Brooklyn Creative Agency | Branding, Web Design, Ecommerce and Packaging | Made in NYC
Are you over 18 and want to see adult content?
Sommerhus i Danmark - Sommerhuse og ferielejligheder til leje - SommerhuseDanmark.dk
Are you over 18 and want to see adult content?
SoundSpectrum - artistic music visuals for your media player
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of mediation-eau.fr
Are you over 18 and want to see adult content?
A complete backup of klasztorjableczna.pl
Are you over 18 and want to see adult content?
A complete backup of generalbytes.com
Are you over 18 and want to see adult content?
A complete backup of monmagasingeneral.com
Are you over 18 and want to see adult content?
A complete backup of jacobspillow.org
Are you over 18 and want to see adult content?
A complete backup of milehidistilling.com
Are you over 18 and want to see adult content?
Text
8, 2020.
VALUE OBJECT: A BETTER IMPLEMENTATION · ENTERPRISE Value Object: a better implementation. I believe you know what a value object is. Here’s a thorough article about it and what differentiates it from an Entity if you need a refresher: Entity vs Value Object: the ultimate list of differences. In short, valueobjects
HOW TO UNIT TEST AN ABSTRACT CLASS · ENTERPRISE CRAFTSMANSHIP There are two ways to unit test a class hierarchy and an abstract class: Using a test class per each production class. Using a test class per concrete production class. Choose the test class per concrete production class approach; don’t unit test abstract classes directly. Abstract classes are implementation details, similar toprivate methods.
SHORT-TERM VS LONG-TERM PERSPECTIVE IN SOFTWARE Note that the short-term perspective is not necessarily harmful per se. It only becomes harmful when it contradicts your long-term plans. When the technical debt is a calculated, prudent choice, the short-term gains you get out of it align well with your long-term goals. There’s no use in a well-designed software in the long run iffailing to
VALIDATION AND DDD · ENTERPRISE CRAFTSMANSHIP There are several common ways of enforcing these business rules. 2. Solution 1: IsValid method. The first method would be to assign an address and time to an order and make it validate itself. The validation method should then return any errors it encountered back tothe caller.
REPRESENTING A COLLECTION AS A VALUE OBJECT · ENTERPRISE Summary. Having a collection of items represented as a Value Object is possible. To do that, you need to: Store the whole collection in a single database table field. Come up with a serialization mechanism which would convert the collection from and to a string in order to save it in that field. ERROR HANDLING: EXCEPTION OR RESULT? · ENTERPRISE The first one is exactly the type of errors the Result class is intended for. If you know how to process a failure, let alone expect that failure to happen, there’s no reason to use exceptions. It’s much better to be explicit about your intent and represent the result of the operation as a value so that you can handle it later the sameway
HOW TO KNOW IF YOUR DOMAIN MODEL IS PROPERLY ISOLATED Summary. To see if your domain model isn’t influenced by the external world, you need to bring honesty to all methods inside your entities and value objects. Apply the haskellifying technique: if any method works with any kind of IO (database, file system, etc.) state it in the method’s return type. Methods that work on top of itbecome
DON'T USE IDS IN YOUR DOMAIN ENTITIES! · ENTERPRISE Solution. You don’t need Ids to operate your domain objects. In most cases, all you need is define equality members in the base entity class so that you could rewrite your code like this: Also, Ids in domain entities often indicate a hidden abstraction: In this example, Ids can be encapsulated in a separate entity: Such approach allows to REST API RESPONSE CODES: 400 VS 500 · ENTERPRISE CRAFTSMANSHIP Today, I’d like to talk about the (sometimes subtle) difference between 4xx and 5xx response codes when programming a RESTful API. I’ll try to show when to return what code (400 or 500) and introduce a simple way to implement this logic on the server side. ENTERPRISE CRAFTSMANSHIPBLOGBOOKTDD COURSEPLURALSIGHT COURSESABOUTARCHIVES Always-Valid Domain Model. I’m working on a new Pluralsight course on the topic of validation and DDD, with the help of the FluentValidation library and .NET data annotations (attributes). So expect a couple of posts about validation in the near future. December8, 2020.
VALUE OBJECT: A BETTER IMPLEMENTATION · ENTERPRISE Value Object: a better implementation. I believe you know what a value object is. Here’s a thorough article about it and what differentiates it from an Entity if you need a refresher: Entity vs Value Object: the ultimate list of differences. In short, valueobjects
HOW TO UNIT TEST AN ABSTRACT CLASS · ENTERPRISE CRAFTSMANSHIP There are two ways to unit test a class hierarchy and an abstract class: Using a test class per each production class. Using a test class per concrete production class. Choose the test class per concrete production class approach; don’t unit test abstract classes directly. Abstract classes are implementation details, similar toprivate methods.
SHORT-TERM VS LONG-TERM PERSPECTIVE IN SOFTWARE Note that the short-term perspective is not necessarily harmful per se. It only becomes harmful when it contradicts your long-term plans. When the technical debt is a calculated, prudent choice, the short-term gains you get out of it align well with your long-term goals. There’s no use in a well-designed software in the long run iffailing to
VALIDATION AND DDD · ENTERPRISE CRAFTSMANSHIP There are several common ways of enforcing these business rules. 2. Solution 1: IsValid method. The first method would be to assign an address and time to an order and make it validate itself. The validation method should then return any errors it encountered back tothe caller.
REPRESENTING A COLLECTION AS A VALUE OBJECT · ENTERPRISE Summary. Having a collection of items represented as a Value Object is possible. To do that, you need to: Store the whole collection in a single database table field. Come up with a serialization mechanism which would convert the collection from and to a string in order to save it in that field. ERROR HANDLING: EXCEPTION OR RESULT? · ENTERPRISE The first one is exactly the type of errors the Result class is intended for. If you know how to process a failure, let alone expect that failure to happen, there’s no reason to use exceptions. It’s much better to be explicit about your intent and represent the result of the operation as a value so that you can handle it later the sameway
HOW TO KNOW IF YOUR DOMAIN MODEL IS PROPERLY ISOLATED Summary. To see if your domain model isn’t influenced by the external world, you need to bring honesty to all methods inside your entities and value objects. Apply the haskellifying technique: if any method works with any kind of IO (database, file system, etc.) state it in the method’s return type. Methods that work on top of itbecome
DON'T USE IDS IN YOUR DOMAIN ENTITIES! · ENTERPRISE Solution. You don’t need Ids to operate your domain objects. In most cases, all you need is define equality members in the base entity class so that you could rewrite your code like this: Also, Ids in domain entities often indicate a hidden abstraction: In this example, Ids can be encapsulated in a separate entity: Such approach allows to REST API RESPONSE CODES: 400 VS 500 · ENTERPRISE CRAFTSMANSHIP Today, I’d like to talk about the (sometimes subtle) difference between 4xx and 5xx response codes when programming a RESTful API. I’ll try to show when to return what code (400 or 500) and introduce a simple way to implement this logic on the server side. POSTS · ENTERPRISE CRAFTSMANSHIP Always-Valid Domain Model. I was re-reading some old articles about always-valid domain models, including the response to it from Greg Young. It may seem strange to write a response to an 11 years old article, but December 8, 2020. ERROR HANDLING: EXCEPTION OR RESULT? · ENTERPRISE The first one is exactly the type of errors the Result class is intended for. If you know how to process a failure, let alone expect that failure to happen, there’s no reason to use exceptions. It’s much better to be explicit about your intent and represent the result of the operation as a value so that you can handle it later the sameway
ALWAYS-VALID DOMAIN MODEL · ENTERPRISE CRAFTSMANSHIP Always-Valid Domain Model. January 12, 2021. I’m working on a new Pluralsight course on the topic of validation and DDD, with the help of the FluentValidation library and .NET data annotations (attributes). So expect a couple of posts about validation in the nearfuture.
DEFENSIVE PROGRAMMING: THE GOOD, THE BAD AND THE UGLY Defensive programming stands for the use of guard statements and assertions in your code base (actually, the definition of defensive programming is inconsistent across different sources, but I’ll stick to this one). This technique is designed to ensure code correctness and reduce the number of bugs. Pre-conditions are one of the mostwidely
ENTITY VS VALUE OBJECT: THE ULTIMATE LIST OF DIFFERENCES The topic described in this article is a part of my Domain-Driven Design in Practice Pluralsight course. I wrote about entities and value objects some time ago. In this post, I’d like to talk about differences between Entity vs Value Object in more detail. I know, the topic isn’t new and there are a lot of articles on the Internet discussing it already. DOMAIN SERVICES VS APPLICATION SERVICES · ENTERPRISE The main difference between them is that domain services hold domain logic whereas application services don’t. As we discussed in a previous post, domain logic is everything that is related to business decisions. Domain services, therefore, participate in the decision-making process the same way entities and value objects do. DOMAIN MODEL ISOLATION · ENTERPRISE CRAFTSMANSHIP The notion of domain model isolation is very similar to what functional architecture proposes: you make the code that comprises the core part of your application pure while pushing the side effects and the work with external dependencies (such as the database) to the edges of a business operation, either to the beginning or to the end of it. The immutable core in that sense is the domain DOMAIN-CENTRIC VS DATA-CENTRIC APPROACHES TO SOFTWARE In this post, I’d like to make a comparison of two approaches that prevail in the world of (mostly enterprise) software development: domain-centric and data-centric. If you read my last post (or any other post, quite frankly), you might have noticed I personally gravitate towards the domain-centric approach. Although this article is intended to be an impartial one, keep in mind that my bias SINGLETON VS DEPENDENCY INJECTION · ENTERPRISE CRAFTSMANSHIP The following heuristic will help you to determine which pattern to use: If a dependency is ambient, meaning that it is used by many classes and/or multiple layers, use Singleton. Otherwise, inject it to the dependent classes using the Dependency Injection pattern. ← Defensive programming: the good, the bad and the ugly. REST API RESPONSE CODES: 400 VS 500 · ENTERPRISE CRAFTSMANSHIP Today, I’d like to talk about the (sometimes subtle) difference between 4xx and 5xx response codes when programming a RESTful API. I’ll try to show when to return what code (400 or 500) and introduce a simple way to implement this logic on the server side. ENTERPRISE CRAFTSMANSHIP SOFTWARE DEVELOPMENT PRINCIPLES AND BEST PRACTICES Menu Skip to content* Home
* Online Training
* Get in Touch
I’M WRITING A BOOK! TL;DR: I’m writing a book called UNIT TESTING: PRINCIPLES, PATTERNS AND PRACTICES. Link to the book: https://www.manning.com/books/unit-testing. Click
here to get a 40%
DISCOUNT: https://enterprisecraftsmanship.com/book-discount/ Continue reading → MERGING DOMAIN EVENTS BEFORE DISPATCHING This post describes a common problem: how to deal with multiple domain events if raising of one of them must negate the others. Merging domain events before dispatching → CQRS AND EXCEPTION HANDLING This is the last article in the series of articles designed to supplement my CQRS in Practicecourse. In it,
I’d like to discuss one particular aspect of exception handling relevant to CQRS and the decorator pattern. Continue reading → WHEN TO VALIDATE COMMANDS IN CQRS? I’m continuing the series about CQRS to supplement my recent CQRS inPractice
course.
There’s a question that I didn’t cover in the course and that was raised at least twice since then: when to validate commands in CQRS? When to validate commands in CQRS? → ARE CQRS COMMANDS PART OF THE DOMAIN MODEL? I published an online course about CQRSa couple
months ago, and since then I realized that there are some topics I didn’t put enough emphasize on in that course, or didn’t cover at all. In the next several blog posts, I’m going to fill this gap. This article is about CQRS commands and whether they are part of thedomain model.
Are CQRS commands part of the domain model? → HIERARCHY OF VALUE OBJECTS This article is a response to a reader’s question. The question posed an interesting problem that I think will be interesting to awider audience.
Hierarchy of value objects → CQRS VS SPECIFICATION PATTERN This is an article about how two DDD patterns contradict each other. More about CQRS vs Specification pattern → NEW ONLINE COURSE: CQRS IN PRACTICE My new online training course CQRS in Practicewent live.
Continue reading → IN DEFENSE OF LAZY LOADING In this article, we’ll talk about ORMs and lazy loading. In Defense of Lazy Loading → ENTITY IDENTITY VS DATABASE PRIMARY KEY Today, we’ll discuss the difference between identity in the DDD sense and database primary keys. We often mix the two together but are they really the same thing? More about Entity Identity vs Database Primary Key→POST NAVIGATION
← Older posts
CONTACTS:
UNIT TESTING BOOK
Click here to get
a 40% DISCOUNT
NEWSLETTER
MOST POPULAR ARTICLES * → Domain services vs Application services * → Entity vs Value Object: the ultimate list of differences * → Optimistic locking and automatic retry * → 3 misuses of ?. operator in C# 6 * → DTO vs Value Object vs POCO * → Database versioning best practices * → Specification pattern: C# implementation * → Functional C#: Handling failures, input errors * → Singleton vs Dependency Injection * → Unit testing private methods Domain-Driven Design in Practice Applying Functional Principles in C# Database Delivery Best Practices Building a Pragmatic Unit Test Suite Specification Pattern in C# Refactoring from Anemic Domain Model Domain-Driven Design: Working with Legacy ProjectsCQRS in Practice
RECENT POSTS
* I’m writing a book! * Merging domain events before dispatching * CQRS and exception handling * When to validate commands in CQRS? * Are CQRS commands part of the domain model?ARCHIVES
* ▼2019 (5)
* ►July (1)
* ►June (1)
* ►April (1)
* ►February (1)
* ►January (1)
* ►2018 (16)
* ►December (1)
* ►November (1)
* ►October (1)
* ►September (1)
* ►July (1)
* ►June (1)
* ►May (1)
* ►April (2)
* ►March (3)
* ►February (2)
* ►January (2)
* ►2017 (29)
* ►December (2)
* ►November (2)
* ►October (2)
* ►September (1)
* ►August (3)
* ►July (4)
* ►June (4)
* ►May (3)
* ►April (2)
* ►March (3)
* ►February (1)
* ►January (2)
* ►2016 (45)
* ►December (2)
* ►November (3)
* ►October (4)
* ►September (5)
* ►August (3)
* ►July (3)
* ►June (6)
* ►May (3)
* ►April (4)
* ►March (4)
* ►February (5)
* ►January (3)
* ►2015 (51)
* ►December (3)
* ►November (4)
* ►October (4)
* ►September (6)
* ►August (4)
* ►July (4)
* ►June (6)
* ►May (3)
* ►April (4)
* ►March (5)
* ►February (4)
* ►January (4)
* ►2014 (9)
* ►December (4)
* ►November (5)
*
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0