0% found this document useful (0 votes)
19 views58 pages

Aluu

h

Uploaded by

alemtes29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views58 pages

Aluu

h

Uploaded by

alemtes29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Department of computer

science

Event Driven Programming


Alemu W.

1 1 Alemu W. 11/7/2024
Course contents
 Chapter One Introduction  Chapter 3: Object-Oriented Fundamentals
in VB.NET
 Introduction to Software Development
 Language Fundamentals
 Software Development Approaches  Variables and Data Types
 Control Flow
 Rapid Application Development  Methods and Their Types
 Events
 Software Development Principles  Classes and Objects

 Chapter 2: Introduction to .NET  Inheritance and Overloading Implementation


 Classes versus Components
 The .NET Platform and Its Architecture
 Base Class Library
 Chapter 4: Exception Handling
 Common Language Runtime
 Introducing Exception Handling
 Uses of .NET Platform in Application Development
 Structured Exception Handling
 Introduction to Microsoft Visual Studio 2010  Implementing Exception Handling
 SDI and MDI Forms
 Controls

2 Alemu W. 11/7/2024
Cont..
 Chapter 5: Manipulating Files How  Chapter 6: Database Programming
 The ADO.NET Architecture
to open a Text File
 LINQ Architecture
 Read a file line by line in VB .NET
 The .NET Data providers
 Write to a Text File
 Working with the common .NET Data providers

 How to Copy, Move and Delete a File  The Dataset Component

 Using the DataGrid View for database access

3 Alemu W. 11/7/2024
Assessment Methods
 Assignment/quizzes 10 %
 Mid Semester Examination 20%
 Project 20%
 Final Examination 50%

4 Alemu W. 11/7/2024
Reference
Text books and References:

1. An introduction to programming using visual basic 6.0, fourth edition, David I.


Schneider Evjen, B et al, (2008). Professional Visual Basic 2008.

2. Crosspoint Boulevard: Wiley Publishing Inc. Gary Cornell and Jonathan Morrison
(2002).

3. 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

5 Alemu W. 11/7/2024
Chapter One
Introduction

6 Alemu W. 11/7/2024
Chapter Content

 Introduction

 Introduction to Software Development

 Software Development Approaches

 Rapid Application Development

 Software Development Principles

7 Alemu W. 11/7/2024
1.1 Event Driven Programming
 Event-driven programming focuses on events

 Event-driven programming is a paradigm where entities

 (objects, services, and so on) communicate indirectly by


sending messages to one another through an intermediary.

 Event:

 A signal to the program that something has happened.


8 Alemu W. 11/7/2024
Cont..
 It can be triggered either by external user actions, such as

 mouse movements

 button clicks, and keystrokes,

 by the operating system, such as a timer.

 The program can choose to respond to or ignore an event.

9 Alemu W. 11/7/2024
1.2 Introduction to Software Development
 What is the introduction of software development?

 Software development is the process of

 conceiving, specifying, designing, programming, documenting, testing,


and bug fixing involved in creating and maintaining applications,
frameworks, or other software components.

10 Alemu W. 11/7/2024
Cont..
 Software development is the process programmers use to build
computer programs.

 The process, also known as the

 Software Development Life Cycle (SDLC),

 includes several phases that provide a method for building products


that meet technical specifications and user requirements.

11 Alemu W. 11/7/2024
1.2.1 Software Development Process
 The process vary in the detail of what activities they prescribe,
their related artefacts.(b/c there are many approaches)

 However the most common process is


 Analysis
 Design
 Implementation
 Testing
 Deployment

12 Alemu W. 11/7/2024
1.3 Software Development Approaches
 the most commonly used software development approaches are
• Waterfall Approach
• Spiral Approach
• RAD
• Agile
• Incremental
• Etc…

13 Alemu W. 11/7/2024
•Waterfall Approach
• The stages of a project
were carried
out sequentially.
• The entirety of each
stage had to be
completed, formally
documented, discussed,
agreed, and signed off
before the next stage
could begin.
• This has been described
as the waterfall
lifecycle.

