0% found this document useful (0 votes)
32 views

Lab Manual Software Architecture Cs701

Uploaded by

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

Lab Manual Software Architecture Cs701

Uploaded by

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

Global Nature Care Sangathan's Group of Institutions

Jabalpur (M.P.)

Department of Computer Science & Engineering

Name of the Student:

Enrolment Number:

Semester: VII

Department: Computer Science & Engineering

Subject: Software Architecture Lab

Subject Code CS 701

SUBMITTED BY SUBMITTED TO
Prof. Gulafsha Anjum
Software Architecture Lab Manual
Contents

Vision and Mission of the Institute

Vision and Mission of the Department

Program Educational Objective

Program Outcomes

Program Specific Outcomes

Course Outcomes

List of Experiments
Vision and Mission of the Institute

Vision

Transforming life by providing professional education with


excellence.
Mission

1. Quality Education: Providing Education with quality and shaping up

Technocrats and budding managers with a focus on adapting to changing


technologies.
2. Focused Research & Innovation: Focusing on Research and

Development and fostering Innovation among the academic community


of the Institution.
3. People Focused: Accountable and committed to institutional operations

for effective functioning by Faculty members, Staff and Students.


4. Holistic Learning: Focus on conceptual learning with practical experience

and experiential learning with strong Industrial connections and


collaborations.
5. Service to Society: Providing Technical and Managerial services to

society for betterment of their quality of life with best of the skills,
compassion and empathy.
Vision & Mission of Department

Vision of the Department

Transforming the life of the graduates by providing excellent education in


the field of Computer Science & Engineering.

Mission of the Department

The department strives:

1. Create student centric learning ambience so as to produce

graduates who are well informed about latest technological trends


and advancement in the world of computing, technology and
research.
2. Produce professionals who are capable to work in diversified

fields, find workable solutions to complex problems with


awareness and concern for society and environments.
3. Continuously upgrade faculty through training so that they function
effectively.
4. Encourage industry institute collaborations through consultancies

and research, helping students to have conceptual learning.


Program Educational Objectives

1. To impart in depth concepts of the subject in terms of both theoretical

and practical aspects to achieve excellent University results.


2. To produce technically sound engineering graduates who would fulfill

the latest requirements of computer science and IT industry at modest


cost with the caliber of solving intricacies of deeper programming
concepts.
3. To inculcate the lessons of communication skills, teamwork spirit and

professional attitude to the budding engineering graduates.


4. In order to get versatile growth of students, participation of students in

extracurricular activities is also made compulsory; and also to develop


ethical attitudes in the graduates so that they can also become good
citizens of the nation.
5. To develop leadership and entrepreneurship qualities in budding

graduates so that they will cherish and nourish the society and the
nation with modern trends of digitization and blossom it with their
unparalleled technical expertise.
Program Outcomes

1. Engineering knowledge: Apply the knowledge of mathematics, science,


engineering fundamentals, and an engineering specialization for the solution
of complex engineering problems.
2. Problem analysis: Identify, formulate, research literature, and analyze
complex engineering problems reaching substantiated conclusions using first
principles of mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering
problems and design system components or processes that meet the specified
needs with appropriate consideration for public health and safety, and cultural,
societal, and environmentalconsiderations.
4. Conduct investigations of complex problems: Use research based
knowledge and research methods including design of experiments, analysis
and interpretation of data, and synthesis of information to provide valid
conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques,
resources, and modern engineering and IT tools, including prediction and
modeling to complex engineering activities, with an understanding of the
limitations.
6. The engineer and society: Apply reasoning informed by the contextual
knowledge to assess societal, health, safety, legal and cultural issues and the
consequent responsibilitiesrelevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional
engineering solutions in societal and environmental contexts, and demonstrate
the knowledge of, and need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities andnorms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a
member or leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering
activities with the engineering community and with the society at large, such
as, being able to comprehend and write effective reports and design
documentation, make effective presentations, and give and receive clear
instructions.
11. Project management and finance: Demonstrate knowledge and
understanding of the engineering and management principles and apply these
to one’s own work, as a member and leader in a team, to manage projects and
in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change
Program Specific Outcomes
PSO 1: Proficiency in Computer Systems: Capability to understand, analyze and
develop computer programs in the areas related algorithms, system software,
multimedia, web design, cloud computing and networking enable designing of
computer systems that are efficient and support the degree of complexity.

