Sunday, August 30, 2015

Business Logic in OOP

It appears logic should not be mistaken with behavior when it comes to OOP, which embraces the coupling of state and behavior (that modifies that state). Logic belongs elsewhere, e.g. in a rules engine.

One of the "Advantages of [a] Rule Engine" is "Logic and Data Separation (breaking OO coupling of data and logic)" - http://training-course-material.com/training/JBPM_and_Drools_Introduction

Which tables are affected is business logic as well. The database should not have any knowledge of which tables constitute a customer on the business level. These are better served in the business layer.
https://www.codeproject.com/Articles/10746/Dude-where-s-my-business-logic

Thursday, August 27, 2015

Static State Shared from Libs Shared Among Webapps

One of the disadvantages of placing application libraries in the Tomcat lib folder is thread safety issues.

... if any of the classes has static state, you will find that the state is now shared across all webapps. This can cause the objects / types from one webapp to be seen by another, which can cause problems.

Stephen C http://stackoverflow.com/questions/12162654/how-to-make-war-file-take-up-less-memory

Tuesday, August 11, 2015

Advantage of Compiled vs Interpreted Languages

Same reason you'd choose GWT vs JavaScript:
One of the primary ways GWT speeds AJAX development is by allowing you to write your applications in the Java language. Because of this, you can take advantage of static type checking and time-tested patterns of object-oriented programming. These, when combined with modern IDE features like code completion and automated refactoring, make it easier than ever to write robust AJAX applications with well-organized code bases.
http://www.gwtproject.org/doc/latest/tutorial/codeclient.html

so:
1) static type checking
2) code completion
3) automated refactoring