Web Info & Tutorials

October 5th, 2007

WEBKIT JOINS OPERA WITH @FONT-FACE SUPPORT

Apple cares about typography, so it only makes sense that Webkit has joined Opera in supporting @font-face.

The Surfin’ Safari blog said it all:

WebKit now supports CSS @font-face rules. With font face rules you can specify downloadable custom fonts on your Web pages or alias one font to another. This article on A List Apart describes the feature in detail. All of the examples linked to in that article work in WebKit now.

@font-face is on the WebKit feature branch, and a nightly build of that is available. You can try it out here.

Just in time for Leopard ;)

October 5th, 2007

JOE WALKER SHOWS A TIP FROM DWR.NEXT

I asked Joe to show us something interesting that he is playing with on DWR and he quickly obliged by showing us a new file upload and download feature that allows you to do new fancy things with files.

What is cool about this is that the APIs from Java and JavaScript lands feel right in each, but to do this DWR has to do a lot of fancy work to hide the details.

In Java land you write something like the following, which uses Java BufferedImages.

JAVA:
  1.  
  2. public class FileUploader {
  3.   ...
  4.  
  5.   public BufferedImage uploadFiles(BufferedImage uploadImage, String uploadFile, String color) {
  6.     uploadImage = scaleToSize(uploadImage);
  7.     uploadImage = grafitiTextOnImage(uploadImage, uploadFile, color);
  8.    
  9.     return uploadImage;
  10.   }
  11.  
  12.   ...
  13. }
  14.  

But a BufferedImage means nothing to JavaScript, but that is fine... in JavaScript land you just use the nodes (or so you think).

JAVASCRIPT:
  1.  
  2. function uploadFiles() {
  3.   var image = dwr.util.getValue('uploadImage');
  4.   var file  = dwr.util.getValue('uploadFile');
  5.   var color = dwr.util.getValue('color');
  6.  
  7.   FileUploader.uploadFiles(image, file, color, function(data) {
  8.     dwr.util.setValue('image', data);
  9.   });
  10. }
  11.  

Anyway, let's watch Joe explain:


October 5th, 2007

PHOTOSHOP COLOR PICKER

John Dyer has seen other colour pickers but has become up with his possess that mimics Photoshop:

Some pickers essay to create the whole colouration transpose in JavaScript by art a 256×256 installation prefabricated of div. This is rattling slow, which is ground colouration pickers that go the JavaScript line ofttimes don’t entertainer the whole map, but instead exclusive 4×4 or 8×8 blocks.

Photoshop Color Picker

October 5th, 2007

LOAD BALANCING IN YOUR AJAX CODE

Voxlite

Lei Zhu developed a Flash site called Voxlite that allows you to send video messages to people. The application uses both Amazon S3 and EC2, and Lei decided to do load balancing between instances on the client side itself.

He wrote up his thoughts on Client Side Load Balancing for Web 2.0 Applications, and wants your comments.

His article discusses:

  • Information on to build a sample Client Side Load Balancing
  • Comparing Server Side Load Balancing to Client Side Load Balancing
  • How an actual Web 2.0 application is using Client Side Load Balancing to achieve reliability and scability
  • How to take advantage of Client Side Load Balancing with Amazon's EC2 and S3 service.
October 5th, 2007

CHECKERS WITH THE ISOMETRIC GAME ENGINE

It's Friday game day! Raphael has created an SVG based Checkers game using his Isometric Game Engine:

The Isometric Game Engine is a project to make cool games you can run in your browser. Checkers is the first game made with the engine, involving essential game elements such as creating a board, moving pieces around according to the rules, and capturing pieces.

You can take a peak at the code in its entirety and find out that he is a Steven Colbert fan.

Isometric Game Engine