360iDev – Total FTW!

Brian Flings "idea" preso
Brian Flings "ideas" preso

Let me preface this post with I’m not an iPhone developer – I’m a Flash developer.
I spen last week days in San Jose at the 360iDev conference and I want to extend an HUGE congratulations to John and Tom who “Are 360 Conferences”. These 2 guys have put together another awesome conference (the other being 360Flex) for the iPhone community. Being someone who has spent zero time in the iPhone Objective-C world, the 360iDev conference was the perfect event to attend. Here is a short list of why I think so:

  1. 360Conferences strive to put together sessions and speakers from a wide range of backgrounds. From experienced to inexperienced users, there was something for everyone
  2. The iPhone/Objective-C/Cocoa community is extremely friendly. Talking to some of the speakers and other attendees was one of the best things about this conference for me.
  3. 360Conferences wants to keep the cost low. I mean come on, less than $500 for a conference – yep that rocks.
  4. John and Tom are just damn cool guys.

I think it was time well spent in San Jose and I hope that 360Conferences keeps 360iDev around. Oh, and that thing about me not being an iPhone developer….I am now – or at least I’m workin’ on it! Make sure you check out a 360Conference weather it is at 360Flex or 360iDev – you won’t be sorry.

Yammer and SVN post-commit hooks

If you don’t know what Yammer is, it is a twitter like communication tool for your company:

Yammer is a tool for making companies and organizations more productive through the exchange of short frequent answers to one simple question: “What are you working on?”

Whats nice about Yammer is it is an internal tool that you can quickly communicate with everyone, well anyone listening, in your company. Answers to questions come quickly and from the appropriate party without much effort on either end and notifications to everyone are a snap.

The notifications is what got me thinking about Subversion and post-commit hooks. Subversion provides hooks that allow you to trigger scripts based on a repository event. So, I set up a script that retrieves information about the latest commit to the repository formats an email which is sent to Yammer and published. Now, when someone commits to the repository, everyone is automatically notified without the developer having to write an email and send it to everyone that needs to know about it.

Another unforeseen benefit of this system is that everyone has gotten much better at their SVN comments for their commit. I would imagine this is because they get instant feedback about inadequate comments when everyone see it in Yammer.

On to the resources – SVN hooks are pretty easy to implement and provided by default. They reside in each repository you create in a ‘hooks’ directory {SVN_ROOT}/{REPOSITORY}/hooks. There is a provided template for each type of hook that SVN supports. The script can be any type of script (shell scripts, Python scripts etc), it just needs to have the same name as the supplied template file. For our Yammer script I dusted off the .bat script skills to retrieve the commit and send an email. To send the email I downloaded blat to handle sending the email to Yammer. Finally we create an email for out SVN user and a yammer account using the svn user email.

So here is the list of what we have so far:

  • SVN Repositoy and access to the hooks directory
  • Email address for the SVN user
  • Yammer account using the SVN user’s email address
  • Some way to send an email (Blat)
  • SVN post-commit hook script (post-commit.bat)

Now on to the contents of the script – The post commit hook receives 2 arguments, the name of the repository and the revision. The script uses svnlook, the repository name and revision to retrieve the details (message and author) of the commit. Then usign the commit details the script creates a text file that Blat uses as the email body and sends the email to Yammer.

Here is the actual script (names have been changed to protect the innocent):
[code]
@echo off

:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: ARGUMENTS :::::::::::::::::::::::::::::::::::::::
SET REPOS=%1
SET REV=%2

:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: GENERAL INFO ::::::::::::::::::::::::::::::::::::
SET DIR=%REPOS%/hooks
SET MESSAGE_FILE=%DIR%/message.txt

:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: SVN INFO ::::::::::::::::::::::::::::::::::::::::
SET DIR=%REPOS%/hooks
SET REPO_PATH=file:///%REPOS%

::: Get the author ::::::::::::::::::::::::::::::::::
For /F “Tokens=*” %%I in (‘svnlook author %REPOS% -r %REV%’) Do Set author=%%I

::: Get the log messsage ::::::::::::::::::::::::::::::::::
For /F “Tokens=*” %%I in (‘svnlook log %REPOS% -r %REV%’) Do Set log=%%I

::: Set the message body ::::::::::::::::::::::::::::::::::
ECHO Commit – rev %REV% (#%author%): ‘%log%’ – %REPOS% > %MESSAGE_FILE%

:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: EMAIL INFO ::::::::::::::::::::::::::::::::::::::

set to=-to yammer@yammer.com

set subj=-s “SVN Commit (Revision %REV%)”

set server=-server mail.domain.com

set debug=-debug -log blat.log -timestamp

set auth=-u email@domain.com -pw yourpasswordhere

set from=-f email@domain.com

:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: SEND THE EMAIL ::::::::::::::::::::::::::::::::::
C:/pathtoyourrepos/_tools/blat/blat %MESSAGE_FILE% %server% %to% %from% %subj% %auth% %debug%
[/code]

Or you can download the script:

[dm]4[/dm]

Mozilla Ubiquity – Useful and fun

So i’ve been checking out Ubiquity and playing with it a bit. Even in its “early, rough” state, it is fun stuff to play with and definitely useful!

I even had the time (about 2 min cause I just copied one of their commands) to create a custom command for is.gd the shorter URL service.

[js]
CmdUtils.CreateCommand({
name: “isgd”,
takes: {“url to shorten”: noun_arb_text},
preview: “Replaces the selected URL with an is.gd URL.”,
execute: function( url )
{
var baseUrl = “http://is.gd/api.php”;
var params = {longurl: url.text};
jQuery.get( baseUrl, params, function( isgdUrl )
{
CmdUtils.setSelection( isgdUrl );
})
}
})
[/js]

To add this command jsut open up Ubiquity (opt/ctrl+Space) and type command-editor, then hit enter. Add the code (it automatically saves as you type). Then your good to go.

To use the new command, have some text selected in a new email or blog post, open Ubiquity type isgd, then the url, hit enter and the text that was selected will be replaced with the shortened URL.

Shortening a URL with is.gd and Ubiquity
Shortening a URL with is.gd and Ubiquity

Of course there are plenty of other ways you can use/play with Ubiquity.

Ubiquity’s Intro: http://is.gd/1Wns

Custom Commands: http://is.gd/1Ydc

That’s right, I even used Ubiquity to create the links above.

Mate & Swiz – Other Flex Frameworks

Jun Heider just pointed me to the Swiz Framework.

Swiz is a framework for Adobe Flex that aims to bring complete simplicity to RIA development. Swiz provides Inversion of Control, event handing, and simple life cycle for asynchronous remote methods. In contrast to other major frameworks for Flex, Swiz imposes no JEE patterns on your code, no repetitive folder layouts, and no boilerplate code on your development.

Looks very interesting! I’m right in the middle of a quick project that we are using Mate for, so I guess I’ll have to check out the Swiz framework next. Hopefully I’ll have the time to write out some of my thoughts on both frameworks as I finish playing with them.

Status Update – what I’m doing and have done latley

Its been a crazy busy summer so far! Here is quick status of the stuff that I’ve been doing.

Work

Lots of ActionScript 2 – oh yay! But, it is still needed for some clients. Not a whole lot of exciting stuff there, but it is keeping me busy!

A bit of fun with Flex and ActionScript 3 – we’re working on some super secret code for a local company who is updating their site. I’ve been lucky enough to be able to squeeze in a few ‘voids’ between all the ‘Voids’ to create a cool component docking framework and SharedObject Manager class. I’ll see what everyone here says about sharing the code and share what I can.

Projects & Ideas

I’ve been playing around with lots of APIs and such lately. Trying to wrap my brain around the Social Graph – what is it good for, some really good ways to use it. So, I’ve signed up with tons of different Social Networks and services to see what is out there and what people are doing with it. You can check out the Social Links on the right for a list of those that I actually use regularly.

I’ve also got a couple of projects that I’ll release to the wild when I actually get around to finishing them:

The book that I was helping Chris Korhonen out with has been released. Yay Chris!

Travel

Just spent the last 2 weekends driving down to New Mexico so Aidan could spend a week with his Grams. Has a few good meals in Santa Fe and got to relax a bit – good stuff.

Pretty sure I’ll be going to 360Flex in San Jose in August. From what I hear – it is a damn fine conference and one of the more fun/interesting conferences for Flex – so I’m excited!

Other than that, don’t have much else planned. Possibly go out to Virginia to see my Dad and/or Austin to play a little.

Links: SQLLite, Peddle Pushers & Music Mixing

SQLite-manager

A very lightweight firefox extension (originally) to manage all your sqlite databases. This extension will be useful to developers who want to create and play with sqlite databases. Thanks Jun!

Clear Data Builder 3.0 becomes a free product

A code generator Clear Data Builder 3.0 will become available free of charge. Clear Data Builder (CDB) was released as a command-line open source code generator a.k.a. DaoFlex.

Protonotes: Leave your mark.

Protonotes are notes that you add to your prototype that allow project team members to discuss system functionality, design, and requirements directly on the prototype.

Assembla – Accelerating Software Development

Use Assembla spaces for rapid software development, and agile team collaboration. Get free workspaces with unlimited team size and integrated tools like wiki, discussion, alerts, chat, ticketing, Trac, Git and Subversion.

Mix2r.fm

Got the invite from Jun – Social network type site for music mixes.

Mate Flex Framework — A tag-based event-driven Flex framework

Mate framework has been created to make it easy to handle the events your Flex application creates. Mate allows you to define who is handling those events, whether data needs to be retrieved from the server, or other events need to be triggered.

ScribbleLive…live blogging

Welcome to on-the-spot live-blogging. Think of it as a media rich conference call.

Brand new Google Reader for iPhone
W00t! I’m liking it so far!

Google Maps API for Flash

This API lets Flex developers embed Google Maps in Flash applications.

Out For A Ride

Social networking for peddle pushers

Identifying Multiple Screens with Adobe AIR

While working on a presentation about Native Windows & Adobe AIR I ran into the Screen class. The screen object provides information about the display screens available to an application allowing you to position applications/windows on different screens. I say screens and not monitors because of a little caveat that the livedocs have in them:

Note that there is not necessarily a one-to-one correspondance between screens and the physical monitors attached to a computer. For example, two monitors may display the same screen.

I thought I’d have a little fun to get my code fingers back after a week in Cabo San Lucas, and create a little AIR app that identifies each screen. The basics are:

  1. Identify the Screens – I knew I had 2 screens, so that was easy. The screens property is an array of Screen objects, so you can work with as many as the user has.
  2. Create something to identify the windows – I used transparent windows with a label to make things simple.
  3. Then position the new windows on the screens.

[as]

private var _screenOne:Screen;
private var _screenTwo:Screen;

private function _identScreens( p_event:MouseEvent ):void
{
// I know I have 2 screens so I’ll just grab those
_screenOne = Screen.screens[0];
_screenTwo = Screen.screens[1];

// Now lets identify the screens
var identOne:IdentWindow = new IdentWindow();
identOne.title = “Screen One”;
identOne.screenLabel = “1”;

// open the irst window and set its position on the first screen
identOne.open( true );
identOne.nativeWindow.x = ( _screenOne.bounds.width / 2 ) – ( identOne.width / 2 );
identOne.nativeWindow.y = ( _screenOne.bounds.height / 2 ) – ( identOne.height / 2 );

var identTwo:IdentWindow = new IdentWindow();
identTwo.title = “Screen Two”
identTwo.screenLabel = “2”;

// open the second window and set its position on the second screen
identTwo.open( true );
identTwo.nativeWindow.x = ( _screenTwo.bounds.right – ( _screenTwo.bounds.width / 2 ) ) – ( identTwo.width / 2 );
identTwo.nativeWindow.y = ( _screenTwo.bounds.bottom / 2 ) – ( identTwo.height / 2 );
}
[/as]

Very straight forward and simple, but a fun little exercise.

You can download and install the app (with source) using the badge below:

[airbadge] Identify Screen Sample, http://www.thekuroko.com/wp-content/plugins/downloads-manager/upload/IdentifyScreens.air, 1.0, badge image.jpg[/airbadge]

Or, download the zip’ed flex archive:
[dm]2[/dm]

Adobe Announces the Open Screen Project

Adobe has just announced the Open Screen Project.

The Skinny:

  • Restrictions on use of the SWF and FLV/F4V specifications will be removed
  • The device porting layer APIs for Adobe Flash Player will be published
  • The Adobe Flash® Cast™ protocol and the AMF protocol for robust data services will be published
  • Licensing fees will be removed – making next major releases of Adobe Flash Player and Adobe AIR for devices free

What does it really mean? Well it could be the promise of a universal application platform and the ability to write an application and deploy it everywhere. But, we know, with the likes of Apple and Google, who haven’t really taken to the flash platform, that probably isn’t the case. To me it means that Adobe is allowing the community as a whole to participate in the direction that the flash platform takes. To develop what what the community wants and thinks needs to be developed. This is a good thing – yay Adobe and yay Flash!

A few more links to read:

Ryan Stewart

Techcrunch

Wired

Developers: http://www.adobe.com/openscreenproject/developers/

Businesses: http://www.adobe.com/openscreenproject/businesses/