Difference between SOAP and RESTful Webservices



SOAP:

1. Developer View: Object oriented 
2. Standards Based: Yes .

SOAP web services are based on SOAP and WS-* specifications

For acquiring security tokens,it uses WS-Trust.

For conveying security tokens, it uses WS-Security

For defining policy, it uses WS-Policy

For suppoting distributed ACID transactions, it uses WS-AtomicTransaction and WS-Coordination

For acquiring interface definitions, it uses WS-MetadataExchange

For providing end-to-end reliability, it uses WS-ReliableMessaging

For establishing security context, it uses WS-SecureConversation

3. Security: SSL, WS-Security .

WS-Security provides end-to-end security covering message integrity and authentication 

4. Transactions : WS-AtomicTransaction 
5. Reliability : WS-ReliableMessaging 
6. Performance: Good 
7. Caching : No
8. Message Size : Heavy, has SOAP and WS-* specific markup
9. Message Communication protocol : XML
10. Message Encoding :Yes

SOAP Web Services support text and binary encoding
11. Service Description :WSDL
12. Human intelligible Payload :No 
13. Developer Tooling :Yes

Complexity of SOAP Web Services dictates the need for using frameworks to facilitate rapid application development.
14. Orientation :Wraps business logic
15. Abbreviation: SOAP stands for Simple Object Access Protocol 
16. Who is using SOAP? Google seams to be consistent in implementing their web services to use SOAP, with the exception of Blogger, which uses XML-RPC. You will find SOAP web services in lots of enterprise software as well. 
17. Simplicity: No
18. Transport protocol support: HTTP, SMTP, JMS

Multiple transport protocol support makes SOAP Web Services flexible

REST:

1. Developer View: Resource Oriented
2. Standards Based: No
3. Security: SSL
4. Transactions : No
5. Reliability :Application specific
6. Performance: Better

Caching and lower message payload makes RESTful web services performance efficient and scalable
7. Caching : GET operations can be cached
8. Message Size : Lightweight, no extra xml markup
9. Message Communication protocol : XML, JSON, other valid MIME type .

This flexibility of REST makes its extremely useful in providing consumer need specific message payloads 
10. Message Encoding : No

RESTful encoding is limited to text 
11. Service Description : No formal contract definition

In REST, no formal way to describe a service interface means more dependence on written documentation
12. Human intelligible Payload : Yes 
13. Developer Tooling : Minimal or none

REST on the other hand due to its simplicity can be developed without any framework
14. Orientation : Accesses resources/data 
15. Abbreviation: REST stands for Representational State Transfer
16. Who is using REST? All of Yahoo's web services use REST, including Flickr, del.icio.us API uses it, pubsub, bloglines, technorati, and both eBay, and Amazon have web services for both REST and SOAP.
17. Simplicity: Yes
18. Transport protocol support: HTTP


Areas where SOAP based WebServices is a great solution:


Asynchronous processing and invocation: If application needs a guaranteed level of reliability and security then SOAP 1.2 offers additional standards to ensure this type of operation. Things like WSRM – WS-Reliable Messaging etc.
Formal contracts: If both sides (provider and consumer) have to agree on the exchange format then SOAP 1.2 gives the rigid specifications for this type of interaction.
Stateful operations: If the application needs contextual information and conversational state management then SOAP 1.2 has the additional specification in the WS* structure to support those things (Security, Transactions, Coordination, etc). Comparatively, the REST approach would make the developers build this custom plumbing. 

Areas where RESTful WebServices are a great choice:


Limited bandwidth and resources: Remember the return structure is really in any format (developer defined). Plus, any browser can be used because the REST approach uses the standard GET, PUT, POST, and DELETE verbs. Again, remember that REST can also use the XMLHttpRequest object that most modern browsers support today, which adds an extra bonus of AJAX.
Totally stateless operations: If an operation needs to be continued, then REST is not the best approach and SOAP may fit it better. However, if you need stateless CRUD (Create, Read, Update, and Delete) operations, then REST is suitable.
Caching situations: If the information can be cached because of the totally stateless operation of the REST approach, this is perfect.







REST is almost always going to be faster. The main advantage of SOAP is that it provides a mechanism for services to describe themselves to clients, and to advertise their existence. 


REST is much more lightweight and can be implemented using almost any tool, leading to lower bandwidth and shorter learning curve. However, the clients have to know what to send and what to expect.


In general, When you're publishing an API to the outside world that is either complex or likely to change, SOAP will be more useful. Other than that, REST is usually the better option.

1) REST is more simple and easy to use than SOAP
2) REST uses HTTP protocol for producing or consuming web services while SOAP uses XML.
3) REST is lightweight as compared to SOAP and preferred choice in mobile devices and PDA's.
4) REST supports different format like text, JSON and XML while SOAP only support XML.
5) REST web services call can be cached to improve performance.
 



ref :https://sites.google.com/site/interviewsharing/asp-net/difference-between-soap-and-restful-webservices

http://javarevisited.blogspot.com/2012/01/rest-web-services-framework-interview.html

Agile Methodology

What Is Agile?

Agile methodology is an approach to project management, typically used in software development. It helps teams respond to the unpredictability of building software through incremental, iterative work cadences, known as sprints. But before discussing agile methodologies further, itÂ’s best to first turn to the methodology that inspired it: waterfall, or traditional sequential development.

Where Did Agile Come From?

In 1970, Dr. Winston Royce presented a paper entitled “Managing the Development of Large Software Systems,” which outlined his ideas on sequential development. In essence, his presentation asserted that a project could be developed much like an automobile on an assembly line, in which each piece is added in sequential phases. This means that every phase of the project must be completed before the next phase can begin. Thus, developers first gather all of a project’s requirements, then complete all of its architecture and design, then write all of the code, and so on. There is little, if any, communication between the specialized groups that complete each phase of work.
ItÂ’s easy to see how this development agile methodology is far from optimized. First of all, it assumes that every requirement of the project can be identified before any design or coding occurs. Put another way, do you think you could tell a team of developers everything that needed to be in a piece of software before it was up and running? Or would it be easier to describe your vision to the team if you could react to functional software? Many software developers have learned the answer to that question the hard way: At the end of a project, a team might have built the software it was asked to build, but, in the time it took to create, business realities have changed so dramatically that the product is irrelevant. In that scenario, a company has spent time and money to create software that no one wants. CouldnÂ’t it have been possible to ensure the end product would still be relevant before it was actually finished?

Why Agile?

Agile development methodology attempts to provide many opportunities to assess the direction of a project throughout the development lifecycle. This is achieved through regular cadences of work, known as sprints or iterations, at the end of which teams must present a shippable increment of work. Thus by focusing on the repetition of abbreviated work cycles as well as the functional product they yield, agile methodology could be described as “iterative” and “incremental.” In waterfall, development teams only have one chance to get each aspect of a project right. In an agile paradigm, every aspect of development — requirements, design, etc. — is continually revisited throughout the lifecycle. When a team stops and re-evaluates the direction of a project every two weeks, there’s always time to steer it in another direction.
The results of this “inspect-and-adapt” approach to development greatly reduce both development costs and time to market. Because teams can gather requirements at the same time they’re gathering requirements, the phenomenon known as “analysis paralysis” can’t really impede a team from making progress. And because a team’s work cycle is limited to two weeks, it gives stakeholders recurring opportunities to calibrate releases for success in the real world. In essence, it could be said that the agile development methodology helps companies build the right product. Instead of committing to market a piece of software that hasn’t even been written yet, agile empowers teams to optimize their release as it’s developed, to be as competitive as possible in the marketplace. In the end, a development agile methodology that preserves a product’s critical market relevance and ensures a team’s work doesn’t wind up on a shelf, never released, is an attractive option for stakeholders and developers alike.

ref:http://agilemethodology.org/
http://www.versionone.com/Agile101/Agile_Development.asp


Design Principles

1.Identify the aspects of your application that vary and separate them from what stays the same.

2.Program to an interface, not an implementation.

3.Favor composition over inheritance.

4.Classes should be open for extension, but closed for modification.

-The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

Observer Pattern
� The Observer Pattern defines a one-to-many relationship between objects.
� Subjects, or as we also know them, Observables, update Observers using a common interface.
� Observers are loosely coupled in that the Observable knows nothing about them, other than that they implement the Observer Interface.
� You can push or pull data from the Observable when using the pattern (pull is considered
more “correct”).
� Don’t depend on a specific order of notifcation for your Observers.
� Java has several implementations of the Observer Pattern, including the general purpose java.util.Observable.
� Watch out for issues with the java.util.Observable implementation.
� Don’t be afraid to create your own Observable implementation if needed.
� Swing makes heavy use of the Observer Pattern, as do many GUI frameworks.
� You’ll also find the pattern in many other places, including JavaBeans and RMI.


Decorator pattern

The Decorator Pattern attaches additional responsibilities to an object dynamically.
Decorators provide a flexible alternative to subclassing for extending functionality.

� Decorators have the same supertype as the objects they decorate.
� You can use one or more decorators to wrap an object.
� Given that the decorator has the same supertype as the object it decorates, we can pass
around a decorated object in place of the original (wrapped) object.
� The decorator adds its own behavior either before and/or after delegating to the object it
decorates to do the rest of the job.
� Objects can be decorated at any time, so we can decorate objects dynamically at runtime
with as many decorators as we like.

Best Java Websites ...

1. O’Reilly Java

URL : http://www.onjava.com
Since : 10-feb-2000
Rss : http://www.oreillynet.com/pub/feed/7?format=rss2
Description : O’Reilly’s, contains latest Java technology news, quality code snippets, full example and detail explanation.

2. Sun Developer Network (SDN)

URL : http://java.sun.com
Since : 19-mar-1986
Rss : http://developers.sun.com/rss/java.xml
Description : The official Java developer website, always get the latest Java related news here.


3. Developer.com

URL : http://www.developer.com/java/
Since : 21-dec-1995
Rss : http://www.developer.com/icom_includes/feeds/developer/dev-25.xml
Description : Java news and articles in developer.com


4. Java.net

URL : http://www.java.net
Since : 18-jun-1997
Rss : None
Description : The Java community website hosted by Oracle.


5. IBM’s Developerworks

URL : https://www.ibm.com/developerworks/java/
Since : 19-mar-1986
Rss : http://www.ibm.com/developerworks/views/java/rss/libraryview.jsp
Description : Java news and articles in IBM’s Developerworks.


6. Java World

URL : http://www.javaworld.com
Since : 22-nov-1995
Rss : http://www.javaworld.com/rss/index.html
Description : Well-known Java websites, you just can’t miss this one.


7. Devx

URL : http://www.devx.com/Java/Door/6972
Since : 26-sep-1997
Rss : http://feeds.feedburner.com/DevxLatestJavaArticles
Description : Java news and articles in Devx.com.


8. TheServerSide.com

URL : http://www.theserverside.com
Since : 05-jan-2000
Rss : http://www.theserverside.com/rss
Description : Java community to discuss the server side development.


9. Big Moose Saloon

URL : http://www.coderanch.com
Since : 27-aug-2004
Rss : Vary in topic, visit http://www.coderanch.com/forums
Description : Friendly and popular Java forum.


10. Stack Overflow

URL : http://stackoverflow.com
Since : 26-dec-2003
Rss : http://stackoverflow.com/feeds
Description : Well-known generic programming Q & A site organized by tags. Java topics included.


11. jGuru

URL : http://www.jguru.com
Since : 16-sep-1997
Rss : None
Description : Java articles and Q&A style forum.


12. Official Java Tutorials

URL : http://download-llnw.oracle.com/docs/cd/E17409_01/javase/tutorial/
Since : Unknown
Rss : None
Description : The Official Java tutorials from Oracle.


13. Java Blogs Aggregator

URL : http://www.javablogs.com
Since : 25-nov-2002
Rss : http://javablogs.com/ViewDaysBlogs.action?view=rss
Description : Blogs aggregator for many active Java-based blogs.


14. Java-Source.Net

URL : http://www.java-source.net
Since : 25-feb-2004
Rss : None
Description : Java frameworks collection site. Well organized.


15. Java Lobby

URL : http://java.dzone.com
Since : 17-may-1998
Rss : http://www.dzone.com/feed/frontpage/rss.xml
Description : The heart of the Java developer community.


16. Jdocs

URL : http://www.jdocs.com
Since : 01-jul-2004
Rss : None
Description : Search engine for Java API documentation.


17. Java2s.com

URL : http://www.java2s.com
Since : 07-nov-2004
Rss : None
Description : Many Java programming tutorials and source code example, well organized by categories.


18. Java Tips

URL : http://www.java-tips.org
Since : 22-Apr-2005
Rss : None
Description : Many quick and Java source code example.


19. RoseIndia

URL : http://www.roseindia.net
Since : 23-may-2000
Rss : None
Description : Collection of Java tutorials, cover wide range of Java topics.


20. Mkyong

URL : http://www.mkyong.com
Since : 30-oct-2007
Rss : http://feeds.feedburner.com/FeedForMkyong
Description : Cover wide range of the Java tutorials : Spring, Hibernate, Struts, Struts 2…
ref:http://www.mkyong.com/featured/top-20-java-websites/