Skip to main content

Posts

Showing posts from July, 2014

Craftsmanship

It was a busy month, all work no play... more about polishing, both code and UI, to make a better product. 1. Code Polishing In the current Java Spring project, there are a few things worth mentioning. 1. Service layer for MVC. My previous projects are mostly architected under MVC pattern. There is nothing wrong about that. However, when the logic gets more complexed, handling all the logic in the controller layer would not be as clean and efficient. Another layer named Service for better data access and logic control is used in the our project. http://stackoverflow.com/questions/5702391/mvcs-model-view-controller-service The controller would not be handling too many logics, instead, it only handles routing and  parameter passing. Most logics will be handled in the service layer. 2. Exception handling vs error codes In the beginning, I didn’t do any exception handling in the service layer, neither do I create many exception handlers in the controller layer.After