Thursday, December 18, 2014

Working on a Java position looking for Struts, but the client is intimidated

Working on a Java position looking for Struts, but the client is intimidated by the amount of resumes being pumped in with Spring


Know the differences b/w Spring and Struts


Struts is the front end, ActionForms and Actions. Actions will call the Spring Service which has the Spring DAO injected into it. Spring makes unit testing a lot easier, you can inject your fake dao and not have to test with the database at all if you do not want to. We use it with Hibernate and my code is quite small as Spring handles exceptions quite well and you are relieved of all the Hibernate repetitive code. 

Differences: 

1)Struts is a web framework while Spring is not. 

2)Spring is a Layered Architecture while Struts is not. 

3)Struts is heavy weight while Spring is light weight. 

4)Struts supports tag Library while Spring does not. 

5)Spring is loosely coupled while Struts is tightly coupled. 

6)Spring provides easy integration with ORM technologies while in struts, we need to do coding manually. 

7)Struts easily integrate with other client side technologies. It is not easy in case of spring.

1. Spring don't have any action from, it bind the http form values directly into pojo. Instead of initializing the form bean spring directly initialize the domain object. 
2. ActionForward in struts is replace with the ModelAndView in Spring. Model component contain the business object to be displayed via view component. 
3. Unlike Struts Spring don't provide any separate tag library. 

4. What Action class do in struts, Controller does in Spring. And action in Struts is a Abstract class but Controller in Spring is an interface, This is very good advantage of the spring. 

5.Struts implement MVC Design Pattern where as Spring implements IOC Design Pattern and addresses AOP Cross cutting concerns. 

6.Struts is heavy weight where as Spring is light weight framework. 



Also remember, 
Struts is mainly a presentation layer framework, like redirecting to a particular page ,doing client side validations etc which otherwise very tedious using jsp and servlets. 
Spring is a complete J2EE framework having seven independent layers which can be used all together or few layers integrated with some other framework. Spring provides declarative transaction management and AOP. One layer of spring is for presentation purpose like struts but for only presentation layer, struts is better than spring.


I hope the client facing managers could take few questions on what is it that the client is more interested in, which would help recruiters streamline on the right resumes as well save the JavaBoys time over the phone being asked dumb questions.

An Unknown & Humble background of KR Naraynan, the 10th president of India

The Rediff Special/George Iype

'My brother has got the country's top post not because he is a dalit. He got it because he is a simple, sincere human being'

Kocheril Raman Narayanan has taken a Lincolnesque journey to the Rashtrapati Bhavan. Born in a thatched hut in a poor dalit family, the man who was elected India's tenth President on Thursday overcame innumerable economic and social hurdles to ascend to the highest office in the land.
It is, as Special Correspondent George Iype discovered in Uzhavoor, Narayanan's village, a story of courage and true grit, a story that is a metaphor of what Indians can do if they have the will and the spirit.
Narayanan's home
K R Narayanan's home
The truck roars past leaving the smell of raw rubber, the latex from the trees flanking the road in staid rows, bleeding white as if they've been garroted.
You come upon Uzhavoor village, small, prosperous, wearing a faintly starchy air of Syrian Christian rectitude. Ebony-skinned men and women go past you, looking at you incuriously. You aren't a plantation owner's relative, back from the Gulf or maybe the US -- they'd have known you then.
But Uzhavoor, in Kottayam district, has begun stirring now after it learnt that one of its sons, Kocheril Raman Narayanan, was going to be President of India.
''We adore him because our small village is famous today thanks to Narayanan," says 68-year-old Ramu Namboothiripad.
Already, the Kurchithanam lower primary government school, where Narayanan enrolled on May 19, 1927, along with the Uzhavoor panchayat, has planned a victory march from the school to his modest family home on a hillock.
It is a small house by Uzhavoor standards -- tiled, with two bedrooms, hall and kitchen. It does not look like a home of a President, and there are no signs that the interior decorators will be calling soon.
The President's primary school
Only Narayanan's 80-year-old unmarried sister K R Gowri and 60-year-old younger brother K R Bhaskaran live there now. Narayanan has two other sister, Bhargavi in Delhi and Bharati in Madras.
Narayanan's father, Kocheril Raman Vaidyar, was an Ayurvedic physician; Gowri is a homoeopath. Bhaskaran, who bears an uncanny resemblance to the President-elect, returned home after tiring of London life in the sixties.
"Narayanan called me up on election day (July 14) and sought my blessings... I told him to continue his selfless service in the days to come," says Gowri, who has before her countless newspaper reports about her brother's prospects. Narayanan sends no money home.
"We do not want any money from him. He is still a poor man. He still does not own property in India apart from the small share of our ancestral property. The only thing he has gifted me are these spectacles," says Gowri, proudly taking them off to show them.
"We are not thrilled at the prospect of chettan (elder brother) becoming the President of India... It was inevitable because he deserves it," says Bhaskaran proudly.
Gowri, Naryananan's sister
Bhaskaran asserts his brother is a model of "sincerity, truth and justice... He is everything that an Indian leader should be," he says in fluent English, picked up during his 10 years in London. Bhaskaran studied at London University while Narayanan was the first secretary in the Indian high commission. He worked for seven years at Selfridges, the department store, before sickening of city life and returning to become a teacher at a private tuition class in Uzhavoor.

