personal experiences and code :)

Monday, December 11, 2006

opaque swf format?

Tim Sneath is an MS Vista Technical Evangelist, and I was reading his post on the WPF/E dev environment over the weekend. I was particularly interested, because I have a mac (with mono installed), and was wondering how I can get some wpf/e goodness going on this environemnt. Now if I am right, there's no luck here... is MS interested in having people develop for wpf/e on macs? Most geeks I know have mac book pros these days... I don't plan on getting vista installed, personally, but I would love to develop (or at least learn about wpf/e... in my current development env).

Anyway, a statement on Tim's post didn't quite sound right to me:
One difference that I'll call out is in the way each technology is embedded. Flash applets are distributed as .SWF files, which wrap all the resource and code information into a somewhat opaque (emphasis, mine) binary format. On the other hand, the goal for "WPF/E" is to complement HTML by providing a more transparent approach.

I think this is inaccurate, and I hope the language is not deliberate; you can find out more if you do a web search for "swf specification"; I think there are benefits in having a single swf file to deploy: it is convenient for all the assets that come together for your particular swf, the binary format allows for a smaller footprint and efficient delivery eventually, plus it is trivial anyway if your target is a binary. If you really want to share the source, nothing prevents you from zipping it up and making it available, anyway. If you are doing flex and you want to publish your souce code, well that is documented too. I am not a fan of the fla format/flash IDE though, which is why I am happy that mxml allows you to do swf source, declaratively, with plain text.

Judging from the response from the just-ended FOTB conference, people realize that ms has some really good tools for the web here. I don't know for myself. A fud campaign, however (and I hope it is not), will yield exactly the opposite of whatever the expectations are. Let the tools compete on their pure merits (if there indeed is overlap in capabilities), and do not set the baseline of developers for the platform to a windows OS.

cheers,
-- eokyere :)

Links:

WPF/E Developer Environment - http://tinyurl.com/y2vp7m
Publish Your Flex Source code - http://tinyurl.com/ued7o
SWF Specification Links - http://tinyurl.com/wlbea
FOTB - http://www.flashonthebeach.com/

Thursday, November 30, 2006

flash @ the javaposse

James Ward at Adobe wrote to the JavaPosse (on episode 95, towards the end) to clear up a few things related to the tamarin announcement and it's timing with Java going the GPL route that came up in the previous edition; i called bs on javaposse, btw.

Anyways, Dick and the rest of the guys there generally feel like I do--that there really is a drive to get current versions of the player on linux in time (which gets it into the hands of developers who haven't really cared about it in the past) and that it allows for some really slick stuff to be built.

They mentioned that they might try to get James on there for a chat about flash, as an alternative *thick* client platform; I thought that is interesting; I'm sure hope Adobe will follow up on this... it doesn't get as easy as this to hit some core audience :)

cheers,
-- eokyere :)

Aptana, Your web IDE is here

while doing some research for work, I went off on a tangent wondering what happened to xamlon; hitting the default RHEL/Apache 2 site isn't what I bargained for; what happened to them?

Meanwhile, I found a link to great IDE in Aptana (in beta) on Robin Debreuil's weblog; from the product page:
Aptana is a robust, JavaScript-focused IDE for building dynamic web applications. Highlights include the following features:

* Code Assist on JavaScript, HTML, and CSS languages, including your own JavaScript functions
* Outliner that gives a snapshot view of your JavaScript, HTML, and CSS code structure

I've been using it for a few days now, and it is actually quite solid; it is built on Eclipse (and has a plugin for it) plus it's available on Mac, Linux and PC. If you are doing some coding in the file formats mentioned above, you want to try this product.

cheers,
-- eokyere :)

Links:

Aptana - http://aptana.com

Tuesday, November 21, 2006

Wiiiiiiiii and flash :)

Dan Wood just pointed on our internal list that the wiiiiiiiiiii will have support for flash. From the Opera press release:

"With support for Flash and AJAX-based content such as Google maps, Wii users will benefit from a feature-rich Internet experience that is uniquely customized for the Wii."

sorry, ps3, but for geek points I know which console I'm getting :)

Cheers,
-- eokyere :)

Links:

Opera Wii Press Release -- http://www.opera.com/pressreleases/en/2006/09/26/

