0% found this document useful (0 votes)
6 views65 pages

Develop Information System Learning Guide

The document outlines a learning guide for the unit 'Develop Information Systems' as part of the Computer Scientist qualification, detailing the course content, learning outcomes, and performance standards. Key topics include understanding information systems fundamentals, software development processes, human-computer interaction, and VB.NET application development. The guide is structured to provide a comprehensive overview of information systems, their components, types, emerging trends, and security measures.

Uploaded by

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

Develop Information System Learning Guide

The document outlines a learning guide for the unit 'Develop Information Systems' as part of the Computer Scientist qualification, detailing the course content, learning outcomes, and performance standards. Key topics include understanding information systems fundamentals, software development processes, human-computer interaction, and VB.NET application development. The guide is structured to provide a comprehensive overview of information systems, their components, types, emerging trends, and security measures.

Uploaded by

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

LEARNING GUIDES

Title Of the Unit: DEVELOP INFORMATION SYSTEMS

Unit Code: ICT/CU/CS/CR/06/6/A

Qualification Title: COMPIUTER SCIENTIST

Name of Trainer: MR PATRICK

Contact Information [email protected]

Phone of Department:254117215735

Department: COMPUTER SCIENCES

Duration: 150 HOURS

Date of Preparation: 25/6/2025

Table of Contents
DEVELOP INFORMATION SYSTEMS....................................................................................................................2
Learning Outcomes.......................................................................................................................................................2
COURSE OUTLINE.....................................................................................................................................................3
Learning Outcome 1: Understand fundamentals of Information Systems...............................................................6
Learning outcome 2: Understand the Software Development Process...................................................................12
3: Demonstrate Human Computer Interaction Principles.......................................................................................25
4. Understand the VB.NET programming environment..........................................................................................30
5. Develop and test a VB.NET application................................................................................................................42
DEVELOP INFORMATION SYSTEMS
Introduction
This unit covers the competencies required to develop an information system. It involves understanding
fundamentals of information systems, understanding the software development process, demonstrating
human computer interaction principles, understanding the VB.net programming environment and developing
and testing a VB.NET application.

Performance Standard
1. Described the software development process
2. Demonstrated Human Computer Interaction principles
3. Develop and test a VB.NET application

Learning Outcomes
List of Learning Outcomes
 Understand fundamentals of Information Systems
 Understand the Software Development Process
 Demonstrate Human Computer Interaction Principles
 Understand the VB.NET programming environment
 Develop and test a VB.NET application

COURSE OUTLINE
1. Understand fundamentals of Information Systems
 Information systems
✓ Definition
✓ Components
• Types of information systems
✓ Transaction Processing Systems
✓ Management information Systems
✓ Decision Support Systems
✓ Executive Information Systems
✓ Office Automation Systems
• Emerging trends in information systems
• Recommendation of information systems for different scenarios
• Information system security
✓ Definition
✓ Information security management system
✓ Tools for information system security
✓ Firewalls
✓ Virtual private networks
• Mobile security
✓ Geolocation software
✓ Remote data removal software
• Web security
✓ Cyber security
✓ Technologies
✓ Web threats
✓ Defence strategies
2. Understand the Software Development Process
• Software Development Lifecycle
• Software Development Methodologies
✓ Waterfall
✓ Spiral
✓ Rapid Application Development
✓ Agile Development
• Modeling techniques
✓ Data Flow Diagrams
✓ Entity Relation Diagrams
✓ UML diagrams
• Creation of models for given scenarios
3. Demonstrate Human Computer Interaction Principles
 Human Computer Interaction
 Definition
 Role of interaction design
 Interaction styles
 Interaction elements
 Mistakes in interaction design
• Interface design principles
• Prescribing interaction choices and recognition of interaction flaws
4. Understand the VB.NET programming environment
 The .Net framework
 Applications supported
 Components of the .Net framework
 Installation of Visual Studio
 Features of VB.Net
 The Integrated Development Environment (IDE)
 Definition of IDE
 Parts of VB.Net IDE
 VB.Net program structure
 VB.NET syntax
 Namespace declaration
 Class or module
 Procedures
 Data types, variables,
 constants
 The Main procedure
 Statements and Expressions (Variable declarations, operations, control statements)
 Comments
 Creating aVB.Net project
 Saving Forms and Project
 Compiling a Project
5. Develop and test a VB.NET application
Basic VB.Net Controls
 Controls and their purpose
 Standard naming conventions for controls
 Elements of a control
 Properties
 Methods
 Events
 Demonstrating Properties, Methods and Events
 Properties for basic controls
 Setting properties at design time and run time
 Methods for basic controls
 Events for basic controls
 Demonstrating event handling
 Mouse events
 Keyboard events
 Designing VB.NET form using HCI principles
 Connection of VB.Net applications to a database
 ADO.Net object model
 Demonstrating Database connection using the Data Provider
 Demonstrating creation of tables using Dataset components
 Deployment of VB.Net applications
 Purpose deployment
 Demonstrating deployment steps
References
a. Programming with visual basic 2017 8th Edition by Diane Zak
b. An Introduction to Programming Using Visual Basic. Eleventh Edition by David I. Schneider
c. VB.NET Programming by H. M. Deitel
d. Microsoft Docs: Visual Basic .NET
Learning Outcome 1: Understand fundamentals of
Information Systems
Introduction:
This learning outcome covers describing the components of information systems, outlining types of
information systems, explaining emerging trends in information systems and recommending
Information systems for different scenarios

Information systems
Information systems are the combination of people, information technology, and business processes to
accomplish a business objective.

Components of an information system


Information systems are made up of five components: hardware, software, data, people, and process.
i) Hardware: Information systems hardware is the part of an information system you can touch – the
physical components of the technology. Computers, keyboards, disk drives, iPads, and flash drives are all
examples of information systems hardware.
ii) Software: is a set of instructions that tells the hardware what to do. Software is not tangible – it cannot be
touched.
iii) Data: data is a collection of facts. For example, your street address, the city you live in, and your phone
number are all pieces of data. Like software, data is also intangible.
iv) People: the people involved with information systems; from the front-line help-desk workers, to systems
analysts, to programmers, all the way up to the chief information officer (CIO)
v) Process: a process is a series of steps undertaken to achieve a desired outcome or goal. Information
systems are becoming more and more integrated with organizational processes, bringing more productivity
and better control to those processes

Types of information systems


Among the types of information systems are:
i) Transaction Processing Systems: A Transaction Processing Systems (TPS) is used primarily for record
keeping which is required in any organization to conduct the business. Examples of TPS are sales order
entry, payroll, and shipping records etc. TPS is used for periodic report generation in a scheduled manner.
TPS is also used for producing reports on demand as well as exception reports.
ii) Management Information Systems: Management Information System (MIS) provides the management
routine summary of basic operations of the organization. The essential services are recorded by the TPS of
the organization and MIS consolidates the data on sales, production etc. MIS provides routine information to
managers and decision makers. The primary objective behind installing an MIS in the organization is to
increase operational efficiency. MIS may support marketing, production, finance, etc.
iii) Decision Support Systems: Decision Support System (DSS) serves the management of an organization.
A decision support system has sophisticated data analysis tools, which support and assist all aspects of
problem-specific decision-making. DSS may use data from external sources such as current stock prices to
enhance decision-making.
iv) Executive Information Systems: An Executive Information System (EIS) is also called the Executive
Support System. Senior managers of an organization use the EIS. Therefore, it must be easy to use so that
executives can use it without any assistance. EIS can do trend analysis, exception reporting and have drill-
down capabilities. The results are usually presented in a graphical form tailored to the executive’s
information needs. EIS has on-line analysis tools and they access a broad range of internal and external data
v) Office Automation Systems: are computer based information systems that collect, process, store and
transmit electronic messages, documents and other forms of communications among individuals, work
groups and organizations

Emerging trends in information systems


It has always been the assumption that the implementation of information systems will, in and of itself, bring
a business competitive advantage. This goes to explain the emerging trends in information systems, which
majorly is to keep businesses afloat despite the competition.

Among the emerging trends is:


i) Globalization: The use of the Internet is growing all over the world, and with it the use of digital devices
ii) Socialization: social media sites are seeing tremendous growth; such as Facebook, and twitter usage
iii) Personalization: ever since the advent of Web 2.0 and e-commerce, users of information systems have
expected to be able to modify their experiences to meet their personal tastes. Soon, we will begin seeing
devices perfectly matched to our personal preferences, based upon information collected about us in the past
iv) Mobile technologies: Beginning with the simple cell phone in the 1990s and evolving into the
smartphones and tablets of today, the growth of mobile has been overwhelming
v) Wearable technologies: Wearables have been around for a long time, with technologies such as hearing
aids and, later, Bluetooth earpieces. But now, we are seeing an explosion of new wearable technologies.
Perhaps the best known of these is Google Glass, an augmented reality device that you wear over your eyes
like a pair of eyeglasses.
vi) Collaborative technologies: this is whereby it keeps getting simpler than ever to share data with each
other for mutual benefit. Such as adding our rating of a restaurant to a review site.
vii) Printable technologies: One of the most amazing innovations to be developed recently is the 3-D
printer. 3-D printing is quite useful for prototyping the designs of products to determine their feasibility and
marketability. 3-D printing has also been used to create working prosthetic legs, handguns, and even an ear
that can hear beyond the range of normal hearing
vii) Wireless technologies (findable): The “Internet of Things” refers to the idea of physical objects being
connected to the Internet. Advances in wireless technologies and sensors will allow physical objects to send
and receive data about themselves. Many of the technologies to enable this are already available – it is just a
matter of integrating them together
viii) Autonomous: an extension of the Internet of Things is another major emerging trend: autonomous
robots and vehicles. By combining software, sensors, and location technologies, devices that can operate
themselves to perform specific functions are being developed.
ix) Information system security: In order for a company or an individual to use a computing device with
confidence, they must first be assured that the device is not compromised in any way and that all
communications will be secure. The same applies with any information system.

concepts of information systems security:


The following are fundamental concepts of information systems security:
i) Confidentiality: When protecting information, we want to be able to restrict access to those who are
allowed to see it; everyone else should be disallowed from learning anything about its contents
ii) Integrity: Integrity is the assurance that the information being accessed has not been altered and truly
represents what is intended
iii) Availability: Availability means that information can be accessed and modified by anyone authorized to
do so in an appropriate time frame
:The Information Security Triad: Confidentiality, Integrity, Availability (CIA)

Tools for information system security


These tools are to ensure confidentiality, integrity and availability of information systems. They include:
i) Authentication: Authentication can be accomplished by identifying someone through one or more of
three factors: something they know, something they have, or something they are. For example, the most
common form of authentication today is the user ID and password.
ii) Access Control: Once a user has been authenticated, the next step is to ensure that they can only access
the information resources that are appropriate. This is done through the use of access control. Access control
determines which users are authorized to read, modify, add, and/or delete information.
iii) Back ups: Another essential tool for information security is a comprehensive backup plan for the entire
organization
iv) Firewalls: Another method that an organization should use to increase security on its network is a
firewall. A firewall can exist as hardware or software (or both). A hardware firewall is a device that is
connected to the network and filters the packets based on a set of rules. A software firewall runs on the
operating system and intercepts packets as they arrive to a computer. A firewall protects all company servers
and computers by stopping packets from outside the organization’s network that do not meet a strict set of
criteria. A firewall may also be configured to restrict the flow of packets leaving the organization.
v) Intrusion Detection Systems: Another device that can be placed on the network for security purposes is
an intrusion detection system, or IDS. An IDS does not add any additional security; instead, it provides the
functionality to identify if the network is being attacked.
vi) Virtual private networks: A VPN allows a user who is outside of a corporate network to take a detour
around the firewall and access the internal network from the outside. Through a combination of software and
security measures, this lets an organization allow limited access to its networks while at the same time
ensuring overall security.
vii) Physical Security: Physical security is the protection of the actual hardware and networking
components that store and transmit information resources to ensure that these resources cannot be physically
tampered with or stolen
viii) Mobile security: Creating a BYOD (“Bring Your Own Device”) policy allows employees to integrate
themselves more fully into their job and can bring higher employee satisfaction and productivity. In many
cases, it may be virtually impossible to prevent employees from having their own smartphones or iPads in
the workplace.
So, what can be done to secure mobile devices?
i) Implement policies to govern the use of mobile devices within an organization
ii) Use of software such as:
 Geolocation software: that aids in finding lost or misplaced mobile gadgets
 Remote data removal software: which will remove data from a device if it becomes a security risk

ix). Web security: Web security is mainly security of web applications such as websites, and web
information systems from attacks and intrusions.

Cyber security
Cyber security is the practice of defending computers, servers, mobile devices, electronic systems, networks,
and data from malicious attacks. It's also known as information technology security or electronic
information security

Web threats
The threats countered by cyber-security are three-fold:
Cybercrime includes single actors or groups targeting systems for financial gain or to cause disruption.
Cyber-attack often involves politically motivated information gathering.
Cyber-terrorism is intended to undermine electronic systems to cause panic or fear.

Defence strategies
Cyber safety tips - protect yourself against cyber attacks
Businesses and individuals ought to take guard against cyber threats. The following are some cyber safety
tips:
 Update your software and operating system: This means you benefit from the latest security
patches.
 Use anti-virus software: Security solutions like Kaspersky Total Security will detect and removes
threats. Keep your software updated for the best level of protection.
 Use strong passwords: Ensure your passwords are not easily guessable.
 Do not open email attachments from unknown senders: These could be infected with malware.
 Do not click on links in emails from unknown senders or unfamiliar websites: This is a common
way that malware is spread.
 Avoid using unsecured Wi-Fi networks in public places: Unsecure networks leave you vulnerable
to man-in-the-middle attacks.

Conclusion
At the end of this learning outcome, the trainee should be able to describe the components of information
systems, outline types of information systems, explain emerging trends in information systems and
recommend information systems for different scenarios

Further reading
Information systems for business and beyond: A look at the technology, people, and processes of
information systems; 2014 -by David T. Bourgeois, Ph.D. and Bourgeois
Assessment
a) What are the five components that make up an information system?
b) What are three examples of information system hardware?
c) Microsoft Windows is an example of which component of information systems?
d) What roles do people play in information systems?
Oral assessment
a) Outline types of information systems
b) What is a database in the context of Information Systems?
c) What does the term authentication mean?
Practical assessment
a) Research on business application areas of the various types of information systems and indicate their
benefits
References
https://saylordotorg.github.io/text_business-information-systems-design-an-app-for-that/index.html
https://edugeneral.org/blog/business/types-of-information-systems/

2: Understand the Software Development Process


Introduction:
This learning outcome covers explaining the Software Development Life Cycle and software development
methodologies and demonstrating modelling techniques using CASE tools.
Software Development Life Cycle
The Software Development life cycle (SDLC), sometimes referred to as the waterfall methodology, is the
sequence of steps that take place during the development of a piece of software.
Software Development Methodologies
1. Waterfall methodology
The SDLC methodology is sometimes referred to as the waterfall methodology to represent how
each step is a separate part of the process; only when one step is completed can another step begin.
The following are its phases:
1) Preliminary Analysis: In this phase, a review is done of the request. This step is important in
determining if the project should even get started.
2) System Analysis: In this phase, one or more system analysts work with different stakeholder
groups to determine the specific requirements for the new system. No programming is done in
this step. Instead, procedures are documented, key players are interviewed, and data requirements
are developed in order to get an overall picture of exactly what the system is supposed to do. The
result of this phase is a system-requirements document.
3) System Design: In this phase, a designer takes the system-requirements document created in the
previous phase and develops the specific technical details required for the system. It is in this
phase that the business requirements are translated into specific technical requirements. The
design for the user interface, database, data inputs and outputs, and reporting are developed here.
The result of this phase is a system-design document. This document will have everything a
programmer will need to actually create the system.
4) Programming: The code finally gets written in the programming phase. Using the system-
design document as a guide, a programmer (or team of programmers) develops the program. The
result of this phase is an initial working program that meets the requirements laid out in the
system-analysis phase and the design developed in the system-design phase.
5) Testing: In the testing phase, the software program developed in the previous phase is put
through a series of structured tests. The first is a unit test, which tests individual parts of the code
for errors or bugs. Next is a system test, where the different components of the system are tested
to ensure that they work together properly. Finally, the user-acceptance test allows those that will
be using the software to test the system to ensure that it meets their standards. Any bugs, errors,
or problems found during testing are addressed and then tested again.
6) Implementation: Once the new system is developed and tested, it has to be implemented in the
organization. This phase includes training the users, providing documentation, and conversion
from any previous system to the new system.
7) Maintenance: This final phase takes place once the implementation phase is complete. In this
phase, the system has a structured support process in place: reported bugs are fixed and requests
for new features are evaluated and implemented; system updates and backups are performed on a
regular basis.

