Who is Amit Sharma?

Spring Tutorials - About Amit Sharma

First of all, I want to thank you for visiting www.springtutorials.com.

I’m Amit. I am a 37-year-old Java developer dude with 11+ years of Spring Framework experience.

Yes. You read that right. I was an early adopter of this awesome framework and have used Spring Framework in all my projects since 2004.

My first contact with Spring Framework

I was a web applications developer hired to do Struts development in Feb 2004. Straight out of masters program. This was my first “job”.

The struts development work went on for about six months. After this work, My client asked me to explore any java portal technologies that were out there.

Our requirements were a perfect match for a portal.

  • We had disparate groups within an agency that needed a common platform to share ideas.
  • This portal would bring in existing struts system as portlets.
  • The groups wanted to have a secure and dedicated page within this portal for their own use.
  • The portal would also be a single place for communication amongst members.
  • We identified wikichat tools, audio uploads, photo gallery, contacts for integration into it.

The criteria were clear. We weighed it against all the alternatives out there and found a clear winner: Liferay.

Liferay was free and open source. It had built-in portlets like the gallery, contacts list, wiki pages and so on. It was easy to extend and integrate our applications into. It was java based.

There was one problem.

It was hard to setup and install at first. The install instructions seemed clear. But the issues crept up after the server started deploying the ear file.

I am talking about the first few Liferay releases here.

Even if the portal came up, the portlets would fail to register for one reason or the other. Since their implementation was using EJBs, the portal came with built-in javaEE application servers. I think we went with JBoss 3.2.3 + tomcat bundle.

And then in late 2004, Liferay announced a lighter version of their portal that would run on tomcat.

They dubbed it the ‘Professional‘ Edition vs the original ‘Enterprise‘ Edition. The underlying difference: No EJBs in Professional Edition. For Liferay Portal Professional edition, they mentioned they used  ‘Spring based Architecture’.

I had no idea what that meant.

The installation of Professional edition went smooth from the first time. It felt lighter and faster like the install instructions stated. Of course, the question kept coming to mind:

“What had changed that led to this smoother deployment and improved performance. How much of this difference did Spring Framework attribute to?”

I started comparing the professional edition code with Enterprise edition. This would lead to my learning Spring Framework soon as I explain below. But I will deviate here for a few minutes.

I want to be able to convince you why I thought Spring Framework, even in its earliest stages, was important. Please bear with me for a few minutes.

Distributed Programming: The foundation that led to Spring Framework.

In its initial forms in my computer science classes, I saw CORBA into play.

Don’t let the term scare you.

With springtutorials.com, my goal is to break complex ideas down to simple terms for you. For now here is what it means. It was the Common Object Request Broker Architecture that allowed a program in C++ to talk to java. You can say it helped with inter-process communication.

It was dorky but led to a great implementation in java in the form of RMI later. RMI stood for Remote Method Invocation. What is RMI? Let me explain.

It was the coolest feeling to see your (non-web) request reach a remote server and come back with a response. This was client-server communication via sockets. Think of it as an advanced version of inter-process communication. Remember those socket programming days.

I will prove to you that Sockets are easy to understand. You’ve just never been given an analogy. I promise it is important. This will help you understand RMI and very soon… Spring Framework. So let me ask you this below:

How do two machines communicate with each other? 

Let’s assume these machines are like two neighbors across the street from each other.

You ran out of sugar and you want to know if your neighbor has it. You will:

a) Open up the window that faces your neighbor’s house.

This is opening up socket connection from your machine – the client.

b) Yell on top of your lungs to get your neighbor’s attention and ask for sugar.

Your voice is the message.

It has data – your question about sugar.

Sound waves are the network packets that carry the messages.

c) The neighbor hears you and opens up the window and tells you the answer.

This opening up of the window is the socket the server is listening on.

The neighbor’s answer follows the same pattern as above in point b in reaching you. see the example described above as an image.

Spring and Distributed Programming

I made it look so simple above. And I assumed a lot of things.

I assumed your neighbor knows you and was keeping their ears and windows open for you. This is TCP/IP communication.

Imagine introducing yourself to your neighbor before each question. And your neighbor slamming the window shut after answering each question. That is UDP.

RMI was socket communication wrapped around in a velvet robe. In the analogy above, Think of RMI as a courier who wouldn’t mind taking your message to the neighbor for  you.

This technology – RMI – would later simulate itself into many forms.

In its direct form, Enterprise Java Beans (EJB) was RMI that took care of a lot of boiler plating for you. EJBs handled things like service discovery, transaction Handling, connection pooling and resource handling.

