wood burning stoves 2.0*
The moose likes Web Services and the fly likes When should web service be developed using code first method and when should contract first method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "When should web service be developed using code first method and when should contract first method?" Watch "When should web service be developed using code first method and when should contract first method?" New topic
Author

When should web service be developed using code first method and when should contract first method?

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 594
There are 2 ways of creating a web service.?When should a web service be developed using code first method and when should we choose contract first method for developing the web services.?

thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
My response would be "White board and Use Case diagrams first" then what ever you are comfortable with based on what the use cases and diagrams suggest.

Bill
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1076
    
    1

Depends upon your design.
Both of these approaches have their advantages and disadvantages.
You need to weigh these advantages and disadvantages to decide the approach.

For my usage, I found mix approach to be better (starting with WSDL and Java both).

~ abhay


Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 594
then what ever you are comfortable with based on what the use cases and diagrams suggest.


Thanks. Is it a question of just being comfortable with or there are other factors too why 2 ways exist to create Web services.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Monica. Shiralkar wrote:
then what ever you are comfortable with based on what the use cases and diagrams suggest.


Thanks. Is it a question of just being comfortable with or there are other factors too why 2 ways exist to create Web services.


Since "web service" covers a HUGE number of possible applications from a simple lookup to an Amazon sized shopping site, there is no simplifying answer to your question. I would say there is a practically infinite number of paths to follow so pick what is comfortable for you.

Bill
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 594
thanks
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Monica. Shiralkar wrote:There are 2 ways of creating a web service.?When should a web service be developed using code first method and when should we choose contract first method for developing the web services.?

thanks

Prefer to start with a well defined contract if you are starting from scratch. Code first approaches are usually done because there is already code written that is tested and working (usually already in production) and now needs to be integrated with some other applications via webservices.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When should web service be developed using code first method and when should contract first method?
 
Similar Threads
Axis 2 Vs Spring Web Services stack
How to generate wsdl with spring ws
Help regarding Metro
Contract-first web services
JAXWS Stubs