PSO 2: Proficiency in Software Development: Ability to understand the structure


and methodologies of software systems with keen knowledge about software design
process and practical expertise in the programming languages and the open system
platform.

PSO 3: Proficiency in Mathematics and science concepts: Capable of applying


mathematics and science concepts to solve computation tasks and model real world
problems using suitable algorithms and data structures.

PSO 4: Successful career as a Computer Science Engineer: Ability to employ


themselves as computer professionals, to be an entrepreneur having innovative
ideas and sound knowledge in various domains leads to enthusiasm in higher
studies and research.
Course Outcomes
After completion of this course, the students are expected to be able to
demonstrate the following knowledge, skills, and attitudes. The student will be
able to:

CO1 - Understanding the fundamentals, qualities, and terminologies is essential for


designing robust, efficient, and maintainable software systems.

CO2 - To maintain a high-level structure of a software system that defines its components
and the relationships between them .and use key fundamentals, qualities, and terminologies
associated with software architecture.

CO3 - Represents the design decisions related to overall system structure and behavior as
well as understand and analyze how the system will achieve essential qualities such as
modifiability, availability, and security.

CO4 - The principles of software architectures for enterprise application development


involves following established guidelines and best practices to ensure the system is
maintainable , secure and efficient.

CO5 - To Ensure the system can handle growth in users, transactions, and data and Divide
the system into smaller, manageable, and interchangeable components or modules.
List of Experiments

S. No. Experiment Date of Sign. Remarks


Completion
1. Create DFD For Railway Reservation System.

2.
Create Class Diagram For Library Scenario.

3.
Create Use Case Diagram For Library Scenario.

4.
Introduction to Common Object Request Broker
Architecture (CORBA)
5.
Study Of Cost Benefit Analysis Method (CBAM).

6.
Study Of Spiral Model.

7.
Study Of Call And Return Architecture.

8. Explain Data-Centered Architectures.

9. Explain Attribute Driven Design Method (ADD)

10. To Study Of MVC Framework


Object: 1 Create DFD For Railway Reservation System.
A railway reservation system like IRCTC (Indian Railway Catering and Tourism Corporation)
manages millions of users and transactions daily, handling bookings, cancellations, passenger
information, and real-time updates. Efficient database design ensures smooth operations, quick
response times and a simple user experience.
Database Design Essentials for a Railway Reservation System-

 Designing a database for a railway reservation system involves considerations such as user
management, train schedules, booking and cancellation processes, seat allocation and real-time
updates.
 The database must handle high transaction volumes which ensures fast response times and
maintain data integrity and accuracy.

Features of Databases for Railway Reservation Systems-


Databases for railway reservation systems offer a range of features designed to support user
management, train schedules, booking and cancellation processes, seat allocation, and real-time
updates. These features typically include:
 User Management: Managing user accounts, profiles and authentication.
 Train Schedules: Storing train details, routes, schedules and availability.
 Booking Management: Handling ticket bookings, cancellations and payments.
 Seat Allocation: Managing seat availability and assignment.
 Real-time Updates: Providing real-time notifications for booking status and train schedules.
 Analytics and Reporting: Generating insights and reports on booking trends, user
engagement and system performance.

Entities and Attributes in Databases for Railway Reservation Systems


Entities in a railway reservation system database represent various aspects of user management,
train schedules, booking and cancellation processes, seat allocation, and real-time updates, while
attributes describe their characteristics:

1. User Table
 UserID (Primary Key): It is an Unique identifier for each user.
 Username: User's display name.
 Email: User's email address for contact and login.
 PasswordHash: Securely hashed password for user authentication.
 PhoneNumber: User's contact number.
 Address: User's address details.
 CreatedAt: Timestamp when the user account was created.
2. Train Table
 TrainID (Primary Key): Unique identifier for each train.
 TrainNumber: Official train number.
 TrainName: Name of the train.
 RouteID: Identifier for the route taken by the train.
 ScheduleID: Identifier for the train's schedule.
3. Route Table
 RouteID (Primary Key): Unique identifier for each route.
 SourceStationID: Identifier for the source station.
 DestinationStationID: Identifier for the destination station.
 Distance: Distance between source and destination stations.
4. Station Table
 StationID (Primary Key): Unique identifier for each station.
 StationName: Name of the station.
 Location: Geographical location of the station.
5. Schedule Table
 ScheduleID (Primary Key): Unique identifier for each schedule.
 TrainID: Identifier for the train.
 DepartureTime: Scheduled departure time.
 ArrivalTime: Scheduled arrival time.
 DaysOfOperation: Days on which the train operates.
6. Booking Table
 BookingID (Primary Key): Unique identifier for each booking.
 UserID: Identifier for the user who made the booking.
 TrainID: Identifier for the booked train.
 ScheduleID: Identifier for the train's schedule.
 BookingStatus: Status of the booking (e.g., confirmed, cancelled, waitlisted).
 BookingDate: Date when the booking was made.
 TotalAmount: Total amount paid for the booking.
7. Seat Table
 SeatID (Primary Key): Unique identifier for each seat.
 TrainID: Identifier for the train.
 SeatNumber: Seat number within the train.
 ClassType: Type of class (e.g., sleeper, AC, general).
 AvailabilityStatus: Availability status of the seat (e.g., available, booked).

Online Railway ticket reservation is very useful nowadays. This is very important to design a good-
working system software for ticket booking and related transactions. To design it, full-track
documentation of models(ER, DFD, Class, Use-case, Activity, Sequence) is required as per as
software development is concerned.
 Level 0 DFD:

Required Diagrams:
Entity Relationship(ER) Diagram:
ER diagram displays the relations between the various entities(classes and their attributes) stored in
the database. ER diagrams are very important for any database project. This diagram shows the
communication between entities and their attributes.
 Level 1 DFD:
Object: 2 Create Class Diagram For Library Scenario
Class Diagram:
These diagrams describe the operation and attributes of a class with imposed constraints in the
system. In this article the classes to be considered are ‘payment’, ‘train’, ‘passenger’, ‘ticket’,
‘railway reservation system’, ‘admin’.

Classes of Library Management System :

 Library Management System class – It manages all operations of Library Management


System. It is central part of organization for which software is being designed.
 User Class – It manages all operations of user.
 Librarian Class – It manages all operations of Librarian.
 Book Class – It manages all operations of books. It is basic building block of system.
 Account Class – It manages all operations of account.
 Library database Class – It manages all operations of library database.
 Staff Class – It manages all operations of staff.
 Student Class – It manages all operations of student.

Attributes of Library Management System :

 Library Management System Attributes – UserType, Username, Password


 User Attributes – Name, Id
 Librarian Attributes – Name, Id, Password, SearchString
 Book Attributes – Title, Author, ISBN, Publication
 Account Attributes – no_borrowed_books, no_reserved_books, no_returned_books,
no_lost_books fine_amount
 Library database Attributes – List_of_books
 Staff Class Attributes – Dept
 Student Class Attributes – Class

Methods of Library Management System :

 Library Management System Methods – Login(), Register(), Logout()


 User Methods – Verify(), CheckAccount(), get_book_info()
 Librarian Methods – Verify_librarian(), Search()
 Book Methods – Show_duedt(), Reservation_status(), Feedback(), Book_request(),
