Another Flash from J2me developer perspective (Part1)

First, let me restate something: I am a strong promoter in Flash, but after some weeks of usage, I am still wondering why it does not match my expectations in terms of productivity. It seems that I am taking too much time for doing simple task. Why?

Here is a few of the points that I’ve identified:

  • Lack of UI toolbox
  • The biggest issue, especially for me, is that I spent too much time on things that are not my core competency: graphics! When trying to create user interface using Flash,there is no toolkit to create common UI element, like button, menus, etc…. I know, it must be easy to develop them using Flash, but mine really look crap, and then I have to spent a big amount of time with things that I do not deal usually; create nice looking button, put everything in place to do a scrollbar, etc…

    So what is really missing, for me, is a toolbox of usual UI component (menu, buttons, textbox, checkbox, etc…) that just can be drag-dropped on the screen, and easily manipulated, eventually customized, as well some common “effect” that could enhance the UI.

    The weakness here, it’s that its ‘too’ open, you have to create everything from scratch. You have to deal with concept that I usually do not care about, to understand the philosophy of Flash: all the tools, layer, etc…usefull for designer, totally not needed for me. I hope that market will mature, and some people (Adobe?) will provide such common toolkit, as well as some “skins” for these toolkits, still providing the ability to create everything from scratch. In fact, I’ve just realized that Flash is a low level graphic vector engine, and not an high level UI engine.

  • An application is not “linear”
  • Your application is presented through the “timeline”, on the editor. It shows, in a linear way, the various frame that correspond to your application. But an application is not linear like this: you go from one screen to the other, from main screen to parameters, back to main screen, then go to another one, etc… So, the ActionScript code is full of “goto”…The exact same goto that has been banned decades ago from high level programming is back in Flash.…


The stage view in Flash: all linear

The Flow design view in Netbeans: flow oriented

(I don’t think that NetBeans is better than Flash, but it’s just my understanding of what could be an higher level view of an application logic)

  • Where is the “developer’s view” in Flash?
  • The other weakness, it’s that it’s not a developer environment. It’s really a nightmare to figure out where is your code. The window is too small, very few feedback. ECMA script is not a so bad language, it’s not very fast, for sure, but it’s especially the lack of “developer orientation” which is a big problem in Flash8…

So, what is the solution? I would like to see a tool, may be using Flash as a low level technology that would allows me to focus on rapid prototyping, providing me predefined but customizable element. I would like to see a clear separation between code, and UI design and elements…And may be some higher level abstraction, like the one proposed by Netbeans…

I might be missing some important point, like the right tools, widget sets, etc…so please, if there are some developer who now some of them, I would be happy to test them….

In the meantime, I have to improve in Flash, learn a lot of things that I hope will let me be more productive once mastered….
Technorati Tags: , , ,

