I would like to sincerely thank everyone from MIND for being such a wonderful host, especially Sue Ching for allowing us to crash at her place, and Ramin and Terk Sean for bringing us around KL and bringing us to KLCC Twin Towers, and Sin Min for treating us to dinner, and naturally Serena for just being there to support me all the way when she wore our own SgDotNet shirt. Not to mention Fook Hwei for just being there and talking to me.
I hope this trip down would start a new beginning in our relationship with MIND and other user groups. I felt that this trip was quite successful, and I learnt quite a lot from the you guys.
Thank you all, and once again, thank you.
The pictures I took will be posted soon. I just woke up.
Well, I survived the 6 hours trip here. Apparently it was 6 hours and not 5, *groans*. But I survived and still alive and kicking. Thanks to the people at MIND for being such a great host and offering me a place to crash.
The first few pictures I took in KL were my host’s dog, and her puppies. They’re so cute! I’ll post the pictures later when I’ve got time. Had a fun time playing with the puppies. I can’t remember the name of the breed though. Oh well.
I did quite alot of reading during the bus ride, occasionally taking breaks off the book “Designing with Web Standards” to avoid puking all over the coach. I’m almost half way through. I’ll write a review on it when I’m done. If you notice, what I’m typing here is almost a review already. I’ll just copy and paste and add and brush up on the sentence structure to create a proper review.
It’s quite an interesting book that approaches web standards in a lenient way, coaxing everyone to eventually follow what XHTML and CSS were intended for.
I’ve completely finished the first part of the book, which is “Houston, We Have A Problem”, which talks about why XHTML and CSS is good, why customers should change their mindsets on legacy browsers, and so on. It’s more for the business side of web development, trying to convince the management that following the web standards are good, and that web standards are matured enough. Not my cup of tea, but I browsed through anyway, and learnt quite a few things about the history of the web, and how it evolved from a “snatching the pie” to a “sharing the pie”. I too think that it’s time we embraced the new standards and follow closely and strictly to it, but of course, the wonderful thing is they also provide a less strict version called the XHTML transitional, for people who are too used to the old style HTML. For me, I like to keep my code strict.
The second part of the book is more technical, and much suited for people like me. There’s a few things I’ll like to point out, that I find it very useful.
9 Rules of XHTML (from Designing with Web Standards)
- Start your html file with a proper DOCTYPE and namespace
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
(Who actually memorises these stuff anyway!? Here is the link to these templates – http://www.webstandards.org/learn/templates/index.html)
- Use META Content element to declare your content type
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″ />
- All elements and attribute names are in lowercase
<body> instead of <BODY>
- Put quotes to all attributes
<table width=”75%”> instead of <table width=75%>
- Assign values to all attributes
<td nowrap=”nowrap”> instead of <td nowrap>
- Close all tags
<p>Text</p> instead of <p>Text
- Close empty tags with a space and a slash
<br /> instead of <br>
- Comments should not consist of any dashes between it
<!– Test –> instead of <!———- Test ———>
- Use Markup symbols instead of the symbols themselves
< instead of <
Those are all about it. Surprisingly simple, don’t you think? Follow those closely and you will almost have a valid XHTML page. I’m still reading more stuff about how to code the entire page in pure Presentation and Structure seperately. I’ll post more when I’m through with it.
Here are some great links from the book.
Learn how to code css in the most experimental way ever.
Web Standards Project – Learn more about the standards in layman’s term
W3C Validation Service – Check if your webpage is valid
Tidy – convert your current HTML to a neat and almost proper XHTML
Well, I’ve got a presentation to do in the afternoon, and I’ve got to wake up in 3 hours. I’ll write more later today and post some pictures I took of the cute puppies.
Just saw an interesting book at Clementi Bookstore today.
Looks like a good book that I’ll pick up next time, or borrow it from the library. Reasonally priced too.
More about my life:
Today’s quite a tiring day. I’m sick again. Down with the big bug flu. I went to meet SIG^2 guys today to discuss some collaborations with them and SGDN. I guess the meeting went well. Hope everything works out fine.
I hope I recover from this flu soon. The medicine’s making me drowsy and tired so I can’t really blog anything today.
Read 1/4 of “Designing with Web Standards” today, still reading the 1st part of the book where they talk about the benefits and revolution of web standards, in the more business sense. That part is more for managers and such, but I guess I’ll just breeze through it to get a rough idea on the Web and its legacy.
Quite interesting discussions on how horrible web browsers were back in the early days. That’s actually one of the reasons why I didn’t hop on to the web development at that time, because it was just simply too tedious and too many code versions to write for different browsers.
But after reading a few chapters from the book, I’m starting to think that web development is really ready for me to take on, with it’s strict coding, and the trinity of web standards and development, plainly put, Structure(data), Presentation(layout) and Behaviour(scripting). I think it’s quite matured enough to start picking up web development seriously.
A first impression review on the book is that it really gives you the lee-way to choose what and how you want to code your html, and does not enforce you to only 1 strict possible way of doing it, but gives you a variety of options to choose from. It also has a quite open view on web standards, and it isn’t really an evangelist book that non-sensically press down dogmas and crazed purist thoughts on CSS and XHTML seperations. I like it’s open approach that allows you freedom of choice, but provides you with alternatives too. I’ll most probably stick to the strictness, coming from a C++ background.
Previously in 1996 when I wanted to go into web development, it was the hottest thing back then, I had alot of trouble understanding the loosely structured tags and inconsistencies of codes between browsers, and lots of browser checking codes, which basically pissed me off, so much that I threw a HTML book out of the window, literally. But with the XHTML standards that’s out now, and every browser is almost standardized to follow the web standards, I feel it’s finally time to come out my shell and plunge into the web development.
I’m still currently using tables to style my layout for my website, but after I’m finished with this book, trust me, I’ll start recoding everything from scratch to support the wonderful strictness of XHTML. Furthermore, I’ll write more about control development with XHTML STRICT DOM. Look forward to it.
I just borrowed this book, “Designing with Web Standards” by Jeffrey Zeldman, from the library today (just 2.5 hours ago actually). It was recommended by the guy who wrote “Creating Websites by Hand” in the previous post, “Some Website Tips“. Here’s his website. http://www.zeldman.com/dwws/
I’ve just started reading it, and it looks quite interesting, in terms of that it’s no ordinary “tutorial” book which teaches you everything, but more on coding design. It feels much like “Design Patterns” for websites.
So far, benefits of using CSS layout instead of table layout reduces your html code by more than half (wow… impressive), and because of that it improves the loading speed. The rest of the other benefits doesn’t really seem that much of a biggy thing to me, but I’m really more interested in how this way of coding will actually help in my creation of custom controls for ASP.Net.
A few things I must clarify with my previous post on “Some Website Tips“, for those who doesn’t know, those codes are actually for custom controls. Just to add on to what I mentioned earlier, if you write your own custom controls, you’ll end up having problems with your html close tags as it might have to exist in another file if you use the normal table layout concept. But if you use the CSS layout concept, meaning using <div> to style your layout, basically you can close your tags within the same file. So your entire custom control can exist within a <div> tag.
Now that’s what I call proper coding. For web development.
I’ll be going KL during this weekend (Saturday, 1 day) to attend the MIND meeting at the Twin Towers, so I might not be able to post on that day, but I’ll post some pictures on Sunday. I hope I survive the coach trip, 5 hours there and 5 hours back. *Groans*
Anyway, I’ve got to sleep soon, but I’ll leave you guys with a quote from Jeffrey Zeldman.
“Web Standards are a continuum, not a set of inflexible rules.” – by Jeffrey Zeldman
Just a link I’d like to share with everyone.
A friend of mine was asking me on how to formulate a regular expression for his particular string, well, being the lazy me, I couldn’t think of anything. Writing regular expressions is an art, that I don’t think I’ll ever get to that. So I recommended that link to him. It’s quite a useful place to search for already formulated and thought up regular expression for all the common expressions for your strings.
Another great tool to use when creating regular expressions is The Regulator. But apparently the site is down at this moment of writing. I’m not too sure what happened to it.
Anyway this is just meant to be a short post.
Creating Websites by Hand
I feel stupid after reading this article, because I’ve always been coding websites and writing the layout using <tables> and <tr> and <td>, but this article (yes, I’m kind of outdated) teaches you how to use the modern XHTML way to do it. It teaches you the basic stuff of dividing your code into layout and data (or text, whatever way you want to see it). Layout being the CSS file, and data being your text you wanna show.
I’m not much of a web developer, but I’ve recently learnt quite alot about web development, especially using CSS (Cascading Style Sheet) extensively. But this article brings it to an entirely whole new level for me. I’m quite excited to try it out.
Anyway I’ve been working on the SgDotNet website for some time, from time to time updating it, and improving it. But using <div> and CSS to completely disect your layout/style and data would be interesting to do, and I would love to try it out on the SgDotNet website.
Another thing I see this different way of coding your webpages would be dividing your webpage into sections, e.g. header, sidebar, menu, content. The thing about this, why I’m touching on, is because each section are enclosed in a <div> and the styles are controlled by your css file. Furthermore, creating your templates would be much easier using ASP.Net, i.e. Masterpages, because currently I’m using tables and it’s quite the mess. Using <div> tag to seperate it into different sections would be excellent in this case.
Oh btw, perfect masterpages framework to use. Grab it from MetaBuilders – MasterPages Templating Framework. It beats waiting for ASP.Net 2.0′s Masterpages.
Anyway, back to code.
in the header.ascx file
<% @ Control Language="C#" %>
<!-- add your inline code -->
<!-- add your content header -->
instead of doing something like this (which is what i’m currently doing)
<% @ Control Language="C#" %>
<!-- add your inline code -->
<!-- add your content header -->
Ok. Did I mention my html sucks? Did you know HOW freaking difficult it was to type those code? Can anyone tell me how to write html code in blogger?! Life would be SO much easier because I’ll be writing LOTS of code here! Dang.
Anyway back to that example. Notice how bad the tables method was? Basically there wasn’t a close table tag, i.e. </table> which totally sucks because you’ll have to close it somewhere. And it screws up everything if you don’t know where to close it. Bad coding. In my sense at least. Using <div> looks alot much better, well formatted, well structured, and it closes within the same control page. Perfect. Nothing to worry about closing tags.
Enough of my chattering. That was something I’d like to share with everyone. Hope you guys found it interesting. For those who are still stuck to tables, and do server-side web development, PLEASE take a look at this method. It’s much better and cleaner, and guarantees proper html structure, instead of putting your close tags in another file. And of course, the other benefit is that layout is seperated from data. Not quite an exciting feature for a developer like me.
As you can see, I diverge and converge quite alot on my thought process, branching out to various other sub-topics and sometimes never coming back to the original topic, but bear with me, I’ll try to do better as I write more.
Finally, I got my own blog. Do you guys know the hassle of actually thinking up a name, a nickname AND a sub-domain name for your blog when practically every possible name has been taken up? Anyway, just some introduction to this blog. It’s my own personal blog which I intend to put up anything I want, from quotes I find funny, to my own thoughts, to some interesting links I’d like to archive. Great place to share links and information. I’ll also be writing some commentary on the technology scene, if I have some quirks I’d like to bring up. Maybe some tutorials or even my up-coming presentations. I’ll also be customising my blog as time goes by, and put up some of my favourite links I go to, and more things to let you guys know more about me. So, I hope you’d enjoy my blog and my eccentricity.