940 likes | 1.16k Views
Object-Oriented Software Engineering. Anton Eliëns Vrije Universiteit, Amsterdam http://www.cs.vu.nl/~eliens/online/courses/oo. Topics:. Basic OO technology Application Framework(s) Universal Modeling Language Design Patterns Project Management Current developments and trends.
E N D
Object-Oriented Software Engineering Anton Eliëns Vrije Universiteit, Amsterdam http://www.cs.vu.nl/~eliens/online/courses/oo
Topics: • Basic OO technology • Application Framework(s) • Universal Modeling Language • Design Patterns • Project Management • Current developments and trends
Introduction If OO is the Answer, What is the Question?
Keywords and phrases • the OO lifecycle -- modelling • encapsulation, inheritance, delegation, polymorphism • specification and implementation inheritance • design by contract • interfaces, components and frameworks • idioms, patterns, software architecture
Themes and Variations • abstraction -- the object metaphor • modeling -- understanding structure and behavior • software architecture -- mastering complexity • frameworks -- patterns for problem solving • components -- scalable software
Object Terminology • objects -- packet containing data and procedures • methods -- deliver service • message -- request to execute a method • class -- template for creating objects • instance -- an object that belongs to a class • encapsulation -- information hiding by objects • inheritance -- allowing the reuse of class spec.s class • hierarchy -- tree structure inheritance relations • polymorphism -- to hide different implementations
Features of OOP • information hiding: state, autonomous behavior • data abstraction: emphasis on what rather than how • dynamic binding: binding at runtime, polymorphism , virtual functions • inheritance: incremental changes (specialization), reusability
Benefits of OOP • OO = encapsulation + inheritance • modularity -- autonomous entities, cooperation through exchanges of messages • deferred commitment -- the internal workings of an object can be redefined without changing other parts of the system • reusability -- refining classes through inheritance • naturalness -- object-oriented analysis/design, modeling
The San Francisco Framework How useful is an OO framework?
A framework is ... • a collection of components • a generic solution for a class of problems • a frame of mind for solving problems • a set of architectural constraints
The San Francisco Framework • is meant to develop business applications • is based on Java technology • may solve 70% of your problem • leaves 30% (minimum) to solve for you • may set a standard • or may fail to do so ...
San Francisco - motivation • The project was started when several software vendors asked IBM to help modernizing their application products • However, there were several barriers preventing them from being able to update their applications
Barriers to modernizing • (1) The problem of how to retrain their development staff to effectively use OO technology. • (2) The risk involved in moving to a new technology. • (3) moving -> the cost of the change • The software developers realized they needed some basic infrastructure. • Many companies could not develop this infrastructure themselves.
San Francisco - the press • The San Francisco project helps to solve these problems by offering developers Business Process Components, • designed as frameworks that provides an object oriented infrastructure, • a consistent application programming model, and • some default business logic • The frameworks make it easier to move to OO technology because developers use well-tested services instead of building their own.
San Francisco Framework - layers • Core Business Process Layer - the highest • Common Business Objects Layer - middle • Foundation Layer - lowest
Core Business Processes • The objective for this layer is to create a sound architecture and highly extensible OO implementation for the basic structure and behavior which any application provider delivering a solution in the application doamin would require: • Accounts Receivable/Payable Ledger • General Ledger Framework • Sales Order Management Framework • Purchase Order Management
Common Business Objects • Business Objects common to multiple domains • Common Application level Services • CBO: • Business Partner • Address • Number - decimal structure • Currency - how many euros in a dollar?
Foundation Layer • Foundation Object Model Classes • Utilities • in other words: it provides the infrastructure • comment: reinventing the wheel is not a big problem, because the wheel is a terrific invention
Foundation Object Model Classes • Command • Entity • Dependent • Collection/Iterator • Factory • you need to study Design Patterns to appreciate these ...
Using the San Francisco Framework • … The San Francisco Frameworks are designed to make many types of extensions easy for application developers: • overriding the default business logic in supplied methods • adding additional attributes to existing classes • adding additional methods to existing classes • from the report: Complete documentation will be provided …
Example • Two classes: Receipt and Purchase order Line • default attributes, methods • default business logic: inspect Quality on receipt • Extension: enhance this logic • subclass Receipt • override inspection method • change logic to include checks against supplier tables, and hazardous or high value products
San Francisco - issues • Standards: OMG/CORBA Business Issues • Technology Integration: • Compound Documents: Lotus Notes, JavaBeans, Active X • Business process Modeling and Control: workflow engines may be used as glue … • Internet/Intranet and Java: applications may be designed …. • Conclusions: … a bit premature ...
Trends -- modeling patterns -- examples of design UML -- Unified Modeling Language Technologies -- components Web -- global infrastructure CORBA/DCOM - the software bus Java -- the platform? Challenges Applications -> Frameworks <- Patterns
Challenges in O-O • vertical framework development -- finance, medical care, insurance • separation of 'logic' from 'control' -- business rules • distributed object technology -- heterogeneous systems • visualisation -- structure and processes • knowledge intensive applications -- declarative • heterogeneous systems - fragmented applications
Universal Modeling Language • … why you need models? • Models are necessary to communicate, • to stabilize abstractions • as a reference for the implementation • and maintenance • and you need an agreement on the notation and formalisms in which you express your models
Unified Modeling Language Introduction Class diagrams Use cases Interaction diagrams Package and deployment diagrams State and activity diagrams Discussion
The Unified Modeling Language (UML) resulted from a joint effort of leading experts in object-oriented analysis and design, Grady Booch, Jim Rumbaugh and Ivar Jacobson, also known as the three amigos, all currently employees of Rational.
Unified Modeling Language UML • class diagrams -- conceptual structure • use cases -- functional requirements • interaction diagrams -- operational characteristics • package and deployment diagrams -- implementation • state and activity diagrams -- dynamic behavior See http://www.rational.com/uml and UML Distilled, [Fowler97].
Event annotations event(arguments)[conditions]/action
The UML toolbox is very rich. It allows you to model every conceivable aspect of the system. Nevertheless, to my mind, graphical models are not always appropriate. But, on the other hand, most people like them and they often make a good impression, suggesting clarity ...
Examples - interactive drawing tool - the reactor pattern (events) - business process modeling - the observer pattern
Basic OO Technology Technology determines the effectiveness of the approach
Concepts • Encapsulation • Data hiding • Inheritance • Polymorphism