The document discusses software frameworks and provides examples. Key points:
- Frameworks balance reuse and specialization through foundation methods that provide common functionality and deferred methods that allow specialization.
- Frameworks provide reuse of high-level abstractions rather than just low-level code.
- Examples include a sorting framework, GUI framework, simulation framework, and Java applet framework. Frameworks combine many classes to provide structure that can be specialized.
Towards Task-Based Linguistic Modeling for designing GUIsJean Vanderdonckt
The linguistic perspective emphasizes the use of linguistic taxonomy to classify (partition) graphical user interface concepts and elements on several linguistic levels with clearly-defined interfaces between levels. This perspective is based on Nielsen’s Virtual Protocol for Interaction that consists of several linguistic levels: goal, pragmatic (task), semantic, syntactical, lexical,
alphabetical and physical. A linguistic modeling is modeling the graphical interface by abstracting each linguistic level. The aim of the linguistic modeling is to enhance the maintainability
quality of the graphical user interface model as defined
in ISO-25010:2011, by enhancing sub-qualities of
modularity, analyzability and modifiability. Recent research reported on the linguistic perspective and the linguistic modeling requirements. In this paper, we elaborate more towards a linguistic modeling by modeling the task level; the high abstract level in the linguistic stack. Our contribution is an executable
hierarchical task model that fulfils the specific needs
towards linguistic modeling.
Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. A design pattern is not a class or a library that we can simply plug into our system; it's much more than that. It is a template that has to be implemented in the correct situation. It's not language-specific either. A good design pattern should be implementable in most—if not all—languages, depending on the capabilities of the language. Most importantly, any design pattern can be a double-edged sword— if implemented in the wrong place, it can be disastrous and create many problems for you. However, implemented in the right place, at the right time, it can be your savior.
Patterns and Anti-patterns
How to learn design patterns?
Categories of GoF patterns
The Fundamental theorem of software engineering
Real-world problems and how design patterns solve them with GoF structural patterns
Towards Task-Based Linguistic Modeling for designing GUIsJean Vanderdonckt
The linguistic perspective emphasizes the use of linguistic taxonomy to classify (partition) graphical user interface concepts and elements on several linguistic levels with clearly-defined interfaces between levels. This perspective is based on Nielsen’s Virtual Protocol for Interaction that consists of several linguistic levels: goal, pragmatic (task), semantic, syntactical, lexical,
alphabetical and physical. A linguistic modeling is modeling the graphical interface by abstracting each linguistic level. The aim of the linguistic modeling is to enhance the maintainability
quality of the graphical user interface model as defined
in ISO-25010:2011, by enhancing sub-qualities of
modularity, analyzability and modifiability. Recent research reported on the linguistic perspective and the linguistic modeling requirements. In this paper, we elaborate more towards a linguistic modeling by modeling the task level; the high abstract level in the linguistic stack. Our contribution is an executable
hierarchical task model that fulfils the specific needs
towards linguistic modeling.
Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. A design pattern is not a class or a library that we can simply plug into our system; it's much more than that. It is a template that has to be implemented in the correct situation. It's not language-specific either. A good design pattern should be implementable in most—if not all—languages, depending on the capabilities of the language. Most importantly, any design pattern can be a double-edged sword— if implemented in the wrong place, it can be disastrous and create many problems for you. However, implemented in the right place, at the right time, it can be your savior.
Patterns and Anti-patterns
How to learn design patterns?
Categories of GoF patterns
The Fundamental theorem of software engineering
Real-world problems and how design patterns solve them with GoF structural patterns
Task Models describe how to perform activities to reach users' goals. Task models represent the intersection between user interface design and more systematic approaches. Task models can be represented at various abstraction levels. When designers want to specify only requirements regarding how activities should be performed, they consider only the main high-level tasks. On the other hand, when designers aim to provide precise design indications then the activities are represented at a small granularity, thus including aspects related to the dialogue model of a user interface (which defines how system and user actions can be sequenced). In this paper a comparative analysis of selected models involving multiple users in an interaction is provided in order to identify concepts which are underexplored in today’s multi-user interaction task modeling. This comparative analysis is based on three families of criteria: information criteria, conceptual coverage, and expressiveness. Merging the meta-models of the selected models enables to come up with a broader meta-model that could be instantiated in most situations involving multi-user interaction, like workflow information systems, CSCW
JAVA design patterns and Basic OOp conceptsRahul Malhotra
This Presentation is about java design patterns. I have covered some OOPs concepts as well: Polymorphism, Interface, Inheritance, abstraction etc. And the Main Topic Covers: Factory Design Patterns,Observer Design Patterns,Proxy Design Patterns,Adapter Design Patterns,MVC Design Patterns etc
[2016/2017] Introduction to Software ArchitectureIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
Lecture 11 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Describes goods and bads of software architecture as well as common design patterns.
It is a specialized case of ‘Abstraction’, such that it is a mechanism to hide irrelevant details of one object from another, while exposing only the relevant details that the other object might need. E.g. a Manager object may only be concerned with professional skills and availability timings of an employee, not his personal life details.
This screencast was produced for the Inf6350 Information Resources and Information Literacy class in October 2013. This is a class in the Masters programme at Sheffield University's Information School. It describes what abstracts are and why they are useful, identifies different types of abstract, and describes a process for abstracting.
There has been a growing importance of e-journals over the past 10 years or so, with a number of studies indicating that researchers welcome the enhanced and easy access. However relatively few studies have attempted to understand how e-journal usage affects researcher behaviour and how this impacts on research quality and productivity. http://www.rin.ac.uk/our-work/communicating-and-disseminating-research/e-journals-their-use-value-and-impact
Task Models describe how to perform activities to reach users' goals. Task models represent the intersection between user interface design and more systematic approaches. Task models can be represented at various abstraction levels. When designers want to specify only requirements regarding how activities should be performed, they consider only the main high-level tasks. On the other hand, when designers aim to provide precise design indications then the activities are represented at a small granularity, thus including aspects related to the dialogue model of a user interface (which defines how system and user actions can be sequenced). In this paper a comparative analysis of selected models involving multiple users in an interaction is provided in order to identify concepts which are underexplored in today’s multi-user interaction task modeling. This comparative analysis is based on three families of criteria: information criteria, conceptual coverage, and expressiveness. Merging the meta-models of the selected models enables to come up with a broader meta-model that could be instantiated in most situations involving multi-user interaction, like workflow information systems, CSCW
JAVA design patterns and Basic OOp conceptsRahul Malhotra
This Presentation is about java design patterns. I have covered some OOPs concepts as well: Polymorphism, Interface, Inheritance, abstraction etc. And the Main Topic Covers: Factory Design Patterns,Observer Design Patterns,Proxy Design Patterns,Adapter Design Patterns,MVC Design Patterns etc
[2016/2017] Introduction to Software ArchitectureIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
Lecture 11 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Describes goods and bads of software architecture as well as common design patterns.
It is a specialized case of ‘Abstraction’, such that it is a mechanism to hide irrelevant details of one object from another, while exposing only the relevant details that the other object might need. E.g. a Manager object may only be concerned with professional skills and availability timings of an employee, not his personal life details.
This screencast was produced for the Inf6350 Information Resources and Information Literacy class in October 2013. This is a class in the Masters programme at Sheffield University's Information School. It describes what abstracts are and why they are useful, identifies different types of abstract, and describes a process for abstracting.
There has been a growing importance of e-journals over the past 10 years or so, with a number of studies indicating that researchers welcome the enhanced and easy access. However relatively few studies have attempted to understand how e-journal usage affects researcher behaviour and how this impacts on research quality and productivity. http://www.rin.ac.uk/our-work/communicating-and-disseminating-research/e-journals-their-use-value-and-impact
Twins: Object Oriented Programming and Functional ProgrammingRichardWarburton
Object-Oriented Programming has well established design principles, such as SOLID. For many developers architecture and functional programming are at odds with each other: they don’t know how their existing tricks of the trade convert into functional design. This problem becomes worse as hybrid languages such as Java 8 or Scala become common. We’ll talk about how functional programming helps you implement the SOLID principles, and how a functional mindset can actually help you achieve cleaner and simpler OO design.
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Raffi Khatchadourian
Enabling interfaces to declare (instance) method
implementations, Java 8 default methods can be used as a
substitute for the ubiquitous skeletal implementation software design
pattern. Performing this transformation on legacy software
manually, though, may be non-trivial. The refactoring requires
analyzing complex type hierarchies, resolving multiple implementation
inheritance issues, reconciling differences between class
and interface methods, and analyzing tie-breakers (dispatch
precedence) with overriding class methods. All of this is necessary
to preserve type-correctness and confirm semantics preservation.
We demonstrate an automated refactoring tool called MIGRATE
SKELETAL IMPLEMENTATION TO INTERFACE for transforming
legacy Java code to use the new default construct. The tool,
implemented as an Eclipse plug-in, is driven by an efficient,
fully-automated, type constraint-based refactoring approach. It
features an extensive ruleset covering various corner-cases
where default methods cannot be used. The resulting code is
semantically equivalent to the original, more succinct, easier to
comprehend, less complex, and exhibits increased modularity. A
demonstration can be found at http://youtu.be/YZHIy0yePh8.
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Akhil Mittal
I have been writing a lot about advanced topics like MVC, Entity Framework, Repository Patterns etc., my priority always remains to cover the topic as a whole, so that a reader do not have to search for missing links anywhere else. My this article will cover almost every OOPS concept that a novice/beginner developer hunt for, and not only beginners, the article’s purpose is to be helpful to experience professionals also who need to sometimes brush-up their concepts or who prepare for interviews .
Software development effort reduction with Co-oplbergmans
This talks explains the motivations for the Co-op technology: what are the challenges it addresses, in particular focusing on reducing accidental complexity, where it comes from, and a general vision on how to resolve it. Then we continue to show practical application of Co-op, including experience figures from large-scale application of a previous generation of this technology. Show a little bit about its realization, and conclude with an evaluation of the technology.
NicheTech is the best mobile development company in Ahmedabad,
We are providing iOS Live Project Training Ahmedabad, We are offering iOS Training Ahmedabad.
Get the best iOS Live Project Training Ahmedabad .
iOS Live Project Training Ahmedabad, iPhone Live Project Training Ahmedabad, iPhone classes Ahmedabad, iPhone Course Ahmedabad
iOS Live Project Ahmedabad:- http://liveprojecttraining.in/
This is inspired from Tom Mitchell's book on Machine Learning. You can achieve a bit exact implementation of the back propagation algorithm if you follow the code in this.
A simple client-server application in java in which a client sends a message to a server and the server tries to be funny by sending back a funny response.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
AI Genie Review: World’s First Open AI WordPress Website CreatorGoogle
AI Genie Review: World’s First Open AI WordPress Website Creator
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-genie-review
AI Genie Review: Key Features
✅Creates Limitless Real-Time Unique Content, auto-publishing Posts, Pages & Images directly from Chat GPT & Open AI on WordPress in any Niche
✅First & Only Google Bard Approved Software That Publishes 100% Original, SEO Friendly Content using Open AI
✅Publish Automated Posts and Pages using AI Genie directly on Your website
✅50 DFY Websites Included Without Adding Any Images, Content Or Doing Anything Yourself
✅Integrated Chat GPT Bot gives Instant Answers on Your Website to Visitors
✅Just Enter the title, and your Content for Pages and Posts will be ready on your website
✅Automatically insert visually appealing images into posts based on keywords and titles.
✅Choose the temperature of the content and control its randomness.
✅Control the length of the content to be generated.
✅Never Worry About Paying Huge Money Monthly To Top Content Creation Platforms
✅100% Easy-to-Use, Newbie-Friendly Technology
✅30-Days Money-Back Guarantee
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIGenieApp #AIGenieBonus #AIGenieBonuses #AIGenieDemo #AIGenieDownload #AIGenieLegit #AIGenieLiveDemo #AIGenieOTO #AIGeniePreview #AIGenieReview #AIGenieReviewandBonus #AIGenieScamorLegit #AIGenieSoftware #AIGenieUpgrades #AIGenieUpsells #HowDoesAlGenie #HowtoBuyAIGenie #HowtoMakeMoneywithAIGenie #MakeMoneyOnline #MakeMoneywithAIGenie
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
3. Introduction Summary References
INTRODUCTION
Software frameworks are one of the primary means for
large scale software reuse, and rapid application
development.
In this chapter we will examine the technologies that make
software frameworks possible.
The Tension between Reuse and Specialization.
Reuse of Code, Reuse of Concept.
High and Low Level Abstractions.
Some Example Frameworks.
4. Introduction Summary References
TENSION BETWEEN REUSE AND SPECIALIZATION
A truly general purpose tool cannot contain features
specific to any one application.
Solving most problems requires application specific
features.
How do you bridge the gap between general purpose and
application independent tools and an application that will
solve a real problem?
5. Introduction Summary References
REUSE OF CODE, REUSE OF CONCEPT
The solution comes from the two ways we have been using
inheritance from the beginning of the book.
Reuse of code.
Certain methods, call foundation methods, are defined in a
general purpose class.
These provide functionality that is common to many
applications.
Reuse of concept.
Other methods, called specialization methods, are defined
in a parent class, but overridden in child classes.
These provide the means to specialize an application to a
new situation.
6. Introduction Summary References
A SIMPLE EXAMPLE, A GUI SYSTEM
A simple example might be a framework for user
interfaces:
Class Window: methods.
foundation: setTitle, setWindowSize, moveWindowTo,
addMenu, repaint
specialization: mouseDown, keyPress, paint
class Childwindow: methods
paint, mouseDown, keyPress
The foundation method are applicable to any type of
window.
The deferred specialization methods are appropriate only
to one type of application.
7. Introduction Summary References
DEFERRED METHODS
By working with deferred methods, the application class
views the application in one way, and the child class in
another.
8. Introduction Summary References
REUSE OF HIGH LEVEL ABSTRACTIONS
Software frameworks provide a different type of reuse:
Conventional libraries of procedures provide a means for
reuse of low level abstractions (I/O libraries, math
functions, and so on).
Software frameworks provide a means for reuse of high
level abstractions, and still allow them to be specialized for
new situations.
9. Introduction Summary References
AN EXAMPLE OF A LOW LEVEL ABSTRACTION
SORTING EMPLOYEE RECORDS
Suppose we want to sort employee records. We could write the
following.
EXAMPLE
class Employee {
public :
s t r i n g name;
int salary ;
int startingYear ;
}
void sort ( Employee ∗ data [ ] , int n ) {
for ( int i = 1; i < n ; i ++) {
int j = i −1;
while ( j >= 0 &&
v [ j +1]−>startingYear < v [ j ]−>startingYear ) {
/ / swap elements
Employee ∗ temp = v [ j ] ;
v [ j ] = v [ j +1];
v [ j +1] = temp ;
j = j − 1;
}
}
}
But what happens if we want to change it?
10. Introduction Summary References
TYPES OF REUSE
We can reuse the idea of a merge sort, but cannot reuse
the binary without modifications to the original source
code.
Might want to sort on salary, instead of starting year.
Might want to do comparisons of string (e.g., name), not
integers.
Might want to sort a different type of structure.
To create an object-oriented software framework, we must
first ask ourselves what are the likely sources of change?
11. Introduction Summary References
A SORTING FRAMEWORK
EXAMPLE
class I n s e r t i o n S o r t e r {
public :
void sort ( ) {
int n = size ( ) ;
for ( int i = 1; i < n ; i ++) {
int j = i − 1;
while ( j >= 0 && lessThan ( j +1 , j ) ) {
swap( j , j +1);
j = j − 1;
}
}
}
private :
v irtual int size ( ) = 0; / / abstract methods
v irtual boolean lessThan ( int i , int j ) = 0;
v irtual void swap( int i , int j ) = 0;
}
The part that is common in made into a foundation method, the
part that changes are made into deferred methods.
12. Introduction Summary References
SPECIALIZING THE SORTING FRAMEWORK
To apply the framework to a new problem, we subclass and
override the deferred methods:
EXAMPLE
class EmployeeSorter : public I n s e r t i o n S o r t e r {
public :
EmployeeSorter ( Employee ∗ d [ ] , int n )
{ data = d ; sze = n ; }
private :
Employee ∗ data [ ] ;
int sze = n ;
v irtual int size ( ) { return sze ; }
v irtual bool lessThan ( int i , int j )
{ return data [ i ]−>startingYear < data [ j ]−>startingYear ; }
v irtual void swap ( int i , int j ) {
Employee ∗ temp = v [ i ] ;
v [ i ] = v [ j ] ;
v [ j ] = temp ;
}
}
13. Introduction Summary References
NOT ONE CLASS
The impression that a framework is always just one class is
wrong.
Often, a framework is a collection of many classes.
For example, a typical GUI framework might have.
Window classes.
Button or scroll bar classes.
Text box classes.
All can be specialized by the combination of foundation
methods for overall structure, and deferred methods for
specialization.
14. Introduction Summary References
FLEXIBILITY AND RIGIDITY
A framework can be tremendously helpful in allowing a
programmer to rapidly create new application, but only
when the application fits into the general structure
envisioned by the creator of the framework.
If an application falls outside that framework, then it can be
very difficult to overcome the framework.
For example, if the designer of the framework has not
encapsulated the right sources of variation in a method, or
has forgotten to declare a method as virtual, then it can be
very difficult to work with.
15. Introduction Summary References
AN EXAMPLE API
THE JAVA APPLET API
The Java Applet API is one simple example of a software
framework.
init() Invoked when the applet is initialized
start() Invoked to start the application
paint(Graphics) Invoked to repaint the window
stop() Invoked when the applet is halted
destroy() Invoked when the applet is terminated
Lots of
other classes for constructing buttons and menus, and so on.
16. Introduction Summary References
SIMULATION FRAMEWORK
Here is a framework like we might use in Chapter 7 (the
billiards game).
EXAMPLE
GraphicalObject = object
(∗ data f i e l d s ∗)
l i n k : GraphicalObject ;
region : Rect ;
(∗ i n i t i a l i z a t i o n function ∗)
procedure setRegion ( l e f t , top , r i gh t , bottom : integer ) ;
(∗ operations that graphical objects perform ∗)
procedure draw ;
procedure update ;
function i n t e r s e c t ( anObj : GraphicalObject ) : boolean ;
procedure hitBy ( anObj : GraphicalObject ) ;
end ;
17. Introduction Summary References
A GENERALIZED EVENT DRIVEN SIMULATION
FRAMEWORK I
A generalized discrete event-driven simulation can be formed
based around the class Event:
EXAMPLE
class Event {
public :
Event ( unsigned int t ) : time ( t ) { }
const unsigned int time ;
v irtual void processEvent ( ) = 0;
} ;
class eventComparison {
public :
bool operator ( ) ( event ∗ l e f t , event ∗ r i g h t )
{ return l e f t −>time > r ig h t −>time ; }
} ;
18. Introduction Summary References
A GENERALIZED EVENT DRIVEN SIMULATION
FRAMEWORK II
An event is an action that will take place at a specific time.
Discrete event driven simulations were the type of
application that helped drive the design of the first
object-oriented programming language, Simula. (Early
1960’s).
19. Introduction Summary References
THE SIMULATION CLASS I
CODE
class Simulation {
public :
Simulation ( ) : eventQueue ( ) , currentTime (0) { }
void scheduleEvent ( event ∗ newEvent ) { eventQueue . push ( newEvent ) ; }
void run ( ) ;
unsigned int currentTime ;
protected :
priority_queue <vector , eventComparison> eventQueue ;
} ;
void Simulation : : run ( ) {
/ / execute events u n t i l event queue becomes empty
while ( ! eventQueue . empty ( ) ) {
event ∗ nextEvent = eventQueue . top ( ) ;
eventQueue . pop ( ) ;
time = nextEvent−>time ;
nextEvent−>processEvent ( ) ;
delete nextEvent ;
}
}
21. Introduction Summary References
SUMMARY
A framework is a way of organizing classes so as to solve
a class of related problems
The framework balances software reuse and the ability to
specialize a tool to a new application
The framework achieves this by combining inheritance of
code and inheritance of concept (overriding).
Frameworks can be developed for any application where
you can extract and generalize the ways in which code will
change.
Frameworks are great if your new application fits the
scheme of the designed, but very inflexible if it does not.
22. Introduction Summary References
REFERENCES
Images and content for developing these slides have been
taken from the follwoing book with the permission of the
author.
An Introduction to Object Oriented Programming, Timothy
Budd.
This presentation is developed with Beamer:
Darmstadt, spruce.