14 Alemu W. 11/7/2024
•Spiral Approach
• is a development method that uses
the same steps as the waterfall
method, but also uses project
cycles, each culminating in a version
of the software (a prototype) that is
formally reviewed to inform the next
cycle.

Determine objectives
Identify and resolve risks
Develop and test
Plan (the next iteration)

15 Alemu W. 11/7/2024
Reading Assignment
 Incremental approach
 Agile Approach
 Extreme programming
 DevOps Methodology
 Joint Application Development Methodology

16 Alemu W. 11/7/2024
1.4 Rapid application development
 is a development model prioritizes rapid prototyping and
quick feedback over long drawn out development and testing
cycles.

 With rapid application development, developers can make


multiple iterations and updates to a software rapidly
without needing to start a development schedule from
scratch each time.

17 Alemu W. 11/7/2024
Steps in RAD
 Although RAD has changed over the years, these four
basic steps provide some continuity over the years.
1. Define the requirements
2. Prototype -> the actual development takes place.
 Instead of following a strict set of requirements
3. Receive Feedback
 Feedback on what’s good, what’s not, what works,
and what doesn’t
4. Finalize Software

18 Alemu W. 11/7/2024
19 Alemu W. 11/7/2024
Cont..
 Advantages of the RAD model
 helps to reduce the risk and required efforts on the part
of the software developer.
 helps the clients to take quick reviews for the project.
 Encourages customer feedback which always provides
improvement scope for any software development project.
 Each phase in RAD delivers the highest priority
functionality to the client.
20 Alemu W. 11/7/2024
Cont..
 Disadvantages RAD model
 Depends on the strong team and individual performances for clearly
identifying the exact requirement of the business.

 This approach demands highly skilled developers and a designer’s team


which may not be possible for every organization.

 This is not applicable for the developer to use in small budget


projects as the cost of modeling and automated code generation is very
high.

 Progress and problems accustomed are hard to track as such there is no


21 documentation to demonstrate what has been done.
Alemu W. 11/7/2024
22 Alemu W. 11/7/2024
Chapter Two

Introduction to .NET

23 Alemu W. 11/7/2024
Chapter Content
 Chapter 2: Introduction to .NET
 The .NET Platform and Its Architecture
 Common Language Runtime
 Base Class Library
 Uses of .NET Platform in Application
Development
 Introduction to Microsoft Visual Studio 2010
24 Alemu W. 11/7/2024
What is .NET Framework?
 .Net Framework is a software development platform developed by Microsoft
for building and running Windows applications.
 The .Net framework consists of developer tools, programming languages,
and libraries to build desktop and web applications.
 It is also used to build websites, web services, and games.
 The .Net framework was meant to create applications, which would run on the
Windows Platform.
 The first version of the .Net framework was released in the year 2002.
 The version was called .Net framework 1.0.

25 Alemu W. 11/7/2024
Cont.…
 .NET Framework Architecture is a programming model for the .Net
platform that provides an execution environment and integration

 Has various programming languages for simple development and


deployment of various Windows and desktop applications.

 It consists of class libraries and reusable components.

26 Alemu W. 11/7/2024
.NET Components
 Common Language Runtime
 CLR is the execution engine that handles running
applications.
 It provides services like thread management, garbage
collection, type-safety, exception handling, and more.

 also knows as the runtime.

 CLR’s responsibility is to mange any code written in .NET


languages such as C#, VB.NET, or F#.
27 Alemu W. 11/7/2024
Base Class Library(BCL)
 The Class Library provides a set of APIs and types for common
functionality.

 It provides types for strings, dates, numbers, etc.

 The Class Library includes APIs for reading and writing files,
connecting to databases, drawing, and more.

 The .NET Framework includes a set of standard class libraries.

 A class library is a collection of methods and functions that


can be used for the core purpose.
28 Alemu W. 11/7/2024
Characteristics of .NET Frame work

