Meine Blogeinträge! Durchgeführte Projekte! Meine Interessen! MiCasaIsSuCasa! This is me!
MYBLOG

"The programmer, like the poet, works only slightly removed from pure thought-stuff.
He builds his castles in the air, from air, creating by exertion of the imagination.

Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures.
- Frederick P. Brooks

Distinguish to be precise erstellt am 23.02.2009

In Software-Engineering everyone is typically confronted with diagrams and architectural descriptions containing circles, rectangles arrows and some plain text. Such descriptions are another representation of the organization of code in order to make software more tangible. They are used to clearly identify system borders and to introduce identifiers describing the problem domain. It sounds like a great way to make software internals more understandable, but how often did you sit in front of some code finally recognizing that mappings between diagrams and code are not matching. I think distinction and precision are fundamental for creating exact and meaningful software descriptions.

Imagine you are working on a project where you have to establish a connection between two servers in order to exchange newspaper articles. Figure 1 shows two different views on this system, a metaphorical and a technical. The metaphorical has identifiers, which can be used for the implementation to make the code more understandable, whereas the technical view helps you to establish the underlying infrastructure for the communication process.

Having this distinction in mind, you will create an interface, which represents the contract for the newspaper exchange. For a good understanding of the code, the contract has to reflect the metaphorical view, whereas the implementation shall represent the technical view.  The following code snippet emphasizes the difference between contract and implementation.

Important to recognize is, that the user of this interface just needs to know the metaphorical view, where Paperbox A can send newspaper articles to Paperbox B. The underlying technical implementation which might describe the establishment of a TCP/IP communication process is just of interest by the implementer of the system.

Now, you should have noticed what I mean by to distinguish in order to be precise. The system described above is clearly delimited in figure 1. Furthermore, the implementation reflects the identifiers of the architectural description and therefore provides a clear understanding for a developer which tries to work with that piece of code.

There are much more things where you have to precisely differentiate things. In this article I just want to give you a hint. Keeping this in mind I bet you will still get more understandable systems.


Keine Kommentare
 
  Kommentar hinzufügen | Permalink  


Anzeigename: deSiriX-oNe
Realname: Denis Dwornitzak
Studiengang:
Software-Engineering

Kontakt: E-Mail

Weitere Informationen gibt's hier...
 
Die letzten Einträge
 
Links
 
Terminübersicht

C# 3.0 und LINQ

Datum: 24.09.2009 - 09:00 Uhr
Dauer: ca. 4 Std.
Ort: HS Esslingen, Geb.1 Raum F1.205
Referent: Denis Dwornitzak, Andreas Maier

Downloads: Präsentation und Materialien

Windows Presentation Foundation

Datum: 25.09.2009 - 09:00 Uhr
Dauer: ca. 4 Std.
Ort: HS Esslingen, Geb.1 Raum F1.205
Referent: Denis Dwornitzak, Andreas Maier

Downloads: Präsentation und Materialien

The almighty .NET language - C++/CLI

Datum: 30.05.2009 - 08:30 Uhr
Dauer: ca. 4 Std.
Ort: HS Heilbronn im Raum F025
Referent: Denis Dwornitzak, Andreas Maier

Downloads: Präsentation und Materialien

Windows Presentation Foundation

Datum: 02.03.2009 - 08:30 Uhr
Dauer: ca. 4 Std.
Ort: HS Heilbronn im Raum F025
Referent: Denis Dwornitzak, Andreas Maier

Downloads: Präsentation und Materialien