Ryan's Rambling

Sunday, January 07, 2007

OpenSSL and OpenSearch

Some of the development I have been doing lately has had me searching through the OpenSSL online documentation quite frequently. While most times the OpenSSL site pops up first in the google results it is not always the case. Google allows you to constrain the search to a particular site by adding a site:site-name expression to the search. This is great but more typing than I care to do repeatedly. My solution was to add an OpenSearch to the IE7 search.

The great thing is that this works in both IE and FireFox through the simple inclusion of a <link/> HTML element. If you check your search drop down you should see that OpenSSL Search Provider is availabe for using to search.


<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>OpenSSL</ShortName>
<Description>OpenSSL constrained search using Google</Description>
<Tags>OpenSSL SSL TLS</Tags>
<InputEncoding>UTF-8</InputEncoding>
<Url
type="text/html"
template="http://www.google.com/search?hl=en&amp;q=site%3Awww.openssl.org+{searchTerms}"
/>
<Query role="example" searchTerms="SSL_new"/>
</
OpenSearchDescription>


This <link> should really be in the <head> section of the HTML document but luckily both browsers will pick it up even when it is embedded in the body.


<link
title="OpenSSL Search Provider"
href="http://www.run-time-systems.com/blog/openssl-search-provider.xml"
type="application/opensearchdescription+xml"
rel="search"
/>

Labels:

Monday, April 04, 2005

Finally started updating the site

Main site

I have really ignored my company site for the last five years. It was time for a logo change so I took the opportunity to clean up the site a bit. No content changes were made and all the existing (old) downloads are still available. I am going to make a concerted effort to get updated examples, programs, and libraries up on the site with some supporting documentation. I have been keeping everything up to date and using most of the stuff day to day but simply have not had the time to get around to it.

Labels:

Friday, March 18, 2005

Google Maps and Google Code

Google has recently announced and released two very cool new offerings. Google Maps has got to be one of the coolest web/script only applications that offers that particular type of functionality. It is incredibly fast and I definitely enjoyed having my region there in all it's glory. You definitely have to check it out. It is still just a beta but I really hope to see the ability to link to it for directions (which is pulls off flawlessly) and perhaps some developer API's. I know from past experience with ESRI this web based interface seems like a real charm.

Along with the maps they have yet another site, Google Code that has some decent code and API documentation. Since the old BLogger API appears to be malfunctioning a bit I was glad to see the Atom API documentation listed there. I need to update my blogging tool to use it so I can get rid of those pesky error messages.

Labels:

Wednesday, December 22, 2004

Reality Check for FireFox

Peter Torr'sarticle on his initial reaction to installing and using FireFox is certainly interesting and reminds you just how easily you forget some basic tenants of installing software these days. Microsoft has had years to tweak the useability of the user's interaction with the browser and it is nice to be reminded about the attention to detail. I am sure we will see some of the concerns he raised get addressed in future releases of FireFox.

For myself,my initial foray into FireFox was quite pleasant but I am still using IE as my stock browser of choice (without any particular reason). In all honesty, my hope is that FireFox will drive IE to become a better and more standards compliant browser rather than choosing it as my browser of choice.

It is great to have choices again ;-)

Labels:

Wednesday, September 08, 2004

Great list of Delphi RSS feeds

Nick has put together a great list of Delphi related blogs. Check it out and add it to your reader.

Labels: ,

Wednesday, August 11, 2004

FireFox (Mozilla) has really caught up

I have to be honest, since version 5 of Internet Explorer I have really not been all that interested in the Netscape/Mozilla browser. There werefour compelling reasons for me to really consider IE as my preferred tool of choice. The reasons, in order of relevance, were 1) XmlHttp object support; 2) XSL support (yes, even if it pre-dated the standard); 3) Embedding; and 4) Always there.

I will leave it to the purists in this world to worry about whether IE implements every standard under the W3C banner. By having the above mentioned items it was really a no brainer to adopt it for any html based work I may have to tackle.