Though Narayanan's Paravan origins are being discussed threadbare elsewhere, it is not an issue in his house, or elsewhere in Uzhavoor.
"We were very poor. But my father was a learned physician who regularly treated the high-caste Namboodiris whenever they fell ill," says Gowri. After he died in 1960, his ailing wife and the rest of he family moved to their current home. Uninhabited, the ancestral home is in a dilapidated condition, though every time he comes home, Narayanan makes it a point to go there and pray for his father.

Uzhavoor residents too do not see Narayanan as a dalit leader.
"He became the vice-president and now President not because he was born a dalit. He succeeded because he was studious. He never benefited from any reservations scheme for low-caste people because in the 1930s there was no such system," says Uzhavoor Co-operative Bank manager P C Jose.
Bhaskaran, Narayanan's brother
Bhaskaran, Narayanan's brother
The villagers also see him as simple man swimming amidst sharks.
"We feel he is the shining example for the need to eradicate the caste system in the country," says Namboothiripad, himself a brahmin. "Narayanan has proved that all of us are equals whether we are dalits or brahmins," he says.
Gowri agrees with Namboothiripad. 'My brother has got the country's top post not because he is a dalit. He got it because he is a simple, sincere human being," she says.
"We believe in god. But not in particular religions. That is why we have kept Jesus Christ's photograph here," says Bhaskaran, pointing to a picture of Christ on the wall.
Though Narayanan escaped caste oppression in childhood, he had a taste of it when he graduated from Travancore university, recalls Gowri. Narayanan went to meet the then Diwan, Sri C P Ramaswami Aiyer for a job. Aiyer, infuriated that a Paravan should wear a silk mundu, rejected him outright. The dejected Narayanan left for Delhi, where a combination of luck and pluck sent him to the London School of Economics. And finally into the President's chair.
Meanwhile, preparing for the big day when their Old Boy would be President, the proud school authorities have dusted files that haven't been moved for decades and located Narayanan's admission paper. They have dusted it, laminated it, and now keep it beside a framed pic of him.
Bhaskaran and Gowri
Bhaskaran and Gowri
The school's current principal, Mary Mathew, pertinently points out that Narayanan topped the 25 students who did not drop out of school of the 56 first admitted. Its illustrious alumnus has also helped keep the school going, at a time when many similar institutions had to close down due to a shortage of students. Even rich parents send their children to the school, says Mathew. They hope that if it was the school that gave Narayanan the crucial break, then their children too might benefit.
Kidamavu Thomas, an affluent rubber planter, admits as much. Asked why he sends his only son Varun to this government school and not an exclusive private affair he can well afford, Thomas said, "I feel Narayanan should be the role model for my son. Therefore, I did not prefer convent schools."
Narayanan himself is attached to the school, visiting it often. Last year he gifted a colour television to the school. The school's 152 students sent postcards to him in Delhi when his candidature was announced for the post of first citizen of India.

Gowri and Bhaskaran have just one wish now. They want to stay with their brother at Rashtrapati Bhavan for a few days. "He has invited us," says Gowri. "We will go there when he is not busy."


Source- Rediff