Your Development & Design Resource
A basic thing all web developers should know...
07/21/2009 12:15 PM by Chris Toohey
This past week I was chatting with an individual who was looking to extend their web development expertise. They are a Lotus Notes/Domino Admin at their core, but need to rely on an understanding of web development fundementals for various project work.
I won't bore you with the details of the project, but will rather summarize:
- The customer is using a hosting vendor to host their websites.
- The vendor is using a prorietary solution to address the customer's needs.
- The vendor is thus charging the customer at will for any changes, updates, and new websites.
- The vendor is often unresponsive to the customer, causing delays in delivering online marketing materials or coordinating online and offline campaign efforts.
To give you an idea, the vendor's "monthly maintenance bill" is variable. And this does not include any consulting for things like provisioning a new website, which sounds like an amazing feat until you realize that it's creating a copy of an existing SQL table for capturing Contact Us online form data. See, they purchased a $10,000 USD CMS solution (from the vendor, naturally) to actually build out the websites themselves, but the vendor still wants to charge upwards of $500 USD for the provisioning. That price does not include the creation of the CName for the customer domain nor the administrative changes required to their DNS.
After hearing this apparent case of price gouging, I had suggested that the customer immediately look at bringing some of the Contact Us functionality in-house.
The Pavlovian response - which was of course drilled in by said vendor - was that to do so they've had to abandon the CMS, hosting, etc.
Well, I came up with a small demo to show them that it might be a lot easier than that...
Let's say you wanted to create a very simple Google Search widget on your webpage. Not a Domino webpage per se, but a plain ol' HTML webpage that was written in Notepad.
The first thing that I would suggest would be to actually perform a Google search from the Google home page, and pay specific attention to the URL. This is a quick and dirty way of getting information on how you can interact with a public (or internal) service.
For example, if I do a Google search from the Home Page for test, I'll get the following URL:
You can actually simplify the QueryString to read just
http://www.google.com/search?q=test, which is what we'll do for
this very basic example.
Now, we can create our simple Google search widget in our basic HTML:
<form action="http://www.google.com/search" method="GET">
<input type="text" name="q" value="" /><input type="submit" value="Google Search" />
This markup will result in the following form:
... which uses the GET METHOD to pass the value of the q INPUT element to the Form element's Processing Agent, which happens to be Google's search public service handler. The result is - from a usage experience perspective - a "redirect" to the Google search results for whatever value you supplied in your g INPUT element.
So, in this example, I was able to show that we didn't need to particularly rewrite the website or find another host in order to specify a different web service for capturing the customer website's contact us data... we simply needed to create a new web service, write to that API, and return the browser back to website URL post submission. All pretty standard stuff really...
The more astute of you will hopefully see not only how you can use this very technique today with your Domino Web Applications, but you'll also see how you can use it with your Lotus Notes Client applications.
For a quick example of that, let's take a look at Google Maps, which has a
very similar public service API:
Any Lotus Notes Client developer should be able to string together the
StreetAddress, City, State, and Zip
NotesItems from a NotesDocument in an Address Book or CRM solution and use a
@URLOpen to pass those values into a Google Maps lookup!
So, to wrap things up:
- The customer needs to ditch that vendor ASAP.
- Solutions Integration is often really simple.
- This isn't the last from this approach, as I plan on leveraging the fundamental idea here in some more stuff, including a few Sidebar apps and widgets that I hope to surface here soon.
So what are your favorite web services? What applications do you have in-house (IBM Lotus/Domino or otherwise) that could use a solutions integration infusion to make it viable again? Let me know in the comments!