Renew_info()
 Account Methods – Calculate_fine()
 Library database Methods – Add(), Delete(), Update(), Display(), Search()

The description of the classes is given below.


Class Attributes Processes

Payment amount ticketGeneration

train code, train


Train —
name, frequency
Class Attributes Processes

login, search Train,


modify the form,
PAX_id,
passenger pay charges, book
name,age,sex
tickets now ticket,
cancel tickets

PNR_no, status,
payment type, train new Ticket, delete
ticket
code search train, tickets
date of journey

railway
reservation system response
system

formDetails,
Admin ID, name cancellationForm,
refundAmt
Object: 3 Create Use Case Diagram For Library Scenario.
Use Case Diagram for Library Management System
visually map out the relationships and interactions. Below is the textual description of what the
diagram would look like:
1. Actors:
 User (Staff or Student)
 Librarian
2. Use Cases:
 Register New User
 Issue Library Card
 Request New Book
 Reserve Book
 Renew Book
 Pay Fine
 Fill Feedback Form
 Manage Records
 Delete Records
 Update Database
3. System Boundary:
 The system boundary will encompass all the use cases mentioned above.
Below is the use case diagram of a Library Management System

Use Case diagram of a Library Management System

Explanation of Use Case Diagram of a Library Management System

1. User who registers himself as a new user initially is regarded as staff or student for the library
system.
 For the user to get registered as a new user, registration forms are available that is needed to
be fulfilled by the user.
 After registration, a library card is issued to the user by the librarian. On the library card, an
ID is assigned to cardholder or user.
2. After getting the library card, a new book is requested by the user as per there requirement.
3. After, requesting, the desired book or the requested book is reserved by the user that means no
other user can request for that book.

4. Now, the user can renew a book that means the user can get a new due date for the desired book
if the user has renewed them.

5. If the user somehow forgets to return the book before the due date, then the user pays fine. Or if
the user forgets to renew the book till the due date, then the book will be overdue and the user
pays fine.

6. User can fill the feedback form available if they want to.

7. Librarian has a key role in this system. Librarian adds the records in the library database about
each student or user every time issuing the book or returning the book, or paying fine.

8. Librarian also deletes the record of a particular student if the student leaves the college or
passed out from the college. If the book no longer exists in the library, then the record of the
particular book is also deleted.

9. Updating database is the important role of Librarian.


Object: 4 Introduction to Common Object Request Broker Architecture
(CORBA) – Client-Server Software Development


Common Object Request Broker Architecture (CORBA) could be a specification of a
regular design for middleware. It is a client-server software development model.
Using a CORBA implementation, a shopper will transparently invoke a way on a server object, which
may air a similar machine or across a network. The middleware takes the decision, associated is to
blame for finding an object that will implement the request, passing it the parameters, invoking its
methodology, and returning the results of the invocation. The shopper doesn’t need to remember
wherever the item is found, its programming language, its software package or the other aspects that
don’t seem to be a part of the associated object’s interface.

CORBA Reference Model:


The CORBA reference model known as Object Management design (OMA) is shown below figure.
The OMA is itself a specification (actually, a group of connected specifications) that defines a broad
variety of services for building distributed client-server applications. Several services one may expect
to search out in a very middleware product like CORBA (e.g., naming, dealings, and asynchronous
event management services) are literally fixed as services within the OMA

CORBA Reference Model

Different parts communicate victimization ORB. ORB is additionally referred to as the item bus. An
associate example of the application interface is a distributed document facility. In a very domain
interface, it will have domain dependent services, for instance, producing domain.
Object interface has some domain freelance services:
1. Naming Service:
Naming service is additionally known as a white page service. Victimization naming service
server-name will be searched, and its location or address pointed out.

