Introduction to Ext.Direct

No Comments

Evan Trimboli of the Ext-JS team just published an article describing Ext.Direct, a remoting API that is part of Ext 3.0. The team has created a remoting specification that you can use to implement the server-side stack of your choice.

Details about server-specific implementations already being maintained can be found here.

Ext.Direct is a new package in Ext JS 3.0 that helps alleviate many of these issues by streamlining communication between your client and server. When using Ext.Direct, you can expect to write 30% less code by eliminating common boiler plate code.

The Ext.direct namespace introduces several new classes for a close integration with the server-side. New classes have also been added to the Ext.data namespace for working with Ext.data.Stores which are backed by data from an Ext.Direct method.

Ext.Direct uses a provider architecture, where one or more providers are used to transport data to and from the server. There are several providers that exist in the core at the moment, for example a JsonProvider for simple JSON operations and a PollingProvider for repeated requests. One of the most powerful providers is the RemotingProvider.

Read the rest here.

Force a URL to Use HTTPS

2 Comments

Today I came across some old ColdFusion & Mach-II (1.0) code where a plugin was used to force HTTPS. I assume the original developer decided to go with this solution because the target environment was Windows and Internet Information Server.

The task becomes a lot easier under Apache. So I threw away the plugin code and added the following rule to the Apache configuration:

<directory "/public_html/mysite.com">
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{HTTP_HOST}/$1	[R,L]
</directory>

The directive above can be placed inside a VirtualHost or Directory directives, but this usually requires access to the Apache server configuration, which is not typically possible in a shared hosting environment — in that case, the rule can be added to the .htaccess file.

Alternatively we could have used the SSLRequireSSL Apache (2.x) directive, but this would only block access to the non HTTPS address. In our case we want to automatically redirect the users instead of displaying an error message.

BlazeDS: Flex Data Services Goes Open-Source

No Comments

So far the standard way of making data connections in Ajax applications has been over XmlHttpRequest, which requires clients to constantly poll backend servers. Adobe is taking advantage of the opportunity to open up a solid platform capable of providing persistent connections (server push / Comet) and the AMF specification.

According to the Adobe Labs site:

Adobe is announcing plans to release source code for its server side remoting and messaging technologies under a new open source product named BlazeDS. Now, developers can easily connect to back-end distributed data and push data in real-time to Adobe® Flex™ and Adobe® Integrated Runtime (AIR) applications for more responsive rich Internet application (RIA) experiences. Previously available only as part of Adobe LiveCycle® Data Services ES software, the technologies included in BlazeDS, along with the Action Message Format (AMF) protocol specification, are being contributed to open source under the Lesser General Public License (LGPL v3) and are available immediately as public betas on Adobe Labs.

HTTP Streaming and Internet Explorer

No Comments

According to Michael Carter, of Comet Daily, evidence of a surefire way to use Comet with IE is purely anecdotal. He describes the steps he followed to uncover the cause of dropped connections in his ActiveX htmlfile hack and how to elegantly work around the issue.

Read the whole story here…

Blogged with Flock

Tags: , , , ,

From DHTML to DOM Scripting

No Comments

Here is a good article by Chris Heilmann for those of you making a move to new JavaScript coding styles and frameworks.

Excellent Addition to Prototype.js

No Comments

$E() is for those of us who use the prototype framework, and have written additional functions to manage new elements and their contents.

CFHTTP Trouble: Connecting to Web Services that Use GZip Compression

No Comments

Rob Gonda posted this today, which I had also experienced while attempting to connect to the Yahoo! Maps API.

The solution in my case was to add charset=”utf-8″ to the cfhttp call.