Tuesday, November 07, 2006

tamarin

in flash circles, this is probably old news, and will likely be the nail in the coffin of the flash/ajax debate.

From the mozilla page:
The Tamarin virtual machine currently implements the ECMAScript 3rd edition language standard that is the basis for JavaScript, Adobe ActionScript, and Microsoft Jscript, plus some of the new language features proposed in the ECMAScript 4th edition specification. By working on an open source implementation of ES4 with the community, Adobe and Mozilla hope to accelerate the adoption of a standard language for creating engaging Web applications. We hope the Tamarin project accelerates the ability of developers to create and deliver richer, more interactive experiences that work across multiple platforms.

go over to jd's blogpost for a roundup on the conversation on this so far.

if you know flash-related stuff, your skill set just got cemented for a lot more years to come (more on this later)


cheers,
-- eokyere :)

Links:

Project Tamarin - http://www.mozilla.org/projects/tamarin/

Friday, November 03, 2006

emmanuel.okyere@akqa.com

i'll be joining the ranks at AKQA, in the crd dept, from next week; the guys at itoworld have been such a positive influence on me... from one great group of guys to another great group of guys... it's been a lot of blessings; and i really appreciate all those experiences. wish me well :)

cheers,
-- eokyere :)

Thursday, November 02, 2006

Rob Savoye on Gnash - The GNU/Flash Player

John Dowdell provides a link to a video on Rob Savoye/Gnash in a comment to Ryan Stewart's blogpost on the Enhanced Flash Player... that was quite long :)

Now if you see the video, it's interesting, to me at least, how over half of it is 'wasted' on Flash 'security' (specifically, harvesting of data/cookies), which I feel is a moot point, btw.

Towards the end, however, Rob talks about what could be the actual utility of the free (as in speech and beer) flash player. Gnash uses gstreamer/ffmpeg to support all the audio and video formats of the gnash player, so rather than being able to play only proprietary formats like mp3 and flv, the gnash team plans to increase the adoption of the free codecs as well.

He also mentions that the player is embeddable, and for a lot of content providers/consumer electronics people, java is too big; the interviewer mentions that embedded Java hasn't been easy to use and solutions she's found haven't been as wora as they should be... which is something I've heard from Richard Leggett before--he's the in-house Flashlite guru at AKQA, has a book coming out on-topic btw, and is well respected in the community on the subject.

imho, this is the most important point Rob should have made, and that is sadly buried towards the end. Gnash is an embeddable audio/video streaming client, with support for proprietary and open codecs alike, that happens to be flash programmable.

cheers,
-- eokyere :)

Links:

Gnash - http://www.gnu.org/software/gnash/

Monday, October 30, 2006

flexible flexifying flex

this post is about two new tools to get you flexing your muscles... err sorry, i almost got carried away ;P

john grden, your boy behind red5, is making it flexible to flex :) ... and hot on the heels of that (could be the other way around) Ted Patrick, Ray Camden and Ben Forta want you to flexify with the flexifier

FLEXible gives you some limited capabilities of Adobe's Eclipse-based Flex Builder IDE, by allowing you drag/drop flex components, edit src and see changes in real time. It was built in flex, and here's a demo video here.

FLEXifier allows you to write and try flex code, directly on the application page, without needing to download or install anything. Also built with flex, and a mix of cf and spry.

tasty morsels of your own dog food, and very good tools for the adoption of flex. go check em out. And thx guys.

cheers,
-- eokyere :)


UPDATE

Nov 1 2006 -- Since there's a flash 9 player for linux out there and no support for linux yet, with Flex Builder, these tools (especially, flexible) should come in quite handy, shd you find yourself on a linux distro. Cheers.

Friday, October 27, 2006

familiar software experiences

i'm what you could probably call a keyboard nut; probably for the same reason people get used to vi and then can't ever get used to any other editor. i'm not in that circle though... for practical reasons, i'd pick an ide over vi any day, but i digress

anyway, i'm doing some writing stuff in neooffice (openoffice) and one of the things I like to do in eclipse is select a bunch of text and use Alt + cursor (up/down) to move them around. [when using this with the jdt, you actually get code formating as a bonus too :)]

