SlideShare a Scribd company logo
ligaoren@gmail.com
假如给你一次机会从零开始学习.net,
你还会使用同样的方法么?
.net framework from 1.0 -> 4.0
第一个问题:你是用什么做开发的?
• C# 1.0 / 2.0 / 3.0 / 4.0
• Vs2005 VS2008 VS2010
• .net Framework 2.0 /3.0 / 4.0
1.0   1.1   2.0   3.0   3.5   4.0
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
• 这些年.net到底发生了哪些变化?
• 这些变化有什么规律吗?
• 除了语法糖我们还能关注些什么?
.NET Framework的设计目标是什么?
1.减少语法噪音
• 完成目标功能语法本身代码量所占比例
• 这部分改进多数被我们当作语法糖
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
2.惯用法实现
• 多数人都会采用的惯用法,会逐渐迁移到框
  架内实现
• 例如:
 – TryParse
 – int? default()
 – EventHandler<T>
• 惯用法的实现职责从开发人员转移到框架,
  往往也会降低代码量
3.类库功能增强
•   常用功能逐渐加入到类库中
•   List<T>.FindAll
•   Stringbuilder.Clear();
•   String.Join
•   Collection类库每一个版本都在变化

• 这种变化比较零散,需要我们BCL有一个持续
  的关注
•
4.编程范式
• 2.0 泛型编程
• 3.0 函数式编程
• 4.0 并行编程 dynamic
5.设计模式
• 设计模式本质上是弥补面向对象语言的不
  足
• 如果语言本身支持,何必重新发明轮子?
 – Lazy<T>
 – Event
 – Iterator
6.产品级通用解决方案
•   LINQ
•   EF
•   TPL
•   Rx
7.项目开发支持
• Code Behind
• Partial Class
• Namespace alia
.net framework from 1.0 -> 4.0
OOP设计原则
 SRP-SoC
   OCP
   DIP
  DI/IoC
   KISS
   DRP
This page intentionally left blank
•
泛型Generics
迭代器Iterators
局部类partial
TryParse()
• 属性访问修饰符access modifiers on getters and setters
• 匿名方法anonymous methods.
//declare a method with no name and convert it into a delegate.
• 后台工作进程background worker pattern
• 泛型约束 Generics Constraints
•
    最令你吃惊的事实是什么?


    人生只有900个月
    .net framework 2.0才有静态类
•   C#
     –   default()
     –   System.EventHandler<T>
     –   System.Collections.Generic.List<T> FindAll()
     –   General Catch Block
     –   Nullable Modifier int?
     –   contravariance & covariance
•   Product
     –   Ado.net
     –   Asp.net



•   What's New in the .NET Framework Version 2.0
•   http://msdn.microsoft.com/en-us/library/t357fb32.aspx

•   Breaking Changes in .NET Framework 2.0
•   http://msdn.microsoft.com/zh-cn/netframework/aa570326.aspx
.net framework from 1.0 -> 4.0
•   3.0
.net framework from 1.0 -> 4.0
•
.net framework from 1.0 -> 4.0
匿名类型anonymous types
自动属性   automatically implemented properties
集合初始化   Collection Initializers
对象初始化   Object Initializer
扩展方法   Extension methods
LINQ
无参匿名方法   Parameterless Anonymous Methods
Lambda表达式

Expression Trees
.net framework from 1.0 -> 4.0
TPL & Parallel loops
dynamic
Optional parameters
Tuple
Func & Action
.net framework from 1.0 -> 4.0
•
持续关注,坚持练习




     我曾认为用手槌要六百年才能掘通的隧道

     安迪用不到二十年就办到了



• 10000个小时的练习,成为技术专家
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0

More Related Content

PDF
PDF
Coscup2011: porting android to brand-new cpu architecture
PPTX
Hcsm lect-20120913
PDF
PPT
IKVM.NET 深入敵營的 Java
PPTX
深入PHP内核之路
PDF
Regular expression
PDF
from Source to Binary: How GNU Toolchain Works
Coscup2011: porting android to brand-new cpu architecture
Hcsm lect-20120913
IKVM.NET 深入敵營的 Java
深入PHP内核之路
Regular expression
from Source to Binary: How GNU Toolchain Works

Viewers also liked (20)

PPT
Inside .net framework
PPT
Architecture of .net framework
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
PPT
Introduction to .NET Framework
PPT
.NET Framework Overview
PPSX
Introduction to .net framework
PDF
Learn Entity Framework in a day with Code First, Model First and Database First
PPTX
Building Office 365 solutions with React
PPTX
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
PPT
.net framework
PPT
.Net framework
PPTX
Introduction to .net FrameWork by QuontraSolutions
PPTX
Introduction to .NET Framework
PPTX
Beyond Gamification: designing the player journey
PPTX
Using MongoDB with the .Net Framework
PPTX
Introduction of .net framework
PPTX
Find out Which Versions of the .NET Framework are Installed on a PC.
KEY
Using The .NET Framework
PPTX
.Net framework
PPT
Владимир Никонов "Вызовы при разработке enterprise продукта"
Inside .net framework
Architecture of .net framework
Migrating To Visual Studio 2008 & .Net Framework 3.5
Introduction to .NET Framework
.NET Framework Overview
Introduction to .net framework
Learn Entity Framework in a day with Code First, Model First and Database First
Building Office 365 solutions with React
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
.net framework
.Net framework
Introduction to .net FrameWork by QuontraSolutions
Introduction to .NET Framework
Beyond Gamification: designing the player journey
Using MongoDB with the .Net Framework
Introduction of .net framework
Find out Which Versions of the .NET Framework are Installed on a PC.
Using The .NET Framework
.Net framework
Владимир Никонов "Вызовы при разработке enterprise продукта"
Ad

Similar to .net framework from 1.0 -> 4.0 (20)

PPTX
[2008]网站重构 -who am i
PPTX
N-layer design & development
PPTX
1_MySQL_20220307_0328.pptx
 
PPT
张勇 搜搜前端架构
PPTX
前端性能优化&测试
PDF
合久必分,分久必合
PDF
赵泽欣 - 淘宝网前端应用与发展
PPTX
使用 .NET Standard 開發跨平台應用程式
PDF
實踐 Clean Architecture(實作高可用性的軟件架構)
PDF
美团前端架构简介
PDF
Foundation of software development 2
PDF
漫談重構
PPT
42qu thrift1
PDF
Nodejs & NAE
PDF
Django step0
PPTX
Open source的devops工具箱 公開版@coscup2016
PPT
MariaDB: 新兴的开源大数据引擎
PPTX
Visual Studio 2017 新功能探索 (Study4.TW)
PDF
广告技术部自动化测试介绍.pdf
PPTX
极速 Angular 开发:效能调校技巧 (ngChina 2019)
[2008]网站重构 -who am i
N-layer design & development
1_MySQL_20220307_0328.pptx
 
张勇 搜搜前端架构
前端性能优化&测试
合久必分,分久必合
赵泽欣 - 淘宝网前端应用与发展
使用 .NET Standard 開發跨平台應用程式
實踐 Clean Architecture(實作高可用性的軟件架構)
美团前端架构简介
Foundation of software development 2
漫談重構
42qu thrift1
Nodejs & NAE
Django step0
Open source的devops工具箱 公開版@coscup2016
MariaDB: 新兴的开源大数据引擎
Visual Studio 2017 新功能探索 (Study4.TW)
广告技术部自动化测试介绍.pdf
极速 Angular 开发:效能调校技巧 (ngChina 2019)
Ad

.net framework from 1.0 -> 4.0