Chrome, webdev

Why Chromebook Is Perfect For Schools?

All the main reasons in less then 133 seconds.

For teachers, you might want to check the section of ‘Education’ tools in the chrome web store. It’s full of powerful apps.

For students, Chromebooks are fast, simple, and secure, and these benefits can be quite powerful in the classroom. Chromebooks increase time spent learning with a super-fast bootup, protect against viruses with built-in security features, and provide seamless access to all the great educational apps on the web. Plus, regular updates from Google mean that Chromebooks actually get better over time, saving thousands of dollars on maintenance and software upgrades.

Standard
Chrome, HTML5, webdev

ChromeOS In 5min Video



In this short screencast I’ve touched on:

  • What is ChromeOS?
  • Why it’s great for users, business and developers.
  • How a good web apps look like.
Until next time, please be strong and happy.
Standard
Chrome, webdev

Want To Test Drive Chrome OS On Your Laptop?

Here is a place with nightly builds for VMWare, VirtualBox and your USB. If you wish to see the magic on your netbook… why don’t you start with a USB build and see how it’s working for you?

Good luck & be strong.

P.S
(!) Important tip… go to the virtual box setting pane and under CPU make sure the ‘PAE’ is checked. This will save you a lot of white hair.

Standard
HTML5, webdev

Web Workers (Part 1 Out Of 3)

Short History

In modern web applications there are lots of cases when we need to do some stuff in the background. The only way to do it today in most of the modern browsers is by using Web Workers. Web Workers provide a standard way for browsers to run JavaScript in the background.  It let you spawn multiple “threads” that all run at the same time. For more about multithreading this is a good place to start your reading.

Web Workers can do lots of things:

  • Complex mathematical calculations
  • Make network requests
  • Access local storage

all while the main web page responds to the user actions (e.g. scrolling, typing some text or clicking around your app).

What is a Worker?

A ‘worker’ is a script that will be loaded and executed in the background. Web Workers provide a way to do this seamlessly, for example:
new Worker(“worker.js”);
The above will load the script, located at ‘worker.js’, and execute it in the background.

There are some big (very big) limitations (but please don’t worry, we will see how to solve them in the next post):

  • Workers don’t have access to the DOM: No document, getElementById, etc. However, you can use setTimeout, setInterval, and XMLHttpRequest.
  • Workers don’t have direct access to the ‘parent’ page.

Can We Use Web Workers?

In order to find out if we can use web workers we need to check if there is a Worker property on the global window object. If our browser doesn’t support the Web Worker API, the Worker property will be undefined.

isWorkersAvailable() {
  return !!window.Worker;
 }

Instead of writing this function yourself, you can use Modernizr to detect support for web workers (Pss… Modernizr is an open-source JavaScript library that helps you build the next generation of HTML5 and CSS3-powered websites by doing lots of work for you and saving you from reinventing the wheel again and again – Thank you @KuraFire  @paul_irish and @SlexAxton )

if (Modernizr.webworkers) {
  // window.Worker is available!
} else {
  // no native support for web workers
}

 

Short Example

 

//
// A simple way to find prime numbers
//
var n = 1;
search: while (true) {
  n += 1;
  for (var i = 2; i <= Math.sqrt(n); i += 1)
    if (n % i == 0)
     continue search;
  // found a prime!
  postMessage(n);
}

<!DOCTYPE HTML>
<html>
 <head>
  <title>Web Worker: The highest prime number</title>
 </head>
 <body>

  <h1>Web Worker: The highest prime number</h1>
  <article>The highest prime number discovered so far is: 
	  <output id="result"></output>
  </article>
  
   var worker = new Worker('highPrime.js');
   worker.onmessage = function (event) {
     document.getElementById('result').textContent = event.data;
   };
  
 </body>
</html>

 

In the next post I’ll dive deeper on more interesting stuff you can do with workers. We will see how to communicate with one dedicated worker and how we can share workers (just for fun).
Here you can continue reading the second part of this series.

More (good) sources

Standard
Chrome, HTML5

How Easy Is To Use A Chromebook?

Very easy and if you are a (happy) user of gmail your life will get better from the first minute you are logged in. If you have other email service it’s also cool. I’m using both yahoo and gmail on it and it’s working great with both of them.

