.. (parent)How to
You are here: About >> How to
Audience
Developer

Meta

Table of contents

Explanation concerning the site

In this page, I explain how I designed my web site. Beyond the content, which is not always interesting, I think that the approach I chose is worth to be explained. In the last section of this document, I explain what I intend to do with this site in the future.

How

We focus here on the way this site was yielded.

Full XML

This site was fully yielded from XML files! What does it mean? Simply that I totally separated the content from the form. Appart from very minor parts, this is a full XML site! Appart from minor and external parts which were written in HTML (or the HTML was yielded when I think of Microsoft Word documents transformed into HTML), the major part of this site resides in XML.

Before the XML era, there was chaos...

Before I made XML's acquaintance, I was like everybody, I wrote my site in pure HTML. This means that everytime that I wanted to add a page to the site, I had to change the menu entries everywhere, I had to perform a subtle cut & paste from a template HTML file, so as to spare me writting time. Moreover, since my former site was extensively using HTML frames and framesets, you may fancy how much tedious and cumbersome work it respresented.

Moreover, the content of my web site was emprisonned within the HTML code, so that I could not output the content in another format. OK, you may say that I could have developed an HTML generator, and you sould be right. The only thing is that the format under which I would have stored the content information would have been totally proprietary.

In my old site, each time I wanted to propose a traduction of a page, I had to write two different HTML files. In short, the time I dedicated to maintain this site was not in a good balance with the improvement it brought.

The benefits of XML

You may say: "Once again this boring XML, that is talked about everywhere!". Let me convince you that this is not pure trend and that XML may bring you a lot of flexibility, and spare you a lot of time when designing a web site.

Write once
The first benefit of XML is that you do not have to write the same information several times. If you intend to publish an information that is bound to be re-used somewhere else, then the fact that you store this information under the XML format will enable you to inline this information here, there and everywhere. A common default of many projects is that the documentation is not centralized, introducing a lot of by-hand duplication: this duplication is not always updated when it changes.
Treat anyhow

A huge benefit of XML is that it conforms to a standard and that XML may be transformed through a technology, which is itself standardized and also expressed in XML. I am refererencing to XSLT, which offers the opportunity to transform any XML file into whatever format that comes to your mind.

Besides, I intend to make use of XSL FO in order to yield some PDF files. I also intend to use the Scalable Vector Graphics (SVG) standard to issue graphs. It would be nice that I generate some Flash in this site...

Run everywhere
I intentionally borrow this expression from Sun when thy talk about Java. But with XML, this is still more obvious, since the technology is not proprietary at all. Both Microsoft and the UNIX/Linux world lead by Sun and IBM agree, advertise and encourage this format. Even new protocols are based upon XML, like SOAP.
Write once, treat anyhow, run everywhere
All in all, I think that the title summarizes what I expect from a standard like XML. And I think that these are the features that made me choose this information storing technology for this site.

Press button

This site may be re-generated from a single button test. Indeed, as ever I wrote an Ant script that performs the XSL transformations, melt the static HTML files with what has been generated, and then eventually uploads the result by FTP on the web server that host those pages.

What difference it makes

Now, when I want to update my site, I just have to edit the XML file that contains the part I wish to change, and invoke my Ant script, and everything is updated. If I wish to create a new page, I just have to create a new XMLfile, conforming to my internal XML representation, add the reference of the file inside another portal file that contains the information concerning all the content files, and eventually invoke my script.

Inside the HTML

Now that I have explained the way I yielded this site, I should say a technical word about the stuff put in the generated HTML pages. Each time I talk about a technical item, I try to provide some basic explanation

Browser

I did my best so as my web site may be browsed with all the current standard browsers. However, it may happen that some pages are not displayed properly with some browsers: this web site has been fully tested under Internet Explorer V6.0 , which means that it is somehow optimized for that browser.

Moreover, this site should still be OK in a low resolution like 800*600.

HTML frames and framesets

I use the HTML tag frame and frameset, which are now supported by most of the web browsers. If this is not the case, one solution is to download a latest version of Netscape Communicator, of Internet Explorer (I have just tested Opera and it is quite fast to download).

If your window is composed by three frames, then you do not have to worry, because your browser supports this technology. Otherwise, I am not really prepared to that eventuality and you will have to go without any menu frame (that is the price to say with old browser)!

For some details about HTML normalization and for some tutorials, click here and type HTML in the text form.

Note for the novice
HTML, which stands for Hyper Text Markup Language, is a language that every browser understands. It is interpreted, which means that your browser uses a program to convert in real time the instructions - text understandable by a human being provided he knows the grammar, syntax and semantics, as ever - contained into the HTML files (with extension html). For instance, the page you are reading is described in an HTML file. There is a consortium that decides what the language grammar, syntax and semantics should be, and a very common problem is that all the browsers do not interpret the same way an HTML file. The higher the abstraction level of the semantics is, the more prone error it is.

JavaScript

I also use very (wisely I hope) some minor JavaScript features, just to make navigation easier, and to display some extra messages. However, there should not be any problem if your browser does not support JavaScript.

For some explanation about JavaScript and for some tutorials, click here and type JavaScript in the text form.

Note for the novice
JavaScript is a language that may be used inside HTML files. This is not HTML, but like HTML it is interpreted and its instructions look like text understandable by a human being. This is Java neither. Think of JavaScript as a set of little programs that are called on certain actions performed by the end-user over some HTML items (hyperlink, buttons...). HTML is the skeleton, JavaScript are the muscles. Not all the browsers support it, and even if a browser supports it, JavaScript is evolving, so that some new features of the language are not always supported all the same. Moreover, as for HTML, the way JavaScript is interpreted varies from a browser to another.

Cascading Style Sheet

At my own risk, I use this nice feature of Cascading Style Sheet, because I think this norm should be really working well, and that it really improves the HTML pages design.

For some explanations about Cascading Style Sheet and for some tutorial, click here and type CSS in the text form.

Note for the novice
CSS, which stands for Cascading Style Sheet, is a language that handles HTML pages layout. It may be used inside HTML pages that may point to CSS files (with extension .ccs) and use them. CSS is a bit like the Microsoft Word style paradigm, that is to say that the programmer can specify how all the headers of a page should appear, what color to use as a background... This unifies the layout of HTML pages and prevents the programmer from having to specify each time the style of each HTML item, which is rapidly tedious. Unfortunately, like JavaScript, not all the browsers supports it. Its is evolving. All the browsers do not interpret it the same way (I eventually wonder whether there is one which interprets it the right way).

In the future

A site is always under construction. This site is far from having taken the layout that I wish. Layout is one thing, content an other, and on this issue, there is still much to do.

Since this site is a kind of visit card, I will mainly focus on the layout. Some people do not like HTML frames, so I am going to design a frameless version of that site. I will also generate some images instead of having only text everywhere. Anyway, the (meta) content will be updated each time I need to explain how I yield this site.

A dynamical site

The reason why this site is static is that I found no free Servlet/JSP host: I wanted to use Servlet/JSP instead of other technologies, because I know that technology more than the others. I wanted to use the Struts or the Barracuda frameworks, in order to show I know how to use them.

Since I really need to be able to update that site on the fly, I think that I am going to use PHP as server side language.


Current date: 2024.04.23 15:37:19 Number of hit: 5408