Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#

Similar presentations


Presentation on theme: "CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#"— Presentation transcript:

1 CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#

2 3 Programming Platforms 2 Visual Studio.NET Java Open Source (LAMP) Platform WindowsAll platformsLinux Architecture.NET architectureJava Virtual Machine Apache Server Databases supported Several DBMS MySQL Programming languages supported C++, C#, VB, J#, and some third party languages JavaPHP Advantages Visual Designer for GUIs; ASP.NET for web pages Applets for client; Servlets, JSPs for web pages Free

3 3 The Visual Studio.NET IDE Visual Studio.NET is an Integrated Development Environment (IDE). It contains: –the Designer which makes it easy to create Graphical User Interfaces (GUIs) –a context-sensitive text editor –various language compilers (we will be using C#) –a runtime environment for testing/debugging our code Visual Studio.NET can be used with other programming languages such as C++ and Visual Basic.

4 4 The.NET Framework Common Language Specification ASP.NET: Web Services and Web Forms Windows Forms ADO.NET: Data and XML Framework Class Library Common Language Runtime VB C++ C# J# … Visual Studio.NET

5 Procedural programming + classes Where Does C# Fit? 1967 1970 1972 1985 1998 2000 BCPL B C C++ C++ C++.NET 1997 2000 BASIC Visual BASIC BASIC.NET MS Visual 1965 1991 2000 C# combines the best features of C/C++, Java, and VB in a new visual, fully object-oriented, event- driven programming language designed for use with the.NET platform. Procedural programming + classes MS 1995 2000 Sun Microsystems Java GUIs Web Programming Fully OOP ANSI/ISO MS Visual C#.NET

6 6 Programming Windows with C# A new language designed specifically for.NET Fully object-oriented Type safe language Built-in Visual Editor for GUI development Fundamental programming syntax resembles that of C++ and Java

7 7 Importance of C# Microsoft wrote much of.NET system programming in C# and is currently writing next version of Windows (Longhorn) in C#. In “Special Report: Security”, PC Magazine, pg 78, 8/3/04 issue: “ ‘In the course of putting together Longhorn,’ says Nash, [of Microsoft] ‘… we’re making sure that in the design phase, the implementation phase, as we build the product, we’re looking for security and quality issues.’ The company is also using design tools that are far more conducive to building secure code. It has discarded notoriously insecure languages like C and C++ in favor of C# and the Microsoft.NET platform.”

8 8 C# Features A considerable amount of pre-defined code resides in the Framework Class Library (FCL). C# can be used to develop –Console applications (procedural programming) –Interactive Windows Forms applications (GUIs) –Web Services (server programs) –Interactive Web Forms (via ASP.NET) Like other.NET languages, code is compiled first into MSIL (MS Intermediary Language) and then into machine language.

9 Objects Object Oriented Terminology

10 10 Classes (templates) Classes are patterns for objects. You might think of a class as a cookie cutter and a set of objects as cookies created with that cutter (class). An object is an instance of a class, and the process of creating an object is called instantiation. Class Objects

11 11 Classes A class is code that defines the attributes and operations of an object. In this course, we may define some custom classes. But mostly, we will use classes that already exist in.NET libraries. It is not necessary for a programmer who uses a pre-existing class to know or understand its code structure. This concept is called encapsulation.

12 12 Objects (nouns) An object is a person, place or thing. Objects are instances of classes (template for object). All objects have attributes (variables) and operations (methods). What class would each of the pictured objects belong to?

13 13 Attributes (adjectives) Attributes (variables) are characteristics of an object. All vehicle objects have make, model, color, number of doors, and fuel type. These attributes (variables) are described in the class definition (template for objects). The pictured vehicle is a blue Smart forTwo with 2 doors that runs on regular gasoline; these characteristics represent values assigned to attributes of this specific vehicle object.

14 14 Operations (verbs) Operations (methods) are actions related to an object. The code associated with these operations (methods) is part of the class definition. You might purchase, sell, repaint, or crash a vehicle. These operations may affect the values of the attributes of the vehicle object.


Download ppt "CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#"

Similar presentations


Ads by Google