• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Dotnetintroduce 100324201546-phpapp02
 

Dotnetintroduce 100324201546-phpapp02

on

  • 876 views

 

Statistics

Views

Total Views
876
Views on SlideShare
876
Embed Views
0

Actions

Likes
0
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Dotnetintroduce 100324201546-phpapp02 Dotnetintroduce 100324201546-phpapp02 Presentation Transcript

    • Winson Sun
    • Survey
      • 听说过 DotNet, C# ( 1 )
      • 知道什么是 C#, DotNet Framework ( 2 )
      • 知道如何命令行编译 C# ( 1 )
      • 编写过 C# 程序 ( 2 )
      • 知道什么是 CLR ( 2 )
      • 知道什么是 Rails , ASP.NET MVC ( 2 )
      • 知道什么是 Ruby, Python (1)
      • 知道什么是 GC , LINQ ( 2 )
      • Write WCF service/client example
      • Write SilverLight/WPF example with plain mode, with MVVM pattern
      • Investigate the source code of Dotnet (with VS debug or ILSpy)
      • Familiar with useful tools for DotNet development
      • Familiar with all DotNet keyword/concept (new features) and could use main parts
      • 知道什么是 Functional Programming , Lambda ( 3 )
      • 知道什么是 UI Automation MSTest MSBuild ( 2 )
      • 知道什么是 Dynamic language in DotNet ( 2 )
    • Survey
      • Do you love programming? Do you plan your job routine?
      • How to become a kaopu developer
      • How to improve yourself continuously
      • Familiar with useful Design pattern
      • Be able to analyse the business requirement, and convert them to software design
      • Could (use tools) find root cause quickly and correctly, could fix issue without adding new bugs
    • Quiz
      • Is DotNet framework a real framework?
      • “ Conversion over Configuration”?
    • What’s Framework? http://en.wikipedia.org/wiki/Software_framework Framework is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code providing specific functionality. Frameworks are a special case of software libraries in that they are reusable abstractions of code wrapped in a well-defined API , yet they contain some key distinguishing features that separate them from normal libraries. Frameworks have these distinguishing features that separate them from libraries or normal user applications: 1. inversion of control - In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework. 2. default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior and not a series of no-ops. 3. extensibility - A framework can be extended by the user usually by selective overriding or specialized by user code providing specific functionality 4. non-modifiable framework code - The framework code, in general, is not allowed to be modified. Users can extend the framework, but not modify its code.
    • http://msdn.microsoft.com/zh-cn/netframework/default.aspx DotNet FAQ
      • http://msdn.microsoft.com/en-us/library/ms973850.aspx
      • COM VisualStudio.Net Ado.Net Windows.Net ASP.NET, 微软你该找个起名大师了!
      • Information , Service, Communication, Connection, too many BIG concepts !
      • 新瓶装旧酒。 MVC 哪一年提出的概念? Garbage Collection 哪一年? FP 哪一年?(参考 Wiki )
      • 从务虚到务实
    •  
    • http://java.sun.com/javase/6/docs/
    •  
    •  
    •  
    •  
    • Quiz
      • What is DotNet Framework?
      • Why Microsoft design the DotNet?
      • Why Microsoft didn’t use DotNet in OS?
      • Why design C#?
      • Why not C++?
    •  
    • http://channel9.msdn.com/tags/
    • Quiz
      • Why we need to learn and use DotNet?
      • The common language runtime (CLR) is the execution engine for .NET Framework applications.
      • It provides a number of services, including the following:
        • Code management (loading and execution)
        • Application memory isolation
        • Verification of type safety
        • Conversion of IL to native code
        • Access to metadata (enhanced type information)
        • Managing memory for managed objects
        • Enforcement of code access security
        • Exception handling, including cross-language exceptions
        • Interoperation between managed code, COM objects, and pre-existing DLLs (unmanaged code and data)
        • Automation of object layout
        • Support for developer services (profiling, debugging, and so on)
    • MSDN .NET Framework http://msdn.microsoft.com/en-us/library/system.io%28VS.100%29.aspx http://en.wikipedia.org/wiki/.NET_Framework http://zh.wikipedia.org/wiki/.NET%E6%A1%86%E6%9E%B6 http://msdn.microsoft.com/zh-cn/library/w0x726c2%28v=vs.90%29.aspx
    • .NET Framework Class Library
      • The .NET Framework class library is a library of classes, interfaces, and value types that provides access to system functionality and is designed to be the foundation on which .NET Framework applications, components, and controls are built.
    • The Base Class Library (BCL) includes a small subset of the entire class library and is the core set of classes that serve as the basic API of the Common Language Runtime . [9] The classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are considered to be a part of the BCL. The BCL classes are available in both .NET Framework as well as its alternative implementations including .NET Compact Framework , Microsoft Silverlight and Mono . The Framework Class Library (FCL) is a superset of the BCL classes and refers to the entire class library that ships with .NET Framework. It includes an expanded set of libraries, including WinForms , ADO.NET , ASP.NET , Language Integrated Query , WPF , WCF among others. The FCL is much larger in scope than standard libraries for languages like C++ , and comparable in scope to the standard libraries of Java .
      • using System;
      • using System.IO;
      • namespace ConsoleApplication1
      • {
      • class Program
      • {
      • public static long DirSize(DirectoryInfo d)
      • {
      • long Size = 0;
      • FileInfo[] fis = d.GetFiles();
      • foreach (FileInfo fi in fis)
      • {
      • Size += fi.Length;
      • }
      • DirectoryInfo[] dis = d.GetDirectories();
      • foreach (DirectoryInfo di in dis)
      • {
      • Size += DirSize(di);
      • }
      • return (Size);
      • }
      • static void Main(string[] args)
      • {
      • System.String dirName = "c:temp";
      • DirectoryInfo d = new DirectoryInfo(dirName);
      • Console.WriteLine("The size of {0} and its subdirectories is {1} bytes.", d, DirSize(d));
      • }
      • }
      • }
      • import java.io.*;
      • import java.util.*;
      • public class DirUtils {
      • public static List recurseDir(String dir) {
      • String result, _result[];
      • result = RecurseDirFrom(dir);
      • _result = result.split("|");
      • return Arrays.asList(_result);
      • }
      • private static String RecurseDirFrom(String dirItem) {
      • File file;
      • String list[], result;
      • result = dirItem;
      • file = new File(dirItem);
      • if ( file.isDirectory( )) {
      • list = file.list();
      • for (int i = 0; i < list.length; i++)
      • result = result + &quot;|&quot; + RecurseDirFrom(dirItem + File.separatorChar + list[i]);
      • }
      • return result;
      • }
      • public static void main(String arg[]) {
      • if (arg.length > 0) {
      • System.out.println(&quot;recursive Dirs from &quot; + arg[0]);
      • System.out.println( DirUtils.recurseDir(arg[0]) );
      • }
      • }
      • }
    • Best practice
      • 处理异常的最佳做法
      • 开发全球通用应用程序的最佳做法
      • System.Net 类的最佳做法
      • 托管线程处理的最佳做法
      http://msdn.microsoft.com/zh-cn/library/ms184411%28v=vs.90%29.aspx
    • http://1code.codeplex.com/ Are you frustrated by the lack of code samples for a certain programming task? Have you ever struggled to quickly get started with a technique? Have you expected someone to write code samples for you based on your requests for free? Is a one-stop code sample library for all Microsoft development technologies attractive to you? Another material: Google search “ C# cookbook ”
    • C# Programming Tools
      • http://msdn.microsoft.com/zh-cn/vcsharp/default.aspx CSharp Development Center
      • http://msdn.microsoft.com/en-us/magazine/cc300497.aspx Ten Must-Have Tools Every Developer Should Download
      • http://www.codeplex.com
      • http://www.codeproject.com
    •  
    • http://www.microsoft.com/china/msdn/events/webcasts/shared/Webcast/MSDNWebCast.aspx
    •  
    • http://channel9.msdn.com/tags/CSharp/
    • http://msdn.microsoft.com/zh-cn/practices/default.aspx
    • http://code.msdn.microsoft.com/Project/ProjectDirectory.aspx?TagName=C%23
    • DotNet internal
      • http://mono-project.com/
      • http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx
      • http://netmassdownloader.codeplex.com
      • Shared Source Common Language Infrastructure 2.0 Release
      • DotNet Platform vs Java Platform
      • WCF(Odata) vs XMLRPC
      • WPF vs RIA (Flash, Flex, Html5, JavaFx)
      • C# language vs Java language
      • Azure Cloud vs Amazon S3
      • Team system vs 持续集成 (CI)
      • Win7 vs MacOSX
    •  
    • Why we say “platform”?
      • Dynamic language
        • IronPython, IronRuby, Lua
      • Functional Programming
        • Fsharp
      • You need to know more
        • JavaScript ( www.jquery.com ) for asp.net
        • Web development, html, css
        • Front dev, server-side dev, do we need desktop?
    • http://www.silverlight.net/learn/dynamic-languages/
    • IronPython Demo
      • Used in: Desktop application, small utility.
      • http://www.ironpython.info/index.php/Contents#Windows_Forms
      • # http://www.ironpython.info/index.php/Interacting_with_Excel
      • # ref: Excel 2003 VBA Language Reference
      • import clr
      • from System import Array
      • from System import DateTime
      • clr.AddReference(&quot;Microsoft.Office.Interop.Excel&quot;)
      • import Microsoft.Office.Interop.Excel as Excel
      • excel = Excel.ApplicationClass()
      • excel.Visible = True
      • workbook = excel.Workbooks.Add()
      • worksheet = workbook.Worksheets.Add()
      • worksheet.Name = &quot;aaaaa&quot;
      • cell1 = worksheet.Range[&quot;A2&quot;]
      • cell1.Value2 = 42
      • xlrange = worksheet.Range[&quot;A3&quot;, &quot;b4“]
      • arr1 = Array.CreateInstance(object, 2, 2)
      • arr1[0, 0] = DateTime.Now
      • arr1[0, 1] = 3
      • arr1[1, 0] = &quot;hi Excel test.&quot;
      • arr1[1, 1] = &quot;hi there!&quot;
      • xlrange.Value2 = arr1
    • IronRuby Demo
      • Used in: Quick dirty website.
      • Sinatra, Rails
      • ir, igem,
      • require 'rubygems'
      • require 'sinatra'
      • get '/hi' do
      • &quot;Hello World!“
      • end
      • get '/hi/:name' do
      • # matches &quot;GET /hello/foo&quot; and &quot;GET /hello/bar&quot;
      • # params[:name] is 'foo' or 'bar‘
      • &quot;Hello #{params[:name]}! you come from /hi&quot;
      • end
    • Quiz
      • Why we should learn and use dynamic language?
      • Which area is suitable for Ruby/Python?
    • Survey
      • First gets 3, second gets 1, third gets 0, how about your rate?
      • Web develop, DotNet(C#) vs Ruby/Python vs Java
      • Desktop develop, DotNet(C#) vs Ruby/Python vs Java
      • Cross OperationSystem, DotNet(C#) vs Ruby/Python vs Java
      • Embedded (Phone), DotNet(C#) vs Ruby/Python vs Java
      • Game (Server) develop, DotNet(C#) vs Ruby/Python vs Java
    • A New World – F#
      • Csharp:
      • int[] numbers = new int[7] { 0, 1, 2, 3, 4, 5, 6 };
      • var numQuery = from num in numbers
      • where (num % 2) == 0
      • select num;
      • foreach (int num in numQuery)
      • {
      • Console.Write(&quot;{0,1} &quot;, num);
      • }
      • Fsharp:
      • let listN = List.filter (fun n -> (n % 2) = 0) [0..6];;
      • printfn &quot;listN = %A&quot; listN
      http://msdn.microsoft.com/en-us/fsharp/default.aspx
      • let rec qsort L =
      • match L with
      • | [] -> []
      • | x::xs ->
      • let smaller = [for i in xs when i <= x -> i] in
      • let larger = [for i in xs when i > x -> i] in
      • qsort smaller @ [x] @ qsort larger;;
      • qsort [3;5;1;4;2];;
      • qsort [7;5;10;2;3;67;1;3];;
      • qsort [&quot;Hello&quot;; &quot;AA&quot;; &quot;hello&quot;; &quot;help&quot;; &quot;Aa&quot;; &quot;aa&quot;;];;
      http://www.gofsharp.com/FS/Translations/Hutton/Hutton.txt
    • Fsharp Demo
      • http://research.microsoft.com/en-us/people/dsyme/
      • http://www.cnblogs.com/JeffreyZhao/tag/F%23/
      • *** Fsharp could do all work that Csharp could ***
    • Quiz
      • Why we should learn/use Functional language?
      • Which area is suitable for Fsharp?
      • Concurrency?
      • Parallelism?
      • Concurrency (Erlang) and parallelism (Fsharp) are NOT the same thing. Two tasks T1 and T2 are concurrent if the order in which the two tasks are executed in time is not predetermined,
        • T1 may be executed and finished before T2,
        • T2 may be executed and finished before T1,
        • T1 and T2 may be executed simultaneously at the same instance of time (parallelism),
        • T1 and T2 may be executed alternatively,
      • If two concurrent threads are scheduled by the OS to run on one single-core non-SMT non-CMP processor, you may get concurrency but not parallelism. Parallelism is possible on multi-core, multi-processor or distributed systems.
      • Concurrency is often referred to as a property of a program, and is a concept more general than parallelism .
      • SliverLight more important
      • UIAutomation Test
      • Odata
      • Azure platform
      • ASP.net MVC
      • MVVM
    •  
    • Advance topic : Garbage Collection
      • Garbage Collection useful documents
        • http://www.ibm.com/developerworks/cn/java/j-jtp10283/
        • http://www.ibm.com/developerworks/cn/java/l-JavaMemoryLeak2/index.html
        • http://blogs.msdn.com/maoni/archive/2004/06/15/156626.aspx
        • http://msdn.microsoft.com/zh-cn/library/0xy59wtx.aspx
        • http://blogs.msdn.com/maoni/archive/2004/06/15/156626.aspx
        • http://blogs.msdn.com/maoni/archive/2004/09/25/234273.aspx
        • http://blogs.msdn.com/maoni/archive/2004/12/19/327149.aspx
        • http://blogs.msdn.com/maoni/archive/2005/05/06/415296.aspx
        • http://www.codeproject.com/KB/dotnet/garbagecollection.aspx
        • http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx
        • http://msdn.microsoft.com/en-us/library/ms973837.aspx
        • http://msdn.microsoft.com/en-us/library/f144e03t.aspx
    • Quiz
      • How to design a garbage collection library?
    • In DotNet, managed heap concept. http://www.codeguru.com/columns/dotnet/article.php/c6593
    • GC 常用技术
      • 引用计数
        • COM , smart pointer
      • Tracing
        • Mark-Compact 此算法結合了“標記 - 清除”和“複製”兩個演算法的優點。也是分兩階段,第一 階段從根節點開始標記所有被引用物件,第二階段遍歷整個 heap ,把清除未標記物件並且把存活物件“壓縮”到 heap 的其中一塊,按順序排放。此演算法避免了“標記 - 清除”的碎片問題,同時也避免了“複製”算法的空間問題。
      http://pt.withy.org/publications/AMM.pdf http://www.cs.nctu.edu.tw/~kjji/GC.pptx http://moon.nju.edu.cn/twiki/pub/ICSatNJU/CourseOOT/04_Memory_Management.ppt http://www.cs.wustl.edu/~mdeters/doc/slides/rtgc-history.pdf http://lua-users.org/wiki/GarbageCollectionTutorial http://blog.csdn.net/akara/archive/2010/03/23/5408678.aspx http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29
    • http://chaoticjava.com/posts/how-does-garbage-collection-work/
    • Advance topic
      • Add-ins and Extensibility Describes how to develop add-in applications that extend a host application's functionality.
      • Asynchronous Programming Design Patterns Describes two design patterns available in the .NET Framework that are used to run threads separately from the main application thread.
      • Component Authoring for the Design Environment Provides links to information about creating your own components in the .NET Framework, customizing their behavior and display, and creating custom controls for the Windows Presentation Foundation (WPF).
      • Dynamic Source Code Generation and Compilation Discusses the Code Document Object Model (CodeDOM), which enables the output of source code in multiple programming languages.
      • Emitting Dynamic Methods and Assemblies Describes a set of managed types in the System.Reflection.Emit namespace that enable a compiler or tool to emit metadata and Microsoft intermediate language (MSIL) at run time and optionally generate a portable executable (PE) file on disk.
      • Expression Trees Introduces expression trees, which are tree-shaped data structures that can be used to represent language-level code in the form of data.
      • Garbage Collection Discusses how the garbage collector manages memory and how you can program to use memory more efficiently.
      • Hosting the Common Language Runtime Explains the concept of a runtime host, which loads the runtime into a process, creates the application domain in the process, and loads and executes user code.
      • Interoperability Describes services provided by the .NET Framework for interaction with COM components, COM+ services, external type libraries, and many operating system services.
      • .NET Remoting Discusses establishing communication between objects that run in different processes.
      • Network Programming Shows how to use Internet access classes to implement both Web- and Internet-based applications.
      • Reflection Explains how to obtain access to type information at run time by using reflection.
      • Reliability Discusses writing reliable code for any host that is executing in a .NET Framework environment.
      • Serialization Discusses the process of converting the state of an object into a form that can be persisted or transported.
      • Managed Threading Explains the runtime support for threading and how to program by using various synchronization techniques.
      • Writing Serviced Components Describes how to configure and register serviced components to access COM+ services.
    • More questions?
      • MSDN
      • codeproject.com
      • StackOverflow.com
      • CodePlex.com
      • Wikipedia
      • MSDN forum
      • http://www.cnblogs.com
      • google search
    • DotNet shortcoming
      • YAGNI, too big, too over.
      • 新名词, Oh No ! ORZ !
      • 技术依赖强烈 Silverlight + WCF
      • 平台及工具 IDE 依赖强烈
      • 学习曲线陡峭
      • 变化剧烈 WinForm or WPF? Remoting or WCF?
      • 大而全?还是大而无当?
      • 重点学习” stable” and “Internal” knowledge ,新技术不过是它们的组合包装 . RPC, XML, HTTP, Socket, GC, Dynamic language, FP, UnitTest, CLR, API design, Framework design, String code, RE, DataStructure, Algorithm, Web framework pattern
      • 适当了解你需要的 . DotNet Framework, WCF, WPF, Asp.net, Silverlight
      • 保持对技术的好奇心
      • 使用新版本 , Win7 + DotNet4 + VS2010
    • Learn it, Use it, Share it!