SDLC waterfall

2. Rapid Application Development (RAD)


The RAD methodology is much more compressed than SDLC. Many of the SDLC steps are combined and
the focus is on user participation and iteration. This methodology is much better suited for smaller projects
than SDLC and has the added advantage of giving users the ability to provide feedback throughout the
process. SDLC requires more documentation and attention to detail and is well suited to large, resource-
intensive projects. RAD makes more sense for smaller projects that are less resource-intensive and need to
be developed quickly.
The RAD methodology consists of four phases:
a. Requirements Planning. This phase is similar to the preliminary-analysis, system-analysis, and
design phases of the SDLC. In this phase, the overall requirements for the system are defined, a team
is identified, and feasibility is determined.

b. User Design. In this phase, representatives of the users work with the system analysts, designers, and
programmers to interactively create the design of the system. One technique for working with all of
these various stakeholders is the so-called JAD session. JAD is an acronym for joint application
development. A JAD session gets all of the stakeholders together to have a structured discussion
about the design of the system. Application developers also sit in on this meeting and observe, trying
to understand the essence of the requirements.

c. Construction. In the construction phase, the application developers, working with the users, build
the next version of the system. This is an interactive process, and changes can be made as developers
are working on the program. This step is executed in parallel with the User Design step in an
iterative fashion, until an acceptable version of the product is developed.

d. Cutover. In this step, which is similar to the implementation step of the SDLC, the system goes live.
All steps required to move from the previous state to the use of the new system are completed here.
Figure 1:The RAD methodology

3. Agile Methodologies
Agile methodologies are a group of methodologies that utilize incremental changes with a focus on quality
and attention to detail. Each increment is released in a specified period of time (called a time box), creating a
regular release schedule with very specific objectives. While considered a separate methodology from RAD,
they share some of the same principles: iterative development, user interaction, ability to change. The agile
methodologies are based on the “Agile Manifesto,” first released in 2001.
The characteristics of agile methods include:
i) small cross-functional teams that include development-team members and users;
ii) daily status meetings to discuss the current state of the project;
iii) short time-frame increments (from days to one or two weeks) for each change to be completed;
iv) and at the end of each iteration, a working project is completed to demonstrate to the
stakeholders.
The goal of the agile methodologies is to provide the flexibility of an iterative approach while
ensuring a quality product.

Modeling techniques
Models are forms of description often adopted in software development. They are abstractions used to
represent and communicate what is important, devoid of unnecessary detail, and to help developers deal
with the complexity of the problem being investigated or the solution being developed.
a) Data Flow Diagrams (DFD)
DFD graphically representing the functions, or processes, which capture, manipulate, store, and distribute
data between a system and its environment and between components of a system.

The visual representation makes it a good communication tool between User and System designer. Structure
of DFD allows starting from a broad overview and expand it to a hierarchy of detailed diagrams. DFD has
often been used due to the following reasons:
i) Logical information flow of the system
ii) Determination of physical system construction requirements
iii) Simplicity of notation
iv) Establishment of manual and automated systems requirements

Symbols is a DFD include:


i) Process: A process receives input data and produces output with a different content or form.
Processes can be as simple as collecting input data and saving in the database, or it can be complex
as producing a report containing monthly sales of all retail stores in the northwest region.
Every process has a name that identifies the function it performs. The name consists of a verb,
followed by a singular noun.
Example: Apply Payment; Calculate Commission; Verify Order
Notation: A rounded rectangle represents a process; Processes are given IDs for easy referencing.

ii) Data flow: A data-flow is a path for data to move from one part of the information system to
another. A data-flow may represent a single data element such as the Customer ID or it can represent
a set of data element (or a data structure).
Example:
Customer_info (LastName, FirstName, SS#, Tel #, etc.)
Order_info (OrderId, Item#, OrderDate, CustomerID, etc.)
Notation: Straight lines with incoming arrows are input data flow; Straight lines with outgoing
arrows are output data flows
iii) Data Store: A data store or data repository is used in a data-flow diagram to represent a situation
when the system must retain data because one or more processes need to use the stored data in a later
time.
Notation: Data can be written into the data store, which is depicted by an outgoing arrow; Data can
be read from a data store, which is depicted by an incoming arrow.
Examples are: inventory, Accounts receivables, Orders, and Daily Payments.

iv) External Entity: An external entity is a person, department, outside organization, or other
information system that provides data to the system or receives outputs from the system. External
entities are components outside of the boundaries of the information systems. They represent how
the information system interacts with the outside world.

A rectangle represents an external entity; They either supply data or receive data; They do not
process data
Notation: A customer submitting an order and then receive a bill from the system; A vendor issue an
invoice

Data Flow Diagram


b) Entity Relation Diagrams
An entity relationship diagram (ERD) shows the relationships of entity sets stored in a database. An entity in
this context is an object, a component of data. An entity set is a collection of similar entities. These entities
can have attributes that define its properties.

Common Entity Relationship Diagram Symbols


An ER diagram is a means of visualizing how the information a system produces is related. There are five
main components of an ERD:
i) Entities, which are represented by rectangles. An entity is an object or concept about which you
want to store information.

ii) Actions, which are represented by diamond shapes, show how two entities share information in the
database.

In some cases, entities can be self-linked. For example, employees can supervise other employees.

iii) Attributes, which are represented by ovals. A key attribute is the unique, distinguishing
characteristic of the entity. For example, an employee's social security number might be the
employee's key attribute.

iv) Connecting lines, solid lines that connect attributes to show the relationships of entities in the
diagram.
v) Cardinality specifies how many instances of an entity relate to one instance of another entity.
Ordinality is also closely linked to cardinality. While cardinality specifies the occurrences of a
relationship, ordinality describes the relationship as either mandatory or optional. In other words,
cardinality specifies the maximum number of relationships and ordinality specifies the absolute
minimum number of relationships.

Notation styles that express cardinality


Bachman Style:

Chen Style:
Information Engineering Style:

Entity Modeling notations


c) UML diagrams
UML stands for Unified Modeling language.
UML is a way of visualizing a software program using a collection of diagrams.
These diagrams are organized into two distinct groups: structural diagrams and behavioral or interaction
diagrams.

Structural UML diagrams


 Class diagram
 Package diagram
 Object diagram
 Component diagram
 Composite structure diagram
 Deployment diagram

Behavioral UML diagrams


 Activity diagram
 Sequence diagram
 Use case diagram
 State diagram
 Communication diagram
 Interaction overview diagram
 Timing diagram
d) Using CASE tools
CASE stands for Computer Aided Software Engineering. It means, development and maintenance of
software projects with help of various automated software tools.
CASE tools are set of software application programs, which are used to automate SDLC activities. CASE
tools are used by software project managers, analysts and engineers to develop software system.
There are number of CASE tools available to simplify various stages of Software Development Life Cycle
such as Analysis tools, Design tools, Project management tools, Database Management tools,
Documentation tools are to name a few.
Use of CASE tools accelerates the development of project to produce desired result and helps to uncover
flaws before moving ahead with next stage in software development.

Components of CASE Tools


