Busy Java Developer's Guide to Multiparadigmatic Design in Java

Multiparadigmatic

What makes a programming language|'oriented', anyway?

Multiparadigmatic

"Contemporary software seems to equate design with objects. ... Yet not all that is in C++ is object-oriented, and most implementations take advantage of C++ features that are not object-oriented. This suggests that most designs in fact have a nontrivial component that is not object-oriented."

"Multi-paradigm embraces many of the goals of the object paradigm, but the goals differ in scope."

(James Coplien, 1999)

Multiparadigmatic

Design is about 'commonalities' and 'variations'

Multiparadigmatic

Software design is multidimensional

Multiparadigmatic

Java is accidentally multiparadigmatic

Multiparadigmatic

This lecture will not cure the world's Java design ills

But this lecture will...

Multiparadigmatic

"But..."

Multiparadigmatic

With all due respect.... No.

Multiparadigmatic

Go back to basics: commonality and variability

Multiparadigmatic

Different kinds of variability emerge

Multiparadigmatic

Different kinds of variability emerge:

Conclusion:

Multiparadigmatic

Late binding: "bind all decisions as late as possible so that you can give customers control over system evolution" (Gregor Kiczales, 1994)

Procedural/Imperative

Follow the step-by-step instructions|and win a prize

Procedural

Some common procedural concepts:

Procedural

Commonality/Variability

Object

"I invented the term object-oriented,|and I can tell you,|C++ was not what I had in mind"

Objects

Common object concepts:

Common design approaches:

Objects

Commonality/Variability:

Objects

Objects in common use are not without criticism:

Meta-Object/Meta-Programming

Metaprogramming

Metaprogramming: writing of programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime

Metaprogramming

Commonality/Variability

Dynamic

If it walks like a duck,|and talks like a duck,|and floats like a duck,|it must be a witch

Dynamic

Common concepts:

Dynamic

Commonality/variability

Function

When did "x = y + 5"|become a programming language?

Functions

Functional languages

Functions

Some basic functional concepts

Functions

Commonality/variability:

Homework

Give a man a fish,|you feed him for a day.|Teach a man how to fish,|and he'll start disappearing on weekends.

Exercise

Kata Four: Data Munging

Exercise

Kata Four: Data Munging

Exercise

Kata Four: Data Munging

Credentials

Who is this guy?