I can recall reading that direct XSL support was not something high on the list of priorities for the Mozilla developers (sorry, cannot recall any useful links) and that CSS styling plus JavaScript could accomplish all the same bells and whistles (if you didn't mind doing it that way that is).

When IE 5 was originally released I was quite impressed and wanted to toy with the new features. I had an internal project, a bug/ticketing system, that I used for experimenting with the creation of a viable web based application (my preference is still for full rich client applications, so that is the bar with which anything web application will be measured against). In particular, this application makes use of a Delphi ISAPI library connected to an Oracle database through a custom OCI connectivity layer built specifically for server processing in Delphi. The content produced by the library is almost exclusively XML content with a bit of HTML for good measure (and laziness). All content is processed on the client workstation using XML/XSL transforms and client-side validations via a decent amount of JavaScript code. Throughout the process the intent was to ensure that the minimum number of client-server round trips are used and real"data" is the only moving on the wire (It really does bother me to see 90% of the content of an HTML page being markup, etc. that has nothing to do with the last POSTed data... seems like a real waste no matter how much bandwidth you can afford). To this end the client-side bits perform all the XML/XSL transforms, do a significant amount of validation via JavaScript, locally cache large volumes of data including code tables, client lists, etc. using "userdata" behaviours, and many of the interactions with the server take place using the XmlHttp object. The net effect of the entire project is that after a user visits only a couple of the pages they have virtually everything they need already sitting in the client browser cache or local store. The application then only needs to pass "real" data back and forth between the ISAPI library and the browser.By the way, this was 1999.Great, but definitely no support for Netscape at the time and with the fledgling Mozilla there didn't seem to be much hope.This project has basically been left unaltered since being originally constructed.

That brings us to the here and now... A bug in the background e-mail handling code for the ISAPI library forced me to revisit the code and much to my shock and dismay wasn't it horribly formatted HTML and XSL based on the pre-XSL-T provided by Microsoft (with embedded script to make up for the shortcomings). This is where FireFox comes into the picture. As part of assessing the present state of the FireFox browser is whether it is capable of being a client to this browser application that was developed using so much IE specific functionality.

My first step was to get rid of the outdated XSL transforms and replace those with standards based versions. That was pretty easy and it certainly didn't take long to get most of the content viewing aspects of the web application up and running under the FireFox browser but it looked horrible (recall that I already declared the HTML a mess). Being a self-proclaimed XML addict I decided the best solution to getting a consistent rendering of the page content was to ensure that I was producing the most well-structured HTML I could. This lead me to using the DOCTYPE declarations and converting the content to be XHTML 1.0 Strict compliant. While it wasn't incredibly difficult I have to say it was painful converting all the tags to lowercase, stripping attributes, creating styles, etc. The net effect of the HTML upgrades was a very consist view from both IE6 andFireFox... I must say doing it today is much easier than it was four years ago.A pet peev here and a focus for a future entry is the "how" I did the validation seeing as the site is served over SSL on a private network using NTLM for authentication.

So, at that point, I was able to view the site under FireFox without having it complain about outdated stylesheets and consistently rendering the content. I still couldn't get the benefits of the search and edit areas of the ticket application. These particular bits rely on having the browser being able to communicate without having to do a "post-back" or any of that horrible typical web application processing (yes, it has it's place but I like to keep it to a minimum, I still just want data moving on the network). I wasn't interested in completely reverting the web application over to use the typical edit-post-refresh cycle so I really needed for FireFox to support XmlHttp. While meandering through the online documentation I saw that they have a good implementation of the DOM which includes support for the "load()" method as well as a method of constructing an XML document on the fly within JavaScript. I wanted to take this as far as I could so I went about making various bits of the code tables available without the need for POSTing so I could use the GET call as required by the DOM load() method. So, now I was at the point of having FireFox support full browsing of the web application content, consistent view as compared to IE, and the much needed ability to actually perform simple and complex searching. We are only missing two things to make the solution as complete and well tuned as it is when run under IE... POSTing XML and client-side caching are needed. Without being able to issue posts to the server outside of the normal navigation of the site you cannot execute any of the edit functionality (I will try and explain why at the bottom). Without the local caching of data the FireFox version will generate significantly more traffic of redundant data requests (I do count HTTP 304's as redundant in case you were thinking well that object will get served from the standard cache anyway).

The big one XmlHttp, I needed to find a solution for this problem. Was it going to be an applet (grits teeth, spits, rinses mouth with soap [not the good kind of SOAP]), a browser plug-in/extension (wow, I just don't have that kind of time to throw about). Well, as it turns out, Mozilla FireFox has built and included the XmlHttpRequest object! You certainly do have to look hard for it or I am terrible at searching for things. It doesn't work quite the same as the MS version but it has all the basic underpinnings required to make POST requests to the server without requiring the browser navigation method, iframes, or any other dirty little tricks. I still haven't found a replacement for the "userdata" behaviour supported by Microsoft but the entire web application is now consumable using either IE6 or Mozilla.

The summary... FireFox (and Mozilla) have made some really big steps forward in bringing the browser up to par with Internet Explorer (and in many cases, well past). They have covered off the #1 and #2 reasons I would ever solely target Internet Explorer and I know from this point forward I will alway try to keep my development efforts capable of supporting both even if the client is still remaining with IE. I am really looking forward to the next release of IE and a renewed browser battle.


I had mentioned that I would explain why the edit functions would never work unless I could get the XmlHttp bits replicated in FireFox. To understand this you need to get a feel for how the web application is designed with regard to content review (viewing/printing) and content contribution (edit). The system is designed to allow a user to locate one or more "tickets" and have them displayed in a summarized list that is suitable (and css styled) for printing. Additionally, a user can view all tickets that matched the search criteria in complete detail that is again suitable for printing. So, the normal view of the application is that it looks completely read-only and "ready-for-print." When you have the detailed list of tickets displayed you can click the edit link for any of the tickets and the client-side code will "reshape" only that ticket so that you have a complete editing environment so you can alter the allowed properties and attach new notes or file attachments. When you do this any un-cached support code tables get retrieved and all the combo boxes, edit controls, etc. are revealed. When you are finished with your changes you click the save button and the client-side code does it's bit, builds the XML request, and fires it off to the server. Whatis important here was that if you have a long list of tickets you are not going to requery the server for any of those details simply because you had updated a single ticket. It is also important that the user doesn't need to visit another screen (and cause more client-server round-trips) to perform the edit. All the goodies are either right there or they are brought to the client as required. Perhaps the most significant driving force for this design was when I put the application together I had just taken over a project that had a backlog of 300+ tickets that had not been entered, had 1500+ open tickets, and I had to manage a massive quantity of tickets quickly and efficiently when distributing them amongst resources. The application was fun to write back then and it was fun and educational to upgrade it to support FireFox this time round.

Thanks for reading if you made it this far :-).

Labels:

Friday, July 30, 2004

FireFox 0.9x

I tend to keep going back and trying out the Mozilla browser offerings simply to check my html against another browser when something odd is happening. I have never been partial to it or it's variants but I have to say the current FireFox browserversion is simply very nicely done. It even provides a handful of useful extensions that make html development a bit easier. It really is worth having a look if you haven't already seen or used it.

I know it won't be replacing my IE any time soon if at all.All the clients of my clients have standardized on IE and quite simply I still find it very programmable and a very useful tool (security issues aside). I am looking forward to the results of the new upstart in development attention the IE browser is getting from Microsoft.

I certainly don't long for the days of the browser wars with major updates all the time but some good healthly competition will certainly improve the baseline itself.

Just a quick aside; FireFox was orginally called FireBird but that conflicted with the Open Source InterBase software project. It is nice to see them change the name since the InterBase group had already been there.

Labels:

Monday, July 26, 2004

JScript and Equality

It is just great having someone like Eric blogging on the details of the ActiveX engines. In particular this time he covers of some of the obscurity (ok, that is what I would call it) of equality comparison operators in JScript.

Read more on it here.

Labels:

Saturday, July 17, 2004

DOCTYPE, If your memory is as bad as mine

I know I personally go hunting over my hard drive every time I want to use a DOCTYPE declaration in an xml/html/xhtml document. If you have the same problem then you should bookmark this page.

Labels:

Wednesday, July 07, 2004

A good resouce for JScript/JavaScript

If you happen to make use of JScript/ECMAScript/JavaScript then here is a good FAQ. It has some great tips and generally provides a good bit of getting started information.

Labels:

Monday, July 05, 2004

Some good news for OpenSSL

OpenSSL, a great library for adding SSL and TLS support to your applications have received a good boost from the US DoD. The DoD went through the process of providing a series of validations for FIPS 140-2. In case you were wondering, that happens to be important to us Canadians as well.

Read more about it here.

Labels:

Tuesday, June 29, 2004

"With" is a bad thing

"with" is bad. Just to be clear I am not talking about the Delphi "with" statement although it certainly can be abused at times. The "with" that is always bad is the one implemented in the Microsoft JScript implementation as noted by one of the authors.

I find this quite interesting as, at first glance, I would consider it as something the script engine could use to improve performance. I know I don't have much code that would be reliant on this particular feature but I will certainly be reviewing and removing it where and when appropriate.

Labels:

Thursday, May 13, 2004

atom2rss Generating validated rss content

While browsing on rss stuff I discovered that the quick and dirty hack I did early wasn't generating a feed that was strictly valid. Luckily the very nice to have http://www.feedvalidator.org/provides the ability to test the feed and tells you exactly what is wrong. In my case I was using the dates as they were feed from the atom.xml file itself. I had not bothered to transform that format to the RFC822 format required.

A quick fix and we now have a validated rss feed generator :-). I have updated the zip file with the new source code as well as the library running on the server. Anyone that may have picked it up earlier should download it again (see the link in that post).

Labels:

www.2rss.com speaks on the new ads

2rss has blogged on the new ads. Turns out they are suffering from success and are moving to a pay model for service. Best of luck, had the announcement come before the ads I may have considered paying the small amount they are now asking for.

Labels:

A Delphi Solution for the 2rss Issue

Well, I have come up with a solution for myself with regard to the previously mentioned 2rss ad problem. Delphi + Irritated User = Solutions :-).

I spent a bit of time looking at the output produced by the 2rss feed and compared to what was available in the atom feed itself since that is all the www.blogger.com provides. It turns out that it is a really simple transform that is required and a few minutes of coding (in Delphi anyway) combined with an XSLT sheet solves the problem. For my personal use I have put together an ISAPI library to take any atom feed and turn it into the equivalent rss 2.0 feed. It works in the very same manner as that of the www.2rss.com tool but does it without the ads.

NOTE: This is not something that I plan to make available for anyone but myself. I simply don't have the bandwidth to allow arbitrary use.

Rather, I am making the source code for the library available for use under any terms. If you are interested you can pick it up here. If you are interested in using it you need an IIS server, MS XML 3.0, and Delphi 7 (very likely compatible with D5 and D6). If it is of use let me know and if you improve on it I wouldn't mind getting those updates back.

Back to some ad-free rss feeds ;-)

Labels: ,

It appears that 2rss has decided to inject Advertising into their free tool!

Well, wasn't I surpised to see that my rss feed indicated it had been updated (hmm, don't remember doing that). Had a peek and well what do you know a couple of advertisements were showing up. A check on the 2rss site didn't say anything about it.

It affects a few of the feeds I happen to enjoy such as Allen, Danny, and Anders as well as my own. Guess it is time to find another way to deal with the atom2rss issue.

If you are going to do something for free then do it for free! Don't use it as a means to build a user dependency and then exploit it through ads or fees. I fully understand and accept the idea of them plugging a few ads in but it is simply unacceptable to do it without any warning, notice, and simply feels wrong.

Labels:

Friday, March 12, 2004

QuickBlog Updates and Fixes

I have fixed up a view of the annoying bugs (deleting new posts was broken) and given the tool a decent face lift to use XP Themes and menu options.

Read about it here
QuickBlogs v0.91 (full, ~ 1MB zip)
QuickBlogs v0.91 (qb.exe only, ~ 162KB)

Labels:

Wednesday, March 10, 2004

Blogging with a Delphi Tool

I got tired of using the www.blogger.com web page for adding new entries. It seems like by the time I get to blogger I have lost that quick little thought or link I wanted to post.I have built a simple little blog editor using the XML-RPC blogging API and Delphi 7. It just provides the basics with the IE DHTML editor control and allows me to easily manage my blog from the system tray (and no VB or OCX's in sight). It can only handle blogger (or more correctly I have only tested it with blogger) and will only deal with a single account but I like to keep it simple.It likely has a few bugsbut if you care to give it a try you can download it below. Comments are welcome. comment

QuickBlog (all files zipped ~ 900KB)

QuickBlog (single file zipped ~ 100KB if you already have Delphi 7)

Happy Blogging

Labels: ,