The ability to run gmail in offline mode is also a doable on a Chromebook. It’s very useful, specially, to people the travel a lot and can’t count that their favorite airline will have wi-fi. I’m writing this post from a Chromebook… but since wordpress don’t have a good webapp with some offline capabilities – I’m using ‘Write Space’. Write Space is a customizable full-screen text-editor that lives in your web-browser. It is designed to minimize the distractions that come between you and your writing and the offline capabilities are really working.

If you are a new to Chromebook – check this one and a half minute demo:

Standard
HTML5, webdev

HTML5 Fields – What Can You Do With It?

HTML5 is the newest specification for HTML, the language that web browsers read to display web pages. HTML5 has many new features intended to make creating websites easier and people’s experience in using those websites better. Among those features are many enhancements to web forms. Here is a list of the major browsers that support these days the new features:

Another place to see which browser support what type of field is http://caniuse.com/#search=input

As a web developer these improvementscan save you lots of time and effort (psss… no java script is needed to validate your fields) in order to see them live I’ve created this ‘playground for HTML5 fields’ so it will be easy to ‘play’ and see what each field is giving you. Here is a basic set to kick things:


<form>
  <fieldset>
    <label>Required</label>
    <input type="text" required />

    <label>Email</label>
    <input type="email" value="some@email.com" />

    <label>Date</label>
    <input type="date" 
     min="2010-08-14" 
     max="2011-08-14" 
     value="2010-08-14"/>

    <label>Range</label>
    <input type="range" min="0" max="50" value="10" />

    <label>Search</label>
    <input type="search" results="10" placeholder="Search..." />

    <label>Tel</label>
    <input type="tel" placeholder="(555) 555-5555" 
     pattern="^\(?\d{3}\)?[-\s]\d{3}[-\s]\d{4}.*?$" />

    <label>Color</label>
    <input type="color" placeholder="e.g. #bbbbbb" />

    <label>Number Range</label>
    <input type="number" step="1" min="-5" max="10" value="0" />
  </fieldset>
<button value="Go">Go</button>
</form>

Good luck and try the JSFiddle link if you wish to fork it and see what are the fields are doing in each case.

Standard
Chrome

Activate Your Chromebook (While You Are On The Road)

  1. Plug in your Chromebook to a power outlet. Some Chromebooks come with a detached battery or with a battery that need some juice so insert the battery and plug it in.
  2. Start your Chromebook. Power up your Chromebook by pressing the power button on the top-right corner of the keyboard.
  3. Select your language settings. On the “Let’s get started” screen that appears, select the interface language you’d like to use by default. If prompted, select a keyboard input method, too.
  4. Connect to a network. Select a Wi-Fi network from the network menu.
    (!) Please make sure you’re not connected to a network that requires web-based authentication or security certificates, in other words, no ‘term & condition’ page you need to sign on before you get connection. If you are having trouble connecting? check out this Internet connection troubleshooter to diagnose your issue.
  5. Accept terms of service. Your Chromebook will then download any available system updates so you automatically get the latest features.
  6. Sign in with your Google Account. In the sign-in box that appears, enter your Google Account username and password and click Sign in. Make sure you sign in with your primary Google Account, because this account will be set as the owner account.

In case you wish to activate Verizon, first make sure you’re in an area that is covered by the Verizon Wireless Network before beginning the activation. To check if your location is supported, visit this site. Once you’ve verified that your location is supported, follow these steps to check your signal strength:

  1. Press Ctrl+Alt+T on your Chromebook to open a terminal window.
  2. Type the following command and press Enter to see information about your modem: modem status
  3. In the information that appears, check whether the signal_strength_dbm value is greater than -86 dbm.
    If it’s not, try moving to another location with better signal strength before continuing with the activation process.

==

Enjoy you new Chromebook and check out these powerful web apps to get you going. Here are some Tricks and Tips as well.
Standard
Chrome, HTML5

New Video Channel on Chrome OS And HTML5

After speaking in seven different events (during the past two months), I’ve decided to start a YouTube channel that will focus on ChromeOS, Chromebook and (of course) HTML5.
The channel will get its own page on this blog.
and as first step, I’ll put there a series of videos (5min each) that will cover subjects around the eco system of Chrome. The first three videos are:

Other videos like This Week In Google on ChromeOS will also be there.

There are some very interesting conversations going on G+ http://plus.ly/greenido feel free to put your voice there.

Standard
Chrome, HTML5, JavaScript, webdev

HTML5 Lastest Features

This slideshow requires JavaScript.

Here are some updates and new features you can use today…

  • Page Visibility API – know when your web app’s page is not visible and save CPU (and Al gore will love you! for helping us saving earth)
  • Web Audio API – Since < audio > had its limitations. Now you can have scheduling of your playback, real-time processing and analysis of the stream and even low-level audio manipulation. Go Have Fun… It’s all in Chrome 14 stable & ready.
  • Prerendering API – speed is the need and this API comes to help.
  • Offline support is going mainstream so first you wish to know when you are online (or not) and then use IndexedDB and other options to save time and data for your clients (on the client).
  • Web graphics enhancements: Beautiful image transitions and A 3D CSS shooter
  • Native Client launched in Chrome 14 – Now you can play some classics games on your Chromebook.
    • Secure cross-platform C/C++ environment for apps/extensions
    • Close to native performance in web applications
    • Extra security, with The Sandboxed inside NaCl and Chrome sandboxes (very far from ActiveX!)
Here are some short code snippts of what you can do today on morden browsers. If you wish to check the specific feature I’ll recommend canIuse.com

Page Visibility API

document.addEventListener('visibilitychange', function(e) {
  console.log('hidden:' + document.hidden, 'state:' + document.visibilityState)
}, false);

Prerendering API

< link rel="prerender" href="http://example.org/index.html" >

Online status

if (navigator.onLine) {
  console.log('ONLINE!');
}
else {
  console.log('Connection is not *good*');
}

Now it’s your turn… start leveraging them.

Standard
Business, Chrome

Chrome Remote Desktop – Work Like A Pro

What is it?

Chrome Remote Desktop BETA is the first installment on a capability allowing users to remotely access another computer through the Chrome browser or a Chromebook.
Yes! If you have install Chrome to your presents you can give them an extra support these days.

The goal of this release is to demonstrate the core Chrome Remoting technology. This version enables users to share with or get access to another computer by providing a one-time authentication code. Access is given only to the specific person the user identifies for one time only, and the sharing session is fully secured.

Chrome Remote Desktop BETA is fully cross-platform, so you can connect any two computers that have a Chrome browser, including Windows, Linux, Mac and Chromebooks.

How to share you computer? (please use with caution)

  1. Open a new tab in Google Chrome by clicking the open a new tab icon at the top of your browser window.
  2. Click the Chrome Remote Desktop icon in the Apps section to open the Chrome Remote Desktop app.
  3. Click Share this computer. The app will have permission to take the following actions:
    • See your email address
    • See your Chrome Remote Desktop computers
    • Receive and send chat messages
  4. A unique access code will be generated for each sharing session. Send this code to the person you’d like to share your computer with. For security reasons, we recommend reading this code aloud to him or her.

Once your friend enters the access code, the sharing session will begin and he or she will be able to see your computer screen.
You can click Stop sharing or press Ctrl+Alt+Esc (Mac: Shift-Esc) at anytime to end the session.

Access a macine that was shared with you

  1. Open a new tab in Google Chrome by clicking the open a new tab icon at the top of your browser window.
  2. Click the Chrome Remote Desktop icon in the Apps section to open the Chrome Remote Desktop app.
  3. Click Access a shared computer.
  4. Enter the access code provided by your friend.
  5. Click Connect.

When things are not working

I would check first the internet connection and then:
  1. Your firewall settings – Your computer’s firewall may be configured in a way that doesn’t allow Chrome Remote Desktop to work properly. Verify that your firewall permits outbound UDP traffic, permits inbound UDP responses, and allows traffic on TCP ports 443 (HTTPS) and 5222 (XMPP).
  2. Your network’s NAT Traversal policy – If your computer is on a corporate network, check whether your company’s network security policies prevent access to outside services that rely on peer-to-peer (P2P) connections (“NAT Traversal” policies). If so, you won’t be able to use the Chrome Remote Desktop app. This restriction applies when you and the other computer are not on the same corporate network.
For the ones that love to read code – This is the code that does this magic.
Standard