Archive for January, 2008

How CSS promotes web maintainability

Posted in General
Post date: January 30, 2008

Continuing on with my foray into the world of CSS I have started scrutinizing every webpage I find. Using the web developer toolbar for FireFox I check almost every website I visit to see if they’ve implemented CSS. The results are quite interesting and here I have included some website images with and without their CSS styles applied.

First-off, download the web developer toolbar here for FireFox and see things like this for yourself: Download it Here

Once you have the toolbar installed you can see a website without its CSS by doing the following:

1) Navigate to the website you want to see
2) On the WebDev toolbar click CSS –> Disable Styles –> All Styles

www.Facebook.com

Naturally I wanted to show off a website that most of internet faring populace have visited at least once so I chose Facebook. The first image is the site with all its CSS styles enabled:

FB with Style:

Now heres what it looks like without style!:

Quite a difference! What makes this so amazing for me is the sheer power of CSS. Working with the HTML would be simple because it would be the straight forward content within HTML DIV elements which are easy to work with.

www.News24.com

The next target is South Africa’s most prominent news website. I was actually horrified when I saw this. I can’t even imagine what it must be like when someone asks their team to change something, it cannot be a pleasant experience!

Site with Styles enabled:

Now, for this next image I have disabled the styles and highlighted any table cell borders on the page using the WebDev tool. Imagine needing to work on the following HTML document:

There way too many nested tables there to work with. The reason I decided to highlight a news website was because of the disabled members of our community. If they have to try and use a screen reader on this website, the screenreader would be reading useless information to them and they would have no clue about what was going on in our country. Besides that fact, making just one small mistake in a nested table could the entire design of the website to fail!

If you now have the WebDev tool installed, go and test the following websites with AND without their CSS styles enabled.

1) twitter
2) jaiku
3) pownce
4) picknpay
5) BBC
6) CNN

My personal opinion is that the CNN website is probably the best CSS driven news website out their so kudos to them! If I had to choose betweening maintaing CNN.com or News24.com purely based on the HTML, I would choose CNN.com any day as my life would be so much easier!

Giving up on Digg.com

Posted in General
Post date: January 30, 2008

For at least 4 weeks now I have not been able to log into digg.com! This is driving me insane, I enjoy my time on digg, especially a lot of the political links. Whats more frustrating is that I cannot digg anything! Everynow and then it gives me false hope and says that I’m logged in, until I try digg something or submit something!

I have tried multiple browsers even, nothing works! I am not the only person experiencing this though. Here’s a fellow South African blogger who’s not getting any digg love: Whussup with Digg?!

So Digg, sort your shit out please.

Imod.co.za offers free Entrecard credits

Posted in General
Post date: January 28, 2008

So 350 Credits are up for grabs and ofcourse I will oblige ;) Not only is entry card an awesome idea but entrecard entrepreneurs are popping up all over. Check out the post here: HERE

Imod.co.za has become one of the highest rated blogs on our local www.amatomu.co.za feed aggregator and Christopher always has very interesting posts. Really worth the RSS feed subscribe!

Benefits of CSS web design

Posted in Web Development
Post date: January 26, 2008

I am by nature a web developer, not a web designer. So when I have been asked to design websites they honestly look like a 9 year old created something using frontpage. I recently decided that learning how to design websites would be a good idea because I can work on the performance of my web apps while designing them instead to trying to communicate this point through whichever random person gets contracted to do the actual design of the web application.

Over the next while I will focus on CSS in my blog posts and I thought it relevant to write to first post about the benefits of CSS design.

CSS (Cascading Stylesheets) works as a method to present content on a website, which content should be shown where and how. Up until now I have always just used HTML Tables to design the pages I have worked on. This becomes quite tricky after a while especially if you are working with a complex page. I am not saying that tables are never to be used but using tables to set the layout of your page is incorrect. I will go into more details concerning this in a later post.

Benefits of CSS:

1) Your website will download faster to client machines:
  A) When using tables, the browser reads your content twice. Once to layout the tables and a second time to fill the content of the tables.
  B) Generally, using CSS design instead of Table based design requires less code
  C) CSS styles can be stored in a separate document so that it can be cached.
  D) With CSS you can set the download order of content on your page, so text will download first and then the larger images can be downloaded

2) Your webpage will be more Search Engine Friendly as CSS content driven spiders can detect more content on better structured HTML code

