Filtered by Web development

Page 26

Reset

Accessible Pop-Up script

June 8, 2004
1 comment Web development

HTML isn't what it used to be. ...2 years ago. Back then you could through in Javascripts, style tags and form tags all of the place and we did not care if the HTML was valid or not. What mattered was that it worked in Internet Explorer and Netscape. That's no longer the case. Now it needs to work and be correct. Actually you only make sure it's correct and then it will [hopefully] work automatically.

I like this pop-up script because it will work quite well even without Javascript enabled and does not require you to enter the href more than once. Worth keeping.

10 reasons for web standards

June 6, 2004
0 comments Web development

Great, yet small and neat, article here on web standards. Worth a read if you're still not convinced.

Basically, web standards are (as I've understood it) when you develop your HTML code without layout and use the power of cascading style sheets fully. Not only for colour and text styles but also for positioning. This very site is done with with very basic HTML and style sheets for layout. Admittedly there are things I need to learn still but at least I have a new copy of "Designing Without Tables Using CSS" here on my desk which I will read as soon as I finish my current book.

Jaguar cars website

May 24, 2004
0 comments Web development

Jaguar cars website didn't work with my browser Suppose you want to find information about Jaguar cars dealerships here in the UK. First you go to the search page and then click on any of the dealerships own sites which all look the same and remain under the jaguar.com domain name. Now, suppose you've got the currently best web browser which of course is Mozilla (I use Mozilla Firefox); you will then be told to piss off!

"We have not been able to identify the browser you are currently using. This could be due to the browser either being too old or too new."

Later I realised that there was a little puny link at the bottom to carry on despite the warning. Did it work then? Of course it did.

When I saw the in-your-face sorry, I reluctantly started Internet Explorer but that crashed a little later when I clicked on used cars, with a message that I should restart windows.

Two conclusions: 1) Accept minor differences between browsers. The content is what matters, not the pixels. 2) Jaguar should reconsider their web development team for a better one.

PlogRank - my own PageRank application

May 21, 2004
2 comments This site, Web development

Now I've done something relatively useful with my PageRank algorithm written in Python that I'm actually quite proud of. It's not rocket science but at least I've managed to understand the Google PageRank algorithm and applied it to my own setup. This application is very simple and not so useful as one could hope but at least I prove to myself that it can be done.

I call it PlogRank. As you might have noticed, most blog items here on this site have on the left hand side, beneath the menu, a list of "Related blogs". These are from now on sorted by PlogRank! Cool, ha?

The "Related blogs" work by specific word matching. Every blog item has a list keywords that I define manually through the management interface. The selection of keywords is helped by another little database that filters out all typical words. E.g. "PageRank" is a particular word and "page" is not; so selecting these keywords is very easy for me.

Anyway. What I do now, once every week, is that I load a huge matrix of all connections between pages. If this blog item has a link to PageRank in Python then that page increases in PlogRank. It does not effect this page. I then feed this into the PageRanker program I've written which calculates the corresponding PageRank for each blog item. Easy! The whole calculation takes only a couple of seconds with 30 iterations. The calculation is actually only a small part of that time because reading from and writing to the database is the real bottleneck.

So, the end result is that every blog item that has related links will show these links in PlogRank-sorted order. Isn't that neat?

Why should I use XHTML?

May 17, 2004
0 comments Web development

This site does not use XHTML although it will some time in the future. The next version of the IssueTrackerProduct will. I've never really understood why one should use XHTML but this site gives the answer:

"What's in it for me?
In the short term, probably not a lot, but the Web is moving very quickly and you always have to think ahead.
If using XHTML only helps to tighten-up your markup, getting rid of ambiguities and sloppy coding, then it's already improving the robustness of your pages across browsers."

and

"The use of valid XHTML helps to guarantee that any pages you build now will work well into the foreseeable future in all current and future browsers."

Good. Now I know.

My dissertation report

April 8, 2004
2 comments Web development, Mathematics

Now I have finished and submitted my dissertation. A great relief. The journey through it has been really interesting and I'm very please with it.

The title is: Building a web application for an on-line mathematics journal and the abstract reads:

"This project is about how to build an on-line journal for mathematics. This was done using the web application platform Zope and the programming language Python. It is now possible for people to register as members on the site and upload papers and write descriptive text for these papers that can be used in various abstraction methods. The report describes what technology techniques were used to accomplish this and the object structure that was applied. We will conclude by listing the shortcomings of the delivered web application and aspects that can be improved and some suggestions to possible solutions to this."

Truncated! Read the rest by clicking the link below.

XHTML, HTML and CSS compressor

April 7, 2004
16 comments Web development, Python

Last week Fry-IT released CheckoutableTemplates which is a templating module add-on for Zope. It includes a module called slimmer.py which can compress XHTML, HTML and CSS. The CSS had a flaw in it that I hadn't foreseen. This flaw arises when you use M$ Internet Explorer hacks like this for example:


#centercontent {
   margin-left: 259px;
   margin-right:249px;
   voice-family: "\"}\"";
   voice-family: inherit;
   margin-left: 271px;
   margin-right:251px;
   }

Now that bug has been fixed, so I give you: The XHTML, HTML and CSS compressor It's a little application of slimmer.py so that the compressing can be tested and so that one can see the effect.

Anti-email-harvesting with JavaScript

April 2, 2004
0 comments Web development

Anti-email-harvesting is when you, as a web developer, tries to make sure the spam bots can not scan your pages for email addresses and then bloat these email addresses with spam. There are several different ways of doing it, or should I say attempting to do it? None is perfect, otherwise we'd all know about it. For this site I use a technique described in the second part of this blog entry.

Now I've put together a little proof-of-concept by using a JavaScript again and modifying something ugly to something nice looking. The idea is that web developers have to render their HTML like this:


<span class="aeh">peter_at_peterbe_._com</span>

Note, that the class has to be "aeh" and the tag must be a span.

This page explains it further. What do you think? The rules can be changed but the effect is really good. People without Javascript support see the email address as peter_at_peterbe_._com which they'll just have to figure out just like they figured out how to disable Javascripts. And people with Javascript will see it as if it was written in clear text. Spam-bots won't see shit. Or will they?

UPDATE

I have upgraded the script a bit now so that it does complain about invalid HTML on spaces in the href attribute. It also doesn't use a span tag anymore. Just set the class aeh on the a tag. Lastly, it uses proper DOM manipulation instead of the hackish innerHTML gadget.

See it in action here

What's so bad about HTML guys?

March 20, 2004
2 comments Web development

Swedish 99Kronor.com decides to ignore the power of HTML completely. Their website is just one huge image with an image-map for the links. That one image is heavy to download and takes 15 seconds to download on a 56K modem according to Web Page Speed Report. This is considerable more than a few of their competitors I looked at as well.

The biggest problem is on the other hand that the pages are completely in accessible on basic browsers like mobile phone or PDAs. Blind or visually impaired people might as well give up on it. Not to mention the hassle in the future when they want to redesign things or change the content.