02 November 2008

Clientside + Serverside = Web Service Development

Since 2006, i am dealing with web services and its technologies.
I faced with many cases, usage of webservice as a bulk of data tronsporter,
uddi tools, usage of endpoints, writing pojos which turns to autogenerated web service,using xfire,axis,axis2,servicegen etc.

Now i will mention about none of these. I will mention about social side of web services.

Social Side? Yess!! Sure It is.



The Ones, do not know the web service technology, i can simplify.

Dramatic attribute is interoperability. This is;(You have the common language) you are technology and company and engineer and tool independent. Here it is, You have a protocol, its standarts are open, if you use this, you can communicate via network resources.

Ok for this Two Task Needed;

1) A guy to implement server side. --> I will call him as heroic.
2) A guy to implement client side. --> I will call him as slave.


This is the article that i int to write many months ago howeever today is more suitable to mention about it.
I will talk about theese 2 roles, heroic and slave.


heroic is powerfull, becouse he knows the system,(because data inside his system will be returned) he determines the datatype to return, he designs. !!!
Question will be asked to him?He will documentate!! He will answer. You need the information on his head.So he is big. He is incredible.

Slave is very poor. He does not know anything. He even does not know the parameter(s) to send. Without Heroic he can do only nothing. Unless full documentation of code and system or javadoc or smthg like that supplied, he has only a web service uri. He is nothing. He need to ask question(s). What will be returned? What does it mean? Which return code means success? He will call, He will mail, He will disturb amazing man.

Lets make them communicate;

S: Hello, I am S, We should Call WS deployed on your server. I think you are responsible, Can you help?, I need to ask some question.
H: I am very busy, I think you have uri of the service. What you want more?
S: AA, yess!! yess!! i have the web service uri. Aprreciate for this :) But May i ask Which parameters to send, at least examples..
H: Aaargh , Hey Men, I do not have that much time right now, But i can send it to in 2 days time, if you can approve it to my boss(manager)
S: Thank you very much, You are great, Thank You, Thank You, You are Hero ...
H: ok..

After this talk Slave calls heraic s manager manager is not reacheable.
In two days time he can reach manager and manager approve(if slave is lucky) Heroic as a resource.
After 6 days (2 days weekend , 2 days approval, 2 days Heroic reponse)


s: Hello, We have talked last week, i can send to parameters but i get IO exception, Most probably its from Firewall settings.
H: yes yes, you should be defined to our firewall.
S: Ok but why you did not make it? Sorry.. How can we make it? May you help?
H: Oh noo.. Our Analysts is dealing with such staff, Please contact to ...
S: Thank you very much, You are great, Thank You, Thank You, You are Hero ...
H: ok..


As you see such conversations occur when web service development start.
But this is wrong.

Web Service development is different from web or middleware or database development.
Its a teamwork. Altough they can be from other countries or other companies, Client and Server is a team.They are one body. And the members(developers), should also be interoperable.

This is clear, Client Side Web Service Development is harder and help from server side is needed

My Methodology is;

Write Test of Web Service, (Make Test Fail)
Documantate What you will Write
Write Web Service(MAke Test PAss)
Update Documentation
Call it from 3rd party tool.
Javadoc it.
Warn Project Manager and Analyst About firewall and network settings.
Send it to test
And Warn Tester to Make Integration Test, and firewall and network settings for TEST enviroments.
Update Documentation After QAS test

My method is the ideal one (it can also be improved), But when i am client i cannot see such behavior. If I am communicating with web service
deployed to other country, situation is more dramatic, Almost dramatic as above. :))

If you divide web service development into 2 part, as Client And Server this means you fail.Development has one part. If you succesfully deployed your service, if it passes from performance tests,if your QA Member says it is ok, This does not mean it is ok. Because they are not testing your documentation. And Client one needs it. If he can not able to call your web service. This means you did nothing!!! Therefore You are building client side and server side together.


At last i can say, When your systems communicating each other , you developers, are also communicating . So you as a developer should support interoperability.


This communication is so important. For me, It is more important than tools you use.



Lastly, Regardless of writing server or client side, if communication fails,you fail.


Happy :)

No comments: