0% found this document useful (0 votes)
22 views23 pages

Object Oriented Software

The document discusses Object-Oriented Software Engineering, emphasizing the importance of reusing existing software components, frameworks, and libraries to enhance efficiency. It outlines the client-server architecture, detailing the roles of clients and servers, their interactions, and the advantages of such systems. Additionally, it covers the necessary technologies for building client-server applications and the types of frameworks available.

Uploaded by

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

Object Oriented Software

The document discusses Object-Oriented Software Engineering, emphasizing the importance of reusing existing software components, frameworks, and libraries to enhance efficiency. It outlines the client-server architecture, detailing the roles of clients and servers, their interactions, and the advantages of such systems. Additionally, it covers the necessary technologies for building client-server applications and the types of frameworks available.

Uploaded by

nishatsithy.t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Object-Oriented Software

Engineering

Nishat Tasnim Sithy


Lecturer, Department of CSE
Eastern University, Bangladesh
Building on the Experience of Others
•Software engineers should avoid re-developing software
already developed

•Types of reuse:
– Reuse of expertise
Experience, Article and blog of expert software engineer
– Reuse of standard designs and algorithms
There are thousands of algorithms, designs and
documentation
– Reuse of libraries of classes or procedures
Libraries and commands represent implemented algorithms,
data structures and other
Chap. 3: Basingfacilities
Development on
2
Reusable Technology
Building on the Experience of Others
– Reuse of powerful commands built into languages and
operating systems
– Reuse of frameworks
Frameworks represent more than libraries, they represent
the structure of entire applications or subsystems
– Reuse of complete applications
Use full application and adapting it to the need of a client
by adding a small amount of extra software.
 Extra code often called glue code.
 Scripting language is used
Frameworks: Reusable Subsystems
•A framework is reusable subsystem that implements
a generic solution to a generalized problem.
– It provides common facilities applicable to
different application programs.

• Principle: Applications that do different, but


related, things tend to have similar designs

Chap. 3: Basing Development on


4
Reusable Technology
Frameworks to promote reuse
•A framework is intrinsically incomplete
– Certain classes or methods are used by the
framework, but are missing (slots)

– Some functionality is optional


• Allowance is made for the developer to provide it (hooks or
extension points)

– Developers use the services that the framework


provides
• Taken together the services are called the Application
Program Interface (API)
Chap. 3: Basing Development on
5
Reusable Technology
Object-oriented frameworks
•In the object oriented paradigm, a framework is composed of
a library of classes.
– The API is defined by the set of all public methods of these
classes.
– Some of the classes will normally be abstract and there are
often many Interfaces

•Example:
– A framework for payroll management
Payment, tax, deduction
– A framework for frequent buyer clubs
frequent flier or frequent buyer for a supershop
– A framework for university registration
– A framework for e-commerce web sites
Chap. 3: Basing Development on
6
Reusable Technology
Frameworks and product lines
– A product line (or product family) is a set of
products built on a common base of
technology.
• The various products in the product line have
different features to satisfy different markets
• The software common to all products is included
in a framework
• Each product is produced by filling the available
hooks and slots
– E.g. software products offering ‘demo’, ‘lite’ or ‘pro’
versions
Chap. 3: Basing Development on
7
Reusable Technology
Framework
Types of frameworks
•A horizontal framework provides general application facilities
that a large number of applications can use
•A vertical framework (application framework) is more
‘complete’ but still needs some slots to be filled to adapt it to
specific application needs

Chap. 3: Basing Development on


9
Reusable Technology
Types of frameworks
Hybrid framework
Composed of vertical and horizontal framework
e-commerce framework consists of horizontal and
vertical e.g. secure payment framework
A Java interface can be considered an extreme example
of horizontal framework
There is no implementation.
All slots are empty and to be filled
The Client-Server Architecture
•A distributed system is a system in which:
– computations are performed by separate programs
– … normally running on separate pieces of hardware
– … that co-operate to perform the task of the system.
•Server:
– A program that provides a service for other
programs that connect to it using a communication
channel
•Client
– A program that accesses a server (or several servers)
to obtain services
– A server may be accessed by many clients
simultaneously
Chap. 3: Basing Development on
11
Reusable Technology
Example of client-server systems
– The World Wide Web
– Email
– Network File System
– Transaction Processing System
– Remote Display System
– Communication System
– Database System

