Introduction to Software Engineering/Architecture/Labs

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Labs[edit | edit source]

Lab 1: Architectural Styles (30 min)[edit | edit source]

For this lab you may want to work in pairs. Consider the following architectural styles. Use the internet or books, to find for each one of them one or two good example applications.

  • Client–server model (2-tier)
  • Three-tier model (An architecture with Presentation, Business Logic and Database tiers)
  • Database-centric architecture
  • Distributed computing
  • Event-driven architecture
  • Monolithic application
  • Peer-to-peer
  • Pipes and filters
  • Service-oriented architecture
  • Shared nothing architecture
  • Software componentry

Lab 2: GoF Design Patterns and StarUML (15 min)[edit | edit source]

Start StarUML and take a look at the ’Apply Pattern’ feature of StarUML: Create a new empty class diagram. Right-click in the white space, and select ’Apply Pattern’. There in the dialog that appears select ’Pattern Repository’ then ’GoF’ and then take the ’Factory Method’. Click next a couple of times, and you should get the class diagram for the Factory Pattern.

Lab 3: Feeling like a Software Architect (30 min)[edit | edit source]

Lab 4: Dynamic GUI Creator (30 min)[edit | edit source]

An interesting example of the Factory Method pattern is the dynamic loading of Swing classes at runtime. This could be used to build GUIs completely dynamically during runtime. This would be interesting for very large projects, when several 100 user interfaces need to be created. This could be used to generate GUI’s ’on the fly’.

Lab 4: Anti-Patterns with SourceMonitor (30 min)[edit | edit source]

Pick a Java and a Cpp project. Install (or copy) SourceMonitor. The program is pretty self-explanatory. Make sure you get the following reports:

  • Overall report for the project, write down the numbers you get and comare them with your neighbors (who hopefully does a different project)
  • Right-click on the Baseline report and create reports for
    • Checkpoint Metrics Summary
    • Method Metrics
    • Checkpoint Metrics Kiviat Graph
  • Then double-click on the Baseline report, which will give you a report for every file. Use it to find the files/classes with
    • The most/fewest statements
    • The most/fewest methods per class (which Anti-pattern is this?)
    • Max depth (what does this mean?)
    • Maximum complexity
  • Right-click on the file with the most statements and find
    • Display File Metrics Details
    • Display Method Metrics


References[edit | edit source]


Questions[edit | edit source]

  1. What is 1+1?