Friday, October 27, 2006

Beyond MAX is Apollo - First Mac OSX Application

Well here I am, back home from MAX 2006. The event was killer! Tagged with the Marketing slogan "Beyond Boundaries", it turned out to be so pulling that we never made it "Beyond the Hotel". So what was the biggest pull? The LiveCycle Birds of a Feather was cool (yes - my boss John H. will shoot me when he gets the bill for the beers I bought for everyone) but Apollo was my favorite. Being on the inside at Adobe is cool. Really really cool. I get first dibs on new technology and get to whip up samples to test. Watching Mike Chambers at Max 2006 was inspirational. He is soft spoken and very humble while showing us potentially the coolest of the cool.

Apollo is an internal code name for an application framework that uses flash yet does not require a browser to render like Flex Applications or Flash (*.swf) files. Apollo applications use a parent container as a frame that will eventually be able to Apollo Code Sample

The MXML file above can be compiled alongside an "application.xml" file that declares the pieces to the application. In this case, it is simple and there are only two files. The end result is the *.air file which renders in Flash but skinned as a complete application.



Flex 2 is cool but sorry - I think Apollo is gonna be *way* cooler. If you are coming to Web 2.0, stop by the Adobe booth to say Hi and I'll give you a quick demo of Apollo.

Wednesday, October 25, 2006

Grabbing XMP Data with XPAAJ

During Max 2006, I am helping out Gunar Penekis with a talk on XMP and demonstrating our XMP SDK toolkit written in C. The Adobe SDK uses James Clarke's Expat Parser and has some custom classes to grab XMP and manipulate it. The samples directory also has some great examples to get anyone up and running.

However....

Being a bit more of a Java head, I felt like being productive. During Matt Butler's excellent 3 hour hands on tutorial on LiveCycle, I got inspired to write an extension to the XPAAJ sample I posted earlier for getting XMP out of a PDF document. The source code is here (sorry about the formatting - email me if you want to get the real file via dnickull (at) adobe (dot) com):

import java.io.*;
import java.util.*;
import java.awt.image.DataBuffer;
import com.adobe.pdf.*;

/* XMPExtractSample
* by Duane Nickull, Adobe Systems Inc. dnickull@adobe.com
* Copyright (c) 2006 - all rights reserved
*
* Use this at your own risk and don't whine to me if it doesn't work.
* You will need to have XPAAJ.jar from Adobe.com. Written and tested
* with JDK 1.5 on a mac w/osx 10.4.7
*/

public class XMPExtractSample {

public static void main(String[] args)
throws FileNotFoundException, IOException

/* Make sure we have the correct args.length() and call PDFExtract() */
{
String inPdfName;
if(args.length != 1 )
{
System.out.println("\nCommand line format: java DuanePDFClass1 pdf-file");
return;
}
else
{
inPdfName = new String(args[0]);
PDFExtract(inPdfName);
}
}
public static void PDFExtract(String inPdfName)
throws FileNotFoundException, IOException

{
System.out.println("\nOpening PDF with DuanePDFClass1...");
PDFDocument doc = null;
boolean b = false;
FileInputStream inPdfFile = new FileInputStream(inPdfName);
try {
doc = PDFFactory.openDocument(inPdfFile);
} catch (IOException e) {
System.out.println("Error opening PDF file :" + inPdfName);
System.out.println(e);
}

if(doc == null)
System.out.println("Cannot open PDF file : " + inPdfName);
else
System.out.println( "\n" + inPdfName + " was successfully opened.");

// Export the xmp metadata from the document

try {

//Call the PDFDocument object's exportXMP method.
InputStream myXMPStream = doc.exportXMP();

//Get the byte size of the InputStream object.
int numBytes = myXMPStream.available();
System.out.println("\nNumber of XMP Bytes found is " + numBytes + "\n");

// Read into a Buffered Reader Stream.
BufferedReader d = new BufferedReader(new InputStreamReader(myXMPStream));

// Iterate through the XMP object and print each line
String xmpLine;
while((xmpLine = d.readLine()) != null)
{
System.out.println(xmpLine);
}

// Find the Physical Memory Reference of the object
System.out.println("\nXMP InputStream is in physical memory at -> " + d);

//Create an array of bytes. Allocate numBytes of memory.
byte [] MDBytes = new byte[numBytes];

//Read the XMP metadata by calling the InputStream object’s read method.

myXMPStream.read(MDBytes);

} catch (IOException e){

System.out.println("it went really bad" + e );

}
System.out.println("\nXMP Extraction has finished.");
}
}

