Browse Source

Merge pull request #12627 from abpframework/auto-merge/rel-5-3/1071

Merge branch dev with rel-5.3
pull/12636/head
Enis Necipoglu 4 years ago
committed by GitHub
parent
commit
cc1692acb1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      docs/en/Microservice-Architecture.md
  2. 18
      docs/en/Samples/Index.md
  3. 2
      docs/en/Samples/Microservice-Demo.md
  4. 10
      docs/en/docs-nav.json
  5. 2
      docs/zh-Hans/Distributed-Event-Bus.md
  6. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs
  7. 2
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json
  8. 2
      modules/blogging/app/Volo.BloggingTestApp/package.json
  9. 2
      modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json
  10. 2
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json
  11. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json
  12. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json
  13. 24
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs
  14. 9
      modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs
  15. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json
  16. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json
  17. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json
  18. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json
  19. 2
      templates/app/angular/package.json
  20. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json
  21. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json
  22. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json
  23. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json
  24. 2
      templates/module/angular/package.json
  25. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json
  26. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json
  27. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json

6
docs/en/Microservice-Architecture.md

@ -23,8 +23,8 @@ One common advise to start a new solution is **always to start with a monolith**
However, developing such a well-modular application can be a problem since it is **hard to keep modules isolated** from each other as you would do it for microservices (see [Stefan Tilkov's article](https://martinfowler.com/articles/dont-start-monolith.html) about that). Microservice architecture naturally forces you to develop well isolated services, but in a modular monolithic application it's easy to tight couple modules to each other and design **weak module boundaries** and API contracts.
ABP can help you in that point by offerring a **microservice-compatible, strict module architecture** where your module is splitted into multiple layers/projects and developed in its own VS solution completely isolated and independent from other modules. Such a developed module is a natural microservice yet it can be easily plugged-in a monolithic application. See the [module development best practice guide](Best-Practices/Index.md) that offers a **microservice-first module design**. All [standard ABP modules](https://github.com/abpframework/abp/tree/master/modules) are developed based on this guide. So, you can use these modules by embedding into your monolithic solution or deploy them separately and use via remote APIs. They can share a single database or can have their own database based on your simple configuration.
ABP can help you in that point by offering a **microservice-compatible, strict module architecture** where your module is split into multiple layers/projects and developed in its own VS solution completely isolated and independent from other modules. Such a developed module is a natural microservice yet it can be easily plugged-in a monolithic application. See the [module development best practice guide](Best-Practices/Index.md) that offers a **microservice-first module design**. All [standard ABP modules](https://github.com/abpframework/abp/tree/master/modules) are developed based on this guide. So, you can use these modules by embedding into your monolithic solution or deploy them separately and use via remote APIs. They can share a single database or can have their own database based on your simple configuration.
## Microservice Demo Solution
## Microservice Demo Solution: eShopOnAbp
The [sample microservice solution](Samples/Microservice-Demo.md) demonstrates a complete microservice solution based on the ABP framework.
The [eShopOnAbp project](https://github.com/abpframework/eShopOnAbp) demonstrates a complete microservice solution based on the ABP framework.

18
docs/en/Samples/Index.md

@ -2,15 +2,19 @@
Here, a list of official samples built with the ABP Framework. Most of these samples are located under the [abpframework/abp-samples](https://github.com/abpframework/abp-samples) GitHub repository.
### Microservice Demo
## eShopOnAbp
A complete solution to demonstrate how to build systems based on the microservice architecture.
Reference microservice solution built with the ABP Framework and .NET.
* [The complete documentation for this sample](Microservice-Demo.md)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/MicroserviceDemo)
* [Microservice architecture document](../Microservice-Architecture.md)
* [Source code](https://github.com/abpframework/eShopOnAbp)
### Book Store
## EventHub
This is a reference application built with the ABP Framework. It implements the Domain Driven Design with multiple application layers.
* [Source code](https://github.com/abpframework/eventhub)
## Book Store
A simple CRUD application to show basic principles of developing an application with the ABP Framework. The same sample was implemented with different technologies:
@ -28,7 +32,7 @@ A simple CRUD application to show basic principles of developing an application
While there is no Razor Pages & MongoDB combination, you can check both documents to understand it since DB & UI selection don't effect each other.
### Other Samples
## Other Samples
* **Event Organizer**: A sample application to create events (meetups) and allow others to register the events. Developed using EF Core and Blazor UI.
* [Source code](https://github.com/abpframework/abp-samples/tree/master/EventOrganizer)

2
docs/en/Samples/Microservice-Demo.md

@ -1,5 +1,7 @@
# Microservice Demo Solution
> This solution is no longer maintained. See [the eShopOnAbp project](https://github.com/abpframework/eShopOnAbp) for the replacement solution.
*"Microservices are a software development technique—a variant of the **service-oriented architecture** (SOA) architectural style that structures an application as a collection of **loosely coupled services**. In a microservices architecture, services are **fine-grained** and the protocols are **lightweight**. The benefit of decomposing an application into different smaller services is that it improves **modularity**. This makes the application easier to understand, develop, test, and become more resilient to architecture erosion. It **parallelizes development** by enabling small autonomous teams to **develop, deploy and scale** their respective services independently. It also allows the architecture of an individual service to emerge through **continuous refactoring**. Microservices-based architectures enable **continuous delivery and deployment**."*
— [Wikipedia](https://en.wikipedia.org/wiki/Microservices)

10
docs/en/docs-nav.json

@ -1320,7 +1320,15 @@
"path": "Samples/Index.md"
},
{
"text": "Microservice Demo",
"text": "eShopOnAbp",
"path": "https://github.com/abpframework/eShopOnAbp"
},
{
"text": "EventHub",
"path": "https://github.com/abpframework/eventhub"
},
{
"text": "Microservice Demo (legacy)",
"path": "Samples/Microservice-Demo.md"
}
]

2
docs/zh-Hans/Distributed-Event-Bus.md

@ -84,7 +84,7 @@ namespace AbpDemo
#### 关于序列化的事件对象
事件传输对象**必须是可序列化**的,因为将其传输到程外时,它们将被序列化/反序列化为JSON或其他格式.
事件传输对象**必须是可序列化**的,因为将其传输到程外时,它们将被序列化/反序列化为JSON或其他格式.
避免循环引用,多态,私有setter,并提供默认(空)构造函数,如果你有其他的构造函数.(虽然某些序列化器可能会正常工作),就像DTO一样.

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs

@ -48,7 +48,7 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase<AngularSer
var apiName = args.ApiName ?? defaultValue;
var source = args.Source ?? defaultValue;
var target = args.Target ?? defaultValue;
var url = args.Url ?? "''";
var url = args.Url ?? defaultValue;
var commandBuilder = new StringBuilder("npx ng g @abp/ng.schematics:" + schematicsCommandName);
if (module != null)

2
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json

@ -7,4 +7,4 @@
"highlight.js": "^9.13.1"
},
"devDependencies": {}
}
}

2
modules/blogging/app/Volo.BloggingTestApp/package.json

@ -6,4 +6,4 @@
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1",
"@abp/blogging": "^5.3.0-rc.1"
}
}
}

2
modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json

@ -6,4 +6,4 @@
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1",
"@abp/cms-kit": "5.3.0-rc.1"
}
}
}