CASE tools can be broadly divided into the following parts based on their use at a particular SDLC stage:
- Central Repository - CASE tools require a central repository, which can serve as a source of
common, integrated and consistent information. Central repository is a central place of storage where
product specifications, requirement documents, related reports and diagrams, other useful
information regarding management is stored. Central repository also serves as data dictionary.
- Upper Case Tools - Upper CASE tools are used in planning, analysis and design stages of SDLC.
- Lower Case Tools - Lower CASE tools are used in implementation, testing and maintenance.
- Integrated Case Tools - Integrated CASE tools are helpful in all the stages of SDLC, from
Requirement gathering to Testing and documentation.

CASE tools can be grouped together if they have similar functionality, process activities and capability of
getting integrated with other tools.
Scope of Case Tools
The scope of CASE tools goes throughout the SDLC.

Case Tools Types


Popular CASE tool types include:
i) Diagram tools
These tools are used to represent system components, data and control flow among various software
components and system structure in a graphical form. For example, Flow Chart Maker tool for creating
state-of-the-art flowcharts, Start UML for creating UML diagrams and MS Visio for many categories of
models.

ii) Project Management Tools


These tools are used for project planning, cost and effort estimation, project scheduling and resource
planning. Managers have to strictly comply project execution with every mentioned step in software project
management. Project management tools help in storing and sharing project information in real-time
throughout the organization. For example, Creative Pro Office, Trac Project, Basecamp.

iii) Documentation Tools


Documentation in a software project starts prior to the software process, goes throughout all phases of
SDLC and after the completion of the project.

Documentation tools generate documents for technical users and end users. Technical users are mostly in-
house professionals of the development team who refer to system manual, reference manual, training
manual, installation manuals etc. The end user documents describe the functioning and how-to of the system
such as user manual. For example, Doxygen, DrExplain, Adobe RoboHelp for documentation.
iv) Analysis Tools
These tools help to gather requirements, automatically check for any inconsistency, inaccuracy in the
diagrams, data redundancies or erroneous omissions. For example, Accept 360, Accompa, CaseComplete for
requirement analysis, Visible Analyst for total analysis.

v) Design Tools
These tools help software designers to design the block structure of the software, which may further be
broken down in smaller modules using refinement techniques. These tools provides detailing of each module
and interconnections among modules. For example, Animated Software Design

vi) Programming Tools


These tools consist of programming environments like IDE (Integrated Development Environment), in-built
modules library and simulation tools. These tools provide comprehensive aid in building software product
and include features for simulation and testing. For example, Cscope to search code in C, Eclipse.

vii) Prototyping Tools


Software prototype is simulated version of the intended software product. Prototype provides initial look and
feel of the product and simulates few aspect of actual product.
Prototyping CASE tools essentially come with graphical libraries. They can create hardware independent
user interfaces and design. These tools help us to build rapid prototypes based on existing information. In
addition, they provide simulation of software prototype. For example, Serena prototype composer, Mockup
Builder.

viii) Web Development Tools


These tools assist in designing web pages with all allied elements like forms, text, and script, graphic and so
on. Web tools also provide live preview of what is being developed and how will it look after completion.
For example, Fontello, Adobe Edge Inspect, Foundation 3, Brackets.

ix) Maintenance Tools


Software maintenance includes modifications in the software product after it is delivered. Automatic logging
and error reporting techniques, automatic error ticket generation and root cause Analysis are few CASE
tools, which help software organization in maintenance phase of SDLC. For example, Bugzilla for defect
tracking, HP Quality Center.

Conclusion
At the end of the learning outcome, the trainee should be able to explain the software development life cycle
and software development methodologies and demonstrate modeling techniques using CASE tools.

Further reading
https://bus206.pressbooks.com/chapter/chapter-10-information-systems-development/

Assessment
Written assessment
1. Explain Software Development Life Cycle
2. What is RAD software development?
3. State at least 4 rules of data flows in a DFD
4. What is a CASE tool?
5. Why is information systems modeling important?

Oral assessment
1. Explain Software Development Methodologies
2. Explain all the symbols in a DFD

Practical assessment
Install Star UML software
Demonstrate the various UML diagrams, indicating the scenarios that call for each diagram.

References
Sommerville, Software Engineering, 9th ed, Addison Wesley, 2011
https://www.visual-paradigm.com/guide/data-flow-diagram/what-is-data-flow-diagram/
3: Demonstrate Human Computer Interaction Principles
Introduction
This learning outcome covers explaining the Human Computer Interaction and interaction design principles
and demonstrating interface design using a design software.

Human Computer Interaction Concepts


Human-computer interaction (HCI) is a multidisciplinary field of study focusing on the design of computer
technology and, in particular, the interaction between humans (the users) and
computers.

Role of interaction design


It is the design of the interaction between users and products. Most often when people talk about interaction
design, the products tend to be software products like apps or websites. The goal of interaction design is to
create products that enable the user to achieve their objective(s) in the best way possible.

The 5 dimensions of interaction design


The 5 dimensions of interaction design is a useful model to understand what interaction design involves.
i) 1D: Words
Words—especially those used in interactions, like button labels—should be meaningful and simple to
understand. They should communicate information to users, but not too much information to overwhelm the
user.

ii) 2D: Visual representations


This concerns graphical elements like images, typography and icons that users interact with. These usually
supplement the words used to communicate information to users.

iii) 3D: Physical objects or space


Through what physical objects do users interact with the product? A laptop, with a mouse or touchpad? Or a
smartphone, with the user’s fingers? And within what kind of physical space does the user do so? For
instance, is the user standing in a crowded train while using the app on a smartphone, or sitting on a desk in
the office surfing the website? These all affect the interaction between the user and the product.
iv) 4D: Time
While this dimension sounds a little abstract, it mostly refers to media that changes with time (animation,
videos, sounds). Motion and sounds play a crucial role in giving visual and audio feedback to users’
interactions. Also of concern is the amount of time a user spends interacting with the product: can users
track their progress, or resume their interaction some time later?

v) 5D: Behaviour
This includes the mechanism of a product: how do users perform actions on the website? How do users
operate the product? In other words, it’s how the previous dimensions define the interactions of a product. It
also includes the reactions—for instance emotional responses or feedback—of users and the product.

Interface design principles


Despite its importance, good HCI design is generally difficult, mainly because it is a multi objective task
that involves simultaneous consideration of many things, such as the types of users, characteristics of the
tasks, capabilities and cost of the devices, lack of objective or exact quantitative evaluation measures, and
changing technologies, to name just a few. A considerable knowledge in many different fields is required.

Main HCI principles include:


a) “Know Thy User”: This principle simply states that the interaction and interface should cater to the
needs and capabilities of the target user of the system in design.
b) Understand the Task: The term task refers to the job to be accomplished by the user through the
use of the interactive system. In fact, understanding the task at hand is closely related to the
interaction modeling and user analysis. It really boils down to identifying the sequence and structure
of subtasks at an abstraction level appropriate for the typical user within the larger application
context.
c) Reduce Memory Load: Designing interaction with as little memory load as possible is a principle
that also has a theoretical basis. Humans are certainly more efficient in carrying out tasks that require
less memory burden, long or short term. Keeping the user’s short-term memory load light is of
particular importance with regard to the interface’s role as a quick and easy guidance to the
completion of the task.
d) Strive for Consistency: ensure consistency throughout the design
e) Remind Users and Refresh Their Memory: Any significant task will involve the use of memory,
so another good strategy is to employ interfaces that give continuous reminders of important
information and thereby refresh the user’s memory
f) Prevent Errors/Reversal of Action: For instance, having the system require the user to choose from
possibilities (e.g., menu system) is generally a safer approach than to rely on recall
g) Naturalness: Naturalness refers to a trait that is reflective of various operations in our everyday life

User interface Design Software (UI/UX) tools


UI/UX stands for User Interface/User Experience
These tools are most useful for prototyping the look and feel of user interfaces.

How to choose the right prototyping tool


In order to choose the right prototyping tool for designing, there are a few factors which need to be
evaluated for that tool to check whether it fits our needs or not.

1. Learning Curve – How is it easy to adapt to?