29 Alemu W. 11/7/2024
Uses of .NET Platform in Application Development
 Can be used to develop
 Windows applications (windows forms)
 Web (Asp.net)
 Mobile applications that run .NET
 Ado.net For Data base connectivity

30 Alemu W. 11/7/2024
.NET Programming languages?
 Supports he following Languages
 Visual Basic
 C#
 F#
 Visual C++
 Etc.…

31 Alemu W. 11/7/2024
1.5 Visual Basic programming language
 VB.NET is also known as Visual Basic.NET.
 It stands for Visual Basic .Network Enabled Technologies.
 VB.NET is a simple, multi-paradigm object-oriented
programming language designed to create a wide range of
 Windows,
 Web,
 Mobile applications built on the .NET Framework.
 developed by Microsoft in 2002.

32 Alemu W. 11/7/2024
VB.NET Features
• It is an object-oriented programming language
• This language is used to design user interfaces for window,
mobile, and web-based applications.
• It supports a rapid application development tool kit.
• It is not a case sensitive language like other languages such
as C++, java, etc.
• It provides simple events management in .NET application.
• A Window Form enables us to inherit all existing functionality
of form that can be used to create a new form. So, in this way,
it reduced the code complexity.

33 Alemu W. 11/7/2024
Advantages of VB.NET
• Your code will be formatted automatically.
• You will use object-oriented constructs to create an
enterprise-class code.
• You can create web applications with modern
features like performance counters, event logs, and
file system.
• You can connect your applications to other
applications created in languages that run on the
.NET framework.
• You will enjoy features like docking, automatic
control anchoring, and in-place menu editor all good
for developing web applications.
34 Alemu W. 11/7/2024
Disadvantages of VB.NET
• VB.NET cannot handle pointers directly.
• This is a significant disadvantage since pointers
are much necessary for programming.
• Any additional coding will lead to many CPU
cycles, requiring more processing time.
• Your application will become slow.

35 Alemu W. 11/7/2024
Summary:
• VB.NET was developed by Microsoft.
• It is an object-oriented language.
• The language is not case sensitive.
• VB.NET programs run on the .NET framework.
• In VB.NET, the garbage collection process has been automated.
• The language provides windows forms from which you can inherit your
own forms.
• VB.NET allows you to enjoy the drag and drop feature when creating a
user interface.

36 Alemu W. 11/7/2024
Introduction to Microsoft Visual Studio 2010

37 Alemu W. 11/7/2024
38 Alemu W. 11/7/2024
Solution explorer

Windows Form

Tool box
• button
• Textbox etc
Properties
Data source DB

39 Alemu W. 11/7/2024
To be continued in Lab…

40 Alemu W. 11/7/2024
Chapter 3:

Object-Oriented Fundamentals in VB.NET

41 Alemu W. 11/7/2024
Contents
1. Language Fundamentals
 Variables and Data Types
 Control Flow
 Methods and Their Types
 Events

2. Classes and Objects


3. Inheritance and Overloading Implementation
4. Classes versus Components
42 Alemu W. 11/7/2024
3.1 Language Fundamentals

3.1.1 Variables and Data Types

43 Alemu W. 11/7/2024
3.1.2 Control Flow

44 Alemu W. 11/7/2024
3.1.3 Methods and Their Types

45 Alemu W. 11/7/2024
3.1.4 Events

46 Alemu W. 11/7/2024
47 Alemu W. 11/7/2024
48 Alemu W. 11/7/2024
49 Alemu W. 11/7/2024
3.2 Classes and Objects

50 Alemu W. 11/7/2024
3.3 Inheritance and Overloading Implementation

51 Alemu W. 11/7/2024
3.4 Classes versus Components

52 Alemu W. 11/7/2024
53 Alemu W. 11/7/2024
Chapter 4:

Exception Handling
54 Alemu W. 11/7/2024
Contents
 Introducing Exception Handling
 Structured Exception Handling
 Implementing Exception Handling

55 Alemu W. 11/7/2024
56 Alemu W. 11/7/2024
57 Alemu W. 11/7/2024
58 Alemu W. 11/7/2024

You might also like