-
Notifications
You must be signed in to change notification settings - Fork 6k
eBook 2.1 updates #4905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eBook 2.1 updates #4905
Conversation
Migrating content from microservices book Cleaning up some formatting.
Also fixing formatting and a couple of content errors.
Updating functional testing with 2.1 approach
|
Ready for review @CESARDELATORRE |
|
Maira, can you review/merge this PR when possible? |
|
Sure! I missed @ardalis last comment here. I'm working on your PR now. |
|
WIP is still on here. Let me close and reopen to see if it helps. |
|
Interesting. WIP bot is stuck. Have you ever seen this happen @terrajobst? @ardalis I'll start the review now but please check the warnings from the last build report as well. |
I saw this once before when one of the earlier commit messages had "WIP" in the message. I think a squash (or other interactive rebase) to edit the commit message would fix it. Also, if that's the root cause, we should file a bug with that bot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ardalis. It looks good overall but I didn't get through it all yet. But I wanted to give you some feedback already. I also sent you an e-mail - please check.
| description: .NET Microservices Architecture for Containerized .NET Applications | Designing the infrastructure persistence layer | ||
| author: CESARDELATORRE | ||
| ms.author: wiwagn | ||
| ms.date: 11/08/2017 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update ms.date
| The Specification pattern (its full name would be Query-specification pattern) is a Domain-Driven Design pattern designed as the place where you can put the definition of a query with optional sorting and paging logic. | ||
|
|
||
| The Specification pattern defines a query in an object. For example, in order to encapsulate a paged query that searches for some products, you can create a PagedProduct specification that takes the necessary input parameters (pageNumber, pageSize, filter, etc.). Then, within any Repository method (usually a List() overload) it would accept an ISpecification and run the expected query based on that specification. | ||
| The Specification pattern defines a query in an object. For example, in order to encapsulate a paged query that searches for some products, you can create a PagedProduct specification that takes the necessary input parameters (pageNumber, pageSize, filter, etc.). Then, within any Repository method (usually a List() overload) it would accept an `ISpecification` and run the expected query based on that specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need specification uppercase here (e.g. https://en.wikipedia.org/wiki/Specification_pattern - ignore the URL, look at the content 😄)
| // https://github.com/dotnet-architecture/eShopOnWeb | ||
| public interface ISpecification<T> | ||
| { | ||
| Expression<Func<T, bool>> Criteria { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 122, you haven't updated that EF Core 2.1 as well?
| [http://deviq.com/repository-pattern/](http://deviq.com/repository-pattern/) | ||
|
|
||
| * **Edward Hieatt and Rob Mee. Repository pattern.** | ||
| [_http://martinfowler.com/eaaCatalog/repository.html_](http://martinfowler.com/eaaCatalog/repository.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use https link
|
|
||
| # Designing the infrastructure persistence layer | ||
|
|
||
| Data persistence components provide access to the data hosted within the boundaries of a microservice (that is, a microservice’s database). They contain the actual implementation of components such as repositories and [Unit of Work](https://martinfowler.com/eaaCatalog/unitOfWork.html) classes, like custom EF DBContexts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add alt text to the images - it's something that wasn't done earlier and is important for accessibility
line 23 - last sentence is hard to read. Can you improve that?
line 47 - GitHub struggles to show formatting with incomplete code so it's hard to spot after that code block if something is using the wrong formatting or not. Can you add ... and closing braces so we can see the content better while diffing?
|  | ||
|
|
||
| You can include multiple components/libraries or internal layers within each container, as illustrated in Figure 5-X. But, following the container principal of *"a container does one thing, and does it in one process*", the monolithic pattern might be a conflict. | ||
| You can include multiple components/libraries or internal layers within each container, as illustrated in Figure 5-X. But, following the container principal of _"a container does one thing, and does it in one process_", the monolithic pattern might be a conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mention several times figure 5-X but there doesn't seem to be such figure
| > - Interfaces | ||
| > - Services | ||
| > - DTOs | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any special reason to add these lists inside quotation marks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, someone converted my Word doc to Markdown and did that.
| This guide provides end-to-end guidance on building monolithic web applications using ASP.NET Core and Azure. | ||
|
|
||
| This guide is complementary to the "*Architecting and Developing Containerized and Microservice-based Applications with .NET*" which focuses more on Docker, Microservices, and Deployment of Containers to host enterprise applications. | ||
| This guide is complementary to the "_Architecting and Developing Containerized and Microservice-based Applications with .NET_" which focuses more on Docker, Microservices, and Deployment of Containers to host enterprise applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add link to that book here? the one on docs I mean
| You should name your tests in a consistent fashion, with names that indicate what each test does. One approach I've had great success with is to name test classes according to the class and method they are testing. This results in many small test classes, but it makes it extremely clear what each test is responsible for. With the test class name set up to identify the class and method to be tested, the test method name can be used to specify the behavior being tested. This should include the expected behavior and any inputs or assumptions that should yield this behavior. Some example test names: | ||
|
|
||
| - CatalogControllerGetImage.CallsImageServiceWithId | ||
| * CatalogControllerGetImage.CallsImageServiceWithId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codefence these
| > \_- Anonymous- | ||
| ## Summary | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 36... same issue here with incomplete code samples
AFAIK the WIP bot also looks at commit messages. There is still one commit that includes "WIP" in it. Try to reword that commit. |
It's currently by-design but it's discussed here. |
|
Read that thread - seems odd that some ancient commit that happened to be WIP will then make the entire PR forever be considered WIP. That's not a great design. Having to rewrite history on older commits like that is someone nerve-wracking, too. I can do it if it that's what's required here, though. Please confirm that's what I should do and (if you have some) point me to known good instructions for doing so. I think this is the (only) offending commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more comments after my quick fixes via GH UI
| This’ll probably be my biggest feedback. I’m really not a fan of repositories, mainly because they hide the important details of the underlying persistence mechanism. It’s why I go for MediatR for commands, too. I can use the full power of the persistence layer, and push all that domain behavior into my aggregate roots. I don’t usually want to mock my repositories – I still need to have that integration test with the real thing. Going CQRS meant that we didn’t really have a need for repositories any more. | ||
|
|
||
| We find repositories useful, but we acknowledge that they are not critical for your DDD, in the way that the Aggregate pattern and rich domain model are. Therefore, use the Repository pattern or not, as you see fit. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks! So I'll change to not use we then.
| > - Services | ||
| > - DTOs | ||
| ### Application Core types | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some introductory sentences before each list?
| } | ||
| ``` | ||
|
|
||
| Routes can be specified on [HttpGet] and similar attributes, avoiding the need to add separate [Route\] attributes. Attribute routes can also use tokens to reduce the need to repeat controller or action names, as shown below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 46 - should that \ really be there?
|
|
||
| In addition to serving pages and responding to requests for data via web APIs, ASP.NET Core apps can communicate directly with connected clients. This outbound communication can use a variety of transport technologies, the most common being WebSockets. ASP.NET Core SignalR is a library that makes it simple to add real-time server-to-client communication functionality to your applications. SignalR supports a variety of transport technologies, including WebSockets, and abstracts away many of the implementation details from the developer. | ||
|
|
||
| ASP.NET Core SignalR is currently under development, and will be available in the next release of ASP.NET Core. However, other [open source WebSockets libraries](https://github.com/radu-matei/websocket-manager) are currently available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not up-to-date given the SignalR release in 2.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
| --- | ||
| title: Choose between traditional web apps and single page apps | ||
| description: Architect modern web applications with ASP.NET Core and Microsoft Azure | ||
| description: Architect Modern Web Applications with ASP.NET Core and Azure | Choose Between Traditional Web App or SPA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sentence, don't include the name of the book
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| - Advanced diagnostics | ||
|
|
||
| *Learn more about Azure deployment options in Chapter 10.* | ||
| _Learn more about Azure deployment options in Chapter 10._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
@ardalis I've left a few last comments but it's looking good. Take a look at my comments and questions from earlier today and just now. |
|
All good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a few things here and there that I'd like to see addressed overall in these e-books to help with SEO (description should be modified for all articles, image file names should be friendly) and accessibility (all images should have alt text) but I'm going to approve this one. Thanks for your work on this. It looks great!
Should we publish ASAP or do you have a specific day in mind of when the update should be published?
|
I'm fine to publish immediately. Maybe check with @CESARDELATORRE |
READY TO MERGE
This is a PR with the 2.1 updates to the eShopOnWeb eBook.