1 / 42

Windows Programming Overview

Windows Programming Overview. Yingcai Xiao. From the Webster ’ s New World Dictionary: 1. A person who computes.

berny
Download Presentation

Windows Programming Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Programming Overview Yingcai Xiao

  2. From the Webster’s New World Dictionary: 1. A person who computes. 2. A device used for computing (an electronic machine which by means of stored instructions and information, perform rapid, often complex calculations or compiles, correlates, and selects data). What is a Computer?

  3. Programs: stored computer instructions for data processing. Programming = Data Structures + Algorithms Professor Donald E. Knuth http://www-cs-faculty.stanford.edu/~knuth/ What is a program and what is programming?

  4. Windows Programming: Programming for the Windows platform? Programming on the Windows platform! What is Windows Programming?

  5. Programs to be covered in this class: (1) Windows: CLI (Command Line Interface) GUI (Graphical User Interface) NUI (Natural User Interface) (2) Web: Server Side, Web Applications, 3-Tir Enterprise Applications, Web Services (3) Cloud: Applications on the Cloud. What Types of Programs?

  6. C#: (0) C^(+)^(2n); n = 0, 1, 2, => C, C++, C# (1) The most advanced programming language to date (3) OOP (Object-oriented Programming) (4) EDP (Event Driven Programming) (5) Dynamic type generation (6) Platform-independent?: Code runs on any platform with .NET runtime (7) Visual Studio 2010 What Programming Tools? C# & .NET

  7. .Net is a framework for developing OS-platform-independent, programming- language-independent, web-enabled, distributed applications. What is .NET?

  8. .Net is evolving. 1.0: fundamentals 2.0: partial classes, profile object, ACL http://forums.asp.net/t/1115522.aspx 3.0: WCF, WWF, WPF, Windows CardSpace http://forums.asp.net/t/1115522.aspx 4.0: DLR, improved security model, http://msdn.microsoft.com/en-us/library/ms171868.aspx Versions of .NET

  9. Inside and Out: how does it work inside (the details), how to design a system (the big picture). • Principles and practices: know the concepts and know how to design and implement an application. • Gradual: starting from the fundamentals and add new features as we move ahead. Our Approach

  10. Textbooks: Programming Microsoft .NET, Jeff Prosise, Microsoft Press http://www.amazon.com/Programming-Microsoft%C2%AE-NET-Core-reference/dp/0735613761 In Safari (free online read for UA students through VPN) http://proquest.safaribooksonline.com/book/programming/microsoft-dotnet/0735613761/firstchapter Pro C# 2010 and .NET 4 Platform, Andrew Troelsen, Apress http://www.amazon.com/2010-NET-Platform-Andrew-Troelsen/dp/1430225491/ref=pd_sim_b_3 In Safari (free online read for UA students through VPN) http://proquest.safaribooksonline.com/book/programming/csharp/9781430225492 Textbooks and References

  11. Reference Books: Professional C# 4 and .NET 4, Christian Nagel, et. al., Wrox Professional C#, Simon Robinson, et. al., Wrox Microsoft .NET for Programmers, Fergal Grimes, Manning Programming C#: Building .NET Applications with C#, Jesse Liberty, O’Reilly For Beginners: C# Concisely, Bishop & Horspool, Pearson / Addison Wesley Beginning C# Objects from Concepts to Code, Barker and Palmer, Apress Microsoft Visual C#.NET Step by Step, John Sharp, Microsoft Press Visual C#2010, Deitel & Deitel Understanding .NET, David Chappell, Pearson / Addison Wesley Textbooks and References

  12. Integrated Development Platform (IDE): Microsoft Visual Studio 2010 From MSDNAA (free downloads) The Lab computers: CAS 241 and 254, 255 for grad students With Microsoft Visual Studio 2010 and 2008 Server for the course: winverv1.cs.uakron.edu With Microsoft Visual Studio 2010 and 2008 The VMs for the course: One VM for each student in the class System Support

  13. An Introduction to C# and .NET

  14. Source Code for Language 1 Source Code for Language 1 Language 1 Compiler on OS1 Language 1 Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2 • Traditional Compilation (Linking)

  15. Common Binary Code?

  16. The trend to support OS-independent binary code is to compile the source code into the binary format of an intermediate language. • And to provide an interpreter for the intermediate language on each OS to translate the binary code of the intermediate language into the native binary code of the OS. OS-Independent Code: Intermediate Languages

  17. OS-Independent Compilation: Intermediate Language Source Code for Language 1 Language 1 Compiler on OS1 Language 1 Compiler on OS2 Intermediate Binary Code Intermediate Code Interpreter OS1 Intermediate Code Interpreter OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

  18. Java Intermediate Language: Java Bytecode Java Source Code (.java) Java Compiler (javac) on OS1 Java Compiler (javac) on OS2 Java Bytecode (.class) Java Interpreter on OS1 (java) Program statements are interpreted one at a time during the run-time. Java Interpreter on OS2 (java) Binary Code for OS1 Binary Code for OS2 OS1 OS2

  19. An interpreter interprets intermediate code one line at a time. Slow execution. • A JIT (Just-In-Time) Compiler compiles the complete code all at once just into native binary code before execution. Faster execution. JIT Compiler

  20. JIT Complier: Java Bytecode Compiler Java Source Code (.java) Java Compiler (javac) on OS1 Java Compiler (javac) on OS2 Java Bytecode (.class) Java JIT Compiler on OS1 All programming statements are compiled at compile time. Java JIT Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

  21. MSIL: Microsoft Intermediate Language Source Code for Language 1 Language 1 Compiler on OS1 Language 1 Compiler on OS2 MSIL Code MSIL JIT Compiler on OS1 .NET OS-Platform-Independence MSIL JIT Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

  22. A Common Language?

  23. To make .NET language independent, CLR (Common Language Runtime) is defined as the runtime environment. • CLR defines CTS (Common Type System) which should be followed by all languages to be used in the .NET framework. • Syntax: int, for, .. • Semantics: multiple inheritance is not allowed in CTS • The code that follows CTS standard is called managed code. • regular C++ supports multiple inheritance • managed C++ does not support multiple inheritance .NET Common Language Runtime

  24. CLR: Common Language Runtime Source Code for Language 1 Source Code for Language 2 Language 1 Compiler on OS1 Language 2 Compiler on OS2 MSIL Code Confirming CTS (Managed Code) CLR on OS1 .NET Language-Independence CLR on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

  25. Source Code for Language 1 Source Code for Language 2 Language 1 Compiler on OS1 Language 2 Compiler on OS2 MSIL Code Confirming CTS (Managed Code) CLR on OS1 .NET Architecture for Language and Platform Independence (fan-in and fan-out on MSIL) CLR on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

  26. CLI (Common Language Infrastructure) CLR/CTS for Everyone?

  27. A specification defines an environment for multiple high-level languages to be used on different computer platforms. • Created by Microsoft based on .NET, standardized by MS, Intel, HP and others, ratified by ECMA and ISO. • .NET is an implementation of CLI for desktop systems. • .NET Compact Framework is an implementation of CLI for portable devices. • Open Source implementations: Mono development platform (Novell), Portable .NET (dotGNU) CLI : Common Language Infrastructure

  28. Source Code for Language 1 Source Code for Language 2 Language 1 Compiler on OS1 Language 2 Compiler on OS2 CIL (Common Intermediate Language) Code Confirming CTS (Common Type System) CLR for OS1 CLI (Common Language Infrastructure) Specification Open Architecture for Language and Platform Independent Programming CLR for OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

  29. Even though, CLI/CTS/CLR can make a program written in any language to run on any platform, the entire program (including all libraries used) has to be on the platform before running. Can we have part of a program on one computer and another part of the same program on another computer? Distributed Computing. A program is divided into multiple parts and different parts are distribute on different computers. e.g. virtual surgery.

  30. Web Enabled & Distributed .NET

  31. To run distributed code on the web, we need a standard way to register the code and a standard way to access the code. • Registration: • UDDI Registry: Universal Description, Discovery, and Integration. • Access: • SOAP: Simple Object Access Protocol • WSDL: Web Service Description Language .Net is Web-enabled and Distributed

  32. .NET Architecture for Web-based Distributed Computing Client 1 UDDI Registry 2 SOAP Client 2 UDDI Registry 1 SOAP Web Service 1 WSDL Interface 1 Web Service 2 WSDL Interface 2 WEB

  33. .NET Framework Composition http://en.wikipedia.org/wiki/.NET_Framework

  34. Common Language Runtime (CLR ): provides the runtime environment for MSIL code. • Framework Class Library (FCL) : provides standard libraries for developing common .Net applications. • .NET runtime environment comes with Windows • .NET development environment comes with Visual Studio .NET Framework Compositions

  35. Current versions: framework 4.0 and VS 2010 • In the works: framework 4.5 and VS “2011” for Windows 8. • ARM (Advanced RISC Machine) support in 4.5 on Windows 8 in addition to x86 • SIMD (single instruction, multiple data), multi and many core processors. Some support through Direct3D. No support yet for SSE (Streaming SIMD Extensions to x86) .NET Framework Compositions

  36. .Net Framework Class Library System Windows Web Data (Database) Enterprise Services XML (Data Description) String, … Forms (GUI) UI Services Connection DataSet XmlDocument Language Integrated Query, Windows Presentation Foundation, Windows Communication Foundation, …

  37. .Net Framework Class Library Common Language Runtime Browser Accessible Remote Applications Local Applications Other Applications Web Services Distributed Applications .NET Application Types OS

  38. MFC: Microsoft Foundation Class, code reuse within an application (process) • COM: Component Object Model, code reuse across applications (processes) • DCOM: Distributed COM, code reuse across systems • COM+: Internet-based Enterprise COM, code reuse across the Internet • .NET: COM+ 2.0, all COM+ services are available in .NET, even those not in managed code, interoperable with COM-based applications History: .Net & COM

  39. Internet Information Services (IIS): web server • Commerce Server: e-commerce server • SQL Server: database server • Exchange Server: MS exchange services • Mobile Information Server: wireless server • Internet Security and Acceleration (ISA) Server: • firewall, proxy, … • BizTalk: B2B (Business-to-Business) server .NET Enterprise Servers

  40. A Common Language for the Internet (free of compilation and translation)?

  41. Tim Berners-Lee • ASCII text (ISO/IEC 8859-1) is platform-independent. • HTTP (Hyper Text Transport Protocol) • e.g. • GET wp.html • Assembly Language for the Internet • HTML (Hyper Text Markup Language) • High-level language for the Internet) • hyper text: text that describes other text • tags: type definition of text in text • <title>WP</title> • all tags are predefined in HTML • only system defined types, no user defined types • Recognizable by all types of computers. (World Wide Web) A Common Language for the Internet

  42. XML (eXtensible Markup Language) Allow user defined tags (types) • SOAP (Simple Object Access Protocol) Standards for defining objects for the Internet Based on XML A Common Language for the Internet • WSDL (Web Service Description Language) Standards for describing web services for the Internet Based on XML

More Related