Event Driven Programming CHAPTER 1 and 2

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

Department of computer

science

Event Driven Programming


Prepared By HaftomB. (M.Sc..)

1 1 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


Assessment Methods
 Assignment/quizzes 10 %
 Mid Semester Examination 20%
 Project 20%
 Final Examination 50%

4 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


Chapter One
Introduction

6 Prepared By Haftom B. 10/18/2022


Chapter Content

 Introduction

 Introduction to Software Development

 Software Development Approaches

 Rapid Application Development

 Software Development Principles

7 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022
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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


1.3 Software Development Approaches
 the most commonly used software development approaches are
• Waterfall Approach
• Spiral Approach
• RAD
• Agile
• Incremental
• Etc…

13 Prepared By Haftom B. 10/18/2022


•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 Prepared By Haftom B. 10/18/2022


•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 Prepared By Haftom B. 10/18/2022


Reading Assignment
 Incremental approach
 Agile Approach
 Extreme programming
 DevOps Methodology
 Joint Application Development Methodology

16 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


19 Prepared By Haftom B. 10/18/2022
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 Prepared By Haftom B. 10/18/2022
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


documentation to demonstrate what has been done.

21 Prepared By Haftom B. 10/18/2022


22 Prepared By Haftom B. 10/18/2022
Chapter Two

Introduction to .NET

23 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022
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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


.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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


Characteristics of .NET Frame work

29 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


.NET Programming languages?
 Supports he following Languages
 Visual Basic
 C#
 F#
 Visual C++
 Etc.…

31 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


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 Prepared By Haftom B. 10/18/2022


Introduction to Microsoft Visual Studio 2010

37 Prepared By Haftom B. 10/18/2022


38 Prepared By Haftom B. 10/18/2022
Solution explorer

Windows Form

Tool box
• button
• Textbox etc
Properties
Data source DB

39 Prepared By Haftom B. 10/18/2022


Chapter 3:

Object-Oriented Fundamentals in VB.NET

40 Prepared By Haftom B. 10/18/2022

You might also like