Tuesday, October 24, 2006

LiveCycle Tracks at Max are busy


Okay - who would have believed this a few weeks ago. The LiveCycle tracks at max are filling up. The photo above is from Sanga's LiveCycle 8: What's coming talk this AM. Despite a late start due to the general session running over, the talk filled up. The lunch hall was filled to boot!

have to run and prepare for two back to back talks - first one I have to build our new XMP SDK 4.0 in xCode on the Mac to demonstrate the functionality. My C skills are a bit rusty. Later, Christoph Rooms and I are doing our first talk on LiveCycle Security Architecture.

MAX 2006 - Shantanu and Blue Men


During the morning keynote we were treated to a performance by the Blue Man Group. Think heavy metal music with magic tricks, art and paint. Lots of paint. Mostly blue paint.

Shantanu is giving a great keynote speech right now. He also issued a challenge to everyone here to try and solve the Semaphore puzzle on the roof of the Adobe building in San Jose. No one has solved it yet. There are several observations on this blog for anyone interested.

Shantanu also re-iterated Adobe’s aim to bring the internet to more than 1 billion people in China and India via cell phones. Kevin Lynch then kicked off a series of demos including new integration between Dreamweaver and Photoshop. As a former web head, this is a huge improvement in the workflow most webmasters go through. The workflow also includes the Spry Framework for AJAX (very cool). Spry makes AJAX easier for website designers.

More to come...

Monday, October 23, 2006

Day One from MAX 2006 (Report from a personal perspective)

Okay – I’m just going to say it and you can label me a hype – “Max is rad”! Not only is the Venetian a really cool place to have a conference but this is one of the best conferences in terms of the cool factor I have been to in a while. Yes – it has all the usually JavaOne type things like the Bean Bag chairs, Ted Patrick’s Maxup and tons of corners, ad-hoc groups and meetings but it is also something more. I think people are generally really excited about Max 2006 given it is the first time Macromedia and Adobe have joined forces to deliver the show. The complexion is something no one could have predicted. Tracks like LiveCycle, an Adobe set of technologies and servers, are in popular demand at a conference typically dominated by Cold Fusion, Flex, Flash, Firefox and Dreamweaver zealots. Matt Butler’s LiveCycle track is actually sold out!! Who would have predicted.

Candidly, Adobe culture can generally use some influence from macromedia in terms of how to have fun, but MAX is really a demonstration that the two companies have truly become one. Despite the corporate directions at the staff meetings like “have fun” which were delivered in a way that sounded akin to a declaration of war, the people here are having fun. I think this would have happened without the official direction but c’est la vie. It’s all good now that we’re unwinding.

I spent the first half of my day attending the usual Adobe mandatory meetings, doing last minute planning for the talks I am presenting and other housekeeping items, but in the afternoon I had the change to attend some tracks. My favorite was David Gassner’s Developing rich internet applications with Flex and Java. In all fairness, this was one of the few that I was able to attend given most of the others including Simon Horvath’s were completely sold out and no standing at the back was permitted. I guess it pays to plan ahead – something I might start doing one day.

David’s course is a hands on course with 25 computers in the room (2 people to a room). It is amazing to see the level of technical knowledge transplanted by David into the attendees. In the last 4 hours, I got to see people with no or little J2EE experience actually write a Flex app that called specific methods available on the app server. Simply stated, the room was full of “lights going on” moments.

Tonight is the pre-party at the Cabana’s and will be tons of fun (tons of free drink and food for all near open swimming pools with wet slippery floors has huge entertainment potential).

Word up – if you’re coming next year register early and pre-register for the sessions. Don’t wait till the last minute like me.

More later.