Web Services
Mister Model was designed to enable the movement of objects between a client and a web service. It was developed because I wanted a Java client to talk to a Perl web service. Mister Model is one product of the frustration.A second product is the development of two methodologies for rapidly developing and deploying web services in Java and in Perl.
- Develop software modules but minimize the amount of time thinking about the fact that they will be web services.
- Deploy web services with a minimum of effort.
- Do not require the use of an IDE to develop web services.
- Maximize the use of open source software.
- Pass arbitrarily complex objects between client and service.
Web Services in Java
Extensive research suggests the use Enterprise Java Bean (EJB) technology can accelerate the development of web services in Java.
EJBs provide the framework to develop and deploy web services. Bruce Tate's
book "Bitter Java" succinctly summarizes EJB technology as:
"a component-based, distributed architecture. On the server, a set of services
support a container, which in turn supports the components, called EJBs, within
the container."
EJB technology:
- Is well documented. There are many books and articles discussing advantages, disadvantages, and techniques for developing EJBs
- Is well criticised. Many antipatterns for the use of EJBs exist and known problems are well documented.
- Can be utilized using open source containers like JBoss.
- Can be rapidly developed by using code generators like XDoclet. XDoclet allows the generation of the difficult-to-understand deployment descriptors and deployment conditions from in-the-code markup
The container based technology provides numerous advantages for developers:
- A mechanism to connect logic to network services without having to account for the connection in logic code
- A mechanism to facilitate the dynamic discovery and binding of beans to clients
- A uniform way to describe the conditions for deploying logic
Mister Model, Web Services, and Java
One can develop web services in Java really quickly using JBoss, XDoclet, Mister Model:- Use Mister Model to generate Java code to represent your data model. Jar the code and drop it into the container.
- Take a Plain Old Java Object (POJO) and add comments describing deployment conditions.
- Allow XDoclet to generate JBoss deployment descriptors.
- Compile the code into an Enterprise Archive (EAR) and drop it into the container.
- Use the code from a client. As long as the client (Java or Perl) has the datamodel classes from step (1) serialization will not be a problem.
Web Services in Perl
Perl, through SOAP::Lite provides an excellent framework for providing web services.- Perl's testing framework is thorough and works
- SOAP::Lite provides a reliable way to service requests
- SOAP::Lite provides an excellent serialization and deserialization framework
- Through Mister Model, SOAP::Lite can expose methods to web services in a rapid and easy way
Mister Model, Web Services, and Perl
One can develop web services in Perl really quickly using Apache and SOAP::Lite:- Use Mister Model to generate Perl code to represent your data model. Put that code in the @INC available to Apache.
- Create a Plain Old Perl Object (POPO) that uses that data model.
- Create a .ws - a web service descriptor that delegates all calls to the POPO you just wrote.
- Use the code from a client. As long as the client (Java or Perl) has the datamodel classes from step (1) serialization will not be a problem.