19 thoughts on “Another Flash from J2me developer perspective (Part1)”

  1. Flash (and thus Flash Lite 2.0) has a UI Toolbox (called Components), can store all logic in Classes and is very OOP-like. You can use design patterns such as MVC, etc… just like in J2ME. I am giving an eSeminar today (6/21/06) and will demo some of these concepts. Feel free to attend. More info can be found at http://www.mikekrisher.com.

  2. I’ll echo Michael’s sentiments. Flash is increasingly OOP and code doesn’t have to be a “nightmare” to find (I would argue if it *is* difficult to find in an application, the application was not very cleverly programmed). Most complex Flash applications are *not* timeline based, and application states can be changed without moving the playhead at all.

    Though the Flash IDE doesn’t really have a view like the NetBeans screenshot you show, Flash components, objects and applications made up of them can behave in exactly that way.

  3. Rotorglow, I am looking what is provided by Macromedia, I’ve followed the example from Macromedia Web site So it seems confirmed that there is no UI component in FlashOne1.1, and I will try to use the FlashLite2.0 ones.
    Regarding the IDE, and the method on how not to be timeline based, do you have any info/link on how to do this? Thanks in advance. But generally speaking my point is still the valid: the difference between a traditionnal development chain, in any language, to Flash is a long and painfull process….

  4. Hi Tom,
    I totally agree with you when you referr to Flash Lite 1.1.
    In fact Actionscript 1 is timeline oriented and it’s hard to learn for every developers.
    But when you talk about Actionscript 2 things change dramatically.
    AS2 is strongly Object oriented and you can get a high level of abstraction.
    You can use classes and design patterns like you do in Java.
    You can develop high level UI component to reuse throughout your projects.

    For what concerns the IDE, you can use some good freeware 3rd party tool to write actionscript code such as Sepy of Eclipse with FAME plugins.

  5. In fact, it’s not really the object orientation which is an issue, it’s more the efforts needed to “master” something that is usually presented as “easy” (at least by Macromedia). The efforts needed to understand Flash were higher than expected (at least for me and for a few other people). I agree that once mastered, it’s should be a productive environment regarding UI, but it should not be oversell as “easy”…

    So, thanks for the link, I will try Sepy but who have an example of what I am describing? Typically: a FlashLite2.0 app (seems the minimum requirement) with custom designed UI component inherited from Macromedia UI component with a non timebased approach?

  6. I do share some of your views too. I use the Movie Inspector in Flash to gain quickly access to the code. And using one of the sketching templates I found at http://www.clearui.com I can quickly mock up a prototype as well as create icons. Flash is great for prototyping. I have tried also Ikivo though I feel more at ease with the Flash IDE.

  7. Tom,

    I’m not sure I understand. There are plenty of pre-built UI components (menus, scrollbars…) for ActionScript 1. The ActionScript 2 versions are better, and now more numerous, of course, and more fully featured. Am I missing something?

    Those components have methods associated with them that let you (for example) populate the menus, set event handlers, etc. All through code. Search the Adobe developer center for “menu component”. (http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00003811.html will be helpful too)

    As for designing applications that are not timeline based, it’s really just a matter of instantiating objects and writing the code to make them “do things” when other objects command them to do so. You could easily make an application on a single frame with one of the menu components. In the simplest example, the menu component is instantiated with menu options you specify (through code). You write some methods in another object to receive the menu’s change event, and have those other components do things in response. The user is told to select an item from the menu. The other object reacts to the choice the user made. (Show or hide itself, make a beep, display “Hello!” or “You chose [value of item]“) Etc. All without the playhead advancing through a timeline.

    Graphic objects and animations using them can be created and controlled programmatically, using code, without specifying start and end keyframes. See http://www.adobe.com/devnet/flash/articles/animation_guide_15.html for an example of the Drawing API and a movie that has all its animation-controlling code in a single frame–or more likely, external ActionScript class files (which means there’s no mystery about where to find the code…:) They’re just like Java classes (though I’m not a Java expert) and it is (or should be) no more difficult to find code in a properly designed Flash application than a Java app. You simply browse the packages in your editor of choice (see below).

    For an example of controlling prgrammaticly tweened animations with the (relatively new) Tween class see http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00004142.html

    I don’t have any non-proprietary examples I can show you (the ones I have handy are all confidential), but I’ve build numerous data driven applications where the UI objects all exist on timelines consisting of a single frame. I guess that might still count as a timeline in some people’s minds, but it’s very much simpler than the example you show above.

    As for the shortcomings of the Flash IDE, I don’t know any ActionScript coders who use the ActionScript editor in Flash. Most people (I know) use Eclipse or Sepy. Third party compilers like MTASC can take the place of the one built-into the Flash IDE.

    This got long and a little unwieldy. I don’t know if helps, but I hope it did, at least a little.

  8. Thanks for the long and detailled answer Rotorglow.

    But when I try to drag and drop something from the component menu, it says that it can not be done in FlashLite1.1 or something like this.

    I also agree about the fact that things can be done differently in Flash. But then, we loose a lot of the advantage of an integrated IDE. If you go into this direction, the general complexity will increase, right?

  9. I am not a Flash (lite) master, but of what I’ve read and tried, it is just a different paradigm – time-based vs. traditional programmatic approach. Yes, there is ActionScript, but the way of building is stilll based on “time”. There is nothing wrong with that. It is just a different paradigm… I am planning on spending time in the future to learn more about this…

    ceo

  10. Hi, :)

    You’ve said:
    “I would like to see a clear separation between code, and UI design and elements…”

    (sorry if someone told you this before.. haven’t got time to read the comments)

    I’m working with Flash since 2001. And I agree with some of your opinions, but as I’ve saw you haven’t unleashed the full power of Flash ActionScript. I’ve developed a lot of applications only using ActionScript and UIComponents provided by Flash. You have the Events, you just have to use them….

    Indeed the straigth line that you see it at the begining is that Flash is “linear”, but no, it is not. You can use it like this and this is for beginners, who want to do stunning animations for web sites… But as a programmer you have the power of ActionScript … you don’t even have to use layers or frames … you can do all from Action Script you can develope classes objects and use events … you don’t have to use the Timeline ….

    I”m, sorry but I’m not a god narator … I don’t have teaching skills … but I hope that I make myself clear enough to make you curios about this. And I wish you luck in learning AS 2.0 … and also the other ways of using flash.

    ;)

  11. I agree that I am far from mastering Flash, but that’s was my point: Flash is not an easy environment to master. It require some work and experiementation before being as producte as in any other environment, if not better. So yes, you can avoid the IDE and go back directly to action script, but then lost some of the main advantage of it (the IDE), and ActionScript is probably not the best things for complex app?
    But don’t miss me, I still think that’s a great environemnt, I just would like to see it evolve in the right direction.

  12. I’ve been working in FL 1.1 and 2.0 for about 1 year now, and Flash since 1999.

    The paradigm is very different from traditional OOP. It has evolved immensely since it’s inception and continues to do so. The paradigms of Flash are unique to the program. It will take the average user a good amount of time to wrap his/her head around them.

    Lots of Flash Junkies use external editors to script their apps as some people are not big fans of the internal editor; although, the Movie Explorer does help to track non-linear scripting throughout the app.

    In terms of components, libraries are readily available. And yes, if you are poor with visual design, you app will look like crap, that’s why you need a designer! :)

    FL 1.1 and 2.0 are very different, due to AS0.5 and AS2.0, as well as the additional fscommand2 properties.

    This is not easy, but once you wrap your head around the concepts, you can execute prototypes that work on various devices in a very small amount of time; oh and they blow J2ME and Brew apps out of the water in terms of visual quality, that is, assuming you or someone on you team has graphic design chops.

    You can test out my newest FL2.0 app @ http://www.journeyofjin.com

    Thanks for the great discussion!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>