Category: The Designer’s Block

The Database Guy…you, the developer, & you, the organization, should really start doing your bit for the open source community

I am not an expert on design pattern histories, but I do believe that this style of abstracting out the persistence layer, a DAO class per type in your application, was used for a very long time.  Things were pretty much stagnant on this side. … Continue reading The Database Guy…you, the developer, & you, the organization, should really start doing your bit for the open source community

The Database Guy…the spy story. Actually more the interpreter story..read on to find out

So we ended the last post pondering on this method: @Override public double fetchBalance(       @NotNull final String stashId)       throws SQLException {   String fetchBalanceSql = "select balance from mystash where id = ?";   try (ResultSet resultSet = sqlExecutor.executeQuery(fetchBalanceSql, stashId)) {       // Move to first row. Should … Continue reading The Database Guy…the spy story. Actually more the interpreter story..read on to find out

The Database Guy…Color code those lines!

Now let’s take a stab at analyzing the synergy between the recently discovered ILedgeDAO and IStashDAO implementations i.e. LedgerDAO & StashDAO.   As it stands, LedgerDAO looks something like this: @Override public void record(LedgerEntry theEntry) throws SQLException {   try (Connection conn = DriverManager.getConnection(           dbConnectionUrl, dbUserName, … Continue reading The Database Guy…Color code those lines!