static vs. dynamic typed configuration

myndian.de

Montag, 15. Mai 2006

static vs. dynamic typed configuration

This mornig I had to think a little about how to configure a particular system. Some parts of the system use different implementations of specific modules defined by interfaces. If there should be used a special implementation among the standard one, it is configured in a properties file. The value is the full qualified name of the implementing class, which is loaded and instanciated via reflection. Because we use Java and Java is a statically typed language, we have to cast the instance from Object to the interface.

This is a common pattern, I think. It is used by log4j for example.

Because we use a property configuration, which is not typed and validated against anything, the implementations can be configured as needed.

The opposite may be an XML configuration, which is validated against a schema. If we would use this and wanted to use it continuous for all modules, we had to design an universal schema for all modules or one for every implementation, which is imported into the main configuration.

It is very clear which one is faster and improves development speed. I have seen this pattern with dynamic configurations (even with an xml like syntax) several times in different Java applications and frameworks, but I just remember one with a statically typed, xml based configuration. But even this one used a universal, not really typed schema for the dynamic modules. So I think it’s just the same.

Applications, developed in a statically typed language, but dynamically typed. As I think about it, a common error in those applications are wrong configurations, mostly these little typos you do not find very fast and drive you crazy. Much like in dynamic languages. But would a strong and statically typed configuration, validated against some genius schemas, be worth the effort?

Just a little a thought, that crossed my mind.
Geschrieben von Jörg in Softwaretechnik um 12:29 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: configuration, dynamic typing, java, strong typing
Artikel mit ähnlichen Themen:
  • Simpler implementation of ApplicationContextAware
  • Premature optimization and object orientation
  • POJOs, POGOs und POCOs
  • View technologys for generated web layers
  • More about Groovy SQL Maps
  • Make your SQL Maps Groovy!
  • last language war language trolling
  • Dynamic two dimensional array in Java
  • Machine Tags tuned
  • notice: JDBC batch updates

Trackbacks
Trackback für spezifische URI dieses Eintrags

Keine Trackbacks

Kommentare
Ansicht der Kommentare: (Linear | Verschachtelt)

Noch keine Kommentare

Kommentar schreiben

Umschließende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.
Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.
Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss um dieses Verfahren anzuwenden.
CAPTCHA

Sie können [geshi lang=LANG][/lang] Tags verwenden um Quellcode abhängig von der gewählten Programmiersprache einzubinden
 
 

Suche

Inhalt

Startseite
Galerien
Impressum

Kategorien

  • XML Alltag
  • XML Internet
  • XML Musik
  • XML Politik
  • XML Softwaretechnik
  • XML Sonstiges
  • XML Visuelles

Alle Kategorien

Archive

September 2010
August 2010
Juli 2010
Das Neueste ...
Älteres ...

Blog abonnieren

XML RSS 2.0 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Kommentare

Login

Verwaltung des Blogs

Login

Aktuelle Einträge

Netzwerkkultur verändert die Gesellschaft
Dienstag, 17. November

Absolute and relative date and time
Sonntag, 18. Oktober

Oren Lavie - Her Morning Elegance
Dienstag, 6. Oktober

Twitter & Blogroll
Samstag, 8. August

Read It Later: Round-Trip-Integration mit Firefox und Google-Reader
Montag, 3. August

Blogroll

* Jörg bei Twitter
* Jens bei Twitter
* Nils bei Twitter

* Beetlebum
* a life less ordinary?
* Martin Fowler's Bliki
* Springify
* BILDblog
* Plazeboalarm
* LawBlog
* ADOM Blog
* Being busy
* Dr. Gero Presser

Links

* Heise
* The Scala Programming Language
Nils' Fotos bei fotocommunity.de
Jogi auf Qype
Get Firefox!
Use OpenOffice.org

Heise News

* Mit Flux flugs über die Grenzen

* Neuer E-Mail-Wurm unterwegs

* Umfrage der EU zur Wiederverwendung öffentlicher Daten

* Studie: Fernsehen bleibt Leitmedium

* Dating-Website durchforstet Twitter, Facebook und Co.

kostenloser Counter