Delphi 2005: Revisiting the Welcome Page


Click to enlarge

In C#Builder 1.0 and now Delphi 8.0 the IDE has a Welcome page which is little more than Microsoft‘s WebBrowser control hosted by the IDE pointing to a rather static HTML page.  In it’s current incarnation the Welcome page is rather lacking but with a little creativity we can begin to unlock its potential.  Throughout the development of C#Builder and D8 for that matter, there were many discussions with some really good ideas (and a few bad ones too 🙂 as to what should appear on the Welcome page but unfortunately by the time RTM rolled around hardly anything that was discussed had actually been implemented.  Since I work on the Internet features of the IDE and particularly the HTML/ASP.NET designers it was particularly frustrating to know the potential of the Welcome page and that we hadn’t even scratched the surface.

Scratching the Surface

During the development of Delphi 2005 I decided that it was time to revamp the Welcome page.  Once again I heard similar mumblings about how to improve it and I finally decided it was time to act (I hadn’t worked on the Welcome page in either D8 or C#B).  To that end I made a list (not necessarily in this order) of things I’d like to see on the Welcome page:

  1. Have a familiar look-and-feel comparable to many modern websites
  2. Provide dynamic content that’s relevant to the developer audience
  3. Provide extensibility allowing customers to tailor the Welcome page to fit their needs
  4. Provide a good example of XHTML layed out using CSS

The first task was to review the current files that make up the existing Welcome page and see what I could use and what would need to be changed.  The layout that I had in mind was similar to many existing websites with a banner, a menu, the main content and a footer which the current design had two, the banner and the footer.  I shuffled the HTML around and built the structure of the page that I felt met these requirements.  Next, I started on the problem of dynamic content and how to keep the Welcome page fresh with new content but without requiring an entirely new infrastruture like Delphi Direct.

Enter RSS, XML and Javascript

Given the current popularity of RSS and the plentiful list of feeds provided by the BDN the decision of what content to include was pretty easy the hard part, or so I thought, would be getting the content onto the page without requiring that that IDE do all the work.  RSS is a defined XML format and the easiest way to programatically work with XML is via a DOM which is easily accessible from Javascript.  At first, I tried to create an implementation that wouldn’t require too much of my time because I still had obligations for the HTML/ASP.NET designer.  What I came up with was a page listed the items from a single RSS feed (not to mention the recent projects table and a list of static links) but as it turns out this was just the beginning.

In the end, we created a Welcome page where the content is driven from XML files including the list of links and the available RSS feeds.  Out of the box you will be able to choose from a list of 45 different RSS feeds from a dropdown right on the page.

Leveraging the Welcome Page for Your Team

Internally, we’ve setup our own development blog server where anyone on the team can blog about internal issues,  announce new features as they show up in the product and notify the rest of the team about any potential problems.  Basically, the Welcome page has become a way for us to improve communication throughout our entire team.  You too can take advantage of this feature by setting up an RSS feed of your own and editing an entry in defaultProviders.xml located in .\welcomepage\xml under your Delphi 2005 directory.

I hope people find Welcome page 2.0 🙂 a lot better and I look forward to see where we can go from here!  Send me a comment and let me know how you like or dislike it.

Finally, I’d like to thank Daniel Wischnewski of the The German Delphi Community for all his help.  Thanks Daniel!