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 ...
随机推荐
- vue 项目部署后 刷新一下 页面找不到 解决
1.修改配置router的参数 (效果不好) 2. (不能解决 出现403) 后端配置例子 Apache <IfModule mod_rewrite.c> RewriteEngine O ...
- python生成可执行文件保护源码
工作中由于需要防止源代泄漏,需要将源代码隐藏,找到两种方法: 1.使用python生成的pyc文件. 这种方法的优点就是pyc文件生成很容易,缺点则是很容易通过工具得到源码,并且python版本不一致 ...
- win10 ubuntu双系统安装后无法引导进入ubuntu
之前按照先装windows后装ubuntu的方式装的系统,都可以引导到ubuntu,无论是将ubuntu挂在到/boot在windows用easy BCD建立ubuntu引导,还是将ubuntu挂在到 ...
- asp.net core in centos
CentOS 7部署ASP.NET Core应用程序 看了几篇大牛写的关于Linux部署ASP.NET Core程序的文章,今天来实战演练一下.2017年最后一个工作日,提前预祝大家伙元旦快乐.不 ...
- Spring Boot中启动HTTPS
一,生成https 的证书 1,在相应的根目录下 keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize -keyst ...
- 实现spring IOC的常见二种方法 setter注入与构造器注入
案例: beans.xml配置 <?xml version="1.0" encoding="UTF-8"?><beansxmlns=" ...
- python字符串填充(转)
ljust()方法返回字符串左对齐的字符串长度宽度.填充是通过使用指定的fillchar(默认为空格).如果宽度小于len(s)返回原始字符串.语法 以下是ljust()方法的语法: str.ljus ...
- gradle 错误
A problem occurred evaluating root project 'clouddriver'.> Failed to apply plugin [class 'com.net ...
- ubuntu下搭建testlink
环境配置: 1. 安装mysql 教程网上找 2. 安装apache sudo apt-get install apache2 重启apache服务 sudo /etc/init.d/apache2 ...
- fieldOfView
fieldOfView 属性 fieldOfView:Number 语言版本: ActionScript 3.0 运行时版本: Flash Player 10, AIR 1.5 为三维视野指定一个 ...