Simon Bisson (sbisson) wrote,
Simon Bisson

  • Mood:

Pretty much the first article I wrote on blogging...

How about a blast from the past?

This, dating from some time in 1999/2000, is the first article I wrote on blogging. It's from a web development series I wrote for PC Plus, and is on building and running a blog using a copy of Access. Note how carefully I use the term "web log" throughout the piece...

How to publish Databases on the Web
Last month we looked at using web design tools to publish databases on the web. This month Simon Bisson looks at using database packages to create web pages and web sites.

The web stopped being a static place a long time ago. Visit any large web site, and you can be sure that the content you’re seeing was generated just for you. Dynamic web content means that pages can be tailored to browsers, and personalised if you’ve left your details on the web site. It also means that the site’s developers don’t have to worry about the page layout – as templates and content delivery engines allow text and images stored in databases to be turned into web pages.

Unfortunately the dynamic web hasn’t reached the free web space most ISPs give their users. To be honest, this isn’t surprising, as large-scale web application servers are expensive beasts to buy, and even more expensive to run. Disk space and a copy of Apache are much cheaper, and so your ISP-hosted site is going to be limited to static HTML pages. This doesn’t mean you can’t take a leaf out of the larger sites’ books though, and use a database to create and manage the content on your site.

One of the most popular web sites around is – an open source news and gossip site. It’s what’s known as a web log or “blog”, a site made up of random musings and their responses. Web logs don’t have to be interactive like Slashdot, and you could create your own to keep the world informed of developments in any projects you’re running - or just to have an online journal.

In this Web Workshop we’re going to create a simple web log application in one of the most widely available home database packages, Microsoft Access. You don’t have to use Access – the basic techniques are valid for most database packages. Another tool that will give very good results is FileMaker Inc’s FileMaker Pro, the latest version of which includes a selection of HTML publishing templates that can create attractive web sites very quickly.

As web-ready office tools haven’t been around that long (the first HTML add-ons for Word were only 5 years ago…) you’ll need to have a reasonably up to date database package. Access 97 or Access 2000 will have all the features you need, and if you’re using an older database you can use a text processing language like Perl to turn a CSV text export into HTML.

The first thing you need to do is to design the database you’re going to use for your web log. Generally these are very simple databases – and a single table will serve all your needs initially. You really don’t need a relational database to create a web log, however applications like Access have the additional features you need to turn a set of tables into a simple application.

You’ll need to decide how many fields you’re going to be using. As this will be a personal web log you can keep formatting information for the report you’ll use to create the HTML. It’s a good idea to keep the number of fields to a minimum – a headline, a sub-heading and a section of body text are all you’re likely to need. A web log is for recording short pieces of information – not writing War and Peace!

It’s important to think about the design of your web log at an early stage, so that you’re ready to start building the reports that will be used to export the HTML. It’s not difficult to design reports in Access, as it contains a drag and drop design tool. This isn’t WYSIWYG for the web though, as when you export an HTML document from Access, the table structure it generates isn’t a duplicate of the report you’ve designed. You can improve formatting by applying an HTML template to the output. You’ll need to use Access’s own tags to control how the template interacts with the HTML generated by Access.

Once you’ve created your web log application, and begun publishing regular updates, you’ll need to start thinking how you might manage a more complex set of pages. The application we’ve built here is only designed to create a single web page, but you can use a combination of reports and queries to generate an index page and then either daily or weekly pages.

Developing a simple web log like this is a step on the road to the dynamic Web, as these are the techniques used to run large data-driven web sites. Instead of using canned reports to generate content, an application server will extract content from a database on the fly, and then format it. On a smaller scale you can use CGI scripts and ASP or PHP to do the same on a personal web server. The largest sites around use tools like Apple’s WebObjects, ATG’s Dynamo and BEA’s WebLogic are able to work with multiple databases and services, creating some of the busiest and most complex e-commerce sites around.

Walkthrough: Building a Web Log application in Microsoft Access

Creating a web log application in Microsoft Access is a simple process. Just follow our simple guidelines to create your own blog…

First design your database. A web log is a very simple single table database – all you need is an automatically generated date field, and then the text fields you want to use. We’ve just chosen a headline, a sub-heading and then a memo field for the body text.

Access can be used to create applications that don’t require you to input data directly into a table – you can design a form that will allow you to quickly add new content to your log. It’s not important to spend time on this, unless you’re sharing it with colleagues.

You should design your Access reports with the web in mind. Think about how the page will be seen in a browser – and remember that you won’t be able to control the way a page is laid out in the browser.

Once you’ve added some content to a database, take a look at the report Access creates. This will allow you to check what you’ve written – and you can go back to your input form to make any changes you want.

Creating a web page from an Access report is very easy. Just select File/Export whilst you’re previewing a report. A standard Windows file save dialog will appear. From the “Save as type” choose HTML, and then save the exported report.

Once you’ve created the HTML check it in your web browser before uploading it to your web server. Access will automatically create links between pages, so you don’t need to worry about multipage reports. You can then use your favourite FTP package to upload the new pages to your server.
Tags: blogs, writing

  • My tweets

    Tue, 13:57: Two 2020 pins, A and B. Poll in next tweet. Tue, 15:21: Oh, rain rains down... England is dreaming Of…

  • My tweets

    Mon, 13:26: Today I am mostly thinking about dapr (again). Mon, 13:34: "Blue Monday" may be just PR hype and a marketing hook, but Hooky's…

  • My tweets

    Sun, 15:19: RT @ tomgauld: ‘Coronavirus advice from a regency novel’ (my cartoon for yesterday’s @ guardianreview)…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded