Tuesday, February 8, 2011

Understanding WSDL

This is an attempt to explain WSDL in the simplest manner

About WSDL

•WSDL stands for Web Service Definition Language.
•It is a contract to the web service that is expressed in XML. To understand better this can be compared to an Interface in Java or a Package in Oracle which acts as a contract between the client and the system.
Structure of WSDL (parallels are drawn to Java wherever possible)

1.What are the capabilities of the Service?
◦What are the operations(methods) provided by the Service and what are the messages(parameters) that each operation requires?
◦The messages can be input(parameters), output(return value) or faults(exception)
2.How can the Service be accessed?
◦What is the protocol(SOAP) and what is the encoding(document)?
3.Where can the Service be accessed?
◦What is the endpoint(address) of the Service?

Monday, February 7, 2011

Top Down Vs Bottom Up Approach

Context "Whether I should start Developing JSP first or the Business Logic ?" is a common question that arises to every developer. This blog talks about the same and try to see the advantage & Disadvantage of both approaches. Top Down Approach What is Top Down Approach? Top Down approach is to start implementing Presentation Layer and then implement the Business Logic. Advantage: • Easy to visualize functionality. • Sense of completeness in the requirement. • Easy to show the progress of development. Disadvantage: • UI driven approach hence high possibility of redundant business logics. • Since an UI is readily available no developer would write a Unit test cases. • No Concrete layer to rely on, as both presentation & Business Logic keep evolving. • Lack of concrete test suits to ensure one layer is tied up. Bottom Up Approach What is Bottom Up Approach? Bottom Up approach is to start with the concrete business logic and its testcase and proceed with presentation Implementation. Advantage: • Solid Business Logic, hence zero redundancy • Good Unit test case can be written to validate changes. • Developer has only option to use unit testing tools to test the Logic. • Easy to manage changes and modification. Disadvantage: • Effort involved to write test cases. • Progress of implementation cannot be show very effectively. Conclusion As the number of tier & layers getting more and more, the amount complexity due to loose coupling also increases. Business logic is one which need to be concrete, testable and manageable. There is no right or wrong in these approaches, but business logic is heart of any modern day or traditional applications. If one has a concrete business logic, it's easy to provide a UI to manipulate the same (UI Developer's excuse me for that, this my perspective). Note: I prefer the Bottom Up approach, and i feel lot more comfortable and confident that my one end it tied up, and i need not worry about it.