In Relational Data Models, we model relation/table for every object in the domain. In case of Cassandra, this is not exactly the case.This post would elaborate more on what all aspects we need to consider while doing data modelling in Cassandra. Following is the rough overview of Cassandra Data Modeling. Continue reading
Here is how I started writing this article. I have read this statement so many times: “Cloning becomes difficult when the object has references to mutable final fields.” And every time I google about it, understand what exactly this means and as part of the process forget about it too. So thought I would blog this so that this will serve as my immediate reference.
Cloning an object, what I could recall from my OOP course in my graduate studies, is creating a similar copy of an object which basically should conform to the following rules:
(1) x.clone() != x
(2) x.clone().getClass() == x.getClass()
(3) x.clone().equals(x) Continue reading
Security tasks such as authentication of user and authorization of a user to view application resources are usually handled by the application server. These tasks can be delegated to Spring security flow relieving application server from handling these tasks. Spring security basically handles these tasks by implementing standard javax.servlet.Filter. Continue reading
As seen in the earlier article, using Constructor pattern and Prototype chaining on their own have got few problems. We resolved those problems by defining a new pattern which amalgamates both the patterns. If we look at the way we have been creating objects so far, it is very much similar to Java. In fact using new keyword sometimes makes the code more complex which we could have avoided using alternatives like Prototypal Inheritance. So the rest of article deals with how to achieve a better form of inheritance without using any new keyword. Also it addresses the issue of redundant properties(masked by the instance properties) on Prototype we have seen in Combination Inheritance. Continue reading