2. Trading Service:
Commercialism service is additionally known as a yellow page service. Victimization
commercialism service a selected service will be searched. This is often corresponding to looking
out a service like an automobile store in a very yellow page directory.
The Broker pattern is particularly useful in helping you follow these design principles:
 Divide and conquer. The remote objects can be independently designed.
 Increase reusability. It is typically possible to design the remote objects so that other systems
can use them too.
 Increase reuse. You may be able to reuse remote objects that others have created.
 Design for flexibility. The broker objects can be updated as required, or you can redirect the
proxy to communicate with a different remote object.
 Design for portability. You can write clients for new platforms while still accessing brokers and
remote objects on other platforms.
 Design defensively. You can provide careful assertion checking in the remote objects.
Object: 5 Study Of Cost Benefit Analysis Method (CBAM).

Cost Benefit analysis is thing that everyone must do so as to think of a powerful or an


efficient system. But while thinking out on cost and benefit analysis, we also need to find
out factors that really affect benefits and costs of system. In developing cost estimates for a
system, we need to consider some of cost elements. Some elements among them are
hardware, personnel, facility, operating and supply cost. The following are the cost factors :

1. Hardware cost –
Hardware cost includes actual purchase and peripherals (external devices) that are
connected to computer. For example, printer, disk drive etc. Actually, finding actual
cost of hardware is generally more difficult especially, when system is shared by
various users so as to compared to a system which dedicated stand alone . In some case,
best way is to treat it as operating cost.
2. Personnel costs –
Personnel costs includes EDP staff salaries and benefits as well as pay for those who are
involved in process of development of system. Cost occurred during development of
system which are one time costs and are also called development cost. Once system is
installed, cost of operating and maintaining system becomes recurring cost that one has
to pay very frequently based on requirement.
3. Facility cost –
Facility cost is amount of money that is spent in preparation of a site that is physical
where application or computer will be in operation. This includes wiring, flooring,
lighting and air conditioning. These costs are treated as one- time costs and are included
into overall cost estimate of candidate system.
4. Operating costs –
These includes all costs associated with day-to-day(everyday) operation of system and
amount depends on number of shifts, nature of applications. There are various ways of
covering operating costs. One approach is to treat operating costs as an overhead.
Another approach is to charge money from each authorized user for amount of
processing they require from system. Amount charged is based on computer time or
time they spend on system, staff time ad volume of output produced .
5. Supply costs –
Supply cost are variable costs that increase with increased use of paper, disks and like.
They should be estimated and included in overall cost of system.
A system is also expected to provide health benefits. First task is to identify each benefit
and then assign some value to it for purpose of cost/ benefit analysis. Benefits may be
tangible and intangible, direct or indirect.
Two major benefits are improving performance and minimizing cost of processing of
system. The performance category emphasizes improvement in accuracy of or access to
information and easier access to system by authorized users. Minimizing costs through an
efficient system – error control or reduction of staff- is a benefit that should be measured
and included in cost/benefit analysis.
The determination of costs and benefit entails following steps :
1. Identify the costs and benefits pertaining to given project.
2. Categorize the various costs and benefits for analysis.
3. Select a method of evaluation.
4. Interpret the results of the analysis.
5. Take action.
Object: 6 Study Of Spiral Model.

Spiral Model
The spiral model, initially proposed by Boehm, is an evolutionary software process model
that couples the iterative feature of prototyping with the controlled and systematic aspects of
the linear sequential model. It implements the potential for rapid development of new
versions of the software. Using the spiral model, the software is developed in a series of
incremental releases. During the early iterations, the additional release may be a paper model
or prototype. During later iterations, more and more complete versions of the engineered
system are produced.

The Spiral Model is shown in fig:

Each cycle in the spiral is divided into four parts:

Objective setting: Each cycle in the spiral starts with the identification of purpose for that
cycle, the various alternatives that are possible for achieving the targets, and the constraints
that exists.