Why is this important for you to know? Let me explain further.

Parallel programming at its core is the time factor working in your application’s favor. Two things will work at the same time so your work gets cut in half. Multi-threading is at the crux of it.

Distributed programming at its core is space factor working in your application’s favor. It is the ability for a remote service to interact with you as if it is not remote.

EJBs made distributed programming possible in java.

We owe our remote exchange to them.

Later, XML over HTTP services was a well defined remote exchange occurring over the web. You send XML over HTTP. The XML had the formatted data. I didn’t have to explain that.

Also, A proud java developer will tell you his web services days with Axis Framework. He is referring to using SOAP to communicate with a remote service.

What was Simple Object Access Protocol (SOAP) after all? Nothing but a stricter definition of XML over HTTP.

And now REST is here. It is remote communication process boiled to the simplest core: The HTTP. REST stands for Representational State Transfer.

In short, it means a system can use standard HTTP methods for remote communication. These methods are GET, PUT, POST, DELETE.

The Representational means the data you are trying to send is identifiable via URIs.

A GET request to URI /list/item/1 can be a pinned down to a unique item with id 1.

The State Transfer means that each request will carry everything needed to complete itself.

I remember amazon services used to be SOAP based web services. Now they are all RESTful. The term REST is ubiquitous now and most developers have at least heard of it.


At this point, You might ask.

Amit, what are you trying to prove with all this? 

Sorry for keeping you waiting but here it is: Web Services would have never taken off if it weren’t for REST.

A complex communication mechanism had to exist. And then the simplification was evident with REST: A powerful and basic approach to communication. I can’t imagine if we would be mobile today if it wasn’t for this simple exchange. But there is something even more important here.

If it wasn’t for RMI in java or .Net Remoting, we wouldn’t have REST. 

I know REST is not new and I know it was there all along. But what led to its proliferation in recent years? This almost reminds me of Ruby programming language. But I will save that for some other day.

I will make one final argument before closing.

If it wasn’t for EJB, we wouldn’t have Spring Framework: A powerful approach to java software development (web or non-web).

Spring Framework provided the ease and simplicity to Java enterprise development that was missing. Just like REST provided the much-needed simplicity to SOAP.

It took care of the boilerplate code that came along with an EJB implementation.

It standardized the interface definition.

Also, Now you could swap your remote calls with local calls if you weren’t going remote. All you had to do was make a tiny XML switch.

That was huge.

Switching to Spring was no compromise despite the initial claim. You could plug-n-play just about any implementation from across the vendors. The open source community was quick to provide pre-built jars for integration. Commercial vendors would soon join in.

Back to Spring based Architecture’ discussion

As I delved into the professional edition of Liferay, I started learning about Spring Framework. The initial tutorials on the web from Rod Johnson came to the rescue.

Rod Johnson founded Spring Framework. More on that when I provide an introduction to Spring Framework.

I understood how Spring Framework was responsible for Liferay’s portable and light nature now. This was 2004. Later, I would introduce Spring Framework to my future teams wherever possible.

Which led to a better understanding of Spring Architecture. And that led to several java lead positions at various firms around DC metro area. Fast forward to 2015. I have been earning a respectable six-figure income for a few years now. Also, I have a tiny brokerage account I use for stock investments. Few months ago, I paid off all my debt.

In my future posts, I will explain how technologists make excellent investors.

Thank You for taking the time to read about me.

I truly appreciate your time you dedicated for me. With springtutorials.com, I will share everything I know about Spring Framework. Not just the what and how but why as well.

I have a simple goal. I want to see you become a Spring Framework Expert. And I would love to see you reach your career goals sooner. Your career fulfillment will give you the freedom to pursue whatever it is you are striving for. Please stay in touch by signing up at the bottom of this page. I am also available on facebook here.

I wish you all the best!





I work as an independent consultant in and around DC metro area.  My clients have included federal agencies, non-profit firms and semi-government organizations. I live in Sterling, Virginia with my wife and our two kids. I am an Oracle Certified Expert SOA Architect and Cloudera Certified Hadoop Developer.

Subscribe to www.springtutorials.com

* indicates required

  • I’m glad to have found your website at least today. The way you try to simplify concepts is excellent and I feel so much confident when I’m reading your write-ups. I can see you’ve got a great domain, your way of explaining things is great and easy to grasp but still, not posting stuff often…why is it like that?

    • Thank you Akhil. I was in a very demanding project up until a month or two. I will be more regular moving forward… Thank you for asking!

      • great to hear that !!
        looking forward for more interesting articles 🙂