2. Sharing - As collaboration is key for design, we check how well suitable it is for teamwork. The tool
should provide collaboration ability for multiple people to be in sync with each other. Since every designer
has their own perspective/ ideas for a project it’s imperative that all of them stay on the same page.
3. Usage - How well it fits your design process and other tools you regularly use. For example, if you are
designing in Photoshop, Illustrator or Sketch, it would be great if your prototyping software could directly
use the files produced by these apps without requiring you to export assets separately and then build
everything from scratch to create the interactions.
4. Ease of use and comfort - The ease of use in using the prototyping tool is essential for the designer to
save time and help increase output. It should reduce the number of steps required for a designer to complete
a task rather than increasing it.
5. Cost
6. Fidelity: What would be the requirement for the prototype? Whether you just require a mockup of the app
layout or do you need something that supports more details and complex interactions?
Some Popular Prototyping Tools
1. InVision
Runs on Web
Prototypes for Android, iOS, Web
Invision is by far the most popular prototyping tool in the world.
With InVision’s project management page, you can organize design components into a status workflow.
You can set columns for To-do, In progress, Needs review, and Approved, and drag and drop your design
components into the appropriate column.
You could add interactions and animations to static images. You can upload multiple file types, including
JPG, PNG, GIF, AI, and PSD.

2. Adobe Experience Design


Runs on OS X, Windows, Android, iOS
Prototypes for: All
With Adobe XD, you can draw, reuse, and remix vector and build artwork to create wireframes, screen
layouts, interactive prototypes, and production-ready assets all in the same app.

3. Axure
Runs on OS X, Windows
Prototypes for: All OS’s

Conclusion
At the end of the learning outcome, the trainee should be able to explain the Human Computer Interaction
and interaction design principles and demonstrate interface design using a design software.

Further reading
https://www.interaction-design.org/literature/book/the-encyclopedia-of-human-computer-interaction-2nd-
ed/human-computer-interaction-brief-intro

Assessment
Written assessment
- Explain possible mistakes in interaction design
- What is HCI?
- Why is consistency important in interface design?
- How should the naturalness principle apply in interface design?
- What range of computer users should HCI design cover?

Oral assessment
How should HCI design cover the needs of special users such as children and the physically challenged?

Practical assessment
1. Install a UI/UX design software
2. Demonstrate interface interaction design using the design software

References
Grudin, J. (2012) A Moving Target: The evolution of Human-computer Interaction. In J. Jacko (Ed.),
Human-computer interaction handbook: Fundamentals, evolving technologies, and emerging applications.
(3rd edition). Taylor & Francis
Human–Computer Interaction: Fundamentals and Practice by Gerard Jounghyun Kim; ISBN 978-1-4822-
3389-6
https://asktog.com/atc/principles-of-interaction-design/
4. Understand the VB.NET programming environment
Introduction
This learning outcome covers explaining the .NET framework, installing Visual Studio, outlining features of
VB.NET, explaining the VB.NET IDE environment, explaining VB.NET program structure and creating
and compiling a VB.NET project

The .Net framework


The .Net framework is a revolutionary platform that helps you to write the following types of applications −
i) Windows applications
ii) Web applications
iii) Web services
The .Net framework applications are multi-platform applications. The framework has been designed in such
a way that it can be used from any of the following languages: Visual Basic, C#, C++, Jscript, and COBOL,
etc.
All these languages can access the framework as well as communicate with each other.
The .Net framework consists of an enormous library of codes used by the client languages like VB.Net.
These languages use object-oriented methodology.

Following are some of the components of the .Net framework −


a) Common Language Runtime (CLR)
b) The .Net Framework Class Library
c) Common Language Specification
d) Common Type System
e) Metadata and Assemblies
f) Windows Forms
g) ASP.Net and ASP.Net AJAX
h) ADO.Net
i) Windows Workflow Foundation (WF)
j) Windows Presentation Foundation
k) Windows Communication Foundation (WCF)
l) LINQ
Installation of Visual Studio
Download it online from Microsoft.

Installation of Visual Studio


It gets automatically installed in your machine. Please note that you need an active internet connection for
installing
Integrated Development Environment (IDE) For VB.Net
Visual Studio IDE
Visual Studio is a powerful and customizable programming environment that contains all the tools you need
to build programs quickly and efficiently. It offers a set of tools that help you write and modify the code for
your programs, and also detect and correct errors in your programs.

Before you start learning more about VB.NET programming, it is important to understand the development
environment and identify some of the frequently using programming tools in Visual Studio IDE.
Visual Studio IDE
1. Menu Bar
2. Standard Toolbar
3. Toolbox
4. Forms Designer
5. Output Window
6. Solution Explorer
7. Properties Window

Visual Basic.NET IDE is built out of a collection of different windows. Some windows are used for writing
code, some for designing interfaces, and others for getting a general overview of files or classes in your
application.

Visual Studio organizes your work in projects and solutions. A solution can contain more than one project,
such as a DLL and an executable that references that DLL. From the following chapters you will learn how
to use these Visual Studio features for your programming needs.
VB.NET Program Structure
A VB.Net program basically consists of the following parts −
 Namespace declaration
 A class or module
 One or more procedures
 Variables
 The Main procedure
 Statements & Expressions
 Comments

Let us look at a simple code that would print the words "Hello World"
Imports System
Module Module1
'This program will display Hello World
Sub Main()
Console.WriteLine("Hello World")
Console.ReadKey()
End Sub
End Module
When the above code is compiled and executed, it produces the following result −
Hello, World!

Let us look various parts of the above program −


 The first line of the program Imports System is used to include the System namespace in the
program.
 The next line has a Module declaration, the module Module1. VB.Net is completely object
oriented, so every program must contain a module of a class that contains the data and procedures
that your program uses.
 Classes or Modules generally would contain more than one procedure. Procedures contain the
