One of the most essential items for any sforce developers’ tookit is a query tester – like the countless SQL query builders used by database developers everyday, a SOQL tester allows developers to navigate the data model, and build and test queries without the standard re-code/re-compile cycle. A quick perusal of the message board shows that a good chunk of the questions can be quickly resolved with the help of such a tool.
The good news is that there is now an online SOQL tester available at
https://sandbox.sforce.com/soqltest/.
For some interesting implementation details, read on.
We’ve actually had the SOQL tester available in our back pocket for a while, but didn’t not want to deploy it until we had a SSL capable server to use, as asking for passwords in the clear is generally a Bad Idea. With the new sandbox environment, we have a place to deploy in the environment we need. Of course, this means setting up all the moving pieces, which is non-trivial to say the least.
There are a few moving parts in this enviroment’s mix; Apache 2.0, which is the front end web server, Tomcat 5.0.25, which is the app server, and mod_jk, which allows apache to front and tomcat, and transparently pipe requests to the app server. With a bit of patience and a few google searches, all of those components can be strung together without too much work.
The challenge comes in putting SSL in the mix. Getting apache setup with mod_ssl isn’t too bad, thanks to a some good HOW TOs available via google. In this configuration, apache is going to take the SSL requests, and then forward them via mod_jk to tomcat – this model allows all the sites/technologies (PHP, JSP, perl, etc) to share a common certificate, eliminating the need to install a separate cert on tomcat.
From a programmers point of view on the tomcat side, things can get interesting. For example, how does tomcat know what protocol to use in prefixing URLs (ie http or https?) Turns out that while the port information (443 for SSL) is based to tomcat appropriately, there is no way (that I could find) to the protocol programatically, forcing me to hard code the value based on the port number. This is of course bad form, and I’m sure there is a better way – any one have ideas?