I have been given a contract to implement in Java. As a developer one of the early design decisions needed is, do I want an interface or an abstract class at the base of my hierarchy. This question is very popular in the Java world and often always pops up when doing low level design.
Search This Blog
Showing posts with label IMHO. Show all posts
Showing posts with label IMHO. Show all posts
Thursday, 27 August 2015
Interfaces versus Abstract classes : pre and post Java 8
Thursday, 20 March 2014
My own primitive Single Sign On - Last Lap
In our previous post we saw how PlatformApp1 was able to read the cookie created by AuthPlatform. The PlatformApp1 verifies with the AuthPlatform if this cookie is valid (maybe through shared data or a simple REST API exposed by AuthPlatform) and accordingly lets the user proceed.
Tuesday, 18 March 2014
My own primitive Single Sign On - Part 2
In the previous post I started on creating of my custom SSO solution. I
have decided to name it "SimplySSO". To continue with the application
flow, lets start with the login flow:
Monday, 17 March 2014
My own primitive Single Sign On
I have often worked on web applications which used SSO. In fact my blogger profile also works through an SSO flow. If I am logged in into Gmail than all fine, else I need to login into Gmail or more specifically my Google account.
Thursday, 2 January 2014
Writing Logs to the Database
With loggers we have something called as an Appender. Simply defined an appender is a component responsible for taking a log request, building the log message in a suitable format and sending it to the output device.
Saturday, 2 March 2013
new ArrayList(????)
Writing code without using collections framework would be crazy. They are really cool part of java with a lot of nifty stuff. More importantly unlike arrays you do not have to worry about size management here. The ArrayList will grow as long as memory is there. No need for the developer to worry about initial size and ArrayIndexOutOfBoundsException.
But what when we are actually asked to watch out our memory footprint ? Can we be memory efficient when we are using Collections ?
But what when we are actually asked to watch out our memory footprint ? Can we be memory efficient when we are using Collections ?
Monday, 19 November 2012
gzip your Tomcat response
I was looking at the request and response headers in our application the
other day. I noticed that the Browser request included the
Accept-Encoding header. The values indicated my browser was capable of
handling zipped responses.
Wednesday, 31 October 2012
Formatting code using Eclipse
We all write code. But how many of us write clean well formatted code ? Do we care if our classes are correctly indented ? Does it affect us when our IDE shows tiny yellow warnings? Warnings that scream "unused variable" or "unchecked code" ?
Monday, 8 October 2012
Caching binary content coming from databases
I recently had the opportunity to work on a mobile project where I faced a whole set of different challenges. All my previous experience involved developing server applications for the web. So when I had to write a REST based API for mobile application we were faced with some interesting challenges.
Sunday, 23 September 2012
Managing module dependency versions with Maven
When building a complex application with Maven it is normal to split the code among multiple projects. Every project has its own pom file
and we use a parent pom file to build all projects in the process generating our final build or deployment artifact.
The problem observed is that the different projects have their own dependencies.
Wednesday, 19 September 2012
String Pool and SLF4J
A few days back we had a code review and one of the concerns raised was "too many logs".
The statement made was : Too many logs in code result could in memory issues.
This was the first time somebody had come with such a feedback. Most of the time it was absence of logs that was the common concern. I decided to spend some time analyzing the complaint.
The statement made was : Too many logs in code result could in memory issues.
This was the first time somebody had come with such a feedback. Most of the time it was absence of logs that was the common concern. I decided to spend some time analyzing the complaint.
Subscribe to:
Posts (Atom)