SlideShare une entreprise Scribd logo
1  sur  58
ligaoren@gmail.com
假如给你一次机会从零开始学习.net,
你还会使用同样的方法么?
第一个问题:你是用什么做开发的?
• 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到底发生了哪些变化?
• 这些变化有什么规律吗?
• 除了语法糖我们还能关注些什么?
.NET Framework的设计目标是什么?
1.减少语法噪音
• 完成目标功能语法本身代码量所占比例
• 这部分改进多数被我们当作语法糖
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
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
•   3.0
•
匿名类型anonymous types
自动属性   automatically implemented properties
集合初始化   Collection Initializers
对象初始化   Object Initializer
扩展方法   Extension methods
LINQ
无参匿名方法   Parameterless Anonymous Methods
Lambda表达式

Expression Trees
TPL & Parallel loops
dynamic
Optional parameters
Tuple
Func & Action
•
持续关注,坚持练习




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

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



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

Contenu connexe

En vedette

Inside .net framework
Inside .net frameworkInside .net framework
Inside .net framework
Faisal Aziz
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
Jeff Blankenburg
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 
Beyond Gamification: designing the player journey
Beyond Gamification: designing the player journeyBeyond Gamification: designing the player journey
Beyond Gamification: designing the player journey
Amy Jo Kim
 

En vedette (20)

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

Similaire à .net framework from 1.0 -> 4.0

张勇 搜搜前端架构
张勇 搜搜前端架构张勇 搜搜前端架构
张勇 搜搜前端架构
isnull
 
前端性能优化&测试
前端性能优化&测试前端性能优化&测试
前端性能优化&测试
tbmallf2e
 
赵泽欣 - 淘宝网前端应用与发展
赵泽欣 - 淘宝网前端应用与发展赵泽欣 - 淘宝网前端应用与发展
赵泽欣 - 淘宝网前端应用与发展
d0nn9n
 
美团前端架构简介
美团前端架构简介美团前端架构简介
美团前端架构简介
pan weizeng
 
Foundation of software development 2
Foundation of software development 2Foundation of software development 2
Foundation of software development 2
netdbncku
 
Nodejs & NAE
Nodejs & NAENodejs & NAE
Nodejs & NAE
q3boy
 
广告技术部自动化测试介绍.pdf
广告技术部自动化测试介绍.pdf广告技术部自动化测试介绍.pdf
广告技术部自动化测试介绍.pdf
bj_qa
 

Similaire à .net framework from 1.0 -> 4.0 (20)

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

.net framework from 1.0 -> 4.0