开发者

web services/object-oriented question

开发者 https://www.devze.com 2022-12-13 02:46 出处:网络
I just recently started with object oriented programming, using java. Before I was programming in old visual basic which wasn\'t object oriented and in old php which wasn\'t object oriented ..

I just recently started with object oriented programming, using java. Before I was programming in old visual basic which wasn't object oriented and in old php which wasn't object oriented ..

Now my question : Where can I learn about webservices and object oriented programming through concrete examples? (real life examples not hello world type)

I read all of the articles which I could find on wikipedia, google etc. Does anyone have 1st hand expirience from switching to object-oriented programming , of course I'm more interested in success stories开发者_运维知识库 :D

Thank you


You should treat learning about webservices (and what exactly do you mean by this?) and OO as two seperate subjects. Both are orthogonal to each other. Learning object orientation is independent of learning how to deliver services over the internet.

With regards to learning OO this might help.

With regards to web services - you'll need to provide a bit more colour - are you looking to develop web applications? If you are looking to develop a webapp there are a bewildering array of java web frameworks to chose from (wicket, tapestry, spring, struts, grails, aribaweb, the list just goes on and on). If you're just starting out with Java & OO you might overwhelm yourself by diving straight in to a webapp framework. I'd suggest learn some Java & OO first, then play around with the Java Servlets/JSP pages, which should give you the basics, and finally pick a framework like grails or tapestry to learn.

If you don't need a webapp and your just accessing/exposing another service over the web then you have most of what you need for network IO in the core J2SE stack, with the addition of possibly some XML/JSON parsing libraries. Java also has a full blown Web Services API - but it's may well be overkill for your needs. You could implement a simple http webservice by simply using Tomcat and Servlets and reading/writing the request response as xml/json.


The two are entirely different beasts. I would suggest looking at existing frameworks that help you implement web services with Java. For instance you can look at the Spring Framework Web Services project which makes it trivially easy to create web services if you already know Java and Spring. But you can look at their code to see how they did what they did.

You can also consider this article that explains using struts2 framework to develop web services.


Apache CXF comes with a slew of examples of web services for a variety (SOAP, REST, etc) of protocols, transports, etc. The examples include inheritance issues that come up in service design (i.e., OO), not to mention CXF itself as a giant example of a Java system.


Go to Axis2 site, they have published very good example (Stock update ) . This Axis2 is a SOAP engine.

0

精彩评论

暂无评论...
验证码 换一张
取 消