Friday, March 28, 2008

ColdFusion 8 nominated

ColdFusion 8 has been selected as a finalist in the Web Development category of the Great Indian Developer Awards 2008. Voting is open for all till May 2nd.

Great Indian Developer Awards recognize the product and innovation excellence of the hundreds of software products and tools that aid developer productivity, across 15 different categories. The selection criteria applied by an international stature panel places emphasis on functionality, usability, innovation excellence, bleeding-edge quotient, and feedback from the developer ecosystem.

Now that I have already casted my vote what are you waiting for !!

Tuesday, March 18, 2008

Adobe RIA Architect Summit 2008

The Adobe RIA Architect Summit is an opportunity for architects and aspiring architects to get an insight into how to design and architect Rich Internet Applications. It is also a unique platform to interact with experts and technology leaders and a chance to develop connections within the community.

The summit is an unparalleled opportunity to hear from eminent people like Dr. Naresh Gupta, MD of Adobe India and David Wadhwani, VP of the Platform BU, Adobe Systems Inc. on the impact of RIAs, the business opportunities that they present and strategy and future of Adobe’s platforms.

When: Thursday, April 3, 2008 9:00 am - 6:00 pm
Venue: The Chancery Pavillion, Residency Road, Bangalore, India

More details and registration, on a First Come First Serve basis, at http://adoberiarch.eventbrite.com/

Wednesday, December 12, 2007

Synchronizer Token Pattern in ColdFusion

Most of the times we feel like maintaining the control flow of the application and prevent users not use browser control especially the browser Back button. Control flow sequence is particularly important to preserve when form submission involves transaction processing on the server which might lead to inconsistencies.

People familiar with Struts framework in Java might be aware of the Synchronizer Token Pattern available to take care of this very problem. I tried if not same a similar principle in ColdFusion to get over the problem on hand for me.

The solution described below is in no way a full blown Synchronizer Token Pattern that might be implemented in Struts but a very simple approach to solve a very mundane problem. The basic idea is to set a token in a session variable before returning a (transactional) page to the client. This page carries the token inside a hidden field. Refer code below :

<cfset variables.timer =gettickcount()>
<cfset session.timer =variables.timer>
<form name="a" action="2.cfm" method="post">
<p>Name : <input type="text" name="name"></p>
<p>Age : <input type="text" name="age"></p>
<cfoutput><input type="hidden" name="timer" value="#variables.timer#"></cfoutput>
<p><input type="submit" name="Sumbit"></p>
</form>

Upon submission, request processing first tests for the presence of a valid token in the request parameter by comparing it with the one registered in the session. If the token is valid, processing can continue normally, otherwise an alternate course of action is taken. After testing, the token resets to null to prevent subsequent submissions until a new token is saved in the session.

<cfif structKeyExists(form,"fieldnames") and form.timer eq session.timer>
  <cfoutput> Your name is #form.name# & age #form.age#</cfoutput>
  <cfset session.timer=0>
<cfelse>
  <p>Your session is expired<p>
</cfif>
<p><a href="javascript:history.back()">Go Back (Simulate Browser Back)</a> 
| <a href="1.cfm">Preferred Back</a></p>

Wanna try a demo

Please note that this is just an idea implementation I did in less than 5 minutes and has scope for improvement. All suggestions/comments are welcome.

Friday, December 07, 2007

Adobe.com has a new look

Yesterday night we at the web team released the new look Adobe.com.

Your comments/feedback are most welcome as to what you feel about the new look

Wednesday, October 10, 2007

Adobe Share

I hope many people must have already heard and used Adobe latest online offering codenamed "Share" which is available on Labs. It is a free web-based service that offers 1GB of space and allows you to easily share, publish and organize your documents. You only need to have an Adobe ID.

With Share you can:

  • Send documents without email attachments.
  • Access your documents from anywhere.
  • View all the documents you have shared or received in one place.
  • Post a link to your document on a wiki or blog.
  • Embed a Flash® preview of your document on any website.
  • Limit access to a document to a list of recipients.

Update: Ray Camden already has a cool little CF API for Share.

Thursday, September 06, 2007

Directory Watcher

A few months back during our internal DevSummit at Adobe, India an engineer demo a slick little utility that sits in the system tray and monitors a directory for updates. It notifies the user of any update to the configured directory. The light weight utility also had a RSS feed that yours can subscribe to provided you have it enabled.

On the lines of this utility standalone executable, I thought doing this in ColdFusion was a cake walk. Using the Directory Watcher event gateway provided with ColdFusion I built a RSS feed using <CFFEED> for all the music I have on my machine. The feed will be refreshed everytime I added more music, so my friends subscribed to my music feed get updated.

 <cfcomponent>
 <cffunction name="onAdd" output="no">
    <cfargument name="CFEvent" type="struct" required="yes">
 
<cfdirectory directory="c:\music\" recurse="yes"  name="music" filter="*.mp3">

<cfquery name="mymusic" dbtype="query">
 select name,size,directory, DATELASTMODIFIED from music where type='File' order by DATELASTMODIFIED desc
</cfquery>
 <cfscript>
      // Create the feed data structure and amymusic the metadata.
      MovieStruct = { link="http://rnarula03",title="Music", description="Music directory for Rahul", pubDate="#now()#", version="rss_2.0", item=arraynew(1) };
      / Add the feed items. 
       for(i=1; i <= mymusic.recordcount; i++)
 {
        MovieStruct.item[i] = StructNew();
        MovieStruct.item[i].description = StructNew();
 S = numberformat(mymusic.size[i]/(1024*1024));
 link = replace(mymusic.directory[i],"c:\music","")&"\"&mymusic.name[i];
        MovieStruct.item[i].description.value = "Movie "& mymusic.name[i] &" (" & S &" MB)";
 MovieStruct.item[i].description.value =  MovieStruct.item[i].description.value & "<br><br>Download at: \\servername\music" &link;
        //MovieStruct.item[i].link ="file://///rnarula03/music/"&link;
        MovieStruct.item[i].pubDate = GetHttpTimeString(mymusic.DATELASTMODIFIED[i]) ;
        MovieStruct.item[i].title = replace(Rereplacenocase(mymusic.name[i],"\.mp3$",""),"."," ","ALL");
       }
    </cfscript>
    <!--- Generate the feed and save it to a file and variable. --->
 <cffeed action="create"  name="#MovieStruct#"  outputfile="c:\wwwroot\music.xml" overwrite="true">
 
 </cffunction>
 </cfcomponent>

This will publish the complete list of music files in my folder, which is also shared to facilitate easy download. The only issue I am having is the network file share link doesn't work from Firefox due to some reason. Still investigating on the same. Also the network link (like file://///servername/share) is not treated as a valid link in RSS & it doesn't appear as link on the fed item. If anyone has any idea on the same, please let me know about it.

Tuesday, September 04, 2007

FEEDJIT real-time traffic analysis

One thing that keeps me motivated to write more on my blog is the ever increasing number of visits on my blog. I have used a few tools to monitor the traffic in the past including Icerocket, Statisfy, Google Analytics to name a few but my I always like to try new tools just because of the kind of stats and analysis they provide. Icerocket, for instance, provide you the visitors tracking which include last n number of recent visits along with the time (in the time chosen chosen) and the geographical region. There are many other reports available like rank, hit by browser with nice charts etc etc. Google Analytics on the other hands doesn't seem to provide live stats and is bit more inclined towards e-commerce related reports.

In continuing with my endeavor to get the best stats and reports for my blog I am evaluating FEEDJIT on my blog. Feedjit offers two types of widgets and can be added to your blog without sign up/registration. The first one let you get a live arrival and departure traffic report on your blog. This widget is totally customizable using Ajax controls. The second widget, integrated at the bottom right of my blog, shows a map with the location of the last 100 visitors. Hover over any dot to get more information about a person.

Yet another very simple but nice widget that caught my attention was whos.amung.us. The USP of this stats is its 30 seconds setup and again like FEEDJIT doesn't require any registration.