190 likes | 280 Views
Software Engineering 3156. 1-Oct-01 #7: RPIS and Project Phil Gross. Administrivia. Groups and questionnaires are locked Talk to Janak or me directly for changes. Review: Concurrency. Threads (lightweight processes) Ability to run concurrent sets of code in one process
E N D
Software Engineering 3156 1-Oct-01 #7: RPIS and Project Phil Gross
Administrivia • Groups and questionnaires are locked • Talk to Janak or me directly for changes 2
Review: Concurrency • Threads (lightweight processes) • Ability to run concurrent sets of code in one process • Java: Class should implement Runnable • Then create new Thread on this class and start() it • Race conditions (fix with locks) • Deadlock (fix with timeout [or cycle detection]) 3
RPIS • Reusability • Portability • Interoperability • (Scalability) • Things to keep in mind early • So you’re not trying to force it in later 4
Basic Reuse: Libraries • Library • API • System Call 5
Impediments to Reuse • Lack of trust / NIH • Logistics of reuse • Mismatch of features (Kangaroos) • Not to mention Ariane 5 (8.3.6) 6
Successful Reuse: Objects • Well, that was the intention in any case • Typical language-level objects need some help • Discovered somewhat by accident: VBX • Lead to JavaBeans and the COM family • Windows uses this pretty successfully 7
Reuse: Frameworks • High-level • Framework gives you a generic body into which you add your particular code • Example: MFC • Problems: bloat, steep learning curve 8
Reuse: Design Patterns • Christopher Alexander in 1977 • Gang of Four in 1995 • Ways of organizing objects in order to solve frequently reoccurring problems • Design it to be flexible, extensible, scalable, portable, etc. from the beginning • Give a vocabulary • Antipatterns: known bad ways of doing things 9
Portability Pitfalls • Hardware • OS • Numerics • Compilers • Libraries • But, you have to do it: software lasts longer than hardware 10
Language Portability • Java and C# • Java uses a JVM • Write once, run anywhere, sorta, kinda • C#: mobile data, not code • XML everywhere • Winner as yet unknown, but betting against Microsoft is historically a losing proposition 11
Interoperability • COM and Corba • Both define abstract services • Allow programs in any language to access services in any language in any location • Object-ish 12
CORBA • International standard • Transport independent • Object oriented • Good for distributed applications • Quite complex 13
COM • Microsoft proprietary • Microsoft proprietary transport • Object based (weaker than oriented) • Impossibly complex • Works really, really well with Windows (surprise!) • Vast quantities of off-the-shelf components 14
Scalability • Just keep it in mind • Familiarity with patterns can help • Don’t worry about scaling beyond abilities of machine • Just avoid unnecessary barriers • Plus maybe graceful overload handling • From single connection, to forking processes, to threads, to thread pool 15
Rational Development Suite • Name makes jokes too easy • Interface is flaky • Software is incredibly bloated • Poor advertisement for software engineering • And yet… 16
Review: XML • XML Schema is like a class • An individual message is like an instance of that class • Schema is itself defined with XML syntax • Made up of elements, aggregated with sequences or choices 17
Important Point • Forgot to mention this last time • XML Schema Primer 0 • Read it • No, really, read it • Read and understand, and you have a sweet item for your resume • Plus a chance of understanding the requirements… 18
Where Is It? • http://www.w3.org/TR/xmlschema-0/ • More than the textbook, this is required reading • Like, right now • An example to kick things off… 19