Application Architecture

Define the components appropriately for the application and create project for each one.

What is Class?

3 Things: Visual Things, Business Things (Domain Entities), Application Things (like Logging & Email Generation)

3 Types: User interface classes, Domain entity classes, Library class

Class is a template or mold,specifies the traits or data,specifies the behavior or operations.

类是一种模板或模具,指定了具体数据或者是行为操作等。

Unit Testing

3 Advantages:

Higher Code Quality, Faster and Easier Debugging, Repeatable

Features:

Tests the behavior of a unit of code (often a method), Automated, Defined with code,Identifies errors

Tools:

MSTest, NUnit

Steps:

1.Define the test scenarios, 2.Generate the tests, 3.Execute the tests

Arrange -> Act -> Assert

FAQ

1.Why is a layer architecture important?

Logical components are easier to create,change,extend and maintain

Code are easier to reuse

2.What is a class?

A template for the objects created at runtime

Specifies the data and operations for each entity

3.What are the benefits of unit testing?

Higher quality code,faster and easier debugging,and they are repeatable over the life of the application

类定义中的访问修饰符

无或internal:只能在当前项目中访问类

public:可以在任何地方访问类

abstract或internal abstract:不能实例化,只能供继承之用(只能在当前项目中访问)

public abstract:同上,但可以在任何地方访问

sealed或internel sealed:不能供派生之用,只能实例化(只能在当前项目中访问)

public sealed:同上,但可以在任何地方访问

接口和抽象类

类似:

都不能实例化,都包含可以由派生类继承的成员。

区别:

1、派生类只能继承一个基类,但类可以继承任意多个接口。

2、抽象类的成员可以拥有代码体(即代码实现),而接口成员没有代码体,都必须在使用接口的类上实现。

3、接口成员是公共的,而抽象类的成员可以是private, protected, internal or protected internal。

4、接口不能包含字段、构造函数、析构函数、静态成员或常量。

最新文章

  1. Akka初步介绍
  2. java 线程池ThreadPoolExecutor 如何与 AsyncTask() 组合使用。
  3. 打开网页自动弹出QQ对话框的实现办法
  4. IOS第11天(3:UIPickerView省市联动)
  5. Android源码分析-全面理解Context
  6. ubuntu 16.04 U盘多媒体不自动弹出
  7. UnityShader快速上手指南(一)
  8. [HIHO1323]回文字符串(区间dp)
  9. 用cookie实现localstorage功能
  10. CSS多行文字截断
  11. DataContext 数据在F5刷新频繁,会出现数据读取错误
  12. 汇编学习笔记(3)[bx]和loop
  13. echarts 应用数个样例
  14. jfinal集成spring cxf做webservice服务
  15. 【转】101个MySQL调试和优化技巧
  16. MySQl数据库常用的DOS命令
  17. 201521123038 《Java程序设计》 第八周学习总结
  18. Spring 高级依赖注入方式
  19. anaconda下安装新包一直报错(‘parse() got an unexpected keyword argument 'transport_encoding'’)
  20. SKSpriteNode对象初始化在iPhone 6 plus中显示不正确的分析及解决

热门文章

  1. SLC和MLC闪存芯片的区别
  2. Office 2010简体中文正式版完美终身破解版免费下载
  3. Android 使用Jsoup解析Html
  4. iOS6和iOS7代码的适配(4)——tableView
  5. Mysql 语句汇总(性能篇)
  6. oracle传输表空间功能测试(含详细过程)
  7. 遍历文件夹及其子文件夹下的.pdf文件,并解压文件夹下所有的压缩包
  8. angular的post传参后台php无法接收
  9. MySQL学习笔记(3)
  10. JavaScript知识(一)