ASP.NET Boilerplate is designed to help us to develop applications using best practices without repeating ourselves. DRY - Don't Repeat Yourself! is the key idea behind ASP.NET Boilerplate.

ASP.NET样板的设计是为了帮助我们使用最佳实践不重复自己开发的应用。不要重复你自己!在ASP.NET的样板的核心理念。

All applications have some common problems and need to some common structures. ASP.NET Boilerplate is proper from small applications to large enterprise web applications to accomplish fast startups and maintanable code bases.

所有应用程序都有一些常见的问题,需要一些常见的结构。ASP.NET的样板是适当的从小型应用到大型企业的Web应用程序,实现快速启动和可维护的代码库。

Considerations(注意事项)

Here, a list of concepts those are in mind while developing ASP.NET Boilerplate.

在这里,很多重要的概念需要注意在开发ASP.NET样板的时候。

Modularity(模块化)

It should be easy to share entities, repositories, services and views between web applications. They should be packaged into modules and can be easily distributed (preferred as public/private nuget packages). Modules may depend on and use other modules. We should be able to extend models in a module for our application needs.

Modularity provides us "code re-usability" (DRY!). For example, we may develop a module that contains user management, role management, login page, error pages... Then all of these can be shared by our different applications.

在Web应用程序之间共享实体、存储库、服务和视图应该是很容易的。他们应该被封装成模块,可以很容易地分布(首选公共/私人NuGet包)。模块可以依赖和使用其他模块。我们应该能够在模块中扩展模型以满足应用程序的需要。

模块化为我们提供了“代码重用性”例如,我们可以开发一个模块,其中包含用户管理、角色管理、登录页面、错误页面…然后所有这些都可以由不同的应用程序共享。

Best practices

An application should be developed by considering best practices in software development. Using dependency injection is one of the most important subjects in this area. Should use AOP (Aspect Oriented Programming) where it's needed and possible, especially for cross-cutting concerns. It should correctly use architectural patterns such as MVC and MVVM. Also, it should follow the SOLID principles in whole application.

应该考虑软件开发中的最佳实践来开发应用程序。使用依赖注入是该领域最重要的课题之一。应该在需要和可能的情况下使用AOP(面向方面编程),特别是横切关注点。应正确使用建筑模式如MVC,MVVM。同时,应遵循整体应用的SOLID原则。

Following best practices makes our code-base more understandable and extensible. It also prevents us to fall in common mistakes those are experienced before by other people.

遵循最佳实践使我们的代码库更易于理解和可扩展。它也能防止我们犯别人以前所犯的错误。

Scalable code base(可扩展的代码库)

Architecture of an application should provide (even enforce) a way of keeping a maintainable code base. Layering and modularity are main techniques to accomplish that. Also, following best practices is important. Otherwise the application gets complicated when it grows. We know, there are many applications are re-written from zero just since it's too hard to maintain the code base (DRY!).

应用程序的体系结构应该提供(甚至强制)保持可维护代码基的方法。分层和模块化是实现这一目标的主要技术。此外,遵循最佳实践是很重要的。否则,应用程序会变得复杂。我们知道,有很多应用程序是从零重新编写的,因为它太难维护代码库。

Libraries & frameworks(库和框架)

An application should use and combine useful libraries & frameworks to accomplish well-known tasks. Should not try to re-invent the whell if an existing tool meets it's requirements. It should concentrate to it's own job (to it's own business logic) as much as possible. For example, it may use EntityFramework or NHibernate for Object-Relational Mapping. May use AngularJs or DurandalJs as Single-Page Application framework.

Like or don't like it, today we need to learn many different tools to build an application. Even it's more complicated for client side. There are much more libraries (thousands of jQuery plug-ins for instance) and frameworks there. So, we should carefully choice libraries and adapt to our application.

ASP.NET Boilerplates composes and combines best tools for you while it preventing you from using your own favourite tools.

应用程序应该使用和组合有用的库和框架来完成众所周知的任务。不应试图重新发明车轮如果现有的工具,满足它的要求。它应该尽可能地专注于自己的工作(它自己的业务逻辑)。例如,它可能使用NHibernate EntityFramework或对象关系映射。可以使用AngularJS或durandaljs单页面应用程序框架。

喜欢或不喜欢,今天我们需要学习许多不同的工具来构建一个应用程序。即使是客户端也比较复杂。有更多的库(例如,数以千计的jQuery插件)和框架。因此,我们应该谨慎选择库并适应我们的应用。

ASP.NET Boilerplates撰写的,结合了最佳的工具为你而阻止你使用你自己喜欢的工具。

Cross-cutting concerns(横切关注点)

Authorization, validationerror handlinglogging, caching... are common stuffs all applications implement in a some level. These codes should be generic and shared by different applications. It also should be seperated from business logic code and should be automated as much as possible. This allows us to more focus on our application specific business logic code and prevents us to re-think same stuff again and again (DRY!).

错误处理、验证、授权、日志、缓存,都是在同一个水平上所有应用实现的普通的东西。这些代码应该是通用的,并且由不同的应用程序共享。它也应该与业务逻辑代码分离,并尽可能地自动化。这使我们能够更专注于特定于应用程序的业务逻辑代码,并防止我们一次又一次重新思考相同的东西。

More automation(更多的自动化)

If it can be automated, it should be automated (at least in most case). Database migrations, unit tests, deployments are some of the tasks those can be automated. Automation saves our time in a long term (even in middle term) and prevents from mistakes of manual tasks (DRY!).

如果它可以自动化,它应该是自动化的(至少在大多数情况下)。数据库迁移、单元测试、部署是自动化工作的任务之一。自动化可以节省我们的时间(即使是在中期),防止手工作业出错

Convention over configuration(约定优于配置)

Convention over configuration is a very popular principle. An application framework should implement defaults as much as possible. It should be easier when following conventions but also should be configurable when needed.

约定优于配置是一个非常流行的原则。应用程序框架应该尽可能地实现缺省值。当遵循约定时应该更容易,但也应该在需要时进行配置。

Project startup(项目启动)

It should be easy and fast to start a new application. We should not repeat some tedious steps to create an empty application (DRY!). Project/Solution templates is a proper way of doing it.

启动一个新的应用程序应该很容易也很快。我们不应该重复一些繁琐的步骤来创建一个空的应用程序,项目/解决方案模板是一种合适的方法。

Source codes(源代码)

ASP.NET Boilerplate is an open source project developed under Github.

Contributors(贡献者)

ASP.NET Boilerplate is designed and developed by Halil İbrahim Kalkan. There are also contributors on github. You can also fork repositories and send pull requests.

Contact(联系)

For your questions and other discussions, use official forum.

For feature requests or bug reports, use Github issues.

For personal contact with me, use my web page.

ABP框架系列之七:(About-关于ABP)的更多相关文章

  1. 老周的ABP框架系列教程 -》 一、框架理论初步学习

    老周的ABP框架系列教程 -- 一.框架理论初步学习   1. ABP框架的来源与作用简介 1.1  简介 1.1.1       ABP框架全称为"ASP.NET Boilerplate ...

  2. 2019 年起如何开始学习 ABP 框架系列文章-开篇有益

    2019 年起如何开始学习 ABP 框架系列文章-开篇有益 [[TOC]] 本系列文章推荐阅读地址为:52ABP 开发文档 https://www.52abp.com/Wiki/52abp/lates ...

  3. ABP框架系列之三十四:(Multi-Tenancy-多租户)

    What Is Multi Tenancy? "Software Multitenancy refers to a software architecture in which a sing ...

  4. ABP框架系列之十一:(AspNet-Core-ASPNET核心)

    Introduction This document describes ASP.NET Core integration for ASP.NET Boilerplate framework. ASP ...

  5. ABP框架系列之五十四:(XSRF-CSRF-Protection-跨站请求伪造保护)

    Introduction "Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a maliciou ...

  6. ABP框架系列之五十一:(Timing-定时)

    Introduction While some applications target a single timezone, some others target to many different ...

  7. ABP框架系列之二十四:(Email-Sending-EF-电子邮件发送)

    Introduction Email sending is a pretty common task for almost every application. ASP.NET Boilerplate ...

  8. ABP框架系列之三十一:(Localization-本地化)

    Introduction Any application has at least one language for user interface. Many applications have mo ...

  9. ABP框架系列之二十九:(Hangfire-Integration-延迟集成)

    Introduction Hangfire is a compherensive background job manager. You can integrate ASP.NET Boilerpla ...

随机推荐

  1. shiro 注解式前提

    <aop:config proxy-target-class="true"></aop:config> <bean class="org.a ...

  2. IP Editor IP控件

    HWND hIpEdit; void __fastcall TForm2::FormCreate(TObject *Sender) { hIpEdit = CreateWindow(WC_IPADDR ...

  3. PCI Simple Communications Controller

    PCI Simple Communications Controller Intel Management Engine Interface (MEI)

  4. ListView 操作

    TListItem *Item; ; i < ; i++) { Item = ListView1->Items->Add(); Item->Caption = i; } Lis ...

  5. vue 项目部署后 刷新一下 页面找不到 解决

    1.修改配置router的参数  (效果不好) 2. (不能解决 出现403) 后端配置例子 Apache <IfModule mod_rewrite.c> RewriteEngine O ...

  6. 在JSP中,使用get提交方式出现乱码时,为什么要使用new String(s.getBytes("iso-8859-1"),"utf-8");?

    最近在学JSP,在学习处理get方式提交数据出现乱码问题的时候,对其中的一个解决方法new String(s.getBytes("iso-8859-1"),"utf-8& ...

  7. How to Pronounce the Word SOMETHING

    How to Pronounce the Word SOMETHING Share Tweet Share Something tells me you’re going to like this v ...

  8. 内核线程和用户线程(SMP)

    用户级和内核级线程 用户级线程:任何应用程序都可以通过使用线程库设计成多线程程序.线程库是用于用户级线程管理的一个例程句,它包含用于创建和销毁线程的代码.在线程间传递消息和数据的代码.调度线程执行的代 ...

  9. mysql备份的三种方式

    一.备份的目的 做灾难恢复:对损坏的数据进行恢复和还原需求改变:因需求改变而需要把数据还原到改变以前测试:测试新功能是否可用 二.备份需要考虑的问题 可以容忍丢失多长时间的数据:恢复数据要在多长时间内 ...

  10. ReentrantLock 使用

    从使用场景的角度出发来介绍对ReentrantLock的使用,相对来说容易理解一些. 场景1:如果发现该操作已经在执行中则不再执行(有状态执行) a.用在定时任务时,如果任务执行时间可能超过下次计划执 ...