Wednesday, June 15, 2016

Maven

Maven is a building tool.
Features of maven :
pom.xml  : an XML for project as well as a module . You can specify the build related information in pom.xml  and maven takes care of build , packaging etc.
Unit Testing : You can run your junit as part of the build , maven also generates report for the test result.
Repository : maven has its own repository with almost all major library jars available.
Local repository : its a directory in users PC which has the jars downloaded from the server repository.
Resources: maven automatically takes care of moving your xmls,property files appropriate places. You can add the xmls,property files to resources folder.

Set up Maven :
Repository :
You can set the location of maven repository in file setting.xml  at path MAVEN_HOME/conf




Saturday, June 11, 2016

spring mvc simple example


Hadoop Simple Example


Three friends went on trip , each paying bills which needs to be split among them.

We need to write a MapReduce Job

References

Hadoop


Hadoop is a programming framework used to process Big Data over a network. First we need to understand big data.The definition of Big data is as follows:

extremely large data sets that may be analysed computationally to reveal patterns, trends, and associations, especially relating to human behaviour and interactions.

Let us classify Big data into 3 types:
  • Structured Data
  • Semi Structured Data
  • Unstructured Data

Structured data is like the data stored in the SQL tables of Relational database.

Semi Structured data is like the data stored in the XMLs.

Unstructured Data is the data stored in word document or pdf .

To process big data over a network google has developed an algorithm known as MapReduce which Hadoop has made use of.

Let's try a Simple Example to understand

References

Agile Methodology

The definition of agile is
Agile software development is a set of principles for software development in which requirements and solutions evolve through collaboration between self-organizing, cross-functional teams

The methods of Agile are :

Scrum : A product owner lists down the requirements which are called as backlogs. Cross functional teams lead by the Scrum Master picks up the backlog according to the priority and deliver it in successive sprints .

Lean : it focusses on
eliminations of waste.
Deciding as late as possible , delivering as early as possible.
Amplifying learning , building integrity in and seeing the whole.

Kanban : principle of kanban are :
Visualize what you have done today.
Limit the amount of work in progress.
Enhance flow.

Extreme Programming :The supporting practices of this methodology are:
Planning Game
Small Releases
Customer Acceptance Tests
Simple Design
Pair Programming
Test-Driven Development
Refactoring
Continuous Integration
Collective Code Ownership
Coding Standards
Metaphor
Sustainable Pace

References

https://www.versionone.com/agile-101/agile-methodologies/

Spring Mvc Testing

Testing Spring MVC is used to test MVC applications developed in spring.To remove the dependency of the application server and few object we need to  Mock it.The web application dependency includes servlet handler , resource handler , exception handler , view handler.
This tutorial requires minimum of Junit 4.9 , javax-servlet-api 3.0.2. You might face Spring4TestRunner exception and NoClassDefFound javax.servlet.SessionCookieConfig
If there any autowired beans in your controller class you might face an exception like IllegalState Failed to load ApplicationContext
Reference:
http://blog.zenika.com/2013/01/15/spring-mvc-test-framework/
http://www.petrikainulainen.net/programming/spring-framework/unit-testing-of-spring-mvc-controllers-configuration/

ec2-user@ec2 Permission denied