Archive for June, 2010

Internet Explorer 9 is the perfect browser!

Tuesday, June 22nd, 2010

Are you laughing? Do you think this is a joke? because nothing could be further from reality. It turns out that the new Internet Explorer 9 on track to be the best browser on the market, leaving far to browsers such as FireFox and Google Chrome …

Click for large view

According to tests performed by Microsoft’s IE9 scored 100% in every test.
The test consists of 192 tests with collaboration of the World Wide Web Consortium (W3C), the test includes testing of HTML 5, CSS 3, DOM Level, SVG … and a lot of things that god knows are

Well whether the result is 100%, you can see the entire test in the Windows Internet Explorer Testing Center I still can not believe it, as the saying goes “seeing is believing” but bueee… This would be a clear example of how to move from being the worst browser on the market to be the best and only one version.

Anywhere: Twitter JavaScript API

Tuesday, June 22nd, 2010

1 month ago Chirp was made, the official conference for developers of Twitter. And there were several developments around the world Twitter. Among them, a new page for developers of Twitter: dev.twitter.com , where we see new tools. In which we focus, being the closest to the theme of the blog is @Anywhere . @Anywhere is a Javascript API that lets you integrate Twitter with your site in a few lines of Javascript. Before you start using it to register as a developer you provide an API key, for it is the call for an application registration Anywhere . After this step, we must only add to the headers of our web page calling this script:

<script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&v=1" type="text/javascript"></script>

Once you add this script are the way to initialize @ Anywhere is:

twttr.anywhere(function (T) {
// Your code here ...
});

As you can see it calls a function and pass a callback function with a parameter T (you can call it whatever you want). Which will be executed once the script loaded Twitter @ Anywhere. With this API, now you can do the following:

  • AutoLink Twitter usernames
  • Hovercards
  • Follow Buttons
  • Tweet Box
  • User Login

I invite you to the try. From Wisecodes are preparing some demos that you’ll use to teach during these weeks.

Use Google Font Directory website to help you change the text to add a variety of fonts

Monday, June 21st, 2010

Every time they issue more and more APIs, and Google is one of the most free APIs. This time has presented at conferences Google I/O, made on 19 and 20 of May, Google Font API . This API helps you to add fonts in any web page. This is about as clear benefit:

  • Font Having high-quality open source
  • It works in most browsers
  • It is extremely easy to use.

You can see all the fonts available in the Google Directory of Fonts . For now have 18 sources, with variations in italics, bold, bold italic. In addition one of them has 10 different families. Therefore we have an extensive catalog that will allow us to another style to our website and get out of the typical universal fonts.

In addition, the catalog is very carefully because it has a tab for each of the fonts. Tab you can find the name of the designer, with a link to his biography and other personal data. You also have the description of the letterpress and the set of characters. There are also examples of texts in different sizes from 36px to 12px, in different colors, # 000, # 333 and # 666, and different variants, italic, bold and bold italic can see the example of typography Cararell sheet .

If you find interesting and want to see how to include it in your web tell you different ways, just by using CSS and Javascript.

Only with CSS

You have several ways to include the fonts on your website. The simplest of all is to include an additional style sheet:

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Font+Name">

Then simply use the font in your style sheet in the usual way:

CSS selector {
  font-family: 'Font Name', serif;
}

If you do not want to load all variants, the variants can specify that you want to add two points and variations you want separated by commas:

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Font+Name:variante">

If you want to add multiple fonts, it is necessary to make a call each of them, simply separate the names with pipes “|” is sufficient:

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine|Inconsolata|Droid+Sans">

And if you want to do everything at once just follow all the above rules and looks something like this:

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic|Inconsolata:italic|Droid+Sans">

Using Javascript

If you do not want the burden of your page is affected by having to solve other DNS servers and upload you can not control, you can try WebFont Loader. A Javascript API that gives you more control over the fonts loaded. This form is also very simple, but requires a minimum knowledge of Javascript. To add these lines into the head of your page should have everything ready for use

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js">
</script>
<script type="text/javascript">
   WebFont.load({
   google: {
      families: [ 'Tangerine', 'Cantarell' ]
   }
  });