Chap. 3: Basing Development on


12
Reusable Technology
A server program communicating with two
client programs

Chap. 3: Basing Development on


13
Reusable Technology
Activities of a server
1. Initializes itself
2. Starts listening for clients
3. Handles the following types of events originating from
clients
1. accepts connections
2. responds to messages
3. handles client disconnection
4. May stop listening
5. Must cleanly terminate

Chap. 3: Basing Development on


14
Reusable Technology
Activities of a client
1. Initializes itself
2. Initiates a connection
3. Sends messages
4. Handles the following
types of events
originating from the
server
1. responds to messages
2. handles server
disconnection
5. Must cleanly terminate

Chap. 3: Basing Development on


15
Reusable Technology
Threads in a client-server system

Chap. 3: Basing Development on


16
Reusable Technology
Threads in a client-server system two friends downloading a book

User A Book Download Server


Message sending server

Wait for Interact With Wait for server Wait for


messages: User events connection
Client B
send me the
book?
Display msg from
user B

create
connect Wait for
create messages:
Client A
Want to
download a book
Book is sent
Display ‘book
downloaded’

disconnect

Chap. 3: Basing Development on Reusable Technology 17


Thin- versus fat-client systems
•Thin-client system (a)
– Client is made as small as possible
– Most of the work is done in the server.
– Client easy to download over the network
•Fat-client system (b)
– As much work as possible is delegated to the clients.
– Server can handle more clients

Chap. 3: Basing Development on


18
Reusable Technology
Communications protocols
– The messages the client sends to the server form a
language.
• The server has to be programmed to understand that
language.
– The messages the server sends to the client also form a
language.
• The client has to be programmed to understand that
language.
– When a client and server are communicating, they are in
effect having a conversation using these two languages
– The two languages and the rules of the conversation,
taken together, are called the protocol

Chap. 3: Basing Development on


19
Reusable Technology
Tasks to perform to develop
client-server applications
1. Design the primary work to be performed by
both client and server
2. Design how the work will be distributed
3. Design the details of the set of messages that
will be sent
4. Design the mechanism for
1. Initializing
2. Handling connections
3. Sending and receiving messages
4. Terminating
Chap. 3: Basing Development on
20
Reusable Technology
Advantages of client-server systems
– The work can be distributed among different
machines
– The clients can access the server’s functionality from
a distance
– The client and server can be designed separately
– They can both be simpler
– There is a choice about where to keep data:
• All the data can be kept centrally at the server
• Data can be distributed among many different clients or
servers
– The server can be accessed simultaneously by many
clients
Chap. 3: Basing Development on
21
Reusable Technology
Technology Needed to Build Client-Server
Systems
•Internet Protocol (IP)
– Route messages from one computer to another
– Long messages are normally split up into small pieces
•Transmission Control Protocol (TCP)
– Handles connections between two computers
– Computers can then exchange many IP messages over a connection
– Assures that the messages have been satisfactorily received
•A host has an IP address and a host name
– Several servers can run on the same host.
– Each server is identified by a port number (0 to 65535).
– To initiate communication with a server, a client must know both
the host name and the port number

Chap. 3: Basing Development on


22
Reusable Technology
One Host Multiple Server
Service Port Purpose

Handles normal website


Web Server 80 traffic (HTTP)

Handles secure website


Secure Web Server 443 traffic (HTTPS)

Database Server 3306 Stores and manages website


data

Email Server (SMTP) 25 Sends emails

Email Server (IMAP) 143 Allows users to receive


emails

Allows users to
File Transfer Server 21 upload/download files

You might also like