Windows Programming Overview

Slides:



Advertisements
Similar presentations
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Advertisements

Introduction to .NET Framework
.NET Framework Overview
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Overview of.NET Prepared by: Xin,Lu.NET Seminar Aug.10, 2003.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
Henrico Dolfing Business Segment Partners. Océ Document Technologies GmbH2 June, NET Framework Version 3.0.
.NET Technology.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
ISYS 512 Business Application Design and Development with.Net David Chao.
Programming Our First Java Program Yingcai Xiao. What to Do Set up for Java Programming Write our first Java Program with IDE Write our first Java Program.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Data Structure and Algorithm 1 Yingcai Xiao. You Me The Course (
ISYS 512 Business Application Design and Development with.Net David Chao.
Programming A Historic Perspective on Code Reuse Yingcai Xiao.
J2EE vs..NET Nigam Patel. Topics Background –Web Services, J2EE and.NET Similarities Differences Conclusion –Pros and Con (J2EE and.NET)
Code-Reuse A Historic Perspective Yingcai Xiao. Want to know? Why we have to write programs to run a computer? Why an error in a program is called a bug?
Windows Programming.NET Overview Yingcai Xiao. What is a Computer? From the Webster’s New World Dictionary: 1. A person who computes. 2. A device used.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
Introduction to ASP.NET Yingcai Xiao. Approach Get the BIG picture before programming “Why?” then “How?” Principles and practices: know the concepts and.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic
Introduction to .Net Framework
Advanced Java New York University School of Continuing and Professional Studies.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
ISYS 512 Business Application Design and Development with.Net David Chao.
VS.NET Syllabus By Peter Huang.
CSC300 Visual Programming Dr. Craig Reinhart. Objectives Teach the basics of C++ –You won’t be an expert but hopefully a very good novice –GUI development.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
High thoughts must have high language. Aristophanes
Module 1: Introduction to C# Module 2: Variables and Data Types
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
Session 1 - Introduction and Data Access Layer
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a library for.
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to .NET Rui Ye.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
Introduction .NET Framework
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
Lecture 15 Introduction to Web Services Web Service Applications.
CS795/895: Introduction. Topics Distributed Systems –Availability –Performance –Web Services Security –Authentication –Authorization –Confidentiality.
Component-Based Software Engineering Introduction to.NET Paul Krause.
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
ISYS 350 Business Application Development David Chao.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 4 Computer Software.
Microsoft.NET Norman White Stern School of Business.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
.NET Mobile Application Development XML Web Services.
ISYS 512 Business Application Design and Development with.Net David Chao.
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
Jim Fawcett CSE687 – Object Oriented Design Spring 2001
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Introducing the Microsoft® .NET Framework
.NET Omid Darroudi.
C# and the .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
.NET Overview Yingcai Xiao.
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Windows Programming Overview Yingcai Xiao

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

What is Windows Programming? Programming for the Windows platform? Programming on the Windows platform!

What Types of Programs? 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 Programming Tools? C# & .NET (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 is .NET? .Net is a framework for developing OS-platform-independent, programming- language-independent, web-enabled, distributed applications.

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

Textbooks and References 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# 5.0 and the .NET 4.5 Framework (Expert's Voice in .NET), Andrew Troelsen, Apress http://www.amazon.com/Pro-NET-Framework-Experts-Voice/dp/1430242337 http://proquest.safaribooksonline.com/book/programming/csharp/9781430242338

Textbooks and References 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

System Support Integrated Development Platform (IDE): Microsoft Visual Studio 2010 From DreamSpark (free downloads) The lab computers: CAS 241 and 254 With Microsoft Visual Studio 2010 Server for the course: winverv1.cs.uakron.edu

An Introduction to C# and .NET

From Source to Binary (C++) Process Products Purpose Notes Coding .cpp (implementations) .h (UDT definitions) .h contains definitions of all UDT(User Defined Data Types): struct , class , enum , templates, #define (preprocessor directives) , encapsulation Timer.h: #define PI 3.14 class Timer {int t; setTimer(int t);}; Timer.cpp Timer::setTimer(int t){this.t=t;} Preprocessing .I .pch .ipch .I = .cpp with the contents of all .h files added, white spaces removed, preprocessor directives resolved, .pch -> precompiled header (preprocessed commonly used headers) , .ipch -> intellisense pch all PI's replaced with 3.14 .pch is large (in MBs) Compilation .obj Resolve templates, check syntax, verify types, generate machine/binary code. Syntax errors reported to the programmer. Linking .exe .lib .dll Link all object files together, create executables ,static libraries, dynamic linked libraries (shared by all programs on the system). Static linked lib and exe are large: all machine code are copied in, no sharing. Loading process (in memory running program) / PID Load program into memory (RAM) : stack->static (per PID); heap->dynamic (per system/resolved at run-time) ; text->binary code. int i; // static on the stack new int; // dynamic on the heap setTimer // an address in the code/text Running Moving PC (program counter) Point PC to the entry point in code: main; execute instruction code one statement at a time. PC jumps to setTimer when the method is called; Return sets the PC back to the caller.

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

Common Binary Code?

OS-Independent Code: Intermediate Languages 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 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

Program statements are interpreted one at a time during the run-time. 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) Java Interpreter on OS2 (java) Binary Code for OS1 Binary Code for OS2 OS1 OS2 Program statements are interpreted one at a time during the run-time.

JIT Compiler 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.

All programming statements are compiled at compile time. 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 Java JIT Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2 All programming statements are compiled at compile time.

.NET OS-Platform-Independence 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 MSIL JIT Compiler on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2 .NET OS-Platform-Independence

A Common Language?

.NET Common Language Runtime 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, …, struct, class, Semantics: multiple inheritance not allowed in CTS Object Oriented: encapsulation, inheritance and polymorphism Visual Basic (.Net) redesigned to be OO The code that follows CTS standard is called managed code. regular C++ supports multiple inheritance managed C++ does not support multiple inheritance

.NET Language-Independence 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 CLR on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2 .NET Language-Independence

Source Code for Language 1 Source Code for Language 2 .NET Architecture for Language and Platform Independence (fan-in and fan-out on MSIL) 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 CLR on OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

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

CLI : Common Language Infrastructure 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)

Source Code for Language 1 Source Code for Language 2 CLI (Common Language Infrastructure) Specification Open Architecture for Language and Platform Independent Programming 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 CLR for OS2 Binary Code for OS1 Binary Code for OS2 OS1 OS2

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.

Web Enabled & Distributed .NET

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

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

A Common Language for the Internet 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 XML (eXtensible Markup Language) Allow user defined tags (types) SOAP (Simple Object Access Protocol) Standards for defining objects for the Internet Based on XML WSDL (Web Service Description Language) Standards for describing web services for the Internet Based on XML

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

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

.NET Framework Compositions 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 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 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, …

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

History: .Net & COM 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

.NET Enterprise Servers 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

Versions of .NET .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 4.0: DLR, improved security model, http://msdn.microsoft.com/en-us/library/ms171868.aspx

Versions of .NET http://en.wikipedia.org/wiki/.NET_Framework#mediaviewer/File:DotNet.svg

EDP