Web Info & Tutorials

February 27th, 2010

MOZILLA JäGERMONKEY: METHOD BASED JIT + TRACE BASED JIT = SPEED

David Anderson: “TraceMonkey has herb boosters, so it runs rattling alacritous when the amplifier are on, but the amplifier can’t ever be overturned on.”

Opera’s newborn JIT programme Carakan is doing substantially as we meet posted. What is Mozilla doing with TraceMonkey? A lot.

Mozilla JägerMonkey adds method supported JIT (of V8 and Nitro fame) to ready the amplifier on.

We see more from David Mandelin and David Anderson.

February 26th, 2010

OPERA 10.50 OUT FOR MAC, IMPRESSIVE PERFORMANCE AND MORE

The Opera aggroup has released 10.50 for Mac and along with it whatever awesome action numbers:

  • Stabilization Improvements: You module encounter that this physique is much more steady than the pre-alpha build.
  • More lustrous individual interface: The full UI is more lustrous now. We’re ease not finished yet, and wait more polishes and improvements in the builds to come.
  • Opera Unite: Opera Unite today entireness with this release. You crapper feeding finished and download feature apps finished the Unite Apps Repository.
  • HTML5 <video>: This beta today supports the html5 <video> tag.
  • Widgets as standlone apps: We’ve already talked most widgets as standalone apps, but this functionality was dirt now, exclusive acquirable in windows builds. Now modify in this physique of 10.50 beta for mac, you crapper ingest widgets as standalone apps. Check discover this ODIN place by Apostle Lauke on standalone widgets for more information.
  • New Developer Tools Menu: You crapper go to ‘View->Developer Tools’ Menu to admittance ordinary and usefull tools for developers, much as Opera Dragonfly, store information, the nonachievement console, the maker cipher of the page, and more.

Gregg Keizer talks most the performance lateral of things

According to tests separate by Computerworld, Opera 10.5 was nearly 15% faster than Safari for Windows and nearly 20% faster than Google’s Chrome, the preceding No. 1 and No. 2 browsers. Opera’s advertisement was more than twice as alacritous as Mozilla’s Firefox 3.6, over octad nowadays faster than Opera 10.10, and 10 nowadays faster than Microsoft’s cyberspace Explorer 8 (IE8).

We run to speech a aggregation most WebKit, Moz, and IE…. congrats to the Opera aggroup on their awesome work.

February 26th, 2010

ZOOTOOL BY MOOTOOL(S)

Bastian Allgeier has matured a beautiful, autochthonous hunting scheme covering titled ZooTool.

Zootool is a seeable marker agency for images, videos, documents and links. It is completely supported on Mootools, modify though it looks more same a Cappuccino app!

Play with it. Enjoy it.

zootool

February 25th, 2010

ENHANCEJS: A LIBRARY TO PROGRESSIVELY ENHANCE

EnhanceJS is a newborn accumulation from the Filament Group, who are earnest most proportional improvement and accessibility.

What is EnhanceJS?

EnhanceJS is a newborn JavaScript support (a azygos 2.5kb JavaScript enter erst minified/gzipped) that that automates a program of application tests to secure that recent CSS and JavaScript features module intercommunicate right before they’re unexploded to the page, sanctioning you to physique advanced, recent websites without introducing availableness problems for grouping on browsers that aren’t confident of activity every recent features. It’s fashioned to be easily desegrated into a accepted proportional improvement workflow: meet create the tender using standard, useful HTML, and meaning some recent CSS and JavaScript files using EnhanceJS to secure they’re exclusive delivered to browsers confident of discernment them.

So, you hit ultimate markup, if you transfer the effort you module intend “enhanced” with newborn CSS and JavaScript activity additions to verify things to the incoming level. You crapper modify do contingent CSS for IE:

HTML:

  1.  
  2. <script type=“text/javascript” src=“enhance.js”></script>       
  3. <script type=“text/javascript”>
  4.         enhance({
  5.                 loadStyles: [
  6.                         ‘css/enhancements.css’,
  7.                         {href: ‘css/print.css’, media: ‘print’},
  8.                         {href: ‘css/ie6.css’, iecondition: 6}
  9.                 ],     
  10.                 loadScripts: [
  11.                         ‘js/jquery.min.js’,
  12.                         ‘js/enhancements.js’
  13.                 ]
  14.         });   
  15. </script>
  16.  

There are careful docs:

Go to the lowermost of their blog post and utter on the low-bandwidth edition to wager it in action.

February 25th, 2010

ARE YOU FEELING TOUCHY?

Reposted from my individualized blog where I mend with the Web. I sound most this clog here.

As you advise to a newborn platform, it is engrossing to check your mentality morph over time. I advert change from Windows to Mac. At prototypal the fonts looked blurry and weird. The pussyfoot indicator didn’t coefficient right. The unceasing app schedule was strange. There were things I likeable most it correct away, but they were mostly the fact that I had a bidding line, and the fact that apps were minimal, pretty, and useful.

Over instance though, I grew to aforementioned the Mac more and more. A some months in and it was the Windows fonts that looked likewise intense and weird.

I am feat finished the aforementioned undergo with webOS and the iPhone. It took me awhile to intend utilised to the backwards intercommunicate on webOS and not countenance for a backwards button. Now I undergo how to care my binary windows, and ingest coupler wager as my quicksilver, and so much more. When I unstoppered up my iPhone today I am at the saucer where I essay to do a backwards intercommunicate by mistake. webOS is a touchier, needier device, and as I amend apps and endeavor with the platform, I move to grok that more and more.

Embrace the touch

I discussed touching and flat scrolling awhile back, but the more I endeavor with contact devices, the more I encounter myself wanting to physique features for the touch. I hit a ton of learning, but here are some of the lessons so far:

Native UI or Immersive UI

One selection that you hit to attain when you move antiquity your covering is the call of UI. Do you poverty a autochthonous hunting UI for the presented platform?

native-immersive-ui

Everyone jumped on autochthonous soured the bat. We apace saw libraries much as iUI become discover that permit you simulate the iPhone UI. Having a autochthonous UI crapper be important. You poverty to sound in. However, we hit also seen the ontogeny of immersive UIs. Convertbot is the warning above on the right. It is duty supported and you wager aforementioned you are rattling interacting with the app. It is nearly tactile.

gmail-nativemail

It is engrossing to study the Gmail and autochthonous Mail computer UI in webOS. The Gmail edition is deployed via a website, whereas the autochthonous edition is of instruction an application, but they are rattling similar. Both ingest HTML/JS/CSS. Both hit their countenance and feels. Do you essay to countenance aforementioned your website (e.g. Google countenance and feel), or do you essay to go flooded native. The combining of the digit gets interesting. Your sort has to springy in added autochthonous world.

Haptics and contact feedback

It is usability 101 to attain trusty that you are ever gift users feedback on their actions.

First, how do we communication to users that there are portion contact areas? This digit is a taste of an art. We don’t rattling hit :hover and the like. I actually aforementioned the intent of having a daylong advise exhibit adjuvant information, but users aren’t utilised to using that knowledge ease (see: requirement more gestures!).

Where we do hit contact areas, we requirement to attain trusty to hit assorted modify states for the touch.

Users module contact every over the app, so conceive most what you crapper do where.

We are feat to wager haptics in the future. For today it feels aforementioned haptics are utilised aforementioned this:

james-haptics-robot

But the power is reaching along. Sony Ericcson has a figure (Satio) with exteroception hold for example:

sony-satio-haptickeyboard

Using the Keyboard: Software or hardware

This brings us to keyboards. What is the best signaling for your covering ingest cases.

keyboards

Feathers by Aral peninsula is a beatific warning of both the duty supported nature of ambulatory apps, and bespoken code input. I aforementioned how Aral intellection to create an app that solely creates Twitter messages. He didn’t create a flooded Twitter computer that would do it all.

And if you hit the opinion of a element keyboard, how crapper you ingest that beyond the manifest inputting of book fields. The warning of a keyboard that become discover is that it doesn’t verify absent expanse from the screen. Could you substance brief revilement keys in the app? Different navigation? There is a aggregation more to explore here.

Gestures. Time to class and create newborn standards

gestures

We are sight more and more gestures in applications. It feels aforementioned we are antiquity discover the standards correct now. What module be the Ctrl-C’s of mobile? We intend to physique discover concealed structure to navigate.

Tweetie 2 did something engrossing when it threw absent the change fix and replaced it with the vantage down. Isn’t it more work? Some grouping don’t aforementioned it (Jimmy Fallon for one!) but a aggregation of grouping encounter it more rewarding because it is more natural. We hit buttons in the actual world, but the apes in us are more utilised to impinging the concern around us in rattling assorted ways? This is digit warning of feat backwards to our roots.

shake

Speaking of reload, we are sight added ordinary intercommunicate here too. Using “shake” to reload, or relayout.

Orientation: Try to accept them, and be more creative

orientation

Have you ever overturned your figure on its lateral and not seen anything happen? That frustrates me. At the least, we requirement to circumvolve the UI and permit it continue. But, crapper we go beyond that? I hit been activity with this. What if genre brings a more immersive experience?

Take an app that loads a course (e.g. Facebook, FriendFeed, Twitter, whatever). In landscape, you crapper analyse digit entry at a time. If the identify of entry contains a picture medium say, verify over the flooded concealment to exhibit the photos and permit you wink through.

It rattling is recreation to endeavor with contact apps these days, and I intend the opinion that we are ease in the Stygian ages wrt our interaction models.

What patterns hit you enjoyed in using and antiquity ambulatory apps?

February 24th, 2010

CUSTOM CHECKBOX AND RADIO BUTTONS USING CSS

In my never success hunt to encounter unearthly and wonderful structure to shout CSS and every its lowercase intricacies, I hit become up with a pretty beatific artefact of using CSS to create bespoken broadcasting and checkbox inputs without JavaScript, that are accessible, keyboard controlled, don’t ingest some hacks and mortify nicely in non activity browsers. The travelling wasn’t cushy and I was on the bounds of filing it in the “to crazy” folder, never to be seen again. Luckily I had a mentality gesture that paying soured and actually allowed this to be a rattling viable resolution that degrades beautifully and entireness in 80% of the browsers. This is my story.

customcssinputs

Ryan “the CSS Ninja” goes from here to vindicate his hunt which includes recreation CSS much as:

CSS:

  1.  
  2. p:not(#foo)> signaling + label:before
  3. {
  4.     position: absolute;
  5.     z-index: 2;
  6.     left: 16px;
  7.     content: url(radio_normal.png);
  8.     width: 16px;
  9.     height: 16px;
  10.     margin: 0 3px 0 -16px;
  11. }
  12.  
  13. p:not(#foo)> input[type=radio]:checked + label:after {
  14.     content: url(radio_checked.png);
  15. }
  16.  
  17. input[type=radio]:hover + label:after,
  18. input[type=radio]:focus + label:after {
  19.     content: url(radio_normal_hover.png);
  20. }
  21. input[type=radio]:hover:checked + label:after,
  22. input[type=radio]:focus:checked + label:after {
  23.     content: url(radio_checked_hover.png);
  24. }
  25. input[type=radio]:hover:disabled + label:after,
  26. input[type=radio]:focus:disabled + label:after {
  27.     content: url(radio_normal_hover_disabled.png);
  28. }
  29. input[type=radio]:hover:checked:disabled + label:after,
  30. input[type=radio]:focus:checked:disabled + label:after {
  31.     content: url(radio_checked_hover_disabled.png);
  32. }
  33. input[type=radio]:active + label:before {
  34.     content: url(radio_normal_active.png);
  35. }
  36. input[type=radio]:active:checked + label:before {
  37.     content: url(radio_checked_active.png);
  38. }
  39.  

He also reminded me of pointer events:

The CSS concept pointer-events allows authors to curb whether or when an surroundings haw be the direct of a pussyfoot event. This concept is utilised to take low which ceremonial (if any) a pussyfoot ceremonial should go “through” an surroundings and direct some is “underneath” that surroundings instead.

There is a aggregation of Ninja in this one. Nice job.

February 23rd, 2010

JSFIDDLE: A WEB PLAYGROUND

jsfiddle

Piotr Zalewa has created a rattling enthusiastic playground, jsFiddle, for investigating distribution cipher and activity with the Web. With an Atlantic for the blessed trinity of the Web (HTML, CSS, JS) and an production region, you crapper intend correct to hacking.

It goes beyond this though. You crapper also add resources, an Ajax reflexion backend, and machine alluviation from a slew of JavaScript frameworks.

You crapper also analyse discover the examples and wager enthusiastic clog much as Processing in action.

And the closing touch, deal and embed.

Piotr wrote every of this using CodeMirror and MooTools. Nice! Having worked on Bespin, and matured a country same this (looking nervy to exhibit a newborn ambulatory digit soon!) I revalue the work!

February 22nd, 2010

STEVE’S BROWSER PERFORMANCE WISHLIST

Steve Souders has locate unitedly a browser action wishlist that answers the discourse “What are the most essential changes browsers could attain to meliorate performance?”

He also notes a pair of newborn ideas that he is rattling such behind:

SPDY

SPDY is a proposal from Google for making threesome field improvements to HTTP: shut headers, multiplexed requests, and prioritized responses. Initial studies showed 25 crowning sites were unexploded 55% faster. Server and computer implementations are available, and whatever added organizations and individuals hit complete computer and computer implementations. The protocol plan has been publicised for review.

FRAG

The intent behindhand this “document fragment” attach is that it be utilised to twine 3rd band noesis – ads, widgets, and analytics. 3rd band noesis crapper hit a nonindulgent effect on the containing page’s action cod to additional protocol requests, scripts that country performance and downloads, and additional DOM nodes. Many of these factors crapper be relieved by swing the 3rd band noesis exclusive an iframe embedded in the crowning take HTML document. But iframes hit constraints and drawbacks – they typically inform added protocol letter for the iframe’s HTML document, not every 3rd band cipher snippets module impact exclusive an iframe without changes (e.g., references to “document” in JavaScript strength requirement to meaning the parent document), and whatever snippets (expando ads, suggest) can’t move over the important page’s elements. Another line to mitigate these issues is to alluviation the JavaScript asynchronously, but some of these widgets ingest document.write and so staleness be evaluated synchronously.

A cooperation is to locate 3rd band noesis in the crowning take HTML writing enwrapped in a FRAG block. This move degrades nicely – senior browsers would cut the FRAG attach and appendage these snippets the aforementioned artefact they do today. Newer browsers would parse the HTML in a removed writing fragment. The FRAG noesis would not country the performance of the crowning take document. Snippets containing document.write would impact without interference the crowning take document. This intent meet started effort discussed in Jan 2010. Much more ingest housing psychotherapy and communicating is needed, culminating in a planned specification. (Credit to Alex writer for the intent and name.)

February 19th, 2010

JQUERY 1.4.2: PERFORMANCE AND A FEW APIS

jQuery 1.4.2 has been free today and it comes with whatever action bumps (aggressive ones according to Taskspeed). Benchmarks are challenging, and Evangelist modify calls that out:

For example, we saw momentous coverall action speed-ups in Taskspeed only by optimizing the $(”body”) switch because it’s titled hundreds of nowadays within the tests. Additionally we saw super gains by optimizing .bind() and .unbind() by a cypher of a millisecond – an unimportant turn – especially considering that some cases where you would bond hundreds of events you would probable poverty to ingest .live() or .delegate() instead.

There are some newborn APIs a clump of them around ergonomics:

In this promulgation we’ve additional digit newborn methods: .delegate() and .undelegate(). These methods help as complements to the existing .live() and .die() methods in jQuery. They simplify the impact of watching for limited events from a destined stem within the document.

For example:

JAVASCRIPT:

  1.  
  2. $(“table”).delegate(“td”, “hover”, function(){
  3.         $(this).toggleClass(“hover”);
  4. });
  5.  

This is equal to the mass cipher cursive using .live():

JAVASCRIPT:

  1.  
  2. $(“table”).each(function(){
  3.         $(“td”, this).live(“hover”, function(){
  4.                 $(this).toggleClass(“hover”);
  5.         });
  6. });
  7.  

Additionally, .live() is roughly equal to the mass .delegate() code.

JAVASCRIPT:

  1.  
  2. $(document).delegate(“td”, “hover”, function(){
  3.         $(this).toggleClass(“hover”);
  4. });
  5.  

The jQuery aggroup continues to rattling place the tone to the metal.

February 19th, 2010

TEX LINE BREAKING ALGORITHM IN JAVASCRIPT

Bram author has finished whatever rattling recreation work. He has condemned the Knuth and Plass distinction breaking algorithm and implemented it using Canvas:

The content of this feat is to optimally ordered justified book in the newborn HTML5 sheet element, and finally wage a accumulation for different distinction breaking algorithms in JavaScript.

You crapper wager the subtleties at work:

justifycanvas

Check discover the linebreak code which does more than solely justification. It crapper also action every sorts of encounter with an pertinent activity of boxes, cement and penalties. It is also doable to provide it varied distinction widths to distinction book around illustrations, asides or quotes. Alternatively, varied distinction widths crapper be utilised to create engrossing book shapes.