out of habit, I tried that on NO/OOo and it didn't work. i thought for a second that NO probably had the feature and so went asearching... playing around with various keyboard combinations... I found a few things... and yup, NO has that baby locked down too.

On the mac, its Cmd + cursor (up/down) to move text around.

brilliant!

cheers,
-- eokyere :)

Tuesday, October 24, 2006

codepress: real-time syntax highlighting in a textarea

i'm very jealous; something i always wanted to do with actionscript; create an online rich text editor that does real-time syntax highlighting (at least for Java/Actionscript).

the guys over at CodePress site nailed it with javascript ;)

nice. very nice. awesome stuff.

-- eokyere :)

get Wiser with SubEthaSMTP

You won't think it should be so difficult to write effective test cases for the bits of your application where you have to send/receive emails.

Sample use case:

You have a 2-step registration process where after a user has submitted their info, they are sent a challenge token (via email) to validate the submission/make sure the email address is actually in use (and that they have access to it), before you add them to your 'users' table.

Ideally, to test this little piece of functionality, you need to be able to give your test mua a fake smtp port, have a dummy server listening on that port, have a convenient way of starting this server, retrieving messages it has to transfer, be able to retrieve all the usual suspects from a sent message (sender, receiver, subject, content etc), and be able to make assertions against these and your test data.

A long time ago, I found dumbster; I figured it solved the author's problems when he/she wrote it then, but just couldn't cut it for what I wanted to use it for.

So I went asearching, and found greenmail, which seemed to relieve me of the pains I was having with dumbster, although it still felt kinda kludgy; for instance, this is a snippet taken of the examples doc on the greenmail page:

[code]
servers = new Servers(ServerSetupTest.ALL); servers.start();
//use random content to avoid potential residual lingering problems final String
subject = servers.util().random(); final String body = servers.util().random();

//wait for max 5s for 1 email to arrive
assertTrue(servers.waitForIncomingEmail(5000, 1)); //Retrieve using GreenMail API
Message[] messages = servers.getReceivedMessages();
[/code]


the servers.waitForIncomingEmail(5000, 1) bit is clearly kludgy; it also seemed to treat ccs as sent mail, so if you sent one mail and cc'ed it to 10 people, then you had to remember to test for 11 mails to be sent by the mta; i found workarounds for this, and all in all it caused me far less pain than dumbster, so I was actually quite happy with it... at least until Geert pointed me to Wiser

From the Wiser page:

[code]
Using Wiser is trivial:

Wiser wiser = new Wiser();
wiser.setPort(2500); // Default is 25
wiser.start();

Now, use a mail client to send email to your Wiser server. To get your JavaMail messages out of the Wiser server, just use this code:

for (WiserMessage message : wiser.getMessages())
{
String envelopeSender = message.getEnvelopeSender();
String envelopeReceiver = message.getEnvelopeReceiver();

MimeMessage mess = message.getMimeMessage();

// now do something fun!
}
[/code]


It really doesn't get simpler (and wiser than that); and yes, writing effective email test cases has, thanks to Wiser, become quite simple; and fun too :)

cheers.

-- eokyere :)

Monday, October 23, 2006

IoC: Inversion of Consequence

when i write code, and it causes you pain, try to find a positive spin to it ;P ... it might be the only thing that keeps you sane enough to get through the maintenance job/babysitting that you have to put it through... it's been a hell of a weekend, and I found Malcolm Forbes just about when I needed it - "Failure is success if we learn from it." If experience teaches us best, then hopefully it follows that you learn to avoid more code smells, the more brittle code you help to correct

my valley of despair has finally hit a minimum and i'm off to find some much-needed sleep

zzzzzz

-- eokyere :)

Thursday, October 19, 2006

tux: we've been ria wora'ed ;P



joining the earlier birds in announcing to the world the availability of player 9 for the tux family... in that screenshot, running happily on lampetia, fc4 over parallels in firefox 1.0.8 :)

tinic uro, over at his blog, is really happy about the performance of this release. He metions this is the fastest gnu/linux version they've ever released, and that "in some cases the GNU/Linux version is up to 20% faster on the same hardware compared to the Windows 32bit version." It looks like tuxland finally found first-class citizenship in Adobe land--at least with the flash platform.

while there are still problems with the current release that the Adobe engineers have to look at, as tinic notes, it should be interesting to see if releases from here on follow more of a parallel pattern.

Developers sure would love that; all the features you've been coding to for the mac and win boxen, will now be free to run on all the gnu/linux flavors out there. A hat tip; a raised glass to the Tinic, Mike and the rest of the unsung heroes on this release.

go grab it here http://labs.adobe.com/technologies/flashplayer9/


-- eokyere :)

Wednesday, October 18, 2006

mac a honey witcha zune?

"In a word, no. I've seen the demonstrations on the Internet about how you can find another person using a Zune and give them a song they can play three times. It takes forever. By the time you've gone through all that, the girl's got up and left! You're much better off to take one of your earbuds out and put it in her ear. Then you're connected with about two feet of headphone cable."

truer words haven't been said, and coming from the 'mac daddy' himself, u know u can take it to the bank ;P

-- eokyere :)

Wednesday, October 11, 2006

RIFE - as DRY as it comes

Aral has a post on some DRY pains with RoR (http://aralbalkan.com/764)... aral's blacklist of ips also managed to scoop me in, so my comment could not be retained

anyways, Aral, I feel your pain; I don't know enough about Ruby or RoR to give a meaningful suggestion wrt them; in the RIFE community (http://rifers.org) though, we believe that centralizing the metadata for your business objects, and allowing that to drive all the other connecting layers of your application is quite RIFE (read kewl ;P)

say you have an object instance of Foo, foo, where

Foo { String name; String email; }

the metadata facility allows you to say, for example:

addConstraint(new ConstrainedProperty("name").notNull(true).notEmpty(true));
addConstraint(new ConstrainedProperty("email").email(true).unique(true).maxLength(100));

the email field could, for instance, be representing the login field in your authentication toolkit

by defining such metadata for the email field, the framework is able to (among a whole load of things):

* through it's database layer, use an sql query builder to limit the size of the column in which the text will stored when the table creation sql is generated (by the framework for you, from your business object/bean),
* through the metadata facility, validate/check that data entered indeed conforms to those constraints: that it's a well-formed email address, that it is unique (by applying a datasource context to it) and that it's size does not exceed the size constraints applied to it.
* through it's template engine, use an html form builder to create a field that doesn't allow the entry of longer text
* through it's template/validation engines, generate meaningful, customizable (through properties) error messages when constraints have been violated.
...

these, to paraphrase Steven Grimm, "cross-layer synergies" (enabled by RIFE's centralized metadata facility) are some of the reasons we are seeing an influx of developers adopting the RIFE way.. I don't believe it gets DRYer (or RIFEr for that matter) than that ;)

-- eokyere :)

Tuesday, October 10, 2006

the mbp club

most of the posts on this blog will be made on my trusty new (for about 4 months now) friend, charybdis; it's an mbp, that as of this posts spots OS X 10.4, instances of fedora core 4 and windows xp sp2 (over parallels). the first time someone asked me how i felt about her, i said she was graceful--that hasn't changed in 4 months.

i run smultron as my basic development editor (vim for purely text stuff), have instances of Callisto (and Europa), Netbeans (5b2, 6m3), Xcode and ANTLRWorks for dev stuff; Callisto finds more use most of the time though. looking forward to adding an adobe (or whoever creates one's) flex ide (for mac) to that list

my fc4 install, forms my basic 'remote' test environment (with tomcat 5.5.17, postgresql 8.0x among others for a current project), and will continue to play this role with added software as and when I need a linux test deployment target.

windows is on there for a few random stuff i still haven't found mac/linux equivalents for, as well as for adobe software i'm either testing out or still using; i might strip out most of the unnecessary stuff over time, and use it as a target for any .net /winfx stuff i decide to dabble in, in the future.

for writing and word processing stuff, as well as the planning that leads to them, I have neooffice, freemind, and omnioutliner.

a couple of other random code running around here include colloquy (irc), skype b2/msn messenger 6, democracy (i'net tv), firefox 2rc2, iterm (and terminal), the google stuff for mac (google.com/mac), keynote etc

you've been introduced to my trusty mbp; joined the club yet? how is it helping u do what u do?

-- eokyere :)