Web Info & Tutorials

March 17th, 2008

LIQUIDITY SPECULATION THE BIGGEST PROBLEM FOR LEHMAN: BMO

“Similar to Bear Stearns, the large venture for Lehman Brothers is the venture that erst reflection begins, it becomes a self-fulfilling prophecy, and no take of liquidity module be sufficient”

The large danger to Lehman Bros. Holdings Inc. shares in the nearby forthcoming is reflection most the firm’s liquidity, according to Bank of metropolis shrink martyr Lazarevski, in a investigate state to clients … via Market Watch

March 17th, 2008

PROTOSAFE EASES COMPATIBILITY FOR PROTOTYPE

With so many new components being developed in a variety of different of JavaScript libraries, it’s a natural expectation that sooner or later, you’re going to want to mix and match these components within your application. Sometimes though, it’s not that easy due to architectural conflicts between different libraries. John David Dalton set out to minimize this pain via his new project called ProtoSafe.

I started ProtoSafe in response to a couple of posts on the Prototype Core Mailing list written by developers frustrated with Prototype’s 3rd party compatibility issues. I did some digging and found a post my Mislav Marohnic (here) explaining an easy way to keep Prototype out of the global namespace by simply wrapping everything in a self-executing anonymous function.

I asked John to explain the best use case for Protosafe and how it helps:

Prototype extends native data type prototypes which makes it very convenient for the developer but when interacting with 3rd party code not written for Prototype, these prototype extensions can cause compatibility issues. The most common is the Array for-in loop issue where by doing a for in loop over an array you get its indexed values plus the method names of all the added helper methods.

The benefit that ProtoSafe provides is that it allows Prototype to be used alongside 3rd party code without causing these compatibility issues.
Also it can be run against multiple frameworks which is good in the widget environment.

The demo page shows MooTools,Prototype,Dojo,YUI,jQuery all running on the same page.

Some highlights of ProtoSafe are:

  • It allows Prototype to work with 3rd-party scripts (no Array for-in
    loop pollution).
  • It works with Prototype 1.4-1.6.0.2.
  • Custom Packer3 that supports Prototype 1.6+/Scripty 1.8.1+
  • Only 3kb gzipped, less when compiled into the standalone js.
March 17th, 2008

CVI_TEXT_LIB: CROSS API TEXT STROKING

Christian Effenberger, or Mr. Canvas as we think of him, has come back from a data recovery nightmare with a new library, cvi_text_lib, that supports stroke text capability for Canvas & VML.

It uses unobtrusive javascript to keep the code clean and it works in all the major browsers - Mozilla Firefox 1.5+, Opera 9+, Safari and IE6+.

Features

  • supports Canvas and VML (identical representation)
  • font format supports moves, lines and curves (bezier & quadratic)
  • font characters 30-127 and 160-255 (charset UTF-8 or ISO-8859-1)
  • font type (built in) is a sans-serif multiple master single
    line stroke font, similar to "VAG Rounded" and "DIN 17"
  • expandable with custom font types/faces
  • font size is limited to min 1 max 99999 default is 12px
  • font weight is limited to min 1 max 400 default is 100%
  • font width is limited to min 10 max 400 default is 100%
  • font spacing is limited to min 10 max 1000 default is 100%
  • uncompressed lib is 32 KBytes (inc. sans-serif font)
  • the integrated sans-serif font is also adaptable for SVG

Here it is at work:

HTML:
  1.  
  2. <script src="cvi_text_lib.js"></script>
  3.         var context = canvas.getContext('2d');
  4.         set_textRenderContext(context);
  5.         if(check_textRenderContext(context)) {
  6.                 ...
  7.                 context.strokeText(text,x,y,fontsize);
  8.                 ...
  9.         }
  10. </script>
  11. <!--[if gte IE 6]>
  12.         if(check_strokeTextCapability()) {
  13.                 ...
  14.                 string = get_strokeText(text,x,y,fontsize)
  15.                 document.getElementById("div").innerHTML += string;
  16.                 ...
  17.         }
  18. </script>
  19. <![endif]-->
  20.  

CVI Text Library

March 17th, 2008

MOO SNIPPELY - MANAGE YOUR CODE SNIPPETS LOCALLY

We all have bits of reusable code that we store in some fashion. These snippets prove to be invaluable at helping to not "reinvent the wheel" so storing them in a safe and convenient place is important.

The MooTools team wants to make it easy for you to store your snippets easily through the use of their new Adobe AIR application, Snippely. Using the MooTools JavaScript library and the AIR SDK, Valerio Proietti and Tom Occhino created a desktop application that allows easy storage of both code snippets and notes about the code.

When we were thinking about what type of application to make our AIR playground, we tried to think of something that we'd want to use ourselves. Valerio and I are notorious for storing countless bits of code in all sorts of different languages all over our hard drives, and thought it would be nice if we had a central place to store and organize those bits of code. We came up with the idea of 'snippets', and an application called Snippely.

The nice thing about this is that they've designed Snippely so that you can organize snippets by groups and that a snippet entry can consist of multiple snips or notes.

Finally, those looking to get into AIR development will certainly benefit from the fact that the Moo team has released the app as an open source project under an MIT license. The code for Snippely is hosted on Google Code and is available for you to review.

March 17th, 2008

DOJO STORAGE UPDATED FOR 1.0

Brad Neuberg, a partner of crime on the Gears team, has released an update to Dojo Storage that has it cooking with gas on the new Dojo 1.x codebase:

Dojo Storage makes it possible to store large amounts of data (hundreds or megabytes of K) on the client-side, way beyond the 4K limit of cookies. Developers are given a simple key/value storage abstraction, similar to a hash table. What makes Dojo Storage unique is that it automatically determines the best way to achieve this. If Google Gears, a small open-source plug-in that teaches current browsers new tricks, is present then this will be used for storage; if the browser supports HTML 5 DOM Storage, such as Firefox 2, then this is used; and finally, if none of the others are available, then a hidden Flash applet is used to store the data permanently. There are even Adobe AIR storage providers (thanks to SitePen and Adobe) if you are running in an AIR environment!

Dojo Storage has been around for a few years. However, when Dojo made the big move to the Dojo 1.0 architecture, the Flash and HTML 5 storage providers broke; plus, new versions of Flash and new browsers made the old design inefficient. I have seriously re-factored the Flash storage system to be much faster and simpler and fixed bugs in the HTML 5 and Gears storage systems. There is now a new storage.js profile build that you can grab and include in your page to easily use Dojo Storage with the three main browser storage providers: Gears, HTML 5, and Flash. The new Dojo Storage will come out as part of the Dojo 1.1 release coming soon.

I've created a screen cast demoing the different storage providers in action:


March 17th, 2008

IE 8 CONNETION PARALLELISM ISSUES

Now that we hit our safekeeping on IE 8 beta, we wager developers investigating the different features. Ryan Breen continues IE 8 tests on the newborn unification limits and parallelism:

A whatever weeks ago, I discussed IE8’s reinforced unification parallelism, specifically the process from 2 concurrent connections per patron to 6. One unstoppered discourse was the amount variety of connections allowed — my reflection was that the IE aggroup would follow with a max of 6 kinda than manifold that continuance as well.

I was wrong. The newborn max is an staggering 18 concurrent connections (editor: restricted to 3 hostnames, you crapper intend more concurrent connections with more hostnames).

This is actually slightly faster than the CNAME gimmick practical to preceding IE versions as it does not incur whatever hostname partitioning outlay when establishing the prototypal connections.

Sounds good! However, then Ryan unconcealed whatever fantastic results. When streaming tests against a dreamhost covering there would be whatever downloads that would be rattling andante indeed, resulting in worsened action than before. Ryan has a hypothesis:

I venture that my hosting bourgeois (Dreamhost) exclusive can’t primed up with the hammy process in unification parallelism. 18 connections is exclusive likewise such of a beatific thing, and it module inform a ordering difficulty for those who are on diminutive to job hosts. 10 users touch at the aforementioned instance module consent 180 concurrent connections, a pretty momentous variety for diminutive providers.

Dial-up and cancellated meshwork users are also probable to be negatively compact by this change. In the broad band concern where interval is the dominating factor, greater unification similarity is a boon. But in bandwidth unnatural networks, it meet leads to flail where advancement is slowed by every the connections disagreeable to deal a diminutive pipe.

I’m peculiar what variety of investigating Microsoft has conducted to watch the effect of this change. The unification similarity move is utilised widely (including by the Virtual Earth team), and whatever servers haw not be primed for the increase. My tests were conducted against exclusive digit host, but if kindred results are old elsewhere, this haw start low the account of “don’t fortuity the web.”