Web Info & Tutorials

July 31st, 2008

JAVAFX: THE PREVIEW HAS LANDED

JavaFX was declared at JavaOne…. in 2007, and we are now sight a advertisement release.

Josh Marinacci of the JavaFX aggroup put unitedly a place with an example that builds the following:

The cipher for this is simply:

JAVA:

  1.  
  2. package blogdemo;
  3.  
  4. import javafx.scene.*;
  5. import javafx.scene.paint.*;
  6. import javafx.scene.geometry.*;
  7. import javafx.application.*;
  8. import javafx.scene.transform.*;
  9. import javafx.input.*;
  10. import javafx.animation.*;
  11. import java.lang.System;
  12.  
  13. var seek = 0.0;
  14.  
  15.     windowStyle: WindowStyle.TRANSPARENT  visible: true
  16.     width: 400 height: 400
  17.     stage: Stage {
  18.         fill: null
  19.         content: Group {
  20.             translateX: 100 translateY: 100
  21.             content: for(i in [0..10]) {
  22.                 // here is the illusion with binding
  23.                 Rectangle {
  24.                     fill: Color.rgb(25*i,0,0, i/10.0)
  25.                     width: 100 height: 100 arcHeight: 10 arcWidth: 10
  26.                     stroke: Color.BLACK strokeWidth: 5
  27.                     transform: bond [
  28.                         Transform.rotate(-i*36+angle/2,50,50),
  29.                         Transform.translate(angle/4,0),
  30.                     ]
  31.                 }
  32.             }
  33.             onMousePressed: function(e:MouseEvent):Void { System.exit(0); }
  34.         }
  35.     }
  36. }
  37.  
  38. var anim = Timeline { keyFrames: [
  39.         KeyFrame { time: 0s values: seek => -360 tween Interpolator.EASEBOTH },
  40.         KeyFrame { time: 2s values: seek => 360 tween Interpolator.EASEBOTH },
  41.     ]
  42.     autoReverse: true
  43.     repeatCount: Timeline.INDEFINITE
  44. };
  45. anim.start();
  46.  

And you crapper check discover the application if you hit Java 1.6 installed.

Michael Coté got unitedly with the Sun folks and recorded a demonstrate and interview:

I am fascinated to wager what Sun does with JavaFX, but I hit to adjudge to existence underwhelmed and more agog most what Sun could do with the Java plugin and hit that as a artefact to interact with Ajax applications.

July 30th, 2008

LIGHT-WEIGHT JSON BINDING FRAMEWORK

In my another chronicle as a screen covering developer (which cod to a intermixture of Fluid, AIR, Prism, canvas, SVG, and Flash is threatening to meet on my Ajax life) I’ve daylong been a follower of data-binding frameworks that attain it cushy to hit a modify automatically aline with championship accumulation structures, action you from the dullness of a dozen lowercase “widget.getValue() - dataModel.setValue()” calls (or in the housing of grids, etc. such more wordy and windy plumbing).

Dojo and others frameworks hit whatever engrossing protection features, but if your selection JavaScript support lacks modify accumulation binding, analyse discover Steven Bazyl’s diminutive stand-alone JSON protection project: js-binding.

The send is meet effort started, but it already has a some base features that attain it useful. For example, to modify this form:

HTML:

  1.  
  2.   <input type=“text” name=“username”/>
  3.   <input type=“text” name=“email”/>
  4.   <input type=“text” name=“address.street”/>
  5.   <input type=“text” name=“address.city”/>
  6.   <input type=“text” name=“address.state”/>
  7.   …
  8. </form>
  9.  

into this object:

JAVASCRIPT:

  1.  
  2. {
  3.   username: “…”,
  4.   email: “…”,
  5.   address: {
  6.     street: “…”,
  7.     city: “…”,
  8.     state: “…”
  9.   }
  10. }
  11.  

You meet requirement to indite this code:

JAVASCRIPT:

  1.  
  2. var myObject = …;
  3. var myForm = …;
  4. var reaper = Binder.FormBinder.bind( myForm );
  5. binder.deserialize( myObject );
  6.  

js-binder also has a built-in identify transmutation execution that, for example, allows you to easily combine with a JavaScript fellow parsing library:

JAVASCRIPT:

  1.  
  2. var reaper = Binder.FormBinder.bind( myForm, {
  3.   date: {
  4.     // Date trainer using datejs such reinforced parsing…
  5.     parse: function( continuance ) { return Date.parse( continuance ); },
  6.     format: function( continuance ) { return Date.toString( ‘M/d/yyyy’ ); }
  7.   }
  8. } );
  9. binder.deserialize( myObject );
  10.  

The docs are apothegmatic but useful.

July 29th, 2008

BOOK REVIEW: “JAVASCRIPT: THE GOOD PARTS” BY CROCKFORD

I hunch king Flanagan. I’m making my artefact finished “The Ruby Programming Language” this summer. Its exhaustiveness rattling satisfies. But a decennium ago, my planning Scripture was Flanagan’s “JavaScript: The Definitive Guide”. As I transitioned from a occupation in noesis to a occupation in code, “the Rhino book” taught me everything I necessary to undergo most object-oriented JavaScript, DOM scripting and the another antiquity blocks of today’s Ajax landscape. I’ve bought a hornlike double of apiece of the book’s fivesome editions. It remained, until recently, the exclusive JavaScript aggregation I’d recommend.

That every denaturized with the past business of JavaScript: The Good Parts by Yahoo’s politico Crockford. Crockford belike needs no introduction. His intelligent website and regular journal posts hit championed JavaScript’s noesis and possibleness patch occupation discover its drawbacks and regular misuse. Now, with “JavaScript: The Good Parts,” he has managed to wage a meaning as multipurpose for JavaScript pros as it is for novices. Part module primer, conception defence and conception critique, Crockford’s aggregation draws from and extends whatever of his long-gestating themes most how to ingest JavaScript - and how not to ingest it.

The author’s postulate is so ultimate and illogical that it sounds same waste until you dead actualise that this is how every planning languages should be taught:

When I was a teen journeyman programmer, I would see most every feature of the languages I was using, and I would endeavor to ingest every of those features when I wrote. …

Eventually I figured discover that whatever of those features were more pain than they were worth. Some of them were poorly specified, and so were more probable to drive portability problems. Some resulted in cipher that was arduous to feature or modify. Some evoked me to indite in a behavior that was likewise hard and error-prone. And whatever of those features were organisation errors. Sometimes module designers attain mistakes.

Most planning languages include beatific parts and intense parts. I unconcealed that I could be a meliorate technologist by using exclusive the beatific parts and avoiding the intense parts. After all, how crapper you physique something beatific discover of intense parts?


More…

July 28th, 2008

DOJANGO: TWO GREAT TASTES IN ONE CAN!

Dojango, a model Django covering that includes flooded Dojo hold tempered in, has been released by Tobias Klipstein, Nikolai Onken, and Wolfram Kriesing.

  • It provides capabilities to easily alter between individual Dojo versions and sources (e.g. aol, google, local)
  • Delivers serving utilities, that makes the utilization of flush internet applications in compounding with dojo more comfortable.
  • It makes the antiquity of your possess crowded Dojo promulgation easier.
  • It includes a reusable django app that provides Dojo
  • It includes supporter functions, i.e. JSON conversion
July 25th, 2008

FIREBUG LITE 1.2; NOW WITH IMPROVED LITE-NESS

Steve Souders gave a speech at OSCON yesterday where he demonstrated the newborn Firebug Lite 1.2.

Today Firebug Lite 1.2 was released. This newborn edition was shapely by Azer Koçulu, creator of pi.debugger. Azer connected the Firebug Working Group, morphed the interface to countenance Firebug, and additional it to the Firebug cipher base.

Firebug Lite is a subset of Firebug that crapper be utilised in IE, Opera, and Safari. The preceding edition provided console.log functionality. In Firebug Lite 1.2, Azer additional the knowledge to inspect DOM elements, road XHRs, and manoeuver HTML, CSS, and JavaScript. You crapper embed it in your pages and enable debugging. I favour creating a Firebug Lite bookmarklet that I crapper start on some scheme page. Instructions and more aggregation are acquirable on the important Firebug Lite page.

If you same a lowercase Firebug fuck when you debug non-Firefox browsers, analyse discover the rattling such reinforced version!

July 25th, 2008

HTML 5 LINKING ALL AROUND THE HORN

Eric Meyer has been working on an HTML 5 linking proposal and has put unitedly a dissent of his proposal.

His linking demo shows how you could place href="..." on paragraphs, plateau rows, cells, and some another places.

This demonstrate is finished with ultimate JavaScript for now, with the manifest wish that browsers natively hold these features in the future.

July 25th, 2008

INTERSECTIONS AND SVG OBJECTS

Kevin Lindsey has a suite of tests that exhibit different intersection routines for SVG objects:

Each unification allows you to cook the shapes listed. All intersections between the digit shapes are updated as you cook the shapes. Some intersections pass added aggregation when the shapes do not intersect. As an example, the circle-circle crossing determines if digit lot is contained by the another circle.

It is essential to state there are famous problems with the Bezier-Bezier (any compounding of quadratric and cubic) crossing routines. Incorrect intersections are reportable when the curb points ingest diminutive values.

Here are a few:

July 24th, 2008

OPEN WEB FOUNDATION: DAVID RECORDON AT OSCON


David Recordon has foregather started his OSCON talk, embedded above, on activity the Open Web.

He is announcing the Open Web Foundation, a newborn endeavor to hit a locate for us to incubate, license, and physique accord around specifications, protocols, and more.

I posted most this on my blog as I am an initial member:

I am agog to wager the past speech of Open Web Foundation is today discover there. I conceive that it is poised to embellish a enthusiastic newborn crossway of the Web gift us a locate for the another stuff.

Let’s verify an example. Imagine that you came up with a enthusiastic idea, something aforementioned OAuth. That enthusiastic intent gains whatever rubbing and more grouping poverty to intend involved. What do you do? People communicate most IP policy, and governance, and dead you wager yourself on the line of creating a newborn MyApiFoundation.

Wait a minute! There are plentitude of standards groups and another organizations discover there, sure you don’t hit to create MyApiFoundation?

Well, there is the W3C and OASIS, which are clear to endeavor orgs. They hit their place, but MyApi haw not sound in there. The WHATWG has become up with strange work, but the boot on IP was an supply likewise (solved by employed with the W3C).

MyApi has whatever cipher in there, so how most swing this in Apache? Athapascan is enthusiastic for code, but it doesn’t care with the another stuff, which is fine. That isn’t its mandate. Athapascan does things rattling substantially though, especially when it comes to organization and the setup process. What if we had a groundwork that had whatever of the aforementioned values around grouping involved (so anyone can, versus companies) and a multifarious accord (not foregather a some blokes from the aforementioned company).

This is ground I am anticipative for the Open Web Foundation. It is a newborn locate to countenance at if you become up with something adjuvant for the Open Web, a locate that haw correct your values.

But advise a minute, what most this “Open Web” abstract again. As I foregather said on a locate most process the term, grouping can’t concord on what the shucks abstract is! There is a aggregation of cord wager “Flash and Silverlight are not the Open Web, but GWT is!”

I conceive that the Open Web Foundation needs to be a cheater in employed this out. With poetics in place, the groundwork crapper gesture projects that foregather the requirements. When a send starts it haw not be Open Web still (e.g. binary application implementations). We requirement a locate to advise nervy and near the Web. Can’t advise to wager what happens there.

Announcing a newborn groundwork isn’t what matters. What rattling matters is what comes of it. I am agog to wager how this every evolves.

In somewhat attendant news, Google Code today supports noesis licensing to go along with your unstoppered maker project.

July 23rd, 2008

EMBEDDED OPENTYPE AND THE W3C

CSS:

  1.  
  2. @font-face {
  3.   font-family: Cambria;
  4.   font-style: normal;
  5.   font-weight: normal;
  6.   src: url(CAMBRIA2.eot);
  7. }
  8.  

We discussed the new font-face / EOT impact yesterday. Ben loves typography, thus him wanting to provide Tahoma a rest.

Then we wager Microsoft consideration in on the topic, and it prefabricated me muse the persuasion feat on.

Bill Hill has a newborn place on the IEBlog most Font Embedding on the Web.

The prototypal pair of paragraphs says a lot. First we hit the “look at the companies activity it”:

It’s Bill Hill here again, ease conflict the beatific fisticuffs to attain printing on the Web as beatific as we’re utilised to sight in print. We prefabricated momentous advancement this week, when digit of the USA’s most prestigious type companies declared its hold for the Embedded OpenType info for type embedding on the Web, and launched a newborn website to encourage another browsers to hold it in constituent to cyberspace Explorer (which has had EOT hold built-in since 1996).

And then the emotion most type linking ;)

At the aforementioned time, Ascender Corporation and its collaborators in the craft accord also warned of the jural dangers of using the Font Linking execution currently based by another browsers.

So, EOT is “in face of the W3C”. What are your thoughts?

You crapper provide Bill Hill’s impact a peak and countenance at the Assender place too.

July 22nd, 2008

DEFINING THE OPEN WEB

I heard that when asked who knew what the “Open Web” meant at a past conference, scarce anyone locate their safekeeping up. Those that ofttimes conceive that they do see it, see it at a cord level.

Brad Neuberg has been intellection most this, and wrote the following asking for our input:

What the Heck is the Open Web?

Do you throw the constituent Open Web around? Ever astonishment what the heck it means? Me too.

I’m hunting for a definition of the Open Web that:

  • Isn’t a laundry itemize of missile points
  • Is digit or digit sentences long
  • Doesn’t constrain the scheme from ontogeny in the forthcoming (i.e. that it’s cavernous sufficiency that it’s not meet defending the position quo but crapper alter to newborn innovations)

I’ve got my possess opinions on these but I’m fascinated in chance what you think. Basically, what’s the elevator pitch for the Open Web? Its cushy to speech to the Converted ™, but what most when conversation to another folks that strength not tending as such yet?

You intend incentive points if you crapper respond the following:

  • If Adobe were to unstoppered maker Flex/Flash, or Microsoft Silverlight, would that be the Open Web? If so, why? If not, ground not?
  • Why should developers tending most the Open Web? How most users?
  • How would you delimitate the scheme itself, again in a artefact that doesn’t constrain it from forthcoming ontogeny and utilization (i.e. “It’s a locate to publicize a clump of documents” doesn’t earmark shack for deploying applications, as we are sight with Ajax today).

We throw around the constituent Open Web a bunch, but I’ve never seen it succinctly defined. What is it, and ground do we hold it? I conceive its essential and worth activity but it’s every a taste hirsute correct now.