ABP的新舊版本選型

新版本  (abp vnext )

https://www.abp.io/web

ABP是一個開源的應用程序框架ASP.NET基於核心的web應用程序開發,也支持開發其餘類型的應用程序。swift

對舊版本的重寫,基於ASP.NET CORE,主要定位微服務;app

//Base class for CRUD services
public class PeopleAppService
    : CrudAppService<Person, PersonDto, Guid>,
      IPeopleAppService
{
    //Generic repository
    public PeopleAppService(
        IRepository<Person, Guid> repository
    ) : base(repository)
    {
    }
}

  

 

舊版本 (AspNet Boilerplate)   

https://aspnetboilerplate.com/框架

ASP.NET樣板(Boilerplate,ABP)是一個開源的、有良好文檔記錄的應用程序框架。它不單單是一個框架,它還提供了一個基於領域驅動設計的強大的體系結構模型,並考慮了全部的最佳實踐。async

ABP與最新的ASP.NETCore和EF Core,但也支持ASP.NETMVC5.x和EF6.x。微服務

基於Core和framework ;穩定和長期維護;ui

public class TaskAppService : ApplicationService, ITaskAppService
{
    private readonly IRepository<Task> _taskRepository;

    public TaskAppService(IRepository<Task> taskRepository)
    {
        _taskRepository = taskRepository;
    }

    [AbpAuthorize(MyPermissions.UpdateTasks)]
    public async Task UpdateTask(UpdateTaskInput input)
    {
        Logger.Info("Updating a task for input: " + input);

        var task = await _taskRepository.FirstOrDefaultAsync(input.TaskId);
        if (task == null)
        {
            throw new UserFriendlyException(L("CouldNotFindTheTaskMessage"));
        }

        ObjectMapper.MapTo(input, task);
    }
}

  

 

選型spa

若是已經使用舊版本,並且沒有微服務需求,能夠繼續使用;設計

若是是全新的項目,建議直接使用新版的,畢竟新版的纔是將來的趨勢;code

相關文章
相關標籤/搜索