executable code, or in other words, they define the behavior of the class. A procedure could be any
of the following −
o Function
o Sub
o Operator
o Get
o Set
o AddHandler
o RemoveHandler
o RaiseEvent
 The next line( 'This program) will be ignored by the compiler and it has been put to add additional
comments in the program.
 The next line defines the Main procedure, which is the entry point for all VB.Net programs. The
Main procedure states what the module or class will do when executed.
 The Main procedure specifies its behavior with the statement
 Console.WriteLine("Hello World") WriteLine is a method of the Console class defined in
the System namespace. This statement causes the message "Hello, World!" to be displayed on the
screen.
 The last line Console.ReadKey() is for the VS.NET Users. This will prevent the screen from
running and closing quickly when the program is launched from Visual Studio .NET.

Compile & Execute VB.Net Program


If you are using Visual Studio.Net IDE, take the following steps −
– Start Visual Studio.
– On the menu bar, choose File → New → Project.
– Choose Visual Basic from templates
– Choose Console Application.
– Specify a name and location for your project using the Browse button, and then choose the OK
button.
– The new project appears in Solution Explorer.
– Write code in the Code Editor.
– Click the Run button or the F5 key to run the project. A Command Prompt window appears that
contains the line Hello World.

You can compile a VB.Net program by using the command line instead of the Visual Studio IDE −
– Open a text editor and add the above mentioned code.
– Save the file as helloworld.vb
– Open the command prompt tool and go to the directory where you saved the file.
– Type vbc helloworld.vb and press enter to compile your code.
– If there are no errors in your code the command prompt will take you to the next line and would
generate helloworld.exe executable file.
– Next, type helloworld to execute your program.
– You will be able to see "Hello World" printed on the screen.

VB.Net is an object-oriented programming language. In Object-Oriented Programming methodology, a


program consists of various objects that interact with each other by means of actions. The actions that an
object may take are called methods. Objects of the same kind are said to have the same type or, more often,
are said to be in the same class.
When we consider a VB.Net program, it can be defined as a collection of objects that communicate via
invoking each other's methods. Let us now briefly look into what do class, object, methods and instance
variables mean.
 Object − Objects have states and behaviors. Example: A dog has states - color, name, breed as well
as behaviors - wagging, barking, eating, etc. An object is an instance of a class.
 Class − A class can be defined as a template/blueprint that describes the behaviors/states that objects
of its type support.
 Methods − A method is basically a behavior. A class can contain many methods. It is in methods
where the logics are written, data is manipulated and all the actions are executed.
 Instance Variables − Each object has its unique set of instance variables. An object's state is created
by the values assigned to these instance variables.

Example: A Rectangle Class in VB.Net


For example, let us consider a Rectangle object. It has attributes like length and width. Depending upon the
design, it may need ways for accepting the values of these attributes, calculating area and displaying details.

Let us look at an implementation of a Rectangle class and discuss VB.Net basic syntax on the basis of our
observations in it −
Imports System
Public Class Rectangle
Private length As Double
Private width As Double
'Public methods
Public Sub AcceptDetails()
length = 4.5
width = 3.5
End Sub
Public Function GetArea() As Double
GetArea = length * width
End Function
Public Sub Display()
Console.WriteLine("Length: {0}", length)
Console.WriteLine("Width: {0}", width)
Console.WriteLine("Area: {0}", GetArea())
End Sub
Shared Sub Main()
Dim r As New Rectangle()
r.Acceptdetails()
r.Display()
Console.ReadLine()
End Sub
End Class

When the above code is compiled and executed, it produces the following result −
Length: 4.5
Width: 3.5
Area: 15.75

Sub Main indicates the entry point of VB.Net program. Here, we are using Class that contains both code and
data. You use classes to create objects. For example, in the code, r is a Rectangle object.

An object is an instance of a class −


Dim r As New Rectangle()
A class may have members that can be accessible from outside class, if so specified. Data members are
called fields and procedure members are called methods.

Shared methods or static methods can be invoked without creating an object of the class. Instance methods
are invoked through an object of the class −
Shared Sub Main ()
Dim r As New Rectangle ()
r.Acceptdetails()
r.Display()
Console.ReadLine()
End Sub

Creating aVB.Net project


To start Vb.net from your computer, go to Start Menu->All Programs->Visual Studio (2015). A splash
screen will display for a view second and finally, a dashboard will be displayed.

Then click on the File menu and select “New project”


On the template (Top left of the form), select Visual Basic and make sure “Windows Form Application” is
selected as shown on the image below.
Windows Form Application

You may also change the .net framework that you are targeting on the middle top part of the “New Project”
screen. However, the default .net Framework 2.0 should work for light-weight programs.

At the bottom, you will see a textbox for naming your project; just use a self-descriptive name like
‘MyFirstApp’. Also, you need to select a folder where your project’s file will be saved. The solution name
will be filled by default and you can leave it that way. Then click ‘OK’ to start the new project.

Windows Forms
VB.Net programmers have made extensive use of forms to build user interfaces. Each time you create a
Windows application, Visual Studio will display a default blank form, onto which you can drag and drop
controls from the Visual Studio Toolbox window.

Figure 2:VB.NET - Windows Forms

The first step is to start a new project and build a form. Open your Visual Studio and select File-
>NewProject and select Visual Basic from the New project dialog box and select Windows Forms
Application. Enter your project name instead of WindowsApplication1 in the bottom of the dialog box and
click OK button. The following picture shows how to create a new Form in Visual Studio.
Select project type from New project dialog Box.

When you add a Windows Form to your project, many of the forms properties are set by default. Although
these values are convenient, they will not always suit your programming needs. The following picture shows
what the default Form looks like.

At the top of the form there is a title bar which displays the forms title. Form1 is the default name, you can
change the name to your convenience . The title bar also includes the control box, which holds the minimize,
maximize, and close buttons.
If you want to set any properties of the Form, you can use Visual Studio Property window to change it.

Conclusion
At the end of the learning outcome, the trainee should be able to explain the .NET framework, install Visual
Studio, outline features of VB.NET, explain the VB.NET IDE environment, explain the VB.NET program
structure and create and compile a VB.NET project

Further reading
https://www.tutorialspoint.com/vb.net/
Assessment
Written assessment
1) What are the components of the VB.NET IDE environment?
2) What is namespace?
3) Which data types does VB.NET support?
4) What is the role of a method in a VB.NET program
5) When is “new” keyword used in a VB.NET program?

Oral assessment
What are the .Net framework components?

Practical assessment
1. Write and compile VB.NET code to declare a variable to store the age of a person.
Then the output of the program is as an example shown below:
You are 20 years old.

2. Write VB.NET code to prompt a user to input his/her name and then the output will be shown as shown in
the example below:
Hello John!

References
https://visualstudio.microsoft.com/
http://vb.net-informations.com/gui/vb.net_vside.htm
http://vb.net-informations.com/gui/windows_forms.htm
5. Develop and test a VB.NET application
Introduction
This learning outcome covers outlining Basic VB.Net Controls, explaining elements of a control,
demonstrating basic VB.Net Controls’ Properties, Methods and Events event handling and forms design
using HCI principles and connection of VB.Net applications to a database.
VB.Net - Basic Controls
An object is a type of user interface element you create on a Visual Basic form by using a toolbox control. In
fact, in Visual Basic, the form itself is an object. Every Visual

Elements of a control
Basic control consists of three important elements −
 Properties which describe the object,
 Methods cause an object to do something and
 Events are what happens when an object does something.

Control Properties
All the Visual Basic Objects can be moved, resized or customized by setting their properties. A property is a
value or characteristic held by a Visual Basic object, such as Caption or Fore Color.

Properties can be set at design time by using the Properties window or at run time by using statements in
the program code. Object.Property=Value
Where
 Object is the name of the object you're customizing.
 Property is the characteristic you want to change.
 Value is the new property setting.

For example, Form1.Caption="Hello"


Control Methods
A method is a procedure created as a member of a class and they cause an object to do something. Methods
are used to access or manipulate the characteristics of an object or a variable. There are mainly two
categories of methods you will use in your classes −

 If you are using a control such as one of those provided by the Toolbox, you can call any of its public
methods. The requirements of such a method depend on the class being used.
 If none of the existing methods can perform your desired task, you can add a method to a class.

For example, the MessageBox control has a method named Show, which is called in the code snippet below

Control Events
An event is a signal that informs an application that something important has occurred. For example, when a
user clicks a control on a form, the form can raise a Click event and call a procedure that handles the event.
There are various types of events associated with a Form like click, double click, close, load, resize, etc.
Following is the default structure of a form Load event handler subroutine. You can see this code by double
clicking the code which will give you a complete list of the all events associated with Form control −

Here, Handles MyBase.Load indicates that Form1_Load() subroutine handles Load event. Similar way, you
can check stub code for click, double click. If you want to initialize some variables like properties, etc., then
you will keep such code inside Form1_Load() subroutine. Here, important point to note is the name of the
event handler, which is by default Form1_Load, but you can change this name based on your naming
convention you use in your application programming.
Form Design Using Basic Controls
VB.Net provides a huge variety of controls that help you to create rich user interface. Functionalities of all
these controls are defined in the respective control classes. The control classes are defined in the
System.Windows.Forms namespace.

The following are some of the commonly used controls −


i) Forms: The container for all the controls that make up the user interface.
ii) TextBox: It represents a Windows textbox control.
iii) Label: It represents a standard Windows label.
iv) Button: It represents a Windows button control.
v) ListBox: It represents a Windows control to display a list of items.
vi) ComboBox: It represents a Windows combo box control.
vii) RadioButton: It enables the user to select a single option from a group of choices when paired
with other RadioButton controls.
viii) CheckBox: It represents a Windows CheckBox.
ix) PictureBox: It represents a Windows picture box control for displaying an image.
x) ProgressBar: It represents a Windows progress bar control.
xi) ScrollBar: It Implements the basic functionality of a scroll bar control.
xii) DateTimePicker: It represents a Windows control that allows the user to select a date and a time
and to display the date and time with a specified format.
xiii) TreeView: It displays a hierarchical collection of labeled items, each represented by a
TreeNode.
xiiii) ListView: It represents a Windows list view control, which displays a collection of items that
can be displayed using one of four different views.

Event Handling
Events are basically a user action like key press, clicks, mouse movements, etc., or some occurrence like
system generated notifications. Applications need to respond to events when they occur.

Clicking on a button, or entering some text in a text box, or clicking on a menu item, all are examples of
events. An event is an action that calls a function or may cause another event. Event handlers are functions
that tell how to respond to an event.
VB.Net is an event-driven language. There are mainly two types of events −
 Mouse events
 Keyboard events

