Crs 120 Frameworks, Patterns and the C++ Standard Template Library
This course focuses on the approaches and techniques needed in the
implementation of large C++ based projects. In particular it concentrates
on the use of the Standard Template Library - to obviate the need to
re-invent the code for maintaining and manipulating complex data sets, and on
the exploitation of patterns - to come up with useful approaches to tackling
some of the design and implementation problems that crop up on large
projects.
By combining a good coverage of the STL, and a comprehensive overview
of Patterns that have been researched over the last 10 year or so the course
should provide senior programmers, analysts and technical project managers
with the necessary skills and insights to develop large scale applications
more rapidly and with fewer bugs in the code.
An important area covered in the course is directed to the art and science
of rapidly prototyping applications that will involve the manipulation of rich
and complex collections of data (in areas such as data exploration,
image processing, operations research and network management).
|
Course outline
Polishing up C++ knowledge
- Rapid overview of the basic syntax
- Namespaces
- type conversion (casting) operators
- overloading the new and free operators
- function objects
- pointers to member functions of a class
- Virtual class hierarchies and pure virtual classes
- static member variables and static member functions
- templates
- the templatised function make_pair()
- the auto_ptr class
- C++ exception handling - try, catch, throw
Rationale behind the Standard Template Library
- An introduction and overview of algorithms and their associated data
structures
- specification and description of algorithms
- Characterisation of the Complexity of algorithms (Big-O notation)
- verification , validation and testing of algorithms
- An overview of typical container classes, their underlying abstractions
and their associated algorithms
Standard Template Library - Components
- Sequence containers
- Associative containers
- Container adapters
- Iterators
- Algorithms
- Iterator adaptors
- Exception handling inside STL
Container classes - details and applications
- Vectors
- Lists
- Deques
- Sets and Multisets
- Maps and Multimaps
- Strings as STL containers
- Arrays as STL containers
- Hash tables
STL Iterators
- Input, Output Iterators
- Forward, Bidirectional and Random Iterators
- Iterator adaptors - Reverse, Insert and Stream Iterators
- Auxiliary Iterator Functions - advance(), distance(), iter_swap()
- Iterator traits
STL Function Objects
- Used as sorting criteria
- Used to maintain Internal state
- Used as a return value of for_each()
- Function adapters
STL Algorithms
- for_each()
- Counting, min/max, searching and range comparison algorithms
- Algorithms for - copying, transforming and combining, assigning new values,
and replacing elements in a container
- Algorithms for reversing order of, rotating, permuting, shuffling elements and
moving elements to the front
- Sorting algorithms
- Numeric algorithms
Special containers
- Stacks
- Queues
- Priority Queues
- Bitsets
Other STL Components
- Strings
- IO Stream classes
- Complex numbers
- Valarrays
- Internationalisation
- Allocators
Patterns
- Rationale Behind Patterns
- Patterns - a brief history
- creational patterns (abstract factory, prototype, singleton)
- structural patterns (adaptor, composite, facade, flyweight, proxy)
- behavioural patterns (interpreter, iterator, mediator, memento,
observer , visitor)
- meta-patterns
- anti-patterns
Strategies and approaches for large projects
- Object oriented approach to requirements analysis
- Framework adaptation patterns
- Design pattern catalogs
- RAD and JAD approaches
- Formal contract approaches
Components in Large Projects
- Identifying components (building blocks)
- creating hierarchies of components with no physical dependency loops
(acyclic physical dependencies)
- reduction of link-time dependencies (levelisation)
- reduction of compile-time dependencies (insulation)
- larger building blocks (packages)
Large projects - logical design, management and implementation issues
- architecting components
- designing functional interfaces
- management and implementation of objects in a large-project environment
- integration , validation and verification
- version control and maintenance
|
Intended Audience
The course is for experienced C++ programmers, analysts and technical
project managers who would like to gain a good overview of patterns and their
uses, and of the Standard Template Library and its potential.
Attendees are expected to be comfortable working with projects containing
many modules, have a good knowledge of debugging techniques, and capable
of interpreting sometimes obscure compiler errors and warnings
This course is designed to be operating system, compiler and
integrated development environment independent, although, it will by
default be taught using workstations running Linux and the GNU C++ compiler
|
Practical Work
The course contains a number of challenging exercises. For many of the
exercises a lot of the supporting code will be provided, so that
students can concentrate on applying one or more key concepts.
Exercises will (typically) consist of some simple warm up mini-problems, followed by
a core problem, followed by several challenges
of increasing difficulty. The challenges are meant for post course
skills development.
The course will use the GNU C++ compiler running under Linux. (It can also be
run using Visual Studio under Microsoft Windows).
The course hours will be from 9 a.m. to 5.30 p.m. for the first four days, and from
9 a.m. to 4 p.m. on the last day. Students are encouraged to come earlier (8 a.m. or
to carry on working after class (till 7.00 p.m.) if they wish to. Where students
have their own laptops (running either Linux or Solaris) they can work on the
challenge exercises at home, or at their hotel in the evenings.
- Implementing a graph search algorithm using the STL
- Realising a simulation of a queueing system using STL
- Using a variety of patterns and STL containers to implement a distributed
command, control and data acquisition system
- Implementing data persistence using an Object Oriented Database Management
System
- Developing a graphical data display system using a variety
of patterns and containers
|