3) Making your website more accessible becomes easier. If for example you need your website to be viewed on a mobile device, simply create a Stylesheet that caters to a mobile device. This way you only need to swap stylesheets instead of recreating whole web apps.

There are a quick few reasons as to why you should start looking at CSS driven design if you do not already use CSS.

Review: The Witcher (PC), damn hilarious!

Posted in Humor
Post date: January 25, 2008

So I don’t post a lot of game related stuff but this you just have to see! Is a video review of The Witcher for the PC. I cried with laughter, best ab workout I’ve had in weeks.

Please not that you need to be a gamer to understand this and should not be easily offended. Enjoy!

LiNQ to SQL giving way to LiNQ to Entities?

Posted in LiNQ
Post date: January 24, 2008

I have been trying to implement LiNQ to SQL where ever and whenever I can. It just saves so much time and effort with standard CRUD applications and especially for little import utilities. The company I work for gets multiple daily updates from numerous companies in .xls format and I’ve found that moving the import utilities over to the .Net framework 3.5 is saving me a lot of time and effort.

LiNQ is so easy to understand and quick to implement so its basically become the office benchmark. No more stored procedures for updating records and/or inserting records. Now I’ve heard about the Entity Framework for quite a while but haven’t really looked at it much. Since I am off work sick today I decided to have a look at it.

To be honest, it hasn’t immediately grabbed my attention. It seems to be very similar to LiNQ to SQL. I realize that its a rather broad generalization but in my case its true. So far all I’ve seen that the Entity framework basically just provides an abstraction layer for your database model so that when you make changes, you don’t need to rebuild your DBML structures. Please keep in mind I have only looked at this for an hour or so.

The biggestest benefit I can see is the interaction with databases other than SQL Server. This obviously has huge implications for those developers who don’t use SQL but since the company I work for purely works on SQL Server it doesn’t hold much appeal to me yet. There seems to be a massive overlap between LiNQ to SQL and LiNQ to Entities so my guess is after a year or two LiNQ to SQL is probably going to fall away quickly. I firmly believe Microsoft had their exceptionally lofty ambitions for LiNQ to Entities but they knew they would not be able to deliver on time so they pushed out LiNQ to SQL for the meantime to developers used to the LiNQ syntax.

From what I can see, the database modeling in LiNQ to SQL seems to be closer than that of the Entity Framework. The entity framework provides numerous other functions but I’ll include that in a later blog post.

Mark my words:
“LiNQ to SQL will give way to The Entity Framework withing 2-3 years”

Using Amatomu to show Entrecard Results

Posted in General
Post date: January 16, 2008

Just a follow up on my previous post. here are some stats from http://www.amatomu.com/ to show Entrecards Influence on the traffic to my blog:

graph

Using BlogRush to prove Entrecard Works

Posted in General
Post date: January 16, 2008

Since I still consider my blog to be a very new blog I generally try out any “free advertising” I can find. The 2 that I have found most beneficial are BlogRush and Entrecard. Here is the interesting fact, blogrush tracks some stats for you on a dashboard and have a look whats happened since I’ve signed up with Entrecard on January 13th:

graph

That is quite a spike in traffic! Now I know many of you will say that its junk traffic, but is any form of publicity bad? Is that even possible? Thats a debate for another time I suppose. Suffice to say that I am exceptionally impressed with my results from Entrecard!

LINQ: Using SqlMetal with VS Express

Posted in Development, LiNQ
Post date: January 15, 2008

There are quite a few of us that don’t have the luxury of sitting with Visual Studio 2008 and rightfully so many of us make use of the Express editions. Heres the problem though: What happens you want to generate a DBML file for a database that does not reside on your local machine and you cannot access the mdf and ldf files directly?

You use SqlMetal! SqlMetal is the tool used by LiNQ and VS to generate your DBML files. The good news is that you can use this manually! To generate the DBML file for a database on the server you simply to the following:

Step 1:
Open a command prompt and navigate to “C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\”

Step 2:
Make sure you have a connectionstring handy to copy

Step 3:
Run the following command at the prompt –> SqlMetal /conn:”connectionStringHere” /dbml:DatabaseName.dbml

And thats it! Obviously where I’ve entered “connectionStringHere” you need to enter your connection string between the inverted commas and where I’ve said DatabaseName.dbml you can enter the name you want for you DBML file.

Once this is done you can simply include this DBML in your Express Project and all the will generated as per normal procedure. What does confuse me however is why Microsoft gives us this file but doesn’t implement its full use in the express editions. It makes no sense to me!