Chapter 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Ethiopian TVT Institute

Faculty of Electrical Electronics and ICT


Department of Information Technology

1
Windows Programing
Course Name/Title: Windows Programing
Course Code: ITec 2036
Course Description:
This course provides the required skills, knowledge
and attitude for the development of windows-based
applications. The course also provides the
development of desktop and event-driven
applications based on the principles OOP
programing paradigm, working with different
windows controls, connecting windows forms with
database and application deployments.
2
Course objective
At the end of the course, students will be able to:
– Understand the windows programming development tool,
visual programming, .NET framework.
– Understand the windows programing development and
event-driven programing paradigm.
– Understand the basic syntax and familiarized with the
software tools for windows programming.
– Understand the windows controls interface design during
design and runtime.
– Understand to connect the windows controls with
database systems.
– Design, develop and implement application software for
real world Problems using Visual C#.Net by connecting to
a database
3
Detail Course Outline
Chapter 1 :Introduction
1.1 The event driven life cycle in windows programming
1.2 The .Net framework and the CLR
1.3 Ms-Visual Studio IDE and basic features
Chapter 2:C# Fundamentals
2.1 data types
2.2 operators
2.3 using variables
2.4 conditionals
2.5 loops
4
Chapter 3:String and Date time datatypes
3.1 Manipulation with string data types
3.2 Working with datetime types.
3.3 Arrays and collections
Chapter 4: Methods, events ,delegates
4.1 Methods declaration
4.2 Methods types
4.3 Calling Methods by value, And calling methods by
references
4.4 events, delegates and indexer
Chapter 5: Object Oriented in visual C#
5.1 Object- oriented programming concepts
5.2 Working with classes and Access modifiers
5.3 Creating and destroying objects
5.4 Inheritance
5.5 Properties
5
Chapter 6: Exception handling in visual c#.net
6.1 Debug application
6.2 Understand exception in C#
6.3 Write a program that Handle exception
6.4 Write a program that Validate data
Chapter 7: Windows Forms
7.1 Event driven and delegate
7.2 text boxes, rich text boxes, labels, link labels
7.3 buttons, checkboxes, radio buttons, panels, group boxes
7.4 list boxes, combo boxes picture boxes
7.5 scroll bars, splitters, track bars, pickers, notify icons, tool
tips, timers
7.6 menus, dialog boxes, printing
7.7 Image lists, tree and list views, toolbars, status and progress
bars, tab controls.
7.8 MDI Form design
6
Chapter 8: Database programming
8.1 ADO Net overview
8.2 Net data providers
8.3 The dataset and data binding
8.4 Data access with ADO Net
8.5 Handling data bases using codes
Chapter 9:Deploying application
8.1 choosing a deployment strategy
8.2 deploying applications

7
Suggested texts and reference materials
Text Book
– Joel Murach, Anne Boehm. Murach C# 2012. Mike Murach & Associates Inc
USA, 2013
– Svetlin Nakov et al. Fundamentals of Computer Programming With C#. Sofia,
2013
Reference Books
– John Sharp. Microsoft Visual C# 2013 Step by Step, 2015 Microsoft Press USA
– Lalit Arora. .Net framework with C# programming, 2007 India
– Utley, Craig, A Programmer’s Guide to Visual Basic.NET, USA , Sams
Publishing, 2001
– An introduction to programming using visual basic 6.0, fourth edition, David I.
Schneider
– Evjen, B et al, (2008). Professional Visual Basic 2008. Crosspoint Boulevard:
Wiley Publishing Inc.
– Gary Cornell and Jonathan Morrison (2002). Programming VB.NET: A Guide
for Experienced Programmers. USA: APress
– Cameron Wakefield, Henk-Evert Sonder and Wei Meng Lee. VB.NET
Developers Guide. USA: Syngress Publishing, Inc.

8
Assessment methods

Mid semester Exam 20%


Individual Assignment 10%
Lab Practice 10%
Group/Individual /Project 10%
Final semester Exam 50%
Total 100%

9
Chapter One
Introduction

10
The event driven life cycle in windows
programming

11
con’t…

12
The .NET Platform and Its Architecture

