EXAM TDDD05 Component-based Software 2014-06-05, 14:00–18:00 Hjälpmedel / Admitted material:

advertisement
Linköpings universitet
IDA Department of Computer and Information Sciences
Ola Leifler
EXAM
TDDD05 Component-based Software
2014-06-05, 14:00–18:00
Examinator: Ola Leifler
Jour: Ola Leifler (070-1739387), visiting ca. 16:00
Hjälpmedel / Admitted material:
Engelsk ordbok / Dictionary from English to your native language
General instructions
• This exam has 6 assignments and 3 pages, including this one.
• Please use a new sheet of paper for each assignment (1-6).
When you are done, please sort all your pages by assignment numbers, and
number them consecutively.
• Justify clearly all statements and reasoning. Explain calculations and solution
procedures.
• Be precise in your statements. Unprecise formulations may lead to a reduction
of points.
• Write clearly. Unreadable text will be ignored.
• You may answer in either English or Swedish.
• Grading: U, 3, 4, 5. The preliminary threshold for passing (grade 3) is 50% of
the total number of points.
Where required, ECTS grades will be set by the LiU administration according
to the LiU guideline for direct translation from Swedish grades: 5=A, 4=B, 3=C,
U=FX.
If the ECTS grading should be missing in the Ladok entry, please contact the
course secretary.
1
1. (6 p.) Object-oriented programming concepts and component systems
(a) What are the main empirically justified reasons for writing software
with reusable components? (2p)
(b) Explain why contravariance in return values and exceptions is not
allowed when overloading methods in a subclass, and covariance is
not allowed in input parameters. Give a concrete example to justify
your answer. (3p)
(c) Explain why you would want to allow covariance in overloaded methods’ parameters. (1p)
2. (6 p.) Metaprogramming
(a) What type information is retained in a generic (template) class after
it has been compiled, in Java, C# and C++? (1p for each language)
(b) What is a dynamic proxy, and what metaprogramming language features (in C# or other languages) allows for the creation of such dynamic proxies? (2p)
(c) What kind of metaprogramming (meta-level or base-level, static or
dynamic) is used in Java application frameworks such as Spring and
for what purpose? Give an example of how metaprogramming is used
in Spring. (1p)
3. (6 p.) Component models
(a) Describe the ”Root POA” in CORBA. (1p)
(b) What are the roles of stubs and skeletons in CORBA and RMI? (2p)
(c) According to Henning in “A new approach to object-oriented middleware”, what are the main defects of CORBA marshalling and GIOP?
List and describe three defects. (3p)
4. (6 p.) Messaging systems and Web Services
(a) What is the advantage of Messaging as opposed to Remote Method
Invocation according to Fowler? (1p)
(b) What is the relationship between Web Services and Service-Oriented
Architectures (SOA)? (2p)
(c) What does Hohpe mean in his paper “SOA Patterns - New Insights
or Recycled Knowledge?” when he claims that new (or different) programming models are introduced by service-oriented architectures?
(3p)
5. (6 p.) Application frameworks and AspectJ
(a) What is a join-point and a point-cut in AspectJ? Give concrete examples using code. (2p)
2
(b) What is an advice in aspect-oriented programming? Give a general
definition and a code example using AspectJ. (2p)
(c) What are the potential pitfalls of using AspectJ in industry, according
to Rashid et al in “Aspect-Oriented Software Development in Practice:
Tales from AOSD-Europe”? (2p)
6. (6 p.) Software Architectures and perspectives
(a) Explain the differences between UML and the early ADLs, and when
you would prefer a “proper” ADL or UML for describing a software
architecture. (2p)
(b) According to Hutchinson et al in their 2011 paper “Model-driven engineering practices in industry”, what were factors that led to success
in adopting Model-Driven Engineering (MDE) in software development? (2p)
(c) Name similarities and differences between software architectures and
computer hardware architectures (e.g., network architectures)? (2p)
Lab bonus: The optional Ladok moment for the timely completed optional lab
series has already been reported at the time of the exam where applicable. If
applicable, your exam score will be automatically increased with up to 6 lab
bonus points.
Good luck!
3
Download