Hibernate Spatial extension together with Spring running on a Tomcat
I have done a lot of projects based on Hibernate (JPA2), Spring, Tomcat (Jetty for test) and Maven (http://www.wiegand.dk/wordpress/?p=51). The basic setup is not easy – but once done correct – it can be reused in most projects afterwards.
Some years ago my company (http://northtech.dk/) moved its main focus from general software architecture to the GEO sector. Because of that we are adding the GEO perspective to all our utilities and frameworks. This article is about how to add GEO awareness to our core JAVA paradigm (http://www.wiegand.dk/wordpress/?p=51).
There is a huge difference when you work on a personal project and when you work on an enterprise project. In your personal project it doesn’t really matter how you structure the code – the goal is to get it to work and everything else comes in second row. In an enterprise project you don’t know how long you are going to work on the project, who is going to take over, will it be send to India, etc. In an enterprise project you are not a one-man army but a team and the team members will be replaced many times over the projects lifespan. Therefore you need a common ground – a paradigm that state how members in the team should behave, what a new team member should expect and especially what is expected of a member of the team when contributing to the project. Continue reading →
How to build a domain model with JPA2 and Hibernate
I have been working with enterprise system for a while and mainly as an Infrastructure Architect – The person that binds all things together to a complete working system. One of the many integrations in an enterprise system, is the internal integration from the code (domain model) to the database. This is normally called ORM (http://en.wikipedia.org/wiki/Object-relational_mapping) – Object-relational mapping. Over the many years I have worked with this, the integration of cause have evolved from a simple and direct SQL approach to gigantic automatic frameworks. This is of cause both a good and a bad thing.
This first question I normally get when talking about ORM is: What about the overhead – is it fast enough? And the simple answer is…. NO! Continue reading →
It is always up to discussion what IDE (Integrated development environment) is the JAVA developers best friend. Some will already here shout ”what’s wrong with Emacs”. In my opinion there is nothing wrong with Emacs, the world has just evolved and new tools with different approaches have seen the light of day. Continue reading →
The first thing you have to do is to provide an enterprise platform that your developers can have en common. This is a simple thing as where do they put there source code? And where do they publish libraries that they haven in common? Continue reading →
I have worked with JAVA and enterprise JAVA since 1998 and it have really surprised me how difficult it is to construct and maintain an enterprise application. At first I build the frameworks myself but then the official JAVA enterprise frameworks came out (to “help” the programmers and architects). I struggled for many years to get, one version after another, to work. Just to get the pluming to work was a painful affair – but to get the application to perform was really a bitch. Just to many layers with too much so called “magic”.
But where is JAVA enterprise today – the year 2014? Are we closer to an easy and fast solution? Can we start up a new project and just begin working directly at the business logic and be creative and fulfill the business demands? Is the age over where we have to make a million small tech demoes just to be sure that we are going in the right direction? Continue reading →
To ensure the integrity in data model and domain model enumerations are a necessity!
This is my statement and let me try to explain why I think it is important and what my solution to the problem is.
In the data model even that it is not read by the domain model it is a good idea to keep the data normalized. When this is said I must in the same sentence state than I am not into deep normalizing where data in the end is more obscure than useable – meaning not accessible. The most common example is that you have an entry table and for each entry you want a status or state. This could be a transaction table with a status that states if the transaction is new or processed. Instead of just adding the status as an integer [1, 2] or string [new, processed] is it good to have the relationship as a foreign key to a status table with to entries – [1, New] and [2, Processed]. With this construction you ensure the data integrity on the database level but this is NOT a good way to handle the data in the domain model. Continue reading →