• Introduced in 2002, Microsoft’s architecture for


applications in the Internet age.
– Increased robustness over classic Windows apps
– New programming platform
– Built for the web
• .NET is a platform that runs on the operating
system.
• Sits on top on the OS (currently all the Windows;
Linux/Unix subset also available – Mono Project)
13
Con’t…

• Provides language interoperability across


platforms. Platform/language independent.
• Strong emphasis on Web connectivity, using
XML web services to connect and share data
between smart client devices, servers, and
developers/user.

14
Con’t…

• The .Net Framework Is a combination of CLR,


FCL, ADO.Net and XML classes, Web/Window
applications and Web services.

15
.NET Common Language Runtime (CLR)

• The heart of the .Net Framework.


• The software programs written in .NET are executed in the
execution environment, which is called CLR (Common
Language Runtime). These are the core and essential parts of
the .NET framework.
• .NET CLR is a runtime environment that manages and
executes the code written in any .NET programming language.
• It resides above the operating system and handles all .Net
applications. It handles garbage collection, Code Access
Security (CAS) etc

16
Con’t…
• Language's compiler compiles the source code of
applications developed using .NET compliant languages
into CLR's intermediate language called MSIL, i.e.,
Microsoft intermediate language code.
• This code is platform-independent.
• Metadata is also generated during compilation.This
metadata is generally about members and types
required by CLR to execute MSIL code.
• A just-in-time compiler component of CLR converts
MSIL code into native code of the machine. This code is
platform-dependent.

17
Con’t…
• The main components of CLR are:
– Common type system
– Common language speciation
– Garbage Collector
– Just in Time Compiler
– Metadata and Assemblies

18
Con’t…
1.Common type system:
• CTS provides guidelines for declaring, using, and managing data
types at runtime.
• It offers cross-language communication. For example, VB.NET
has an integer data type, and C# has an int data type for
managing integers. After compilation, Int32 is used by both
data types.
• So, CTS provides the data types using managed code. A
common type system helps in writing language-independent
code.

19
Con’t…

2.Common Language Specification (CLS):


• What makes a language to be .Net compliant? Answer
is CLS. Microsoft has defined some specifications that
each .Net language has to follow. For e.g.: no pointer,
no multiple inheritances etc.
• Common Language Specification (CLS) contains a set of
rules to be followed by all NET-supported languages.
• The common rules make it easy to implement language
integration and help in cross-language inheritance and
debugging.

20
Con’t…

3. Garbage Collection:
• Garbage Collector is a component of CLR that
works as an automatic memory manager.
• It helps manage memory by automatically
allocating memory according to the
requirement.
• It allocates heap memory to objects.

21
Con’t…

4. Just in Time (JIT) Compiler:


• JIT Compiler is an important component of CLR. It converts
the MSIL code into native code (i.e., machine-specific
code).
5. Metadata:
• A Metadata is a binary information about the program,
either stored in a CLR Portable Executable file (PE) along
with MSIL code or in the memory.
6. Assemblies:
• An assembly is a fundamental unit of physical code
grouping. It consists of the assembly manifest, metadata,
MSIL code, and a set of resources like image files.

22
Con’t…

• .NET CLR Functions


Following are the functions of the CLR.
• It converts the program into native code.
• Handles Exceptions
• Provides type-safety
• Memory management
• Provides security
• Improved performance
• Language independent
• Platform independent
• Garbage collection
• Provides language features such as inheritance, interfaces, and
overloading for object-oriented programs.
23
Con’t…

• Some .NET Languages


– C#
– Eiffel
– Mercury
– Python
– Ruby
– SML
– Perl
– Smalltalk
– VB.NET
– F# …. More are under development

24
Ms-Visual Studio IDE and basic features

• Visual Studio is an Integrated Development


Environment(IDE) developed by Microsoft to
develop Desktop applications, GUI(Graphical
User Interface), console, web applications,
mobile applications, cloud, and web services,
etc.
• It is not a language-specific IDE as you can use
this to write code in C#, C++, VB(Visual Basic),
Python, JavaScript, and many more languages.
25
End!

You might also like