Random musings from my awakening dementia...
01.13.2004  
Three Legged Barstool
 

I'm quite interested in the concept of software components and how those ideas can be applied to Java code. Thoughts or ideas I have on this subject get dropped here for the benefit of humanity and my own hubris.

© 2004-2005, Howard Abrams



Except where otherwise noted, all original content is licensed under a Creative Commons License.
See details.

Just notice this op-ed piece where he says,

Down in the coding trenches, the worlds of objects and of RDBMSes and of XML are far from unified, and that attempts in that direction have been less than enthralling. I think we just have to get used to it, and from here on in, the practice of software engineering is a three-legged discipline.

I’ve noticed the same thing, and have come to the same conclusions…

For instance, when I created my XML components, I resisted the temptation to create an elaborate Java-oriented query mechanism based on DOM or some such, and just went with XPath as the way for accessing data within an XML file.

Similarly, all of my database access components have a property simply called “SQL Query” where I just enter the SQL statement directly. I have found it far more effective (not to mention just plain easier) to use both a language and its knowledge base that is oriented to the task.

I know many people who are mono-language-ists— who feel that everything in the world can be coded in Perl, or in Java, or in XML (have you see Jelly ohmygawd?) or in   insert language here  
. Of course you can write everything using the Borne shell, but why would you?

So why don’t we just split up our applications into modules and write each module in a language or technology that is best suited? Consider a web application… each URL could be implemented in a different language, right? Yes, we both know the answer to this not-so-rhetorical question… integration. It is very difficult to use multiple languages, frameworks, technologies and what-have-you and have them play nicely in the same yard… the problems range from authenticating users to trying to reuse the code.

So the balance that I have struck up is not integration but interface… I have created Java components that wrap-around another technology and presents an interface to it.

Best of both worlds? Eh.

Good thing that regular expressions were added to Java, otherwise, I just might have to a component that interfaced to Perl.