Mark's Stuff

My Foray Into Weblogging. Using this to store interesting items for later review.

Friday, October 17, 2008

What is jQuery?

I first heard of jQuery when Microsoft (actually, Scott Guthrie, the Microsoft VP for Developer Division) announced support for it (see the link below). Then, the .Net Developer User Group had a session on it last week. This is something simple, easy to implement and add to our toolkit, and can save a ton of time adding desirable features to our websites.

If you have not heard about jQuery before:

  • JavaScript library, just link a javascript file to your web page to enable it.
    e.g. : <script type="text/javascript" src="../jquery.min.js"></script>
  • a lightweight JavaScript library, only 15kb in size.
  • Licensed under GPL or MIT (any and all use is free, commercial or otherwise permitted)
  • supported browsers: Firefox 1.5+, Internet Explorer 6+, Safari 2.0.2+, Opera 9+

Good beginning description of it from Scott Guthrie’s blog (http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx):

A big part of the appeal of jQuery is that it allows you to elegantly (and efficiently) find and manipulate HTML elements with minimum lines of code.  jQuery supports this via a nice "selector" API that allows developers to query for HTML elements, and then apply "commands" to them.  One of the characteristics of jQuery commands is that they can be "chained" together - so that the result of one command can feed into another.  jQuery also includes a built-in set of animation APIs that can be used as commands.  The combination allows you to do some really cool things with only a few keystrokes.

For example, the below JavaScript uses jQuery to find all <div> elements within a page that have a CSS class of "product", and then animate them to slowly disappear:

clip_image002

As another example, the JavaScript below uses jQuery to find a specific <table> on the page with an id of "datagrid1", then retrieves every other <tr> row within the datagrid, and sets those <tr> elements to have a CSS class of "even" - which could be used to alternate the background color of each row:

clip_image004

Microsoft will be bundling and supporting jQuery from now on

Again from Scott Guthrie’s blog:

  • “Microsoft will be shipping jQuery with Visual Studio going forward”
  • “We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch.  The files will continue to use and ship under the existing jQuery MIT license.”
  • “will also distribute intellisense-annotated versions that provide great Visual Studio intellisense and help-integration at design-time.”
  • “add the jQuery library by default to all new projects.”
  • “We will also extend Microsoft product support to jQuery beginning later this year, which will enable developers and enterprises to call and open jQuery support cases 24x7 with Microsoft PSS.”
  • “Going forward we'll use jQuery as one of the libraries used to implement higher-level controls in the ASP.NET AJAX Control Toolkit.”

Here are some links on jQuery:

· http://jquery.com/

· Download: http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.min.js&downloadBtn=%3CSPAN%3EDownload%3C%2FSPAN%3E

· Documentation: http://docs.jquery.com/Main_Page

· Tutorials: http://docs.jquery.com/Tutorials

· Scott Hanselmann’s tutorial using jQuery in Visual Studio and Ajax and ADO.Net Data Services: http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx

Labels: , ,

Wednesday, October 15, 2008

Sorting out the different layers of virtualization | Virtually Speaking | ZDNet.com

Basic description of the different types of virtualization:

  • Access Virtualization
  • Application Virtualization
  • Processing Virtualization
  • Storage Virtualization
  • Network Virtualization

Sorting out the different layers of virtualization | Virtually Speaking | ZDNet.com

Labels:

Monday, October 13, 2008

Backup that USB flash drive

I had a problem with a flash drive this weekend, and it points to a problem that we all should be aware of.

Flash drives (those USB memory sticks) have a limited life to them. The cheaper ones (most all of those that you can buy now) can only be written to approximately 10,000 times. (More expensive drives can be written to 100,000 – 200,000 times, but all drives have a limited life that way.) Now, for most uses, that can be a very long time. But if you depend on a single drive for frequent usage, it can fail.

I have been using a Lexar 8gb ExpressCard SSD (solid-state disk) in my laptop for holding my ReadyBoost cache for Windows Vista. ReadyBoost improves system performance dramatically, especially in a laptop. However, after about 1½ years, the memory card failed. That’s when I found out about this limited life for flash drives. Although Microsoft says flash drives for ReadyBoost should last 10 years, my device may have had a defect, or a bug in Vista that was fixed may have caused extra unnecessary rewriting of the device when resuming from standby (which I do all the time instead of shutting down). For now, I am just getting another memory card and doing the same thing. If, in another 18 months, it fails again, then I will reconsider more expensive memory, but $47 for 18 months of use is not a bad trade-off.

So, if you are using a USB drive to do frequent backups (that’s you, Dad), you should be aware that the drive could fail, and have an alternate storage of that data. If you are backing up your QuickBook files to a USB flash drive, make another copy of that drive each time to another device, preferably a hard drive with better life. Or maybe an online backup like using Mozy, Windows Live Skydrive, or even just storing it in a Gmail account.

Labels: ,