Each of these had its own limitations which reduced their feasibility within our application. Next we considered hand-coding the XML directly with API's like:
The amount of code required to create an XML document with these API's was excessive. Code like this was not fun to write nor easy to follow.
So we decided to take a different approach and use a templating engine, specifically FreeMarker. Using FreeMarker to generate the XML response messages turned out to be a great decision. This is a list of some of the advantages we have noticed:
- The FreeMarker template we wrote to create the XML response message is an XML document. This simple fact should not be overlooked.
- Easy to integrate into any application. Very little code was required to utilize FreeMarker in our application.
- Excellent performance.
- The built-in functionality that FreeMarker provides is very powerful.
3 comments:
Although we haven't had to implement the feature yet, we had the same idea on the project I'm on. Glad to see that it worked out.
Hi can you please post it how you used freemaarker to generate the xmal message.
Sorry I used this on a client a few years back and don't have access to the code.
Post a Comment