170 likes | 184 Views
CIS 644 Thurs. Oct. 7, 1999 W7B … call for Video Class model … discuss previous pattersn. Video store class model: send asap, I will select one version to be used for scenarios … to be posted. >I have reviewed > Object Models: > Startegies, patterns, and Applications.
E N D
CIS 644 Thurs. Oct. 7, 1999 W7B … call for Video Class model … discuss previous pattersn
Video store class model: send asap, I will select one version to be used for scenarios … to be posted
>I have reviewed > Object Models: > Startegies, patterns, and Applications. >... no mention of visitors, iterators or etc.. >...I cannot tie it into the lectures. ANS: yes, Coad give PD patterns Gamma gives implementation patts … wait on Coad patterns
> Gamma text doesn't seem to help G is reference book more than class text. > Can you provide examples … hmmm http://st-www.cs.uiuc.edu/ftp/pub /patterns/dpcat/DPCPP.zip C++ examples from Gamma http://www.cs.wustl.edu/~schmidt/ research.html
> Okay, I'll open the discussion. > I don't understand > visitors, > command/action/transaction, > framework.
Framework … some books refer to a collection or hierarchy of classes as a framework is AWT a framework ?
Frameworks: (1) AppWizard in Studio, Café, … (2) Doug Schmidt ACE http://www.cs.wustl.edu/~schmidt/ ACE-overview.html
ACE ADAPTIVE Communication Environment ...free, open-source, OO framework ...reusable C++ wrapper facades and framework components for common communications event demultiplexing .. event dispatching ...signal handling...service initialization... interprocess communication... shared memory management... message routing... dynamic config of distributed services… concurrent execution & synchronization.
Mohamed Fayad, Douglas C. Schmidt (Editor), Ralph Johnson (Editor), Building Application Frameworks : Object-Oriented Foundations of Framework Wiley, Sept. 1999, 0471248754
(3) Matt Dwyer, pattern = concurrency coordination … work pool + replicated workers framework = “application independent concurrency skeleton” (ps) http://www.cis.ksu.edu/~dwyer/ CAS/cas.html
>Comments on Iterator vs. Visitor: >An iterator provides the ability to move >through a collection without knowing >the underlying implementation of the >collection (e.g., vector or hashtable). true , but the collection should also provide that ! iterator gives separate retained state of the iteration !
>It also strikes me as being non-OO. >….basic concept of OO is that > every object maintains its own state > and performs its own operations. yes and no !! .. every object “owns” its own state … ...but reality of implementation is redundant state info for convenience / efficiency ! state of iterator is the state of some object using the collection .. not state of the coll.
“A visitor provides the ability to add functionality to an existing class hierarchy without changing that hierarchy but by adding a separate class hierarchy.” > This seems quite complicated, > even after reviewing both Gamma > and Eckel ("Thinking in Java"). > ... very difficult to follow.
>the "visitor" wants to perform operations >on some other object rather than itself. …?? violated OO concepts?? > cannot relate the visitor to the PD. motivation is to make reusable parts … not related to any specific PD. … that is concept of patterns
build visitor acceptor into the target object class … and collection class now client can add new operations