24
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs

@ -7,7 +7,6 @@ using System.Threading.Tasks;
using MongoDB.Driver;
using MongoDB.Driver.Linq;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories.MongoDB;
using Volo.Abp.MongoDB;
using Volo.CmsKit.Comments;
@ -23,25 +22,16 @@ public class MongoCommentRepository : MongoDbRepository<ICmsKitMongoDbContext, C
public virtual async Task<CommentWithAuthorQueryResultItem> GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default)
{
var query = from comment in (await GetMongoQueryableAsync(cancellationToken))
join user in (await GetDbContextAsync(cancellationToken)).CmsUsers on comment.CreatorId equals user.Id
where id == comment.Id
select new {
Comment = comment,
Author = user
};
var commentWithAuthor = await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken));
if (commentWithAuthor == null)
{
throw new EntityNotFoundException(typeof(Comment), id);
}
var comment = await GetAsync(id);
var author = await (await GetDbContextAsync())
.CmsUsers
.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == comment.CreatorId, GetCancellationToken(cancellationToken));
return new CommentWithAuthorQueryResultItem()
{
Comment = commentWithAuthor.Comment,
Author = commentWithAuthor.Author
Comment = comment,
Author = author
};
}

9
modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs

@ -54,6 +54,15 @@ public abstract class CommentRepository_Tests<TStartupModule> : CmsKitTestBase<T
list.Any(x => x.Author == null).ShouldBeFalse();
}
[Fact]
public async Task GetWithAuthorAsync()
{
var commentDetail = await _commentRepository.GetWithAuthorAsync(_cmsKitTestData.CommentWithChildId);
commentDetail.ShouldNotBeNull();
commentDetail.Author.ShouldNotBeNull();
}
[Fact]
public async Task DeleteWithRepliesAsync()
{

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "~5.3.0-rc.1"
}
}
}

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "~5.3.0-rc.1"
}
}
}

2
templates/app/angular/package.json

@ -58,4 +58,4 @@
"ng-packagr": "^13.1.2",
"typescript": "~4.5.4"
}
}
}

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/module/angular/package.json

@ -62,4 +62,4 @@
"symlink-manager": "^1.5.0",
"typescript": "~4.5.4"
}
}
}

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json

@ -5,4 +5,4 @@
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1"
}
}
}

Loading…
Cancel
Save