Handling Mouse Events


Mouse events occur with mouse movements in forms and controls. Following are the various mouse events
related with a Control class −
 MouseDown − it occurs when a mouse button is pressed
 MouseEnter − it occurs when the mouse pointer enters the control
 MouseHover − it occurs when the mouse pointer hovers over the control
 MouseLeave − it occurs when the mouse pointer leaves the control
 MouseMove − it occurs when the mouse pointer moves over the control
 MouseUp − it occurs when the mouse pointer is over the control and the mouse button is released
 MouseWheel − it occurs when the mouse wheel moves and the control has focus

The event handlers of the mouse events get an argument of type MouseEventArgs. The MouseEventArgs
object is used for handling mouse events. It has the following properties −
 Buttons − indicates the mouse button pressed
 Clicks − indicates the number of clicks
 Delta − indicates the number of detents the mouse wheel rotated
 X − indicates the x-coordinate of mouse click
 Y − indicates the y-coordinate of mouse click

Example:
Following is an example, which shows how to handle mouse events. Take the following steps −
 Add three labels, three text boxes and a button control in the form.
 Change the text properties of the labels to - Customer ID, Name and Address, respectively.
 Change the name properties of the text boxes to txtID, txtName and txtAddress, respectively.
 Change the text property of the button to 'Submit'.
 Add the following code in the code editor window −
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
' Set the caption bar text of the form.
Me.Text = "tutorialspont.com"
End Sub

Private Sub txtID_MouseEnter(sender As Object, e As EventArgs)_


Handles txtID.MouseEnter
'code for handling mouse enter on ID textbox
txtID.BackColor = Color.CornflowerBlue
txtID.ForeColor = Color.White
End Sub

Private Sub txtID_MouseLeave(sender As Object, e As EventArgs) _


Handles txtID.MouseLeave
'code for handling mouse leave on ID textbox
txtID.BackColor = Color.White
txtID.ForeColor = Color.Blue
End Sub

Private Sub txtName_MouseEnter(sender As Object, e As EventArgs) _


Handles txtName.MouseEnter
'code for handling mouse enter on Name textbox
txtName.BackColor = Color.CornflowerBlue
txtName.ForeColor = Color.White
End Sub

Private Sub txtName_MouseLeave(sender As Object, e As EventArgs) _


Handles txtName.MouseLeave
'code for handling mouse leave on Name textbox
txtName.BackColor = Color.White
txtName.ForeColor = Color.Blue
End Sub

Private Sub txtAddress_MouseEnter(sender As Object, e As EventArgs) _


Handles txtAddress.MouseEnter
'code for handling mouse enter on Address textbox
txtAddress.BackColor = Color.CornflowerBlue
txtAddress.ForeColor = Color.White
End Sub

Private Sub txtAddress_MouseLeave(sender As Object, e As EventArgs) _


Handles txtAddress.MouseLeave
'code for handling mouse leave on Address textbox
txtAddress.BackColor = Color.White
txtAddress.ForeColor = Color.Blue
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) _
Handles Button1.Click
MsgBox("Thank you " & txtName.Text & ", for your kind
cooperation")
End Sub
End Class
When the above code is executed and run using Start button available at the Microsoft Visual Studio tool
bar, it will show the following window −
Try to enter text in the text boxes and check the mouse events −

Handling Keyboard Events


Following are the various keyboard events related with a Control class −
 KeyDown − occurs when a key is pressed down and the control has focus
 KeyPress − occurs when a key is pressed and the control has focus
 KeyUp − occurs when a key is released while the control has focus

The event handlers of the KeyDown and KeyUp events get an argument of type KeyEventArgs. This object
has the following properties −
 Alt − it indicates whether the ALT key is pressed
 Control − it indicates whether the CTRL key is pressed
 Handled − it indicates whether the event is handled
 KeyCode − stores the keyboard code for the event
 KeyData − stores the keyboard data for the event
 KeyValue − stores the keyboard value for the event
 Modifiers − it indicates which modifier keys (Ctrl, Shift, and/or Alt) are pressed
 Shift − it indicates if the Shift key is pressed
The event handlers of the KeyDown and KeyUp events get an argument of type KeyEventArgs. This object
has the following properties −
 Handled − indicates if the KeyPress event is handled
 KeyChar − stores the character corresponding to the key pressed
Example
Let us continue with the previous example to show how to handle keyboard events. The code will verify that
the user enters some numbers for his customer ID and age.
 Add a label with text Property as 'Age' and add a corresponding text box named txtAge.
 Add the following codes for handling the KeyUP events of the text box txtID.

Private Sub txtID_KeyUP(sender As Object, e As KeyEventArgs) _


Handles txtID.KeyUp

If (Not Char.IsNumber(ChrW(e.KeyCode))) Then


MessageBox.Show("Enter numbers for your Customer ID")
txtID.Text = " "
End If
End Sub
Add the following codes for handling the KeyUP events of the text box txtID.
Private Sub txtAge_KeyUP(sender As Object, e As KeyEventArgs) _
Handles txtAge.KeyUp

If (Not Char.IsNumber(ChrW(e.keyCode))) Then


MessageBox.Show("Enter numbers for age")
txtAge.Text = " "
End If
End Sub
When the above code is executed and run using Start button available at the Microsoft Visual Studio tool
bar, it will show the following window −
If you leave the text for age or ID as blank or enter some non-numeric data, it gives a warning message box
and clears the respective text −

Database Access with VB.NET


Applications communicate with a database, firstly, to retrieve the data stored there and present it in a user-
friendly way, and secondly, to update the database by inserting, modifying and deleting data.
Microsoft ActiveX Data Objects.Net (ADO.Net) is a model, a part of the .Net framework that is used by
the .Net applications for retrieving, accessing and updating data.

ADO.Net Object Model


ADO.Net object model is nothing but the structured process flow through various components. The object
model can be pictorially described as −

Figure 3:ADO.Net Object Model


The data residing in a data store or database is retrieved through the data provider. Various components of
the data provider retrieve data for the application and update data.
An application accesses data either through a dataset or a data reader.
 Datasets store data in a disconnected cache and the application retrieves data from it.
 Data readers provide data to the application in a read-only and forward-only mode.

Data Provider
A data provider is used for connecting to a database, executing commands and retrieving data, storing it in a
dataset, reading the retrieved data and updating the database.
The data provider in ADO.Net consists of the following four objects −

. Objects & Description

1 Connection
This component is used to set up a connection with a data source.

2 Command
A command is a SQL statement or a stored procedure used to retrieve, insert,
delete or modify data in a data source.
3 DataReader
Data reader is used to retrieve data from a data source in a read-only and forward-
only mode.

4 DataAdapter
This is integral to the working of ADO.Net since data is transferred to and from a
database through a data adapter. It retrieves data from a database into a dataset and
updates the database. When changes are made to the dataset, the changes in the
database are actually done by the data adapter.

There are following different types of data providers included in ADO.Net


 The .Net Framework data provider for SQL Server - provides access to Microsoft SQL Server.
 The .Net Framework data provider for OLE DB - provides access to data sources exposed by using
OLE DB.
 The .Net Framework data provider for ODBC - provides access to data sources exposed by ODBC.
 The .Net Framework data provider for Oracle - provides access to Oracle data source.
 The EntityClient provider - enables accessing data through Entity Data Model (EDM) applications.

DataSet
DataSet is an in-memory representation of data. It is a disconnected, cached set of records that are retrieved
from a database. When a connection is established with the database, the data adapter creates a dataset and
stores data in it. After the data is retrieved and stored in a dataset, the connection with the database is closed.
This is called the 'disconnected architecture'. The dataset works as a virtual database containing tables, rows,
and columns.
The following diagram shows the dataset object model −
VB.NET DataSet objects
The DataSet class is present in the System.Data namespace. The following table describes all the
components of DataSet −

Components & Description

1 DataTableCollection
It contains all the tables retrieved from the data source.

2 DataRelationCollection
It contains relationships and the links between tables in a data set.

3 ExtendedProperties
It contains additional information, like the SQL statement for retrieving data, time
of retrieval, etc.

4 DataTable
It represents a table in the DataTableCollection of a dataset. It consists of the
DataRow and DataColumn objects. The DataTable objects are case-sensitive.

5 DataRelation
It represents a relationship in the DataRelationshipCollection of the dataset. It is
used to relate two DataTable objects to each other through the DataColumn
objects.

6 DataRowCollection
It contains all the rows in a DataTable.

7 DataView
It represents a fixed customized view of a DataTable for sorting, filtering,
searching, editing and navigation.

8 PrimaryKey
It represents the column that uniquely identifies a row in a DataTable.

9 DataRow
It represents a row in the DataTable. The DataRow object and its properties and
methods are used to retrieve, evaluate, insert, delete, and update values in the
DataTable. The NewRow method is used to create a new row and the Add method
adds a row to the table.

10 DataColumnCollection
It represents all the columns in a DataTable.

11 DataColumn
It consists of the number of columns that comprise a DataTable.

Connecting to a Database
The .Net Framework provides two types of Connection classes −
 SqlConnection − designed for connecting to Microsoft SQL Server.
 OleDbConnection − designed for connecting to a wide range of databases, like Microsoft Access and
Oracle.

Example 1
We have a table stored in Microsoft SQL Server, named Customers, in a database named testDB. Please
consult 'SQL Server' tutorial for creating databases and database tables in SQL Server.
Let us connect to this database. Take the following steps −
 Select TOOLS → Connect to Database

 Select a server name and the database name in the Add Connection dialog box.

 Click on the Test Connection button to check if the connection succeeded.


 Add a DataGridView on the form.

 Click on the Choose Data Source combo box.


 Click on the Add Project Data Source link.

 This opens the Data Source Configuration Wizard.


 Select Database as the data source type
 Choose DataSet as the database model.

 Choose the connection already set up.


 Save the connection string.

 Choose the database object, Customers table in our example, and click the Finish button.
 Select the Preview Data link to see the data in the Results grid −

When the application is run using Start button available at the Microsoft Visual Studio tool bar, it will show
the following window −

Example 2
In this example, let us access data in a DataGridView control using code. Take the following steps −
 Add a DataGridView control and a button in the form.
 Change the text of the button control to 'Fill'.
 Double click the button control to add the required code for the Click event of the button, as shown
below −
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) _
Handles MyBase.Load
'TODO: This line of code loads data into the
'TestDBDataSet.CUSTOMERS' table.
You can move, or remove it, as needed.

Me.CUSTOMERSTableAdapter.Fill(Me.TestDBDataSet.CUSTOMERS)
' Set the caption bar text of the form.
Me.Text = "VB.NET "
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs)


Handles Button1.Click
Dim connection As SqlConnection = New sqlconnection()
connection.ConnectionString = "Data Source=KABIR-DESKTOP; _
Initial Catalog=testDB;Integrated Security=True"
connection.Open()
Dim adp As SqlDataAdapter = New SqlDataAdapter _
("select * from Customers", connection)
Dim ds As DataSet = New DataSet()
adp.Fill(ds)
DataGridView1.DataSource = ds.Tables(0)
End Sub
End Class
When the above code is executed and run using Start button available at the Microsoft Visual Studio tool
bar, it will show the following window −
 Clicking the Fill button displays the table on the data grid view control −

Creating Table, Columns and Rows


We have discussed that the DataSet components like DataTable, DataColumn and DataRow allow us to
create tables, columns and rows, respectively.
The following example demonstrates the concept −

Example 3
So far, we have used tables and databases already existing in our computer. In this example, we will create a
table, add columns, rows and data into it and display the table using a DataGridView object.
Take the following steps −
 Add a DataGridView control and a button in the form.
 Change the text of the button control to 'Fill'.
 Add the following code in the code editor.
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
' Set the caption bar text of the form.
Me.Text = "tutorialspont.com"
End Sub

Private Function CreateDataSet() As DataSet


'creating a DataSet object for tables
Dim dataset As DataSet = New DataSet()
' creating the student table
Dim Students As DataTable = CreateStudentTable()
dataset.Tables.Add(Students)
Return dataset
End Function

Private Function CreateStudentTable() As DataTable


Dim Students As DataTable
Students = New DataTable("Student")
' adding columns
AddNewColumn(Students, "System.Int32", "StudentID")
AddNewColumn(Students, "System.String", "StudentName")
AddNewColumn(Students, "System.String", "StudentCity")
' adding rows
AddNewRow(Students, 1, "Zara Ali", "Kolkata")
AddNewRow(Students, 2, "Shreya Sharma", "Delhi")
AddNewRow(Students, 3, "Rini Mukherjee", "Hyderabad")
AddNewRow(Students, 4, "Sunil Dubey", "Bikaner")
AddNewRow(Students, 5, "Rajat Mishra", "Patna")
Return Students
End Function
Private Sub AddNewColumn(ByRef table As DataTable, _
ByVal columnType As String, ByVal columnName As String)
Dim column As DataColumn = _
table.Columns.Add(columnName, Type.GetType(columnType))
End Sub

'adding data into the table


Private Sub AddNewRow(ByRef table As DataTable, ByRef id As
Integer,_
ByRef name As String, ByRef city As String)
Dim newrow As DataRow = table.NewRow()
newrow("StudentID") = id
newrow("StudentName") = name
newrow("StudentCity") = city
table.Rows.Add(newrow)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs)
Handles Button1.Click
Dim ds As New DataSet
ds = CreateDataSet()
DataGridView1.DataSource = ds.Tables("Student")
End Sub
End Class
When the above code is executed and run using Start button available at the Microsoft Visual Studio tool
bar, it will show the following window −
 Clicking the Fill button displays the table on the data grid view control −

Deployment of a VB.NET Application


This entails getting the necessary files and resources from the development environment to the production
environment.

The process of deployment involves two categories of computers, as follows:


 The computer used to create the Setup project (your computer) is called the development computer.
The purpose of a Setup project is to create another program called an installer. The Setup project
bundles all of the elements of an application so that it can be distributed to another computer. To
distribute the application, you can copy the output of the Setup project to removable media such as a
CD-ROM, or DVD. Setup files can also be placed on a Web site where they can be downloaded by
anyone connected to the Internet or a company intranet.
 The end user’s computer is called the target computer. The end user typically runs the installer (the
file named Setup.exe) that you created to install your application on their computer. By running the
installer, all of the files necessary to run your application are copied to the target computer to a folder
you specified when you created the installer. In addition, entries are added to the Start menu and
optionally to the desktop so that the end user can run the application. The installer will also copy
related support files such as Help files, data files, or other informational files. The target computer
need not have Visual Studio installed. This is one of the main goals of building a Setup project
Deployment Steps
To deploy an application so that the end user can install it on the target computer, you begin by opening an
existing Visual Basic solution and project. No matter the type of project being deployed, you perform a
similar set of steps, as described in the following list:
1. Open an existing solution containing one or more projects.
2. Create a Setup project within the solution.
3. Configure the Setup project by specifying the type of project being deployed along with any
support files that need to be deployed with the project. In addition, it is possible to define where the
executable files will be placed on the target computer, and any items to be created on the target
computer’s Start menu.

4. Build the Setup project to create the installer (Setup.exe and related files). Note that you build a
Setup project in the same way that you build a Windows Application project.
5. Test the Setup project on the local computer.
6. Distribute the Setup.exe program and any necessary files to the end user via removable media, the
Internet, or a company intranet.

Conclusion
At the end of the learning outcome, the trainee should be able to demonstrate basic VB.Net basic controls’
properties, methods and events, event handling, connection of VB.Net applications to a database and
deployment of VB.NET applications.

Further reading
https://www.tutorialspoint.com/vb.net

Assessment
Written assessment
 Outline Basic VB.Net Controls
 Explain Elements of a control
 What are the standard naming conventions for controls
 What is an event handler?
 Why does a VB.NET application require deployment?
Oral Assessment
 Outline the steps of connecting a VB.NET application to a database
Practical Assessment
 Develop a simple VB.NET application to capture a student’s details. Using it demonstrate simple but
useful event handling, database connectivity and deployment.

You might also like