Supporting Tools for DataPower Developers

I have a thing for tools.Tim Allen

Summary

A DataPower developer requires a suite of tools to support creating, maintaining and debugging solutions in the environment. These tools are freely available and have become a core piece of my interactions with DataPower:

No man is an island entire of itselfJohn Donne

Introduction

No technology is a island entire of itself either. Implementing solutions in DataPower requires practitioners to wear many different hats such as designer, tester, communicator and problem solver. It can be difficult to assume these roles without solid support. The following are some tools that can become a core part of a working with the environment.

DHC

DHC is an extension for Chrome that enables quick invocations of XML / JSON services over HTTP or HTTPS. From the website:

DHC (aka Dev HTTP Client) is designed and developed by developers for developers to make direct HTTP/REST resource discovery, manipulation and testing more easily. Beside the main function, sending/receiving custom HTTP/REST requests/responses, it allows permanently to save a request to a local repository for later reuse and moreover the request declaration can include variables that are context specific. With the use of contexts you can easily switch between various environments without modifying request declaration. (e.g. from a test environment to production)

Development is active and substantial new features are constantly released. These are my own experienced benefits:

  • All requests are saved to google drive
  • Requests are ordered based on a Project / Service / Endpoint tuple
  • Supports all HTTP verbs and custom HTTP headers
  • Can display the raw messages travelling over the wire for requests and responses
  • Saves a recallable history of all your services invocations
  • New in v0.7.20 are the concept of assertions, where you can specify the expected output of a service call and DHC will alert you when a returned field does not meet the expected value

DHC is a massive productivity improvement versus using cURL.

Alchemize

Alchemize is an extension for Chrome (also available directly on the internet)  that can take XML / JSON / Text / JavaScript / CSS  and format it for humans. From the website:

Sometimes you just need to minify or pretty-print your code. Enter: Alchemize, your one app for dealing with code on the web.

Alchemize supports:

  • Minifying & pretty-printing HTML & CSS
  • Minifying/compressing Javacript
  • Decompressing/pretty-printing minified Javacript
  • Compress & pretty-print XML, JSON

How many times have you emailed XML from the DataPower probes and it’s pasted as a garbled mess of text lacking linefeeds? Alchemize will insert those missing linefeeds and tabs. It opens a special window where you can paste in your content, press a button to format it, and then copy/paste the pretty results. This can substantially reduce problem debugging times by quickly isolating the offending message content.

Eclipse

Eclipse is a standard extensible open-source IDE used for many different purposes.

Eclipse is an integrated development environment (IDE). It contains a base workspace and an extensible plug-in system for customizing the environment.

Eclipse can be downloaded with an XSLT 1.0 parser and provides an IDE that can be used to develop and run XSLTs. It supports the XSLT grammar with basic autocomplete and automatic XML tag completion. It’s not an amazing editor as you’ll find that the built-in readability formatter will tend to introduce extraneous whitespace in places that could impact functionality. If you can live with hand formatting transforms then it is a solid, if not basic tool.

LastPass

LastPass is a cloud password management solution that will autocomplete your username and password when visiting websites, such as the DataPower Administration Console.

LastPass remembers your passwords so that you can focus on the more important things in life.

It makes logging into the device a breeze if you have an aggressively low session timeout value. Beware that your enterprise security policy may not allow passwords to be stored and retrieved in any external repository.

NotePad++

NotePad++ is another tool for editing XSLT files.

Notepad++ is a free (as in “free speech” and also as in “free beer”) source code editor and Notepad replacement that supports several languages.

Being a former IBMer, I’m comfortable in eclipse and haven’t used this product so I can’t comment on how effective it is. NotePad++ does not have a corresponding XSLT runtime but you can paste the XSLT into the tool below.

Free Online XSLT Test Tool

The Free Online XSLT Test Tool is a website where you can paste your input XML document, paste your XSLT 1.0/2.0 and the site will output the result. This can be used in conjunction with NotePad++.

XSLT Identity Templates

The XSLT Identity Templates created by Jesper Tverskov are a great resource for understanding how to insert / update / remove elements from XML documents. These are core-XSLT snippets for DataPower developers as the most common data transformation requests are to enrich documents with data contained by additional service invocations.

XPATH Tester / Evaluator

Allows you to test your XPath expressions/queries against an XML file. This tool runs better than other existing XPath online tools as it supports most of the XPath functions (string(), number(), name(), string-length() etc.) and does not limit you to working against nodes.

The XPATH Tester / Evaluator is a website that allows you to paste in an XML document and then write an XPATH statement to select the proper nodes of that document. This can be very handy when writing XSLT and trying to do difficult matches.

Apache JMeter

The Apache JMeter™ desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

Apache JMeter is a tool used for load and performance testing. I haven’t had personal experience using it as my clients have had their own enterprise load testing tools.

Conclusion

These tools provide key services to a DataPower environment and help make working with it easier.

My thanks for the last five suggestions goes to my good friend, blogger and DataPower advocate, Arnold Shoon.

If you have some tools that you’ve been using that aren’t on this list, free free to comment below and I will update this post.

About the Author

Dan Zrobok

Twitter

Dan is the owner of Orange Specs Consulting, with over 14 years of experience working in enterprise systems integration. He is an advocate of the IBM DataPower Gateway platform and looks to improve environments that have embraced it. He also occasionally fights dragons with his three year old daughter Ruby, and newborn Clementine.

Share this Post