260 likes | 472 Views
Practical Web Service Design and Development. Revathi R Sonata Software. Topics Covered. Why Web Services? Web Services – Key perspectives Difference between Service Design and OO Design Different scenario Service Design Principles Web Service Development Framework
E N D
Practical Web Service Design and Development Revathi R Sonata Software
Topics Covered Why Web Services? Web Services – Key perspectives Difference between Service Design and OO Design Different scenario Service Design Principles Web Service Development Framework Web Service Design and Development Best Practices
Why Web Services Identified by a URI Interfaces defined using XML Can be DISCOVERED by other systems
Web Services for Process Automation Utility Services
Web Services for B2B Interaction Utility Services
Web Services for Application (e.g. RIA, Portals, Mobile) Utility Services
Designing Web Service – Security General Practices Security is very expensive – One size fit all will not work! No Practices Require authentication on every request Authenticate once and use a token Restrict token validity
SOAP vs REST • REST Advantages • Self - describing • Simplicity • Scalability • Decoupled Client - Server • REST Issues • Designing a transactional flow • Developing the client - side library • Handling batch processing • Working with binary data • SOAP Advantages • Interoperability • Extensions • Design Flexibility • Rapid Client - Server Development • SOAP Issues • Dealing with many customers • Needing different media types • Developing an AJAX client
Web Service Development – Widely used Frameworks • Apache Axis 2 • Metro • Glassfish (Earlier Java Web Services Developer Pack) • APIs in Java EE and Java SE Technologies • JAX-RS Alternates: JSON-RPC for light transfer across the network! And there is POX!
RPC/Encoded, Document/Literal : What to use Use Encoding Literal
Web Service Versioning • Multiple Versions of the same Service/Operations • Why? • Least Impact to existing Applications • Enables Multiple Consumer to decide / plan the adoption of enhancements • Cons: • Governance • Implementation Tracking • Tracking of issues in different Versions • Complicated Run time Binding • Best Practice • Control Minimum Active versions • Have a good Governance and Stake Holder Mechanisms with clear ownership and change control procedures for Services
Web Service Design and Dev – Best Practices Check the Business and Technology Goals and Convince yourself if Web Service is the only way to go! Keep it Simple ! Prioritize the Design Principles. Use Appropriate Messaging and Protocol Standards Ensure WS-I Basic Profile Conformance Follow Pre defined, understandable , Intuitive Naming Conventions Always include a version parameter
Web Service Design and Dev – Best Practices Design Fault Messages for Possible Error Conditions Improve Productivity by Using Tools Reuse the Legacy! Go for Late Binding only if absolutely necessary Design your SOA with a foreknowledge of emerging specifications
A Final Word After all Users need a service to be - Accessible Documented Robust Reliable Simple Predictable