KWIC Project – Part 1 Mini-Project to Evaluate Architectural Patterns(Styles) Carl Chesser Ji Li EECS 761.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

CSCI 1730 April 1 st, Materials Class notes slides & some “plain old” html & source code examples linked from course calendar board notes & diagrams.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Hestia: Aarthi Giridharan Govindarajan Panneerselvam Nirmal Chander Shesha Chandrika Moka Sriram Rajendran Suryanarayanan Ganesh Melarkode Vignesh Swaminathan.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Lecture 23: Software Architectures
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
Team 1 Lisa Anthony Luiza da Silva Erik Hayes Diana Tetelman.
Architectural styles and Case studies 1 | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
1 CMSC 132: Object-Oriented Programming II Java Constructs Department of Computer Science University of Maryland, College Park.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Course Instructor: Aisha Azeem
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Networking with Java CSc 335 Object-Oriented Programming and Design Spring 2009.
Chapter 6: Architectural Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
 Introduction Introduction  Definition of Operating System Definition of Operating System  Abstract View of OperatingSystem Abstract View of OperatingSystem.
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Programming Languages: Telling the Computers What to Do Chapter 16.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
CIS Computer Programming Logic
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Unified Modeling Language, Version 2.0
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
10 Software Architecture CSCU 411 Software Engineering.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
Group 4 Java Compiler Group Members: Atul Singh(Y6127) Manish Agrawal(Y6241) Mayank Sachan(Y6253) Sudeept Sinha(Y6483)
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Text Chapters 2 Analyzing Algorithms.  goal: predicting resources that an algorithm requires memory, communication bandwidth, hardware, memory, communication.
Comparing Designs By Chris McCall. Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a.
File Input and Output Chapter 14 Java Certification by:Brian Spinnato.
CS223: Software Engineering
Keyword In Context Presented by Team 2 Francisco Soria Zhiyu Zhang Xuheng Xu Irene Peysakhov.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
System is a set of interacting or interdependent components forming an integrated whole.
KWIC example The KWIC [key word in context] system accepts an ordered set of lines; each line is an ordered set of words, and each word is an ordered set.
Examples (D. Schmidt et al)
Software architecture
CSCI-235 Micro-Computer Applications
Object-Oriented Analysis and Design
Java Course Review.
Lecture 1: Introduction to JAVA
SOFTWARE DESIGN AND ARCHITECTURE
System Design.
Part 3 Design What does design mean in different fields?
CS490 Windows Internals Quiz 2 09/27/2013.
Hierarchical Architecture
Object-Orientated Programming
KERNEL ARCHITECTURE.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Chapter 2: System Structures
Software models - Software Architecture Design Patterns
Chapter 1 Introduction(1.1)
An Introduction to Software Architecture
Introduction to Data Structure
Computer Programming-1 CSC 111
CS/SE ADVANCED SOFTWARE ARCHITECTURE AND DESIGN FALL 2015
SPL – PS1 Introduction to C++.
Presentation transcript:

KWIC Project – Part 1 Mini-Project to Evaluate Architectural Patterns(Styles) Carl Chesser Ji Li EECS 761

Overview Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Design Main-Subroutine Java language Modules – Each module is a class with one static method – Not utilized as an object instance – KeyWordInContextApplication TextLoader TextRotator TextSorter EECS 761

Design Main-Subroutine Structure diagram EECS 761

Main: KeyWordInContextApplication – Driving module – Responsibilities: Accept the user input (file name to load the textual content) Validate the user input Call TextLoader module to load the text from the specified file. Call TextRotator module to produce all the different rotations (circular shifts). Call TextSorter module to produce a sorted listing of all the textual rotations. Print the results EECS 761 Design Main-Subroutine

EECS 761 Design Main-Subroutine Subroutines – TextLoader Responsibility: Takes a file name and loads the contents of the file and returns an ordered listing of strings – TextRotator Responsibility: Takes in a string and produces a list of all the rotations and returns it as a list of strings – TextSorter Responsibility: Takes a listing of strings and returns an ordered listing of those strings which are sorted in a case-insensitive manner

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Design Object Oriented Java language Classes – KeyWordInContextApplication – FileReader – Phrase – Word – PhraseRotator – PhraseList

Design Object Oriented Structure diagram EECS 761

Design Object Oriented Classes – KeyWordInContextApplication Responsibility: Accept and Validate user input Call FileLoader class to load the text from the specified file Call PhraseRotator class to rotate the Phrases Call PhraseList sorting method to produce a new PhraseList in a sorted order Print the results – Phrase Responsibility: Decompose a raw string into a collection of Word objects

EECS 761 Design Object Oriented Classes – PhraseList Responsibility: Maintain a collection of Phrases and own the logic of sorting the collection – FileReader Responsibility: Takes an input and produce a PhraseList representing the contents of input file – PhraseRotator Responsibility: Takes in a Phrase and produces a PhraseList representing all the unique rotations (…Continued)

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Design Pipe and Filter Java language Modules – Rotate – Sort – UNIX shell environment EECS 761

Structure diagram EECS 761 Design Pipe and Filter

EECS 761 Design Pipe and Filter Modules – Rotate Responsibility: Takes input stream of text and produces an output stream of all the circular rotations – Sort Responsibility: Takes input stream of text and produces an output stream of the sorted form – UNIX shell Responsibility: Produce input stream (cat command) Provide piping functionality

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Evaluation Change in algorithm – Main-subroutine: Changes of one or more subroutines that implement the algorithm will be required Possibly changes on the sequence of subroutines being called – Object Oriented: Only the object implementing the algorithm needs to be updated – Pipe and Filter: Only the filter implementing the algorithm needs to be updated

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Evaluation Change in data representations – Main-subroutine: All modules utilizing this data type would need to be changed – Object Oriented: All objects which reference the data type need to be changed Most primitive types are encapsulated in classes, and therefore would require minimal change – Pipe and Filter: The filter involved with that data type would need to be changed Other filters consuming the serialization of this data type would also need to be changed.

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Evaluation Change in functionality – Main-subroutine: The main program and all of the subroutines may need to be updated – Object Oriented: Only the objects related to implement the new functionality will need to be updated – Pipe and Filter: All filters need to be updated

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Evaluation Performance (Time) – Testing against large text file Text file representation of Les Misérables 67,724 lines and a total of 567,043 words – Execution time captured by “time” command time./kwic-oo les_miserable.txt > kwic-oo.out

EECS 761 Evaluation Performance (Time) Object oriented and Main-subroutine have better run-time performance than Pipe-and-Filter. (…Continued) Runskwic-ookwic-proceduralkwic-pf Run Run Run Run Run Average (seconds)

EECS 761 Evaluation Performance (Space) – Pipe and Filter space requirement is difficult to capture Utilizing separate Java virtual machines – Main-subroutine would consume less memory than Object Oriented approach OO approach has a lot more objects, thus more overheads

Design – Main-Subroutine – Object Oriented – Pipe and Filter Evaluation – Change in algorithm – Change in data representations – Change in functionality – Performance – Reusability EECS 761

Evaluation Reusability – Main-subroutine: Limited reusability – Object Oriented: More abstraction per class Very reusable Require additional word for re-assembling – Pipe and Filter: All filters as external components are reusable

Questions? Comments? EECS 761