Zend Certified Engineer

phpguru.org

Quality PHP, Javascript and C# code

Firefox 3.5

July 3rd RGraph release


Programming , Web , Javascript , HTML5
3rd July 2009

[Direct URL for this article]

The weather is a little more comfortable (ie I'm not melting) so here's todays RGraph release. It changes the behaviour of the line chart slightly for the better, in terms of handling NULL values, allows multiple datasets with the Scatter chart (which are only really noticeable if you have lines enabled) and a few other minor things.

  • Better handle NULL values in the line chart
  • Multiple datasets are now permitted withe the Scatter chart
  • Miscellaneous improvements to the docs
  • Caching and performance enhancements
  • Scatter chart now allows multiple datasets
  • Scatter chart can now have a key

0 Comments...

RGraph featured in JSmag


Web , Javascript , HTML5
2nd July 2009

[Direct URL for this article]

JSMag has an article in their July issue rounding up various graphing libraries, of which one of them is RGraph. And I think it fares rather well. In case you're wondering JSMag is an electronic (ie .pdf) magazine covering all things Javascript, and I've previously written for it (June issue - canvas article).
0 Comments...

Mozilla Firefox 3.5 released


Web , HTML5
30th June 2009

[Direct URL for this article]

Months late (six I think) but well worth it, Mozilla Firefox 3.5 has finally been released. Lots of new things, including improvements to the canvas support, geolocation, private browsing, HTML5 video support and HTML5 audio support (to name but a few), which will surely help it maintain the title of number one browser available. Perhaps not the most popular, but that's slowly changing if the statistics I use are anything to go by. If anything, anyone who upgrades will be able to use my canvas based RGraph graphing software. I'd say that's reason enough alone to upgrade...


0 Comments...

Javascript registry class using HTML5 DOM storage


Programming , Javascript , HTML5
24th June 2009

[Direct URL for this article]

This is a simple wrapper around the local and session storage API. It doesn't do anything special, it's just a nicer API.

Storage type: Name: Value:    

You can get the code here.

Usage

// Create the registry, this can be "session" or "local" and defaults to "session" anyway.
settings = new Registry('session');

// Store something in the registry
settings.Set('name', 'value');

// Get it back from the registry
myVar = settings.Get('name');

Compatibility

With it being HTML5, only the following browsers are supported:

  • Firefox 3.5
  • Safari 4
  • Internet Explorer 8 (!)

Update - 27th June 2009

Just read that if you want to find out what's in the storage areas, you can find that information out by using the "databases" option in Safaris introspection tool. Very useful.


0 Comments...

June 20th RGraph release


Programming , Web , Javascript , HTML5
20th June 2009

[Direct URL for this article]

Morning campers. This release adds persistent annotations using HTML5 DOM storage. A feature that is part of Firefox 3.5, Safari 4 and MSIE 8. Annotations continue to work on Chrome 2, but simply will not persist across page refreshes. A few other little things have been updated and refined, including:

  • Code optimisations
  • Persistent annotations
  • Labels can now be shown above bars on basic and grouped bar charts
  • Connecting line can be shown on the Scatter chart

0 Comments...

HTML5 DOM Storage


Programming , Javascript , HTML5
14th June 2009

[Direct URL for this article]


This example will only work on Firefox 3.5, Safari 4 and (shock!) MSIE 8.

What is it?

HTML5 DOM Storage is something new in HTML5 which can be used to store data in the users browser. It has a few advantages over cookies:

  • You can store more data than cookies (roughly 5-10k)
  • It doesn't get sent back and forth to the web server
  • Simpler to access

Browser support

At the moment (14th June 2009) browser support is limited to the following:

  • Internet Explorer 8 (!)
  • Firefox 3.5
  • Safari 4

Because client support is limited, you can't really use it yet on public websites. However on internal websites where you have some degree of control over this, it wouldn't be out of the realms of plausability to use it.

Firefox has supposedly supported this since version 2, but the documentation refers to something called "globalStorage" instead of "localStorage", so who knows.

Possible uses

Use your imagination. Without thinking further about it, I'd be hesitant to store sensitive information using it, but because you can store all sorts of data in there (eg user prefs), and because it doesn't get sent back and forth to the server, it has the potential to lower bandwidth bills.

Example code

Using it is very easy. You talk to it by simply using an associative array. You do need to know the correct key in advance though, so this does afford some degree of anonymity. I wouldn't rely on it for security though. To set something you do this:

window.localStorage['myData'] = 'foo';

And to get something back you simply read that same array:

var blarg = window.localStorage['myData'];

Yes, I know what you're thinking: "Bugger me senseless that's hard". Well... yeah. There's also window.sessionStorage which as the name suggests is limited to the current session, and when the session ends (ie you close the window) the data goes. In my tests in Firefox, sessions were limited to tabs - so different tabs means different sessions.

References

The Quirksmode article was very useful to me in figuring it out, so I suggest you read that.


0 Comments...

June 6th RGraph release


Programming , Web , Javascript , HTML5
6th June 2009

[Direct URL for this article]

As we edge closer to Firefox 3.5 being released, so does RGraph, and I get less and less to do. As such, this release fixes only a few things, and doesn't add any ground breaking new features.

  • On graphs that support tooltips, you can now have tooltips at the same time as context menus
  • Fixes to hiding the palette in Chrome
  • Fixed a palette resizing bug
  • Made "expand" tooltips a little smoother
  • Changed name of ShowPalette function to RGraph.Showpalette
  • Fixed minor Pie chart tooltip/cursor bugs

Download »

0 Comments...

[Article index]

Counter