ABP框架系列之七:(About-关于ABP)
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, validation, error handling, logging, 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.
- Source code: https://github.com/aspnetboilerplate/aspnetboilerplate
- Project templates: https://github.com/aspnetboilerplate/aspnetboilerplate-templates
- Sample projects: https://github.com/aspnetboilerplate/aspnetboilerplate-samples
- Module-Zero: https://github.com/aspnetboilerplate/module-zero
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)的更多相关文章
- 老周的ABP框架系列教程 -》 一、框架理论初步学习
老周的ABP框架系列教程 -- 一.框架理论初步学习 1. ABP框架的来源与作用简介 1.1 简介 1.1.1 ABP框架全称为"ASP.NET Boilerplate ...
- 2019 年起如何开始学习 ABP 框架系列文章-开篇有益
2019 年起如何开始学习 ABP 框架系列文章-开篇有益 [[TOC]] 本系列文章推荐阅读地址为:52ABP 开发文档 https://www.52abp.com/Wiki/52abp/lates ...
- ABP框架系列之三十四:(Multi-Tenancy-多租户)
What Is Multi Tenancy? "Software Multitenancy refers to a software architecture in which a sing ...
- ABP框架系列之十一:(AspNet-Core-ASPNET核心)
Introduction This document describes ASP.NET Core integration for ASP.NET Boilerplate framework. ASP ...
- ABP框架系列之五十四:(XSRF-CSRF-Protection-跨站请求伪造保护)
Introduction "Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a maliciou ...
- ABP框架系列之五十一:(Timing-定时)
Introduction While some applications target a single timezone, some others target to many different ...
- ABP框架系列之二十四:(Email-Sending-EF-电子邮件发送)
Introduction Email sending is a pretty common task for almost every application. ASP.NET Boilerplate ...
- ABP框架系列之三十一:(Localization-本地化)
Introduction Any application has at least one language for user interface. Many applications have mo ...
- ABP框架系列之二十九:(Hangfire-Integration-延迟集成)
Introduction Hangfire is a compherensive background job manager. You can integrate ASP.NET Boilerpla ...
随机推荐
- Angularjs 首次加载显示{{}}
使用如下标签 <span translate="{{'SYSTEM_100001'|translateFilter}}"></span>
- as3 加载gif loader
as3原生不支持gif动态图 loader 加载gif ,内容只是以bitmap加载进来 需要动态,另外衍生类: https://files.cnblogs.com/files/dt1991/GifL ...
- Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To sta
有三种导致这种错误的原因. 第一个: 是因为tomcat的服务没有被关闭所导致的,将服务关闭即可 找到tomcat的安装目录,进入bin文件夹,找到tomcat7w.exe,双击这个文件,点击stop ...
- NUMA体系结构介绍
为什么会有NUMA? 在NUMA架构出现前,CPU欢快的朝着频率越来越高的方向发展.受到物理极限的挑战,又转为核数越来越多的方向发展.如果每个core的工作性质都是share-nothing(类似于m ...
- 使用HttpURLConnection时遇到的资源未释放的问题
http://blog.sina.com.cn/s/blog_56beadc60100j9zu.html 今天自己写了一个压力测试的小程序,同时启100个线程,每个线程都串行地访问应用服务器上的一个j ...
- python-条件和循环
条件 Demo1: if i < 10: print('i<10') elif i == 0: print('i=0 ') else: print('...') Demo1说明了以下几点: ...
- nat 类型及打洞原理
nat 类型分4种 1.全锥形 full cone A 与 主机B交互,nat转换 A的内部地址及端口为 ip1 port1,ip1和port1为对外地址,任何机器能访问. 2.ip 受限制(对B而 ...
- 奇偶数判断1(if,else if语句)
public class 奇偶数判断 { public static void main(String [] args){ float s = 9f; //取单浮点型变量s,可为任意值 float h ...
- JS中如何处理多个ajax并发请求?
js中的多并发处理. 通常 为了减少页面加载时间,先把核心内容显示处理,页面加载完成后再发送ajax请求获取其他数据 这时就可能产生多个ajax请求,为了用户体验,最好是发送并行请求,这就产生了并发问 ...
- 使用CSS实现透明边框的效果——兼容当前各种主流浏览器[xyytIT]
这个效果可是通过代码实现的哦,在不同浏览器下都可以正常显示 对于html中使用CSS实现透明边框的效果,主要有以下四种属性设置方法,但由于 这些属性兼容性并不是很好,单一使用会造成不同浏览器显示效果不 ...