Today: March 27, 2025 5:41 pm
A collection of Software and Cloud patterns with a focus on the Enterprise

Tag: object oriented programming


Most Java programmers are very familiar with the mechanism to extend a class. To do this, you simply create a new class and specify that it extends another class. You can then add funtionality not available in the original class, AND you can also override any functionality that existed already. Imagine a simple class public class Message { private String message;   public Message(String message) { this.message = message; }   public void showMessage() { System.out.println(message); } }public class Message { private String message; public Message(String message) { this.message = message; } public......

Continue Reading


A few days ago I wrote about how to structure version details in MongoDB. In this and subsequent articles I’m going to present a Java based approach to working with that revision data. I have published all this work as an open source repository on github. Feel free to fork it: https://github.com/dwatrous/mongodb-revision-objects Design Decisions To begin with, here are a few design rules that should direct the implementation: Program to interfaces. Choice of datastore or other technologies should not be visible in application code Application code should never deal with versioned objects. It......

Continue Reading


The information below was delivered to one of my programmers as direction for how to implement a rather big change in an existing software product that I sell. I thought it was potentially useful to a broader audience, so I’m posting it here: …The rest of this is rather complicated to explain online. I’ll do my best. I’m going to look at this in a simplistic way and let you work through the details. First imagine that we have an Authorize.net processing class based largely on their API. class AuthnetProcessAIMPayment { protected $apiKey;......

Continue Reading


Java, Wicket and Hibernate on EC2 (pre-interview project)

Over the weekend I put together a project as a precursor to an interview. I really like interviews where I have a chance to solve a problem that’s more meaningful than generating a random number efficiently. The pre-interview question came in the form of a sketch of the application. This worked out great since I suggest always starting with a sketch drawn by hand. Here’s what they wanted: Choice of technology The instructions indicated that I could use any technology that I was familiar with, as long as I included the libraries necessary......

Continue Reading


Software licensing: The value of good books

I have a large budget for books (but thanks to Amazon it doesn’t have to be as big as it could be). Sure it’s true that most of the information in programming books is online and available for free. There may even be substance to the argument that most books are out of date as soon as they hit the shelf because technology moves so fast. Oh well. I get huge value from books. They save me many hours of time that I might spend scouting around for a snippet here or an......

Continue Reading


Programming has evolved in very significant ways over the last few decades. There have been some significant strides forward in terms of language structure, reduced complexity and programmer productivity. One of these shifts was from procedural style programming using a language like C to object oriented programming using a language like C++. Most modern languages support objects, inheritance and other object oriented constructs. However, not all programmers use these the right way. As a matter of course, most introductory material in programming is procedural in style (a linear sequence of commands). It’s important......

Continue Reading