Uplevel e-solutions

Webware and Rich Internet Applications

Adobe Air and Smalltalk integration example

Another good news for someone who really likes Adobe Flex/AIR and Smalltalk environments. Last time I wrote here about Glare project, and now there is an excellent example to build simple Adobe Air app with Smalltalk backend. I have only a one wish, if Glare will be available on other smalltalk platforms for example Squeak not only commercial VisualWorks, that’s gonna be something called “dreams come true”.

adobe air and smalltalk example

Here is an example to do something like on picture above.

  • Comments
  • Filed under: AS3, Flex, smalltalk
  • PureMVC resources

    Last time I hadn’t much time to writing here but it will change now hopefully. First of all we are generally working with PureMVC in our projects. Sometimes I’m wondering if that’s not overkill but in most situations it gives us really productive framework. Anyway my company mate had last time presentation about it on Adobe Flex polish group :adobers.org . Before meeting we collect some materials for people who want to start with PureMVC now so I will past it below, have fun !

    Source: ShoutWaves

    There are also few interesting articles about difference between architecture frameworks (PureMVC, Cairngorm, Swizz, Mate, etc):

    PureMVC tutorials:

  • Comments
  • Filed under: AS3
  • I usually don’t like to copy other’s articles here, but this one is really helpful and made by my friend so enjoy :).

    Source: Shoutwaves blog

    Some time ago I had a lot of problems with starting new projects. Common tasks had to be made. That’s why I’ve build flashdevelop as3 template with pureMVC, preloader, startup manager (loading fonts, css before everything).

    To install template in FlashDevelop ( it was tested on FD b9 ) you need to:

    1. Download template 131 ActionScript 3 - AS3 Shoutwaves Project with Preloader.rar
    2. Extract it and copy extracted folder to: “C:\Program Files\FlashDevelop\Templates\ProjectTemplates”
    3. Run flashdevelop, Project -> New Project
    4. Choose 131 ActionScript 3 - AS3 Shoutwaves Project with Preloader
    5. Write name, location, package ( without this your project will not work )

    Please use it, it’s free for everybody.
    Hope will be useful !

  • Comments
  • Filed under: AS3, Flash, Flex
  • Tamarin and scripting World

    Some time ago I wrote here about Tamarin and some tricks we can use with it. Like I said it’s amazing and gives us outstanding possibilities. You can read more about it here. But generally until now it was only theory without working examples. Today I found someting interesting called DigiMix. “Digimix is a Flex application that runs on an audio engine that allows you to mix multi-track CD quality audio (16 bit - 44.1 kHz) in the browser with many of the features that are found in modern day desktop digital audio workstations (DAW’s) including an effects engine, volume automation, clip editing, time stretching / syncing, and bouncing to disk.” You can find more description also on InsideRia article. Sounds normal but it isn’t, why ? Because application like this takes a lot of calculations (audio, audio converting) and in “normal way” (without AVM2/Tamarin) would have been impossibly slow and non-responsive. However, fortunately, new AVM2/Tamarin can makes this app workable, it works excellent. They said this is a next generation of RIA applications, and I agree completely with them. So now imagine what will be possible a few years from now with Flash Player 10, AVM2/Tamarin ! Here is a demonstration of DigiMix:

    But there are also other interesting projects in scripting World. For example SquirrelFish - it’s new, fast JavaScript engine for WebKit. Another fancy thing is Processing.js it’s made by John Resig, he has ported the Processing visualization language to JavaScript, using the Canvas element. You can see basic demos here. If you want someting for creating interactive fiction, here it is: Parchment - Javascript based interpreter for the Z-Machine created by Atul Varma. Outside of Mozilla, there are such interesting projects as Objective-J and Sprout Core. And of course if you haven’t yet tried AS3Wrapper you have to do it now ! AS3Wrapper is a Javascript library, compatible with IE and Firefox, that can pull the contents of the Flash virtual machine into Javascript. Now you can see what power we have :) have fun.

  • Comments
  • Filed under: AS3, JavaScript
  • ActionScript 3.0 and AVM2: Performance Tuning

    Some time ago I wrote article about Tamarin and AVM2 here. But now I also found something interesting about general ActionScript 3.0 performance and different ways to improve it. Here are interesting documents about these two problems:

    ActionScript 3.0 and Performance Tuning

    AVM2 Overview

    If you also want to find interesting things like this check dispatchEvent() site (New York Flash community) There are many good articles about ActionScript, Flash and Flex.

  • Comments
  • Filed under: AS3
  • Another cool 3D library

    ROXIK temporaries.

    In back to the RIA world, last time I found interesting AS3 3D Library called AS3 ROXIK Sharikura 3D Library. I was watching examples and the most interesting thing is performance. Watch this demo and observe that there is a many objects, everything works fluently but … you can add another objects and the animation is still not jerky. Unfortunately library now is not released yet but Sharikura said that his plan is to release it as an Open Source :)  - sounds great. He’s still working on it and what is more, this is his private project so it can takes a little time. Im waiting for it ! Generally there is a list of some examples, really cool enjoy !

  • Comments
  • Filed under: AS3, Flash
  • SPAS 3.0 - AsWing rival ?

    Like I said AsWing is a really good option in RIA applications development, but there is another solution if you don’t like AsWing, called SPAS (Swing Package for ActionScript).

    The Swing Package for ActionScript 3.0 (SPAS 3.0) provides a set of “lightweight” classes for making graphic user interfaces (GUI) on the Flash Plateform.

    The SPAS 3.0 is fully compatible with both Flash 9 and Flex 2 applications.
    It will be the starting point to extend Rich Internet Application to all applications wich are developed using Adobe’s Flash authoring products.

    The SPAS 3.0 supply Flex 2 developers a real and efficient “java-like” set of GUI classes to wrap RIAs much better if they had to work with the native Flash Platform components.

    Here is a sample application and some examples of using SPAS 3.0 . You can even find there a quick comparison of these plaftorms: AsWing A3 vs SPAS 3.0. Looks really nice :)

  • Comments
  • Filed under: AS3, Flash
  • PureMVC vs Cairngorm

    I’ve just read this post about comparing Cairngorm and PureMVC frameworks ( from design GUI side). Author said: “So is PureMVC better then? This is a question, that cannot be answered by this post alone. The UI patterns is just one part of both frameworks, albeit an important one. One could argue, that you get more out-of-the-box with PureMVC, the mediators being a builtin concept of the framework. The mediators and the communication from and to mediators through notifications, have been nicely worked into the PureMVC framework.”. Yes but I already think that PureMVC is much much better than Cairngorm. Why ? I’m working with both, and Cairngorm is for me terrible mess. Everything’s broken in MVC pattern, its so complicated in use and in teach. What is more they probably never heard about DRY (Don’t Repeat Yourself), everything must be included thousand times, generally in my point of vision Cairngorm is crap ! PureMVC is relatively simple, DRY, easy to learn (good architecture 101 tutorial and best practicies document) and PureMVC is faster !
    So generally i’m still wondering how people using Cairngorm can be productive. Last time i gave you here Silvafug presentation so I’m now using only PureMVC and if you will try it once you’ll never back to Cairngorm, have fun :)

  • Comments
  • Filed under: AS3, Design Patterns, Flex
  • AS3Wrapper - ActionScript 3 w Javascript !!!

    actionscript

    Dziś jest dzień zachwycania się czymś co nazywa się AS3Wrapper. Co to robi ? Otóż umożliwia dostęp do całego Flash API z poziomu Javascript. Całość naprawdę robi wrażenie i daje spore możliwości. Co najważniejsze nie odbywa się to wszystko kosztem wydajności ! Najlepiej odwołam się do artykułu, który napisał sam autor : Pulling Flash objects into Javascript. Polecam zobaczyć dwa dobre przykłady zastosowań: Przykład 1, oraz z biblioteką PaperVision3d Przykład 2 (zobaczcie źródła).

  • Comments
  • Filed under: AS3
  • AsWing - alternatywa dla Adobe Flex ?

    AsWing to Open Source’owy GUI framework stworzony w języku ActionScript3 (przedtem ActionScript2). Framework ten wzoruje się na Java Swing (obecnie najpopularniejszej bibliotece GUI w javie). Jest tu bardzo dużo komponentów, dzięki czemu można zbudować w pełni funkcjonalny interfejs dla aplikacji Flash/RIA.

    Podstawowy problem pojawiający się w aplikacjach używających Adobe Flex to .. ociężałość. Gotowy plik SWF może zajmować do kilku megabajtów, a sam czysty framework już zajmuje koło 1 Mb. Dodatkowo wszystkie te efekty i przejścia zażynają procesor.

    AsWing jest jakby odpowiedzią na to. Jest lekki (plik z samym Hello World zajmuje kilkanaście KB) i wydajny.

    Przykładem może być to co zrobił mój znajomy Evgenios Skitsanos grafeio.eu na razie wersja Beta, wszystko działa szybko i zajmuje 124 KB !! (podobna Aplikacja w Adobe Flex zajmowałaby około 1.5 MB).

    Dobry tutorial mozna znaleźć tutaj Step By Step AsWing with FlexBuilder, oraz forum dyskusyjne AsWing Forum.

  • Comments
  • Filed under: AS3, RIA
  • Tamarin Project - kilka sztuczek

    Tamarin to open source’owy projekt implementujący specyfikacje języka ECMAScript 4. Jest to wirtualna maszyna, która będzie używana w Mozilli Firefox 4 (czyli jeszcze nie teraz) razem ze SpiderMonkey (silnikiem JavaScript). Kod będzie dalej używany przez Adobe jako część ActionScript Virtual Machine wewnątrz Flash Playera.

    Niestety na razie nie ma wielkiego zainteresowania Tamarinem. Zainteresowanie to natomiast zrodziło się w Japończykach, którzy dalej wyprzedzają nas technologicznie o lata świetlne. Zrobili oni użytek z MMgc (Tamarin Garbage Collector), z AVM2(Action Script Virtual Machine 2) oraz kodu Tamarina, który można znaleźć tu: Tamarin Source i stworzyli AVMSHELL - kompilator powłoki (można teraz wywoływać z linii poleceń skrypty w ActionScript 3). Po co tyle wysiłku ? Chodzi o wydajność ! Ten sam kod napisany w JavaScript i odpalony pod Firefoxem 2 działa 15 razy wolniej niż napisany w ActionScript 3 i odpalony w Tamarinie (ciąg fibonacciego).

    Co zrobić żeby to uruchomić ? Można ściągnąć avmplus.exe (silnik wykonawczy).
    Skompilować do pliku skrypt.abc przy pomocy asc.jar z Flex SDK i uruchomić avmplus.exe

    java -jar asc.jar skrypt.as
    avmplus.exe skrypt.abc

    Z plikiem avmplux.exe można bardzo wiele. Jest świetny japoński serwis o ActionScripcie Spark Project. Są również materiały z konferencji poświęconej formatowi SWF , oraz artykuł o językach programowania kompilowanych do formatu SWF Link (niestety japoński :( ).
    Warty przeczytania jest też artykuł pokazujący co daje nam Tamarin.

  • Comments
  • Filed under: AS3