Risk Assessment and reduction: The next phase in the cycle is to calculate these various
alternatives based on the goals and constraints. The focus of evaluation in this stage is located
on the risk perception for the project.

Development and validation: The next phase is to develop strategies that resolve
uncertainties and risks. This process may include activities such as benchmarking, simulation,
and prototyping.

Planning: Finally, the next step is planned. The project is reviewed, and a choice made
whether to continue with a further period of the spiral. If it is determined to keep, plans are
drawn up for the next step of the project.
The development phase depends on the remaining risks. For example, if performance or user-
interface risks are treated more essential than the program development risks, the next phase
may be an evolutionary development that includes developing a more detailed prototype for
solving the risks.

The risk-driven feature of the spiral model allows it to accommodate any mixture of a
specification-oriented, prototype-oriented, simulation-oriented, or another type of approach.
An essential element of the model is that each period of the spiral is completed by a review
that includes all the products developed during that cycle, including plans for the next cycle.
The spiral model works for development as well as enhancement projects.

Advantages

High amount of risk analysis

Useful for large and mission-critical projects.

Disadvantages

 Can be a costly model to use.


 Risk analysis needed highly particular expertise
 Doesn't work well for smaller projects.

Conclusion
Spiral Model is a valuable choice for software development projects where risk
management is on high priority. Spiral Model deliver high-quality software by promoting
risk identification, iterative development and continuous client feedback. When a project is
vast in software engineering, a spiral model is utilized.
Object: 7 Study Of Call And Return Architectures

Theory- The Call-and-Return Architecture is a hierarchical software architecture style where


components communicate by calling each other directly using function calls. This style
supports a layered, modular approach and is commonly used in procedural programming.

Characteristics:

1. Hierarchical structure: Divides the system into layers or modules.


2. Explicit calls: Functions/modules call one another directly.
3. Tight coupling: Direct communication may result in tight coupling of components.
4. Common use cases:

 Procedural programming (e.g., C, Pascal).


 Modular and layered software systems.

Variants:

1. Main-Subroutine Architecture:

 A single main program coordinates all subroutines.

2. Layered Architecture:

 Layers communicate sequentially, often through well-defined interfaces.

It is used to create a program that is easy to scale and modify. Many sub-styles exist within
this category. Two of them are explained below.
 Remote procedure call architecture: This components is used to present in a main
program or sub program architecture distributed among multiple computers on a
network.
 Main program or Subprogram architectures: The main program structure
decomposes into number of subprograms or function into a control hierarchy. Main
program contains number of subprograms that can invoke other components.
Implement the System Here’s a sample Python implementation:
# Main Program
def main():
print("Bank Account Management System")
balance = 0 # Initial balance
while True:
print("\nMenu:")
print("1. Deposit")
print("2. Withdraw")
print("3. Check Balance")
print("4. Exit")
choice = int(input("Enter your choice: "))

if choice == 1:
amount = float(input("Enter amount to deposit: "))
balance = deposit(balance, amount)
elif choice == 2:
amount = float(input("Enter amount to withdraw: "))
balance = withdraw(balance, amount)
elif choice == 3:
check_balance(balance)
elif choice == 4:
print("Exiting...")
break
else:
print("Invalid choice! Please try again.")

# Subroutine: Deposit
def deposit(balance, amount):
balance += amount
print(f"Deposited {amount}. New Balance: {balance}")
return balance

# Subroutine: Withdraw
def withdraw(balance, amount):
if amount > balance:
print("Insufficient funds!")
else:
balance -= amount
print(f"Withdrew {amount}. New Balance: {balance}")
return balance

# Subroutine: Check Balance


def check_balance(balance):
print(f"Current Balance: {balance}")

# Execute the main program


if __name__ == "__main__":
main()

Test the System

 Input test cases to validate each operation.


 Example:
o Deposit: ₹1000 → New Balance: ₹1000.
o Withdraw: ₹500 → New Balance: ₹500.
o Check Balance → ₹500
Object: 8 Study Of Data-Centered Architectures.

The Data-Centered Architecture is a software architectural style that revolves around a


central data repository that is shared among multiple independent components or subsystems.
The primary focus is on how data is stored, accessed, and updated by different parts of the
system.

Characteristics-

1. Centralized Data Storage:


o A single data store (database, file system, or shared memory) acts as the core
of the system.
2. Loose Coupling:
o Components interact indirectly by reading from and writing to the shared data
repository, reducing direct dependencies.
3. Scalability:
o Allows scaling individual components independently.
4. Data Integrity:
o Centralized management of data ensures consistency and integrity.

Types of Data-Centered Architectures

1. Repository Architecture:
o All components share and interact with a common data store.
o Used in systems where data consistency and integrity are critical.
o Example: Version control systems (e.g., Git), databases.
2. Blackboard Architecture:
o Components work collaboratively by posting results to a shared blackboard
(data structure) and reacting to data changes.
o Typically used in AI, machine learning, and knowledge-based systems.
o Example: Speech recognition systems, image processing.

Advantages

1. Centralized Data Management:


o Simplifies data access and ensures consistency.
2. Reusability:
o Components can be reused or replaced without impacting the data store.
3. Scalability:
o Individual components can be scaled without changing the entire system.
4. Flexibility:
o New components can be added to the system without significant changes.

Disadvantages

1. Bottlenecks:
o The central data repository can become a performance bottleneck.
2. Dependency on Data Store:
o Failure of the central data store can halt the entire system.
3. Data Latency:
o Delays in updating or retrieving data can impact overall performance.

Use Cases

1. Enterprise Systems:
o ERP and CRM systems with centralized databases.
2. Knowledge-Based Systems:
o Collaborative systems like AI or problem-solving environments.
3. Data Warehousing:
o Systems for data mining and analytics with centralized storage.

Example: Library Management System (Repository Architecture)


Components:

1. User Management Module:


o Handles user registrations and updates.
2. Book Management Module:
o Manages book information like addition, removal, or updates.
3. Transaction Module:
o Manages borrowing and returning of books.

Central Data Repository:

 A database storing all information:


o User details
o Book inventory
o Borrowing transactions
Object: 9 Explain Attribute-Driven Design (ADD)

The Attribute-Driven Design (ADD) method is a systematic approach to software


architecture design, focusing on satisfying quality attribute requirements. It is particularly
useful for designing architectures that need to balance multiple, often competing, quality
attributes like performance, scalability, security, and maintainability.

ADD uses quality attributes (e.g., usability, performance, reliability) as the primary drivers
for architectural decisions, ensuring that the resulting architecture aligns closely with the
system’s non-functional requirements.

The Attribute-Driven Design (ADD) method is a systematic, step-by-step process for


designing software architecture:
 Purpose
The ADD method helps design software architectures that meet the quality attribute
requirements of the software.
 Process
The ADD method is based on a recursive decomposition process that uses architectural
patterns and tactics to satisfy quality attribute scenarios.
 Input
The ADD method requires known functional requirements, quality attribute requirements,
and constraints.
 Output
The ADD method produces architectural views that the system designer can use to develop
the detailed architecture.
 Benefits
The ADD method helps organizations consider quality attributes early in the design
process, which can help identify trade-offs between quality attributes.
 History
The ADD method was previously known as the Architecture Based Design Method (ABD),
but was renamed around 2001 due to trademark issues.
The ADD method can be used for a variety of application domains, including embedded
systems and information systems.
Advantages of ADD

1. Focus on Quality Attributes:


o Ensures the architecture satisfies critical non-functional requirements.
2. Systematic Process:
o Provides a structured approach to designing complex systems.
3. Iterative Refinement:
o Adapts to changing requirements or new insights during the design process.

Limitations of ADD

1. Complexity:
o Requires expertise in understanding quality attributes and architectural patterns.
2. Subjectivity:
o The success of ADD heavily depends on the accuracy of quality attribute
prioritization.
3. Time-Consuming:
o Iterative nature may extend the design phase.
Object: 10 To Study of MVC Frameworks.
1. Introduction

The Model-View-Controller (MVC) architectural pattern is widely used for developing modern web
applications. It separates an application into three interconnected components:

 Model: Manages application data and business logic.


 View: Displays data to the user and captures user input.
 Controller: Mediates user input, processes it, and updates the Model or View.

MVC frameworks help streamline the development process by enforcing this separation of concerns,
leading to cleaner, more maintainable code.

2. Objectives of the Study

 Understand the MVC pattern and its components.


 Explore commonly used MVC frameworks.
 Analyze their features, advantages, and limitations.

3. Commonly Used MVC Frameworks

a. Spring MVC (Java)

 Features:
o Annotation-based configuration for routing (@Controller, @RequestMapping).
o Integration with Spring modules like Spring Security and Spring Boot.
o Supports RESTful services.
 Advantages:
o Strong enterprise-level support.
o Flexible view technologies (JSP, Thymeleaf).
 Use Cases:
o Enterprise-grade web applications, REST APIs.

b. Django (Python)

 Features:
o Built-in ORM (Object-Relational Mapping) for database operations.
o Automatic admin interface generation.
o Strong focus on rapid development.
 Advantages:
o Simple syntax and configuration.
o Batteries-included philosophy (comes with many built-in tools).
 Use Cases:
o Content management systems (CMS), data-driven applications.

c. Ruby on Rails (Ruby)

 Features:
o Convention over configuration (CoC) and Don’t Repeat Yourself (DRY) principles.
o Built-in ActiveRecord ORM for database management.
o Extensive ecosystem with prebuilt modules (gems).
 Advantages:
o Quick prototyping.
o Strong community support.
 Use Cases:
o Startups, social networking applications.

4. Key Components of MVC Frameworks


Component Role Example
Model Manages data, logic, and rules. Classes like Book, User.
View Displays data and captures input. Templates (JSP, HTML).
Handles user input, processes logic, and updates Classes annotated as
Controller
model/view. @Controller.

Workflow of Spring MVC:

1. Request Handling: The user sends a request that is intercepted by the DispatcherServlet.
2. Controller Processing: The request is routed to a specific controller.
3. Business Logic: The controller processes the request, interacts with the model, and prepares
data.
4. View Resolution: The controller selects a view to render the response.
5. Response: The view generates the response for the user.

Sample Code for Book Management

1. Model:

java
Copy code
public class Book {
private Long id;
private String title;
private String author;
// Getters and Setters
}

2. Controller:

java
Copy code
@Controller
public class BookController {
@RequestMapping("/books")
public String getBooks(Model model) {
List<Book> books = bookService.getAllBooks();
model.addAttribute("books", books);
return "book-list"; // View name
}
}

3. View (JSP):

html
Copy code
<table>
<tr>
<th>Title</th>
<th>Author</th>
</tr>
<c:forEach var="book" items="${books}">
<tr>
<td>${book.title}</td>
<td>${book.author}</td>
</tr>
</c:forEach>
</table>

6. Advantages of MVC Frameworks

1. Separation of Concerns:
o Clear separation between logic, presentation, and user interaction.
2. Maintainability:
o Easier to debug, update, and extend.
3. Reusability:
o Components like Models and Controllers can be reused in different parts of the
application.
4. Scalability:
o Well-suited for large-scale applications.

7. Limitations

1. Steep Learning Curve:


o Advanced frameworks like Spring MVC or Django require prior experience.
2. Overhead for Small Projects:
o MVC frameworks may be overkill for simple applications.
3. Complexity:
o Managing dependencies and configurations can be challenging.

You might also like