Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Update 03.md #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/03.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Jackson is a very powerful library that deals with data binding (e.g. converting

### The Good

There are plenty of good things about the original Granny application I'd like to point out. Let's start by mentioning the [convention over configuration](http://en.wikipedia.org/wiki/Convention_over_configuration) approach: instead of bloating up the configuration the developers sticked to general conventions, which helps to keep the clean simple and easy-to-read. Take a look at the application configuration file for example ([app-context.xml](https://github.com/SAP/cloud-enterprise-granny/blob/master/src/main/resources/META-INF/spring/app-context.xml)). Instead of defining every single bean in here, they made use of [component-scanning](http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch04s12.html) (line 13) and defined the [CRUD](http://en.wikipedia.org/wiki/CRUD) managers via the `jpa:repositories` declaration (line 15). Speaking of which, this is probably the most interesting aspect of the whole application - the usage of the [spring-data-jpa](http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/) module!
There are plenty of good things about the original Granny application I'd like to point out. Let's start by mentioning the [convention over configuration](http://en.wikipedia.org/wiki/Convention_over_configuration) approach: instead of bloating up the configuration the developers sticked to general conventions, which helps to keep the clean simple and easy-to-read. Take a look at the application configuration file for example ([app-context.xml](https://github.com/SAP/cloud-enterprise-granny/blob/91c76d27d4a8518d1ae6b76bd77a5505bef494e2/src/main/resources/META-INF/spring/app-context.xml)). Instead of defining every single bean in here, they made use of [component-scanning](http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch04s12.html) (line 13) and defined the [CRUD](http://en.wikipedia.org/wiki/CRUD) managers via the `jpa:repositories` declaration (line 15). Speaking of which, this is probably the most interesting aspect of the whole application - the usage of the [spring-data-jpa](http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/) module!

Here's an abstract of their introduction:

Expand Down Expand Up @@ -111,7 +111,7 @@ The rest is rather basic stuff, make sure to have a look at the only package and

### The Bad

Hm, those who have looked at the only domain model object [Address](https://github.com/SAP/cloud-enterprise-granny/blob/master/src/main/java/com/osintegrators/example/Address.java) will probably have noticed that... how to put it... the model is rather basic (to put it nicely!) We only have five attributes: id, name, address, phone and email. Now, that certainly does not meet our expectations and hence we will make this a lot cleaner as we move along. While we are at it, we will also address topics like auditing and database migration and talk about some best practices when in regards to naming conventions etc.
Hm, those who have looked at the only domain model object [Address](https://github.com/SAP/cloud-enterprise-granny/blob/91c76d27d4a8518d1ae6b76bd77a5505bef494e2/src/main/java/com/osintegrators/example/Address.java) will probably have noticed that... how to put it... the model is rather basic (to put it nicely!) We only have five attributes: id, name, address, phone and email. Now, that certainly does not meet our expectations and hence we will make this a lot cleaner as we move along. While we are at it, we will also address topics like auditing and database migration and talk about some best practices when in regards to naming conventions etc.

While I do like the fact that the Granny app provides a [RESTful](http://en.wikipedia.org/wiki/RESTful) service interface (aka API) and hereby decouples the presentation layer from the service layer there are mainly two things that I dislike about the solution:

Expand Down