Grab this feed!

Archive for March, 2009

Why I love and hate JavaScript

Friday, March 20th, 2009

2009.03.16 OaD #75 | Consumed by code

JavaScript is a powerful client side scripting language.  It allows developers to quickly add/remove functionality.  It can be dropped in or generated from code.  In WEB 2.0, JavaScript is the backbone of creating rich user environments.  It is quite the catch 22.  Oh how I love to hate and hate to love JavaScript.

JavaScript can pass some rudimentary tasks to the client so, as developers know, this can save processing cycles.  Sometimes it can actually add processing cycles, so it definitely depends.  Saving processing time allows application to run faster for the most part.  You don’t have to wait for a complete page cycle to do tasks ala 1998.  Basically, users are not patient nor should they be patient.  They are used to the Desktop world.  I feel JavaScript helps bridge that gap for users; sometime developers/designers go overboard.

Ease of Use

Love
Javascript is easy to use.  Compatible with any web programming language: Classic ASP, .NET, PHP, Ruby, JSP.  It integrates easily.  It is fairly lightweight and the syntax is not mind-blowing.

Hate
It is a little to easy to use and users can directly access things in your page.  It gives the user more control than what they know.  Look you can easily change the background of any page in the address bar.

javascript:document.bgColor = ‘#000000′;void(0);
^ Paste that into the address bar and press enter -> changes the background

This only touches the surface of what JavaScript can do.  It can get into your web app and change things around.  I use it for quick fixes on the fly or to try different things.  You can’t rely on JavaScript it will only cause you pain.  Can you trust the DOM?  No.

JavaScript is an interesting topic still it was once vogue, faded out, and then came back (with velocity).  I think at one point in JavaScript’s history it was somewhat confused for Java, but I don’t think that is currently valid.  There are so many great JavaScript libraries out there that enhance the UI and the total web experience.

They are even available from the Google API with no API Key which is an added bonus; unlimited connections to boot.  I don’t think a lot of these effects/plug-ins would be as robust or available if not for JavaScript libraries and the good old Goog.

I really don’t hate JavaScript, but I think it can be overused or used incorrectly (say for validation).  Sure it can help in notifying the end-user of validation issues; it should also be validated on the server side.  Web development is a many layered burrito.

IE6 is obsolete

Sunday, March 15th, 2009

Can Internet Explorer 6 be considered a modern browser? It was released on August 27, 2001 (1).  Its market share has been dropping 28 straight months to a current low of 17.4% (2).  It peaked during 2002-2003 according to Wikipedia and W3schools.  I find it amazing that still after all these years it still has market share at all.  With Firefox, IE7, Opera, Google Chrome, how has it survived?  There are so many choices why are people still using it?  Corporate policies? Ignorance?  Lack of knowledge?  From a security standpoint it is down right frightening.

IE6 is terrible and shouldn't not be tollerated

It has been almost 8 years since IE6 was in a public beta test. IE6 should not be hanging around anymore. It hardly follows any spec on CSS or HTML. It is Microsoft’s this is how it should be done and falling short of expectations. Though in its time it was the browser of the Internet reaching upwards of 95% (2). I was never a fan, I used Netscape, which wasn’t much better, then Opera, and now Firefox.

Change is Hard

I don’t think we will ever know the true reason why people still use IE6.  If you do a quick search you find a ton of sites giving lots of reasons.  “They don’t know any better”, “they dislike change”, “because they have to”, “they have an old computer” (3) … all valid reasons why but that is not the point.  Change must occur.  There are so many better choices people must be informed.  This blog does not render correctly in IE6, its close but no cigar, and I think that is how people will ultimately change.  We must move forward and leave people behind so they will catch up.

The Future is Now

I stumbled across a nice little blog Lea Verou that is done totally in CSS3.  Very ambitous and is what a lot more sites should do.  We must move forward so others may follow.  We need more blogs pushing the newer standards.  I don’t think corporations can do this because they are afraid of losing sales or isolating customers; a valid point.  Is this a drawback of Corporations on the web?  That all forward progress must grind to a halt?  To a point.  Yes.

There are a lot of interesting things happening right now that I think correlate to aging technology.  The rise of netbooks hampers this forward progress.  Vista and Netbooks never going to happen.  Windows 7 and Netbooks sounds promising.  I feel we are stuck right now.  I think that is okay as things cannot be the same forever.  The one balantly obvious fact is Microsoft’s model of stitching the browser to the OS will never work.  It has to be independent to be effective.  The next iteration of Microsoft IE codenamed “Gazelle” finally sounds like they are becoming a modern browser (hopefully).  Looks like they are going to follow Google’s implementation of Google Chrome with a multi-process browser (each tab is a process).

The one certainty is that IE6 is dead and people need to be weaned off of it ASAP.

What browser do you use?

Adding Tooltips to Checkboxlist Items

Monday, March 9th, 2009

checkbox-1 The CheckBoxList control in Microsoft ASP .NET 2.0 can be quite limiting in features.  You can set a tooltip for the overall control; we can say “HEY THIS IS A CHECKBOXLIST”, which is great if that somehow helps you.  The true power would be in adding a tooltip to each individual item in the checkboxlist.  It would be nice to databind the field like other ASP .NET 2.0 Controls, but again no such luck.

To add a Tooltip to each individual item you are going to have to loop through the control.  By setting the title attribute to whatever you want will give you the individual control to name each checkbox in the checkboxlist.  This can done be done when pulling items in or on the case of a control firing.  Whatever works for you.

' Loop through CheckBoxList and set tooltip to checked if selected
For Each item As ListItem In CheckBoxList1.Items
If item.Selected Then
item.Attributes("title") = "CHECKED"
End If
Next

This is really just a quick and dirty way to add tooltips to checkboxlist items.  If you are already pulling in jQuery or some other library I would say use one of the many Tooltip plugins out there.  If you are not using any Javascript libraries this can be a quick way to help achieve a goal.  I’m not sure if this will work in Firefox, but if you are going for crossbrowser definitely check out a Javascript library.

Live Writer Test!

Tuesday, March 3rd, 2009

I’m testing to see if Microsoft’s Live Writer can hook up to WordPress and to see what it will look like.  This tool has been getting some good press lately.

:)

Hello World.

Categories