Woohoo, W3C created a new validator for us. Is YOUR site mobile-friendly?
Mine only reached 62/100, most penalties i got because of not using XHTML markup, using a table for layout and using absolute units in my CSS. I should improve, even microsoft.com scores 80 :)
2008-12-22
2008-12-04
SVG support in 2008
As I mentioned in an earlier post, I have been playing with SVG lately. I haven't done any SVG for many years and I was curious how the browsers support them by the end of 2008. The overall picture would be quite satisfying, if our good old friend Internet Explorer wouldn't ruin it all.
The root of all problems is that IE6 and IE7 (i have no info on IE8) do not support SVG natively but by using the external Adobe SVG Viewer, which is going to be discontinued BTW.
Other problems you will face as an SVG developer:
1. HTML and SVG, now put them together
W3Schools created a page explaining the various methods, they are only wrong with the inlining. Inlining IS possible and it works in all modern browsers (ie not IE :) ). After spending some time on it, you can even make it work in IE6, thanks to this guide. Inlining in IE7? If you know how to do it, feel free to share with the rest of us.
2. Create elements dynamically
To create SVG elements on the fly, all modern browsers have the createElementNS method. Explorer doesn't have this, you can NOT create SVG elements dynamically, no tweaks, no tricks. If you want something like that, fell free to use VML (bah).
SVG is great, you can do pretty cool things in pretty cool browsers, if you dare:)
The root of all problems is that IE6 and IE7 (i have no info on IE8) do not support SVG natively but by using the external Adobe SVG Viewer, which is going to be discontinued BTW.
Other problems you will face as an SVG developer:
1. HTML and SVG, now put them together
W3Schools created a page explaining the various methods, they are only wrong with the inlining. Inlining IS possible and it works in all modern browsers (ie not IE :) ). After spending some time on it, you can even make it work in IE6, thanks to this guide. Inlining in IE7? If you know how to do it, feel free to share with the rest of us.
2. Create elements dynamically
To create SVG elements on the fly, all modern browsers have the createElementNS method. Explorer doesn't have this, you can NOT create SVG elements dynamically, no tweaks, no tricks. If you want something like that, fell free to use VML (bah).
SVG is great, you can do pretty cool things in pretty cool browsers, if you dare:)
Save the developers - dead
Earlier this year i blogged about a website called www.savethedevelopers.org (link missing on purpose). Originally the site was recommending other browsers than Explorer 6, namely: IE7, Firefox, Safari and Opera. As for today the site redirects to a Get Internet Explorer page, more ironically if you do a google search for "save the developers", the same site appears on the top of the list.
To restore the healthy ecosystem of the Internet, I suggest all of us remove our links from this site:)
To restore the healthy ecosystem of the Internet, I suggest all of us remove our links from this site:)
2008-12-03
Geolocation solutions on the web
...ok, so you want a killer web app that will locate the position of the current visitor? No problem. Here are the tools of the trade. (Your requirements may vary, for me, i want Lat/Long information, with regards to the KISS principle)
1. IP to location databases
Typical providers include ip2location, ipligence, maxmind. They are usually expensive, static, and just too big. The concept is that you have a big database downloaded and monthly updated, and you can open that database to get the location info from whatever platform you want. Since IP addresses change dynamically i just don't see this method viable. You might consider them, if you need the information in an offline environment. Note that some of these providers offer a webservice also, to query results online. More about this later.
2. REST based services
You send an HTTP request and you get a parseable result with the information. I just tested NetGeo of these kinds. It is not maintained for several years thus giving pretty bad results (putting my Budapest location to Amsterdam).
3. REST based javascript APIs
I didn't really know how to name these. The principle is that you include a remote javascript file, and based on the requestor's IP the returned javascript code will contain a few function calls with the results already built in. For example in my case it will contain lets say a function my_city() {return 'Budapest';}. Extremely simple to use, maxmind and geoplugin offers such services.
4. The W3C API
It is expected that in the future all modern browsers (not counting IE ;) ) will conform to the emerging W3C standard. How will they do it? Its their problem, you just simply call a javascript function and have your Lat/Long info ready. At the moment the upcoming Firefox 3.1 seems to support this natively(!), while older Firefoxes can have the Geode plugin to produce similar results. I only tested Geode, but as it exclusively relies on WiFi positioning, without any fallback method, either it gives you some results (i never saw one), or it just flatly fails.
5. Other browser extensions
Gears have the ability to tell your location, so if you expect your visitors to have the Gears extension, you might as well rely on this. Simple and gave me a good result.
6. Combined methods
An interesting approach can be found here. It first tries to use the native API, secondly one of the extensions (including Gears), lastly it falls back to Google loader ClientLocation. Although the code is not very elegant and it has to include a lot of external files upfront, it is an approach that can gain some ground pretty soon.
7. Fire eagle [UPDATE]
Yahoo created fire eagle with the purpose to control what applications can access what level of location information (You have the same control with #4). Both the user and the consuming application has to be registered at the fire eagle website. The user is "responsible" to keep his location up to date either manually or with the use of an external application, and whenever an application tries to access this information, the user has to allow it through the fire eagle website. Under the hood FE tries to locate you automatically with method #4. I had one pain using FE: you cannot drag and drop the pinpoint of your location freely, and since it was not very confident with my address (Yahoo maps apparently has a typo in my street name), i couldnt set my exact location.
UPDATE2: There is an article on how to build an app to use FireEagle, you might find it useful.
Any other methods? Feel free to comment. For me, i will stick with #3 for now.
Happy geolocating!
1. IP to location databases
Typical providers include ip2location, ipligence, maxmind. They are usually expensive, static, and just too big. The concept is that you have a big database downloaded and monthly updated, and you can open that database to get the location info from whatever platform you want. Since IP addresses change dynamically i just don't see this method viable. You might consider them, if you need the information in an offline environment. Note that some of these providers offer a webservice also, to query results online. More about this later.
2. REST based services
You send an HTTP request and you get a parseable result with the information. I just tested NetGeo of these kinds. It is not maintained for several years thus giving pretty bad results (putting my Budapest location to Amsterdam).
3. REST based javascript APIs
I didn't really know how to name these. The principle is that you include a remote javascript file, and based on the requestor's IP the returned javascript code will contain a few function calls with the results already built in. For example in my case it will contain lets say a function my_city() {return 'Budapest';}. Extremely simple to use, maxmind and geoplugin offers such services.
4. The W3C API
It is expected that in the future all modern browsers (not counting IE ;) ) will conform to the emerging W3C standard. How will they do it? Its their problem, you just simply call a javascript function and have your Lat/Long info ready. At the moment the upcoming Firefox 3.1 seems to support this natively(!), while older Firefoxes can have the Geode plugin to produce similar results. I only tested Geode, but as it exclusively relies on WiFi positioning, without any fallback method, either it gives you some results (i never saw one), or it just flatly fails.
5. Other browser extensions
Gears have the ability to tell your location, so if you expect your visitors to have the Gears extension, you might as well rely on this. Simple and gave me a good result.
6. Combined methods
An interesting approach can be found here. It first tries to use the native API, secondly one of the extensions (including Gears), lastly it falls back to Google loader ClientLocation. Although the code is not very elegant and it has to include a lot of external files upfront, it is an approach that can gain some ground pretty soon.
7. Fire eagle [UPDATE]
Yahoo created fire eagle with the purpose to control what applications can access what level of location information (You have the same control with #4). Both the user and the consuming application has to be registered at the fire eagle website. The user is "responsible" to keep his location up to date either manually or with the use of an external application, and whenever an application tries to access this information, the user has to allow it through the fire eagle website. Under the hood FE tries to locate you automatically with method #4. I had one pain using FE: you cannot drag and drop the pinpoint of your location freely, and since it was not very confident with my address (Yahoo maps apparently has a typo in my street name), i couldnt set my exact location.
UPDATE2: There is an article on how to build an app to use FireEagle, you might find it useful.
Any other methods? Feel free to comment. For me, i will stick with #3 for now.
Happy geolocating!
Tags:
firefox,
gears,
geode,
geolocation
2008-12-01
The Julie Amero case
...ever thought of being a substitute teacher in the States? Forget it. Your life is endangered. Endangered by morons. I just came across this story today. A substitute teacher Julie Amero was prosecuted, because while she was substituting, some computers of pupils showed pornographic popups. Now she is a real talent to do that on purpose, since she cannot teach any more, someone please employ her as a computer security expert!
2008-11-19
Online collage creator
...so i was enthusiastic about the new Picasa collage maker, and i thought to myself i could easily re-create it in the web with the help of canvas, when ...darn ...i am late again:) Even without googling i accidentally came across the high quality implementation of Ernest Delgado (demo here, details here).
Good job Ernest, I will keep an eye on you!
Note to self: need more eyes.
Good job Ernest, I will keep an eye on you!
Note to self: need more eyes.
2008-11-16
Picasa 3 round the corner
Still beta (you can easily get it from filehippo), but brings around some nice new features. I have been playing around with it a little bit, things i liked most:
* Photo Viewer is a real eye-candy, it replaces your default application for double click, it loads relatively fast, and has some nice user interaction features (try your scroll wheel on the image itself, and on the film band).
* Collage maker - it has a killer interface to create the photo pile of your wish, resize, rotate, move your images one by one.
* Quick filter by starred, uploaded photos, videos, or even photos with faces. It doesn't include yet the face recognition and tagging that is already available in picasaweb.
* Movie maker - it is not really a movie maker, more like a presentation maker, but still, it puts much more control in your hands than before.
* There are some improvements on image import, and web upload, i haven't tried these yet.
One bug i have already came through, that whenever i restart Picasa, it keeps refreshing the thumbnails of the same images i recently added.
* Photo Viewer is a real eye-candy, it replaces your default application for double click, it loads relatively fast, and has some nice user interaction features (try your scroll wheel on the image itself, and on the film band).
* Collage maker - it has a killer interface to create the photo pile of your wish, resize, rotate, move your images one by one.
* Quick filter by starred, uploaded photos, videos, or even photos with faces. It doesn't include yet the face recognition and tagging that is already available in picasaweb.
* Movie maker - it is not really a movie maker, more like a presentation maker, but still, it puts much more control in your hands than before.
* There are some improvements on image import, and web upload, i haven't tried these yet.
One bug i have already came through, that whenever i restart Picasa, it keeps refreshing the thumbnails of the same images i recently added.
2008-11-14
FeedBurner vs. SimplePie
...ok, so for a while i was wondering why my website doesnt show my latest blog entries.
I am using SimplePie to fetch the latest RSS feed from FeedBurner and display the last five items. At the beginning i was suspicious of the cache mechanism, but even if i turn off caching completely, it will not fetch the latest feed. So i dugg myself into the internals of SimplePie and it turned out that when it fetches the feed from FeedBurner, it is presented a redirect to http://feedproxy.feedburner.com which indeed does NOT have the latest version. So the problem is not with SimplePie.
Interestingly this redirect doesnt show up when browsing or wgetting the feed.
As soon as i changed the user agent that SimplePie uses, the problem didnt show up any more.
Just add:
$feed->set_useragent('gecko');//anything but simplepie
Later doing some googling revealed this thread and a few others.
I am using SimplePie to fetch the latest RSS feed from FeedBurner and display the last five items. At the beginning i was suspicious of the cache mechanism, but even if i turn off caching completely, it will not fetch the latest feed. So i dugg myself into the internals of SimplePie and it turned out that when it fetches the feed from FeedBurner, it is presented a redirect to http://feedproxy.feedburner.com which indeed does NOT have the latest version. So the problem is not with SimplePie.
Interestingly this redirect doesnt show up when browsing or wgetting the feed.
As soon as i changed the user agent that SimplePie uses, the problem didnt show up any more.
Just add:
$feed->set_useragent('gecko');//anything but simplepie
Later doing some googling revealed this thread and a few others.
2008-10-31
Street view arrives to the Iberian peninsula
Apart from some new Italian cities, Barcelona, Madrid, Valencia and Sevilla are on the map now!
Enjoy the somewhat broken view of the Sagrada Familia:)
[via webisztan]
Enjoy the somewhat broken view of the Sagrada Familia:)
[via webisztan]
2008-10-29
Zend Framework chunks
Ever wanted to use just one part of ZF? Instead of deploying the whole ZF, now you can have just the dependent files thanks to Jani. More here.
BrowserPlus released to public
I cant wait to put my hands on it. Ajaxian wrote an article about it here.
2008-09-20
Google Chrome and the user agent strings
...ok, so as usually when i go on holidays something big is happening ... at least a new browser is being born!
When even all of my non-geek friends are talking about Google Chrome, then Google has shot a big gun again. It was completely kept secret as far as i know and out of the blue they introduce this new browser that has some really neat features despite being an early version. The fact that at the same time they implemented face recognition in Picasa was not even noticed by many, although it is just as well exciting (or worrying:))
I will not do any review of Chrome here, go and try yourself, however i link here a great article that explains how the user agent strings have developed over time. Really, i never knew why IE said "Mozilla"!
When even all of my non-geek friends are talking about Google Chrome, then Google has shot a big gun again. It was completely kept secret as far as i know and out of the blue they introduce this new browser that has some really neat features despite being an early version. The fact that at the same time they implemented face recognition in Picasa was not even noticed by many, although it is just as well exciting (or worrying:))
I will not do any review of Chrome here, go and try yourself, however i link here a great article that explains how the user agent strings have developed over time. Really, i never knew why IE said "Mozilla"!
Subscribe to:
Posts (Atom)