Charl van Niekerk » Blog

Main

Latest

Archives

Powered by Blogger

PDFs Considered Crap

It's official: the PDF format is considered crap (by me, and others). This is an old, bloated technology that really has no more space left for it on the modern Internet.

Motivation

This is my motivation for the hilarious statement in this post's title.

It's Old
PDFs have been there since the very, very old days of the web. It was created because, at that time, there was no way to get web pages to reliably print on a physical page and the layout possibilities of web pages was also (relatively to these days) very limited. PDFs were therefore the solution for documents that typically needed to be printed out on paper.
It's Bloated
PDF files have been known to be large in size, right from the time I read my first book on how to use the Internet, Internet for Dummies. Don't laugh - I said, don't! Sheesh, man, this was 8 years ago! Anyway, although some modern PDF writers (like Open Office 2) offer much improved compression, it's still a pretty bloated format and can't touch the compactness of its alternatives.
It's Slow
Not only do the files tend to be quite large, but Adobe's famous (infamous?) Acrobat Reader is not at all very fast and efficient indeed. Although that isn't the only reader on the market, it still seems to be the de-facto at this moment.
It's Proprietary
Yes, it's stinking rotten filthy proprietary. Adobe owns the PDF format.
It's Unnecessary
Yes, the need for it has expired. There's, simply put, better alternatives! Read on...

Alternatives

Here I quote Lachlan from a private conversation:

XHTML+SVG+MathML+XSL+CSS+PNG+DOM+ECMAScript+XForms = PDF+much more!!!

Yes, with the advent of all these languages, it indeed seems like PDF has had its days.

Also don't forget about the print media type for stylesheets and stuff. Isn't simply printing the current page and having it come out correctly on paper far cooler than having to first click on a little "PDF" or "printable version" icon, waiting for the (large) document to load, and printing that? Yes, web standards makes it all better!

I'm going to openly admit that I'm also still using PDFs quite heavily at the moment for printables. However, as the abovementioned technologies become better supported over time, I'll probably be one of the first to switch. Will you?

Weird Song

Every now and then you come across something really funny about your ethnicity.

Anyway, there are a few traditional Afrikaans songs that are really funny. One of them is titled Tant Antjie ruik na gom. Here we go:

Tant Antjie ruik na gom
Tant Antjie ruik na gom
Tant Antjie ruik na gom
En niemand weet waarom

Now sing this on the tune of Jingle Bells.

The song does actually go on, but this is all we're going to focus on for now.

And of course, non-Afrikaans speakers are now probably begging for a translation so that they can also join in on the fun, so here goes:

Aunt Antjie smells like glue
Aunt Antjie smells like glue
Aunt Antjie smells like glue
And nobody knows why

Of course, it sounds better in Afrikaans because then it actually rhymes.

Oh well... On to something productive...

Coding4Fun

While I've been browsing around quite a lot on MSDN lately because of my recent ASP.NET 2.0 research and reviews, I noticed an advertisement (it's actually quite hard to miss - think almost every single page on MSDN you visit) about their new Coding4Fun site.

Coding4Fun, which is apparently aimed mostly at hobbyists and students that just like to code for the hell of it, provides you with fun tutorials and information regarding Microsoft's new .NET Technologies.

The topics they're covering on the site includes:

The tutorials seem to be written specifically for the .NET Framework 2.0 beta with Visual Studio 2005 and ASP.NET 2.0. The IDEs they're promoting are the free Visual Studio 2005 Express IDEs.

This is all getting more interesting by the day. Finally, I think I'm starting to see where Microsoft is going with releasing, for the first time, free .NET IDEs.

As I said in my previous post ASP.NET Part 1, Microsoft is releasing more and more for free. First, with .NET 1.x, you only got the framework, API documentation and command-line compile tools for C# and VB.NET for free in the downloadable .NET 1.1 SDK, and if you weren't satisfied with the free open source IDE, you'll have to go out and buy Microsoft's rather expensive IDEs as part of the Visual Studio package.

Now, with .NET 2.0, you get C#, J#, Visual C++, VB.NET, Visual Web Developer (for ASP.NET 2.0) and their new light-weight SQL server for development purposes all for free complete with "Express" IDEs and all. Quite interesting move, especially taking into account that Java has also just started packing an optional IDE eliminating the necessity for downloading one of the myriad of third-party IDEs available (although you still might consider doing so for various reasons I'm not going to cover right now).

The "Express" range of IDEs are apparently aimed at students and hobbyists to make it easier for them to learn the platform. It's supposed to be relatively simple and lightweight. I agree that they're much simpler in comparison to the Microsoft Development Environment shipped with Visual Studio 2005. Lightweight, well, I guess it is somewhat, but it still provides me with more than just the featured I (for one) need.

This all interests me quite a lot; it seems like Microsoft has suddenly developed a great interest in the hobbyist community. Of course you can only make up your own theories for this, but if you ask me, this is either because of Java or because of open source. Or maybe both. Keep in mind that the hobbyist community is currently largely made up out of Java users (not even knowing about the free .NET Framework 1.x SDK + free open source IDE) and of course out of open source supporters, just because it's fun for many (including myself) to share code and contribute in the large international open source community.

It seems to be quite obvious that Microsoft is getting a bit nervous because of this; maybe this is their motivation to start catering for the hobbyist community all of the sudden. However, I don't really see this in a negative light at all. I actually think that this is quite a novel approach, as it's a nice place to get started with all kinds of cool new technologies and might inspire a number of good potential programmers to start to fiddle with stuff. Some companies already have, and more companies can benefit from this approach.

These hobbyists/students might even be tempted to release their code under an open source licence anyway. Who said that that, just because you built it using Microsoft technologies, you can't release it as open source? Many, and I repeat many open source applications have been written in .NET already as it's just, simply put, a very powerful platform.

I just hope potential web coders will learn about standards properly and won't accept them as Microsoft is trying to teach them in the new Visual Web Developer and ASP.NET 2.0. But, of course, all we can do is blog! ;-)

Anyway, interesting moves nonetheless; I'll definitely keep watching these developments closely.

MSN Web Messenger

Web Messenger Contact List in Firefox on Linux

MSN Messenger is accessible from just about any platform. Of course, you can try the new MSN Messenger 7.0 on Windows or on the Mac, but you can also use one of the many open source cross-platform multi-protocol messenger applications available (one of the most popular being Gaim).

However, sometimes you find yourself on a public computer without a messenger application installed, and a web-based version would be quite handy. ICQ already took the initiative with ICQ2Go and Microsoft also has Web Messenger.

Here we will delve a bit into the Web Messenger and see how it all fits together.

The first thing that comes to mind might be, "Oh my goodness, IE-only again..." but actually this is far from the case. Web Messenger supports IE 5.0+ (quite obviously), Netscape 7.1+ and Mozilla 1.6+ all on Microsoft Windows. When you enter with Firefox on Windows, everything seems to work perfectly and no bitching or complaining about your browser at all! When you enter using Firefox on Linux, it tells you that your browser isn't supported, although you can enter anyway and everything seems to keep working perfectly. How absurd. :-)

Web Messenger Chat Window in Firefox on Linux

Opera, doesn't matter which operating system you use, is left blatantly unsupported. It's really quite ridiculous to have something work with Gecko and not with Opera, since both (although they have their shortcomings) still offer (relative to IE) excellent support for web standards.

I tried using it with the new Opera 8 anyway. One bug I noticed was that, when you receive a new message in a conversation window, the box doesn't scroll down automatically to enable you to view the received message. You can still scroll down manually, although this is naturally quite pesky. Apart from that and the bitching about my browser, everything seems to work quite well (although I didn't really do extensive testing).

The one thing that is really quite irritating and actually unnecessary is the fact that the Web Messenger insists on opening up new windows the whole time. It would actually have been possible to put them all on the same page and get it to run using different tabs (not browser tabs, but tabs within a page similar to some of the dialogs inside the Mambo Administrator).

Because of these new windows being opened with JavaScript, it insists that you disable your popup blocker. In Firefox, it is easy to do this only for the webmessenger.msn.com host, but on some other systems this means that you'll have to temporarily disable your popup blocker for all sites. A web application shouldn't have to force you to go and poke around in your configuration unless completely necessary (for example, when you have JavaScript disabled).

Now, let's take a look behind the scenes, shall we?

First of all, this is not a Java Applet and it's also not Flash-driven. It's just powered by pure HTML and JavaScript. This is probably a good thing, since Flash is terribly proprietary and Java Applets (not exactly being very much of an open standard either) have a number of problems associated with them. How many of you ever tried to get a Java Applet to actually work correctly from one computer to the next? And the speed is, well, simply pathetic. Sorry...

Now thinking JavaScript, one's first instinct is to suspect heavy usage of XmlHttpRequest; however, it doesn't seem to be making use of that at all (although I could have missed something). Rather, it seems to be making use of framesets while doing constant refreshes in the background.

It is quite obvious that neither refreshes nor XmlHttpRequest are exactly very efficient on bandwidth and smooth usage; the fact remains that HTTP, although very versatile, simply isn't a protocol tuned for use with realtime messaging applications. Quite a pity, but then again, using the Web Messenger is just a last resort anyway. :-)

410 Gone & 404 Not Found

Introduction

It's very seldom I see a proper 410 Gone being issued instead of the usual 404 Not Found these days on the web when a resource has been removed. Most webmasters obviously don't take any care to keep any record of resources being removed from their websites.

This article attempts to clarify why keeping proper record of removed resources is important.

Status 410 Gone

First of all, let's quote directly from the HTTP 1.1 410 Gone Specification:

The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.

The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.

To be thorough, here is also the specification of the 404 Not Found:

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

These pretty clearly indicate the administration advantages for people linking to a resource on your site when you take proper care in reporting what you're doing.

There is another advantage though they're not mentioning; it also aids usability. Take a user getting a website address offline as an example. The user types her address, and gets a 404 Not Found. She immediately thinks something in the lines of, Oh my goodness, I types the address wrong, so she tries again. This time she's sure she typed it correctly, so she starts to think she got the wrong address. Then she goes back to the person that gave her the (apparently faulty) address, only to find out that the resource has purposefully been removed for some reason.

Now think what would have happened if she got a 410 Gone instead. She would have immediately known that her address is correct, but that the resource is no longer available. And she wastes no more time trying to figure out what on earth is going on!

Gone Temporary or Permanently?

Unlike redirects, where we have separate status codes for temporary and permanent ones, a Gone can only be permanent. As far as I understand from the HTTP 1.1 specification, we should use the 404 Not Found status when a resource exists, but is only temporarily unavailable.

Personally, I would have liked a separate status code for that, especially because of usability considerations. A 404 Not Found could mean many different things, and users typically associate it with a resource that has never existed (which leaves the person in my example above to assume she has the wrong address, a typical real-world problem).

Error Documents

I really like custom error documents, probably just because I hate the defaults. Personally, I like an error document being part of the standard site template. That gives users a basic navigational structure so that they know where to go on from there.

Also, be as clear and descriptive about the situation as possible. Remember that not everybody is equally technically gifted and not everybody has a brain that's functioning at least half decent (in other words, some people are just plain simple stupid).

Here's a template I set up for a 410 Gone:


The resource you are requesting existed, but has permanently been removed from this website, most likely due to storage space constraints or because the resource is no longer relevant. Please remove all references to this resource. It is possible that this material is still available offline; please contact the webmaster with any questions.


This message should naturally be accompanied by the webmaster's contact details and with an applicable heading. I don't know whether it's better to include or leave off the error code (410) in the header, but it's probably better to leave it in somewhere so that users with a bit of experience can summarise the situation easily without having to read through a rather boring paragraph every time.

Note that, theoretically, you should never have to worry about storage space. A resource should always remain accessible online and should only be permanently removed under special circumstances. However, in the real world, you typically have storage space limits on your account, so sometimes information does need to be removed because of this terrible fact.

Naturally, if you have your own server or the GMail of hosting plans, you could remove all mention of storage space and material being available offline from the above template.

Next up is error messages for a 404 Not Found. This can actually get a bit more tricky, because now we have two possible reasons for this being returned:

  1. The resource is temporarily unavailable.
  2. The resource never existed.

There could even be more reasons, but these are enough for the purposes of this article.

You can always combine both cases into one error document, stating that either the one or the other is the problem. Or you could write something which doesn't explain the problem properly at all. These are terrible options for usability, in my opinion. An error message should always clearly state what's wrong and shouldn't leave the user with different options of what could be wrong because that essentially frustrates them and wastes their time.

I would rather keep record somehow of which problem is actually the case, and then display a proper, clear error message accordingly.

Here is a template for a resource that's temporarily unavailable:


The resource you are requesting exists, but is temporarily unavailable. It will return shortly, but if you require urgent assistance please contact the webmaster. We apologise for any inconvenience this may have caused.


Next up, here's a template for a resource that never existed in the first place:


The resource you are requesting neither currently exists, nor ever existed. You most likely used an incorrect URI; please check it and see if it contains mistakes.

If you require assistance, please contact the webmaster.


These messages, I believe, are firm and clear yet polite. Of course, you can modify/improve these to fit your purposes or even translate these, as long as there's always a version available in English for others that might stumble upon your site by accident without knowing your native language. Content negotiation might even be used here.

I would like to go on to explain how to get this all to work on some popular implementations, but since this is a whole new story on its own, we'll leave that for another day. :-)

ASP.NET 2.0 - Part 2

Test Page in Design View

After Part 1, it’s time that we take a thorough look at the web standards support in ASP.NET 2.

Time for some experiments. Firstly, I created a blank page and added a single Login component. That’s it for now.

Adding the login component is simple. Just click on it in the toolbox in the left, and drag it where you want it on your page. This can be done either in Design (WYSIWYG) or Code view.

Now, the code I have so far looks like this:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Login ID="Login1" runat="server">
        </asp:Login>
    </form>
</body>
</html>

Test Page in Code View

First I have the page declaration that specifies I’m using C# on this page. You can also use VB.NET (just “VB” in the Language “attribute”) or J# (seems to be replacing JScript in ASP.NET 1.0) if you like.

Now, take a look at that doctype! Oh, horror! XHTML 1.1!!! And yes, the document is exclusively sent as text/html, completely going in against the relevant specifications.

Then you have a standard html element with an xmlns attribute. Now you can clearly see that Microsoft is taking the direction of XHTML, if it makes sense or not, taking into consideration that their own browser isn’t even supporting it currently.

You have a normal head element with an unusual runat attribute. This attribute actually specifies that the particular element must first be parsed server-side.

Next, you have a standard body element with a form. Note that this is not just any form, it’s a special server-side ASP.NET form, as you can probably see from the runat attribute.

And inside that you have the Login component. Now take a close look: It has asp in front of the element name to designate that it’s not a normal client-side element, but a server-side ASP.NET component. When the page is executed, client-side markup will be generated by the component and sent to the client instead of the code you’re seeing now. And again that stupid runat attribute is present.

Now hopefully you can see how ridiculous this all is. It actually uses asp:Login as if asp is actually an XML namespace; however, do you see that declared anywhere? If you do, either you or I need glasses. :-)

My personal suggestion: Remove those silly runat attributes and use proper namespaces in order to stay consistent with XML. Then use a proper xmlns and use a unique namespace for the ASP.NET “elements”. For example:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp="http://microsoft.com/2005/aspnet">
<asp:head>
    <title>Untitled Page</title>
</asp:head>
<body>
    <asp:form id="form1">
        <asp:Login id="Login1">
        </asp:Login>
    </asp:form>
</body>
</html>

Much better, isn’t it?

Anyway, let’s execute the page and see what we get. Just press Ctrl + Shift + W and the page will open in your browser. A nice thing to note is that it actually uses the default browser instead of using IE regardless. On my computer, it opened perfectly in Firefox (naturally).

Here’s a full dump of the markup spitted out:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
 Untitled Page
</title></head>
<body>
    <form method="post" action="Default.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTE4MDc4NTEzNWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFEUxvZ2luMSRSZW1lbWJlck1lBRdMb2dpbjEkTG9naW5JbWFnZUJ1dHRvbq5eufHG/q9hDLsf77OdsFEp8Tph" />
</div>

<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
// -->
</script>



<script src="/Aspnet2/WebResource.axd?d=dSETps0HtMfUyUGnVPX_ldyosdDYjwLiCj0hDyQ4Dfw1&amp;t=632496236232079354" type="text/javascript"></script>
<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
if (ValidatorOnSubmit() == false) return false;
return true;
}
// -->
</script>

        <table cellpadding="1" border="0" id="Login1">
 <tr>
  <td><table cellpadding="0" border="0">
   <tr>
    <td align="center" colspan="2">Log In</td>
   </tr><tr>
    <td align="right"><label for="Login1_UserName">User Name:</label></td><td><input name="Login1$UserName" type="text" id="Login1_UserName" /><span id="Login1_UserNameRequired" title="User Name is required." style="color:Red;visibility:hidden;">*</span></td>
   </tr><tr>
    <td align="right"><label for="Login1_Password">Password:</label></td><td><input name="Login1$Password" type="password" id="Login1_Password" /><span id="Login1_PasswordRequired" title="Password is required." style="color:Red;visibility:hidden;">*</span></td>
   </tr><tr>
    <td colspan="2"><input id="Login1_RememberMe" type="checkbox" name="Login1$RememberMe" /><label for="Login1_RememberMe">Remember me next time.</label></td>
   </tr><tr>
    <td align="right" colspan="2"><input type="submit" name="Login1$LoginButton" value="Log In" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;Login1$LoginButton&quot;, &quot;&quot;, true, &quot;Login1&quot;, &quot;&quot;, false, false))" id="Login1_LoginButton" /></td>
   </tr>
  </table></td>
 </tr>
</table>
    
<script type="text/javascript">
<!--
var Page_Validators =  new Array(document.getElementById("Login1_UserNameRequired"), document.getElementById("Login1_PasswordRequired"));
// -->
</script>

<script type="text/javascript">
<!--
var Login1_UserNameRequired = document.all ? document.all["Login1_UserNameRequired"] : document.getElementById("Login1_UserNameRequired");
Login1_UserNameRequired.controltovalidate = "Login1_UserName";
Login1_UserNameRequired.errormessage = "User Name is required.";
Login1_UserNameRequired.validationGroup = "Login1";
Login1_UserNameRequired.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
Login1_UserNameRequired.initialvalue = "";
var Login1_PasswordRequired = document.all ? document.all["Login1_PasswordRequired"] : document.getElementById("Login1_PasswordRequired");
Login1_PasswordRequired.controltovalidate = "Login1_Password";
Login1_PasswordRequired.errormessage = "Password is required.";
Login1_PasswordRequired.validationGroup = "Login1";
Login1_PasswordRequired.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
Login1_PasswordRequired.initialvalue = "";
// -->
</script>

<script src="/Aspnet2/WebResource.axd?d=ueV_pfrPOMU9isX4kZC2Gw2&amp;t=632496236232079354" type="text/javascript"></script>


<script type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
    ValidatorOnLoad();
}

function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    else {
        return true;
    }
}
// -->
</script>
        </form>
</body>
</html>

Test Page in Firefox

This is, needless to say, far from optimal. There is a huge amount of semantic nonsense in this document. We start off with the delight of tables for layout, along with an extensive array of JavaScripts (most of them even being inline, wouldn’t you know it).

So, the obvious question on anybody’s mind: Does this mess actually validate? Miraculously, it does, believe it or not. So Microsoft does seem to care a bit about validation; the question only remains, do they care about the rest of the spec (semantics, etc)?

On the upside, ASP.NET 2.0 (similar to 1.0) also outputs UTF-8 by default, and does so via the HTTP Response Header (not any meta elements).

There’s one thing that’s still on my mind. Lachlan asked me on MSN what the menu on the toolbar displaying “Internet Explorer 6.0” he saw on my previous screenshots was all about.

Here’s a list of items on that menu:

The Funny Toolbar Menu

Weird; what’s this menu all about? It allows you to select the schema according to which it validates your markup. Wow, it validates?

But before we get to that, I want to state the obvious, just for the record. Firstly, the first three items on that list just doesn’t belong; it encourages proprietary schemas which just can’t be tolerated. Secondly, the following items (I believe) belong on that list too:

(Insert: This is assuming that HTML 4.01 on the previous list actually means HTML 4.01 Strict, which it doesn’t as we’ll find out later.)

Actually, there isn’t really much excuse left to use Frameset and Transitional. Markup purists might like the following improved, albeit stricter list more:

A feature like that drop-down menu might have been handy as a doctype chooser. However, it isn’t that at all. Actually, no matter what you select on that menu, your doctype will remain precisely what it is. Also, the default option on that menu is Internet Explorer 6.0, while the default doctype is XHTML 1.1. Huh? And believe me, those two schemas (as you might guess) are very different.

I would recommend that the drop-down purely changes the doctype into whatever you select. In other words, it’s a doctype chooser as I mentioned above. And it shouldn’t do anything else, in my opinion. If any kind of validation is performed, it should be done according to the doctype, not according to some kind of menu external to the page.

Anyway, let’s go on to test the built-in validation capabilities.

The Validator in Action

To start with, I’ve added a few attributes to the body element which doesn’t exist at all in any schema. It underlines those attributes with a little squiggly red line (similar to the line in MS Word when it thinks you made a spelling mistake). When you hover your mouse pointer over it, a little tooltip appears telling you that it couldn’t find that attribute on that specific element. Looking good!

On to some more advanced tests. I added an a element directly inside the body element. With the schema selected as XHTML 1.1, it complained perfectly as it should that this element can’t be nested inside the body directly according to the schema. I then added the evil target attribute to the a element, and it complained that it couldn’t find that attribute on the element.

Now playing with the schemas, I changed the schema to XHTML 1.0 Transitional, and the red lines disappeared. Perfect! Just when I started to get impressed, I selected HTML 4.01 and the red lines still stayed away. Now the penny dropped: HTML 4.01 must have actually meant HTML 4.01 Transitional instead of HTML 4.01 Strict. This is silly, as this is not how the corresponding doctypes look. It should rather have said “HTML 4.01 Transitional” explicitly to avoid confusion. Who ever said HTML 4.01 can’t be strict? It indeed looks like the HTML 4.01 Strict option is the one that’s missing, not the HTML 4.01 Transitional option as I thought earlier.

Ok, I think we’ll call it a day. This isn’t all though – expect many more articles about the new ASP.NET soon!

ASP.NET 2.0 - Part 1

Screenshot 1

Beta 2 of the .NET Framework 2 is now up for public download, so I grabbed my free copy of the Visual Web Developer 2005 Express.

I can’t help noticing how Microsoft is starting to give away more and more for free. I believe they’re following Sun’s Java on this. At first, Sun only released the command-line compile and run tools for Java with loads of documentation, but with no IDE. That meant that you’d have to use a third-party IDE. When Microsoft released the .NET Framework version 1, they also put the actual framework with the command-line compile and run tools, along with all the API docs, up for free download with no extra licencing costs. But also, with no IDE. In order to get the crappy Microsoft Development Environment IDE (bloatware), you’d have to spend thousands of Rands (in South Africa) to buy the whole Visual Studio package. Very expensive (here), especially if you think you’re actually only paying for a very crappy IDE. Luckily, we have SharpDevelop, which is an open source IDE for the .NET Framework.

Now, Sun is releasing their own Java IDE called “Netbeans”. Ehm, and Microsoft is releasing “Express” (light-weight) versions of their various IDEs for free. Interesting…

Another interesting fact is that their Visual C++ and J# (a.k.a. Microsoft’s Java) languages up for download with .NET 2. In .NET 1, only C# and VB.NET was included for free. Very interesting, indeed...

I’m only really interested in C# and in ASP.NET, since that’s the only stuff that’s really worthwhile IMHO.

Screenshot 2

Visual Web Developer is basically Microsoft’s development environment for ASP.NET 2.0. That’s what we’re going to be focusing on today.

The first thing I noticed was that the IDE is terribly slow, like any other normal Microsoft product. “Bloatware” summarises it nicely, I believe! I actually had to go through a product registration procedure too, like with any other normal Microsoft product, although this product was actually for free and the registration didn’t involve me actually parting from my hard-earned cash. Still irritating, and so unnecessary… What a waste of my precious time!

Another thing I realised is that the concept of a simple, relatively minimalist IDE finally dropped at Microsoft’s camp. Most IDEs of today are terribly overcomplicated, with boxes and crap everywhere until you later don’t have any space left to do your work. Visual Web Developer is probably one of the first specialist IDEs I’ve seen that actually looks relatively clean, simple, and straight-forward straight out-of-the-box. All the features I actually want are still there, though. Maybe this is only the “Express” version though, I don’t know.

Microsoft still loves that ridiculous “start page” concept of them, though. A start page, IMHO, is only really useful in a web browser. I have yet to see a practical start page in an IDE.

Creating a new project, apart from taking a looooooong time to complete, is quite straight-forward. Now the fun starts. :-)

Ok, so I’m basically working with ASP.NET now. The interface is much like normal graphical desktop application development, actually. You have two views – “Design” and “Code”. This also reminds me of Ms Frontpage. You actually have a kind of a WYSIWYG interface, believe it or not. You have the various components in a box to the left, and you can literally drag-and-drop these components onto the page. There’s also a box to the right that shows you and allows you to edit the properties and events of the currently selected component. This feels so much like normal desktop application development that I can hardly believe I’m actually doing web development (if you can call this that)!

Screenshot 3

From the paragraph above, it’s very clear what approach Microsoft is taking to web development: Making it as similar as possible to normal desktop application development. This has been my feeling right from ASP.NET 1.0, but I’ve never actually used an IDE much with ASP.NET before this. I hate the Microsoft Development Environment, so I hand-coded everything myself in a text editor previously, but I’m realising that this is too impractical since an IDE is the only way to go with ASP.NET if you want to utilise all these features (now more than ever). Not like this actually helps you create a high-quality product, though, but more on that tomorrow.

The component selection is ridiculous! It’s extremely extensive. You have all the (improved) classic web forms along with data access controls, HTML controls, and specialist controls.

One example of a set of specialist controls is the Login system. Just drag-and-drop a login form, password recovery form, user registration form, etc onto your page. On the login form, just code event handlers for when the user is logging in, for when the user is logged in and for when the login fails. Easily create fields to display the currently logged on user. It practically does almost all of the work for you.

Screenshot 4

The data access controls are also really amazing. In ASP.NET 1.0, it’s already been quite clear that Microsoft is going the XML-route with data access. In ASP.NET 2.0 (similar to 1.0) , you effectively have Access, SQL and XML data access controls. You can also retrieve stuff out of a database and directly save it all into an XML document just by using built-in features (this has already been possible with the old ADO.NET, just for the record).

Many components rely directly on some form of data source to retrieve information from. For example, the Navigation list component. It can auto-generate a navigation list or it can load it from a data source, an XML document being a prime candidate.

Phew!

I’m signing off now; I’m already going at 2 pages as I’m typing this up in my word processor. Tomorrow some more! And, we’ll speak about standards too (don’t expect too much of the good stuff, though).

Tectonic Magazine

I just received the first edition of the Tectonic magazine in the post. This is the first African open source magazine, and apparently they're getting a huge response from the local community already so it indeed seems like their new venture is going to be successful.

The first issue is really great, focusing on a variety of open source issues. VoIP has been given a fairly large share of the first release, and they explain how to use Asterisk*, an open source VoIP system.

They also had some other interesting reviews, including the new Open Office 2.0 beta and Peanut Linux. There was a very interesting article about open source marketing that really got me thinking. But more on that later.

On page 15, there's a half-page insert titled Portable Firefox and Thunderbird. This is about the USB versions of these applications.

On the preview release, which was (and still is) available for download in PDF format, they had a rather large article about Firefox, but I think since this magazine is dedicated to open source they thought that most people that are interested in open source would already be using it. I guess they're right.

The preview release, as I just mentioned, along with the actual first publication are up for free download in PDF format from their website. Unluckily, you have to register yourself first.

If you haven't signed up already, you missed the first (free) actual hard copy, but you can still sign up for one or two more free physical magazines. This is only for South Africans, though.

Tectonic has actually existed for years now as an African online open source news site, but finally they're starting to publish magazines. Great job, guys, keep it up!

Ozzy Osbourne in George

The local newspaper reports that Ozzy Osbourne (his name sounds familiar, although I can't remember where I heard it) came to my hometown of George, South Africa to visit his friend Cora Smith for her 70th birthday. Reportedly, he stayed a few days in George before flying off to Ireland to get treatment after an accident on a quad-bike.

All isn't well, though. I hear that Ozzy is a self-admitted American satanist. My goodness!!! He actually admits himself to being both an American and a satanist? Terrible!

This shocks me a bit, because contrary to popular belief, not all South Africans drink a glass of fresh blood early every morning before going to work. We'll also have to get the sangomas (local witch doctors) in to remove all the evil spirits from the town, which might cost quite a bit of money!

I'm also a bit worried about more Americans entering the country. If it goes on like this, soon we'll be politely saying "Please pass the Ketchup" instead of "Hand over the tomato sauce, you bastard, or I'll shoot you!"

Sorry for the ridiculous fun I'm having today; a good laugh is healthy for you, they say!

Firefox Newspaper Article

I have been writing the following article for my local newspaper regarding Firefox. Feedback is very welcome, although I'll have to hand this in on Thursday this week at the latest!


Firefox revolutionises web surfing

Firefox is a revolutionary new open source web browser. It has been downloaded more than 45 million times in less than half a year since the first stable release due to the many time-saving features aiding not only the IT professional, but also the end user.

Tabbed browsing allows you to open multiple web pages inside one window. This allows you to read one page while another is loading in the background. It takes up far less of your computer’s resources than opening multiple windows and also helps reduce desktop clutter.

Firefox features a built-in popup ad blocker, which means that there’s no need to install separate toolbars with other annoying features just to get some peace and quite while browsing the web.

The integrated search feature enables you to type your search keywords directly into the search field on the default taskbar and also allows you to select the search engine to use. Search Google, Yahoo, eBay, and search for words one-click using Dictionary.com. Just press “enter” and a new tab will be opened with the results!

A built-in RSS (and Atom) feed reader allows you to easily stay up-to-date with your favourite blogs and news sites. An orange icon will appear in the bottom-left edge of your window when feeds are available; just click on it and select the feed you would like to subscribe to. Add it anywhere to your bookmarks, and a list of items will be displayed as a sub-list under the feed.

Easily add additional features by navigating your way to update.mozilla.org. Hundreds of extensions are available for download; just select which ones you would like to install, and Firefox will do the rest!

Web Developers will enjoy extensions such as the Web Developer Toolbar, Colorzilla and the Google PageRank indicator. The Web Developer Toolbar aids in debugging problems as well as allowing you to quickly and easily check the validation and accessibility of your web pages. Colorzilla provides you with a colour picker on any page and gives you the hexadecimal and RGB values for that colour.

Firefox can easily be customised to fit your individual needs and preferences. The option panel is extremely clean and simple, and allows you to find what you’re looking for fast! All the privacy options are listed in one place, making it a breeze to wipe your tracks if you like.

Since Firefox uses the Gecko rendering engine, one of the most secure in the world, the chance of getting a virus is also greatly reduced!

Firefox is available in many languages, including Afrikaans. It’s one of the most common and most popular open source packages available today and is available for all the common platforms like Microsoft Windows, Linux, and Mac OS X. It’s available for free; no evaluation times and software licencing fees! Download it today from http://getfirefox.com


This will be accompanied with the Firefox logo. So, what do you think?

GMail Graceful Degradation

Update: As Ben and Jop pointed out in the comments, this is actually not graceful degradation. This post should actually have been titled "GMail's HTML Alternative" istead of "GMail Graceful Degradation"; however, it's too late to change now since Blogger doesn't have SLUGs enabled, and since I can't set up redirects on blogspot, the links will break. Eish!

GMail without JavaScript GMail Compose without JavaScript

Some people believe strongly in graceful degradation when it comes to JavaScript, and others don't. I guess I belong to the former group, but regardless of what you believe, GMail as certainly taken the initiative!

From a page on the GMail Help Centre:

If you sign in to Gmail using a browser that isn't fully supported, you'll automatically be directed to a basic HTML view of our service. To make sure that you can always access your mail, we’ve developed this basic HTML view that is compatible with almost any browser.

Since your browser isn't fully supported, you might notice that some of your favorite features aren’t available in the current view, including the following:

  • Filter creation
  • Settings
  • Spell checker
  • Keyboard shortcuts
  • Address auto-complete

If you're directed to the basic HTML view of Gmail, but would like to try using the standard Gmail view, visit: http://gmail.google.com/gmail?nocheckbrowser. Keep in mind that standard view may not work, even with this link, if your browser isn't supported.

For access to all of Gmail’s features, sign in to your account from a fully supported browser, and make sure you have cookies and JavaScript enabled.

The If you sign in to Gmail using a browser that isn't fully supported also counts for when you have JavaScript disabled in your browser, no matter which browser you use.

GMail Settings Panel without JavaScript

All the features on the list in the quote above is quite logical and "additional" (by that, I mean that you will be able to get by without them) except for Settings. This feature is completely necessary for any user, and I see no reason why they can't offer a non-JavaScript alternative for that.

But apart from that, I think that Google is doing great work with this. I really hope they get the Settings panel sorted out, and I also hope this concept will go through to their other areas like the Google Maps (which currently don't seem to degrade so gracefully at all).

Would you trust this sign?

Please smoke; it's good for your health. Also, use IE.

Borland Kylix 3

Borland Kylix 3 Enterprise Screenshot

Borland Kylix is basically Delphi for Linux.

There are three flavours of Kylix 3:

For my purposes, I decided to install Enterprise on SuSE Linux 9.1. The installation is pretty straight-forward. When I tried to run it, though, it bitched about some GLIBC_2.0 it couldn't find. Luckily, a solution was only a Google away.

When running Kylix on a nice modern open source window manager like KDE, the first thing you'll notice is how ugly it looks in comparison to the rest of your desktop. Instead of sticking to something decent like the GTK, they decided to use some ancient GUI widget library.

For the rest, it's just plain simple Delphi. All the controls, and that terrible Pascal-based language. Don't expect any Delphi .NET though; that makes use of the Microsoft .NET Framework (which was promised to be cross-platform, yet Microsoft naturally didn't make any attempt to support any other OS than their own to date AFAIK). I really hope Borland integrates the next version of Kylix with Mono to take full advantage of the new era of programming!

On the upside, Kylix also supports C++!

This review might seem rather negative, but actually I'm very glad to see Borland making this kind of effort to support Linux. Although it obviously needs much more work, this already means that I have one less reason to use Windows for my studies. I'm definitely going to watch this IDE to see where it's going into the future. Great work, Borland, keep it up!

Open Office 2.0 (Beta)

Open Office 2.0 (Beta) Writer on Windows 2000

As I blogged earlier, the beta version of the all-new Open Office 2.0 has been released.

Over the last few weeks, I have been playing with the Open Office Writer a bit. On the downside, it seems slightly slower than Microsoft Office 2003. This is most likely because Open Office has been coded to be cross-platform and therefore has a lack of optimisation for the various specific platforms. (If anything, it would most likely have been optimised for Linux, not for Windows). However, on most other levels, this probably kicks Office 2003 all the way back to Microsoft's hole in the ground!

Explaining the last sentence in the previous paragraph, in Afrikaans we would have said: "Microsoft-sagteware is onderaards!". Literally translated, this roughly means: "Microsoft software comes from beneath the ground!", which actually means that Microsoft software is something which isn't fit to be in the presence of normal human beings.

Ok, enough with all the crap already. Let's go on and try to function on sanity from here on...

Open Office 2.0 (Beta) Writer Customise Dialogue

One of the first things you'll notice when running Open Office is how similar the UI looks to Microsoft Office (specifically 2003). I'm actually referring to the toolbar, because the rest isn't so similar. However, I like the nice colourful buttons and the general modern feel to the package.

The interface also seems much simpler and more user-friendly. Microsoft Office 2003 has a very fancy interface with all those sidebars popping up all over the place, but they can also get quite irritating and overwhelming after a short while. Open Office doesn't have all that extra clutter - it keeps what needs to be simple, simple.

One of the nicest features of Open Office is the ability to export directly to PDF format. I have learned to love this feature to bits!

Open Office can actually open Microsoft Office files. They did an incredible job of reverse-engineering Microsoft's proprietary formats, but complex layouts still break often.

Open Office 2.0 (Beta) Writer Gallery

Actually, Open Office can open many formats almost natively and even save back to them. When you open a Word Perfect document in Microsoft Office, you first get that whole "converting..." thing going on. Not with Open Office - it simply and easily opens a document from another package almost like it opens its own documents, and guess what, it can even save back to those other formats. I tried it with Word Perfect - it worked great. On simpler layouts, everything should work perfectly, but once again be very careful of complex layouts that use a lot of implementation-specific features.

In other words, opening other formats in Open Office is very cool, but isn't always to be relied upon.

Well, from now off onwards, I hope to get myself well accustomed to Open Office Writer and I hope to be using it exclusively one day for all my word processing needs. I also want to get some serious experience with the other Open Office applications in the suite. I think this is a great switch to make, especially because it's open source, free, built on open standards and totally cross-platform. Just as Firefox is proving to be some serious competition for IE, I believe that Open Office will soon be giving Microsoft a serious run for their money with Microsoft Office.

Kubuntu

Like Ubuntu Linux but hate the Gnome desktop? Switch to Kubuntu today and get Ubuntu with KDE as the default window manager!

Winter is Arriving!!!

For the people in Europe, America, Japan, and the rest of the northern hemisphere, summer is arriving; however, for the rest of us in the southern hemisphere, winter is coming.

I am very, very excited. Today, it has been raining all day, and it’s starting to get colder. We’re still having some rather harsh days though, so I hope winter won’t wait too long to come give us a visit.

Well, what can I say? I’m a European – I can’t stand the heat, I can’t stand the sun, and I can’t stand this relaxed African way of living!

My ideal weather is this: Permanently cloudy, and rain at least twice a week (preferably more). Luckily, I live in the Garden Route where it rains relatively frequently, but not frequently enough. The only time we experience similar weather to the weather I described above is during a few weeks of wintertime. I’m very excited; can’t wait!

Sorry, just had to share in this wonderful happiness I’m experiencing right now…

Copyright © 2004-2008 Charl van Niekerk. All articles are released under the Creative Commons Attribution 2.5 South Africa licence, unless where otherwise stated.