Mathias Hauser

My opinions and thoughts on various things and experiences of software development

Monthly Archives: February 2014

My start with Neo4J and what you should consider when starting with it

I had to develop an application which collects real time data from twitter and stores them into a graph database for a university lecture. I took it a little bit more serious than necessary to dive deeper into this technology and to find the limitations of my approach. My submitted project was far more than necessary, but I knew that it couldn’t run in a productive environment. The reason for this was not enough time to rewrite the whole database model at the end and a problem definition for which Neo4j was just the wrong technology.

I start with a project setup which uses Spring Boot and Spring Data Neo4j, after this I tell you what you should consider in my opinion when starting on your own.

I recommend downloading the source of this example before you start. Link to the repository blog_neo4j-spring-boot direct link to the source zip source-zip

Content of this post

  • Projekt setup with Spring Boot, Spring Data Neo4j and Spring Data JPA
  • What you should consider – in my opinion
  • Further reading and references

Read more of this post

Advertisements

Bootstrap an application with Spring Boot – Part2 Web application

Welcome to part 2 of “Bootstrap an application with Spring Boot” which is about web applications with Spring Boot. I use the source code from part 1 as basis. You might want to read part1 before you start with this post, because I don’t repeat explanations from part1.

Web application with Spring Boot

As mentioned in part1, most examples for Spring Boot are web based applications. I’ve read many different ones. Most of them tell a different story. I try to give an easy setup for your application which works out for me. I use AngularJS in this post, but keep in mind that this post is not about AngularJS and I just use a minimal approach as an example for possible front end technologies.

I recommend downloading the source of this example before you start. Link to the repository blog_springBoot-web direct link to the source zip source-zip

Key points of this post

  1. Build- and Dependencymanagement -> build.gradle -> in the project root
  2. Application configuration -> Application.java; WebXml.java; application.yml
  3. REST-Interface -> HelloController
  4. Testing -> HelloControllerTests
  5. Deployment

Read more of this post

Bootstrap an application with Spring Boot – Part1 Command-line

Spring Boot is a new piece of technology with the aim to reduce the configuration overhead and easier project bootstrap. There are many little examples out there which describe how to use it, but there is in many cases something that you don’t want or a configuration parameter you need, but not mentioned in a specific tutorial. I try to give you a good starting point for you application plus additional references to additional informations you might need for your setup.

Command-line application with Spring Boot

Most Spring Boot examples are web applications. This is ok because many new applications are web based, but its not optimal in each situation. I personally prefer to start with as little new as possible. My experience is that solving problems with two new things cost more time than solving one after another. So I decided to start things off with a really simple command-line application which allows inserting a word with a specific text to the database.

I recommend downloading the source of this example before you start. Link to the repository blog_springBoot-commandLine direct link to the source zip source-zip

Four key points of the configuration

  1. Build- and Dependencymanagement -> build.gradle -> in the project root
  2. Application configuration -> Application.java -> anywhere in your package structure in this case mh.dev.blog (src/main/java)
  3. Property configuration -> application.yml -> src/main/resources
  4. Logging configuration -> logback.xml -> src/main/resources

Read more of this post

My intentions behind starting a blog and what I want to achieve with it :)

I have the idea since a while to start writing a blog. But as with many other things its quit hard to really start with it. There are two reasons why I’ve do it so late. The first one is obviously – will someone read what I’ve written and how should he find my thoughts about certain things. The other one is that English is not my native language, so I’m pretty sure to make several grammatical mistakes. But I found out that these two things combined are not that worse. Because nearly nobody will really read my first blog posts, but if he still reads it, it’s for the actual topic and not for 100% grammatical correctness. On the other hand I will automatically improve with time. This will allow me to write better understandable explanations of complicated topics.
Read more of this post