</script>

This loads the fonts listed in families and if all went well and the browser supports these fonts will be added in the html classes’ wf-active “and” wf-family-type-active ‘(eg’ wf-Cantarell -n4-active ‘).

This allows us to use our font style sheet alternatives in case of not having the desired load of this:

 .wf-inactive h1 {
       font-family: serif;
     }
     .wf-active h1 { 
       font-family: 'Tangerine', serif;
     }

With Loader WebFont sources can apply to other providers such as called Books TypeKit or even make any font suppliers overnight specifying the supplier .

In the call to Loader WebFont can specify callbacks to run your own code at any given time. Calback functions of which are available:

  • loading() Called when all modules of web fonts providers (google, typekit, and / or custom) have reportadoq ue start loading fonts.
  • fontloading(fontFamily, fontDescription) is called when it starts charging each application for web typography. FontFamily parameter is the name of the font family, and fontDescription represents the style and font weight.
  • fontactive(fontFamily, fontDescription) Called when loading has finished each of the applications.
  • fontinactive(fontFamily, fontDescription) is called if an application has failed to load.
  • select() is called when all web fonts have been loaded or not you were able to charge, as long as at least one is loaded successfully.
  • inactive() is called if the font web browser does not support or none of the sources failed to load.

Google free command line tool to access Web services

Sunday, June 20th, 2010

Google announced a command-line utility called GoogleCL based on Python . The tool offers various Google services from the command line, including Blogger, Calendar, Contacts, Picasa, Google Docs, and YouTube.

You can download the Linux package or compressed tar file here .

Once installed, you can access Google services from the command line. Access to services is generally limited to a few commands, usually “Add / Upload,” “Delete” and “List.” YouTube, Picasa, Blogger and all let you add tags to your posts, and Picasa also lets you download your photos with one command “get”.

“List” can also give different arguments to define how results are returned as title, url, author, date, and location.

Members of Google Street View team, Jason Holt, and Tom Miller said the team hopes to have the tool included in Debian and Ubuntu repositories in time for their next release.

Five reasons why HTML5 is much better to Flash

Monday, June 14th, 2010

If the war was popular in internet browsers, then the standards, now is the HTML5 versus Flash . Which is better? – Why prefer one over another? I think HTML5 is the future. I also believe that Flash has always been a nuisance rather than an asset (and I think since 1999, eight years before it becomes a problem on the table by Apple ).

I believe the right way is to develop on HTML5 for everyone involved, and these are my five reasons why it is better to Flash:

  1. It is native. No need for plugins , extra amenities or load external components to the browser. Flash, unfortunately, being heavy and often need to consume so many resources faster the battery and use a large percentage of the processor.
  2. It does not belong to anyone, is a markup language that can be used by anyone and is supported by all modern browsers. Flash, however, is the owner, serves the interests of one company, Adobe. May be altered to taste them if needed (for whatever reason, economic, by company policy, etc.)
  3. Maintains the overall user experience the web, run the previous and next buttons in the browser, does not operate within a “sandbox” as with Flash, is not limited to the area assigned to the plugin.
  4. All items with all effects and all hierarchies needed to build a fully functional graphical interface to support a web application is 100% possible using HTML5 + CSS + Javascript. Flash was used as a replacement. Gmail is the perfect example. Even more so if viewed from a mobile device. Did you know that the version of Gmail for IPAD is much higher than the native application made by Apple?
  5. Adaptable, flexible, scalable platform. While insisting Adobe, Flash on mobile phones remains a goal too far, meanwhile build interfaces for the desktop or the mobile is quite real today on the two platforms.

Is there hope for Flash? Of course, but not in the platform development of applications or in building web sites made of 100% with this plugin. I think that Flash works well for games and animation elements for certain very particular, very far away from this “solution for anything” that Adobe (or Macromedia before being acquired) tried to sell for years.