jagomart
digital resources
picture1_Software Design Pdf 187355 | Designpatternsjava


 109x       Filetype PDF       File size 0.84 MB       Source: stlab.dinfo.unifi.it


File: Software Design Pdf 187355 | Designpatternsjava
enrico vicario aa 13 14 sw engineering software engineering a a 13 14 design patterns fromthe original c version with some regard to java implementation enrico vicario dipartimento di ingegneria ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
          Enrico Vicario - AA 13/14
          SW Engineering
                Software Engineering - A.A. 13/14
                Design Patterns
                Fromthe original [GOF] c++ version
                with some regard to Java implementation
                                                                                   Enrico Vicario
                                                      Dipartimento di Ingegneria dell'Informazione
                                                   Laboratorio Scienza e Tecnologia del Software
                                                                              Università di Firenze
                                                    enrico.vicario@unifi.it, www.dsi.unifi.it/~vicario
         1/97
          Enrico Vicario - AA 13/14                                             Design Patterns
          SW Engineering
            Design pattern: a reusable solution scheme for some recurrent problem
                   A name, a problem, alternative solutions, known consequences, …
                   Term first made explicit in Architecture by Christopher Alexander
                   A Handbook of electronics schemes (e.g. amplifiers push-pull, totem-pole, …)
                   ProducerConsumer or Monitor are also patterns in operating systems
            Patternsin OO Design
                   Advanced use of OO programming schemes
                   Substitutability and polymorphism, inheritance, composition, …
                   Override, method look-up or dynamic binding and virtual methods, …
                   Differently mapped to different languages
         2/97
           Enrico Vicario - AA 13/14                                         The Observer pattern
           SW Engineering
            The problem
                   (an object of type) Subject has a state variable whose value 
                     is necessary also to (objects of type) Observer_A and Observer_B
                   (this might occur in the transition from specification to implementation,
                     or in refactoring for separation of main concerns)
                   Much about 
                     maintaining consistence 
                     across decoupling
            a naive solution
                   (naive is a positive attribute, when beginning)
                   Subject provides a public method
                     that Observer invokes to get the value
                   But, when shall the Observer unpdate its copy of the state?
                     …might be before using it
                     …but, intermediate states could be relevant as well
                     (e.g.  Computing interest on a banking current account)
         3/97
           Enrico Vicario - AA 13/14                                          TheObserverpattern
           SW Engineering
             one step ahead 
                    assign to Subject 
                     the responsibility of 
                     notifying Observers
                     (inversion of responsibility)
                    after any change of its state, 
                     Subject invokes notify()
                     which in turn 
                     invokes update() 
                     on each Observer
                                                                                      Yet, the Subject 
                                                                                      must be aware of
                                                                            all the types and instances 
                                                                                            of Observer
          4/97
The words contained in this file might help you see if this file matches what you are looking for:

...Enrico vicario aa sw engineering software a design patterns fromthe original c version with some regard to java implementation dipartimento di ingegneria dell informazione laboratorio scienza e tecnologia del universita firenze unifi it www dsi pattern reusable solution scheme for recurrent problem name alternative solutions known consequences term first made explicit in architecture by christopher alexander handbook of electronics schemes g amplifiers push pull totem pole producerconsumer or monitor are also operating systems patternsin oo advanced use programming substitutability and polymorphism inheritance composition override method look up dynamic binding virtual methods differently mapped different languages the observer an object type subject has state variable whose value is necessary objects b this might occur transition from specification refactoring separation main concerns much about maintaining consistence across decoupling naive positive attribute when beginning provides...

no reviews yet
Please Login to review.