Archive for the 'flex' Category

21
Dez

Get schema-free within minutes using MongoDB

As me, many software developers learned the relations view of database management system: Identifiy entities, develope a database schema, normalize it and map it to a real DBMS system. That’s fine. And for many application this approach is just fine.

For other types of application, this approach tends to make development complicated.

Continue reading ‘Get schema-free within minutes using MongoDB’

26
Feb

Flex’ mx_internal_uid considered harmful

Actually, not that harmful. But you should be aware of a special meaning of this Flex object property. Here’s the story:

Today, I tried to develop a method the create shallow and deep copies of objects. Finally, I prepared this method, initially without the line marked with __MARK__:

static private function clone( source:Object, deep:Boolean = false ):Object
  {
    if ( null == source ) {
    return null;
    }
    var copy:Object;
    if ( true == deep ) {
       copy =  ObjectUtil.copy( source );
    } else {
      copy = new Object();
      for( var key:Object in source ) {
        if (  ( 'mx_internal_uid' != key ) ) {     // __MARK__
          copy[ key ] = source[ key ];
        }
     }
  }
  return copy;
} // clone

Without the line marked by __MARK__, the method copies (more or less raw) objects, but the dataProvider-driven controls gets in trouble: List-based control add each managed object a ‘mx_internal_uid‘ to identify each data object. Thus, if you copy the ‘mx_internal_uid’ property, e.g. a DataGrid will no longer be able to distinguish the original source object or the clone(source) object.

Thus, it’s appropriate to not copy ‘mx_internal_uid‘ from source to clone.

15
Jan

Flex deployment: Using the correct mime type

Fine! You just managed to finish your first Flex-base AIR application. Using FlexBuilder’s Export Release Build…., you managed to package your deployable solution into a *.air file. Finally, you uploaded the *.air file to your web-server – and your coding mates tell you that not event a bit of an installation gets started. Too bad. What happened?

Most likely, you missed to assign the correct mime-type! Don’t forget, that you need to tell browsers, that files with *.air extensions actually are Adobe AIR installer files.

If you run Apache, adding the correct MIME type is simple:

AddType application/vnd.adobe.air-application-installer-package+zip .air

As always: Big trouble, small solution.Don’t forget, that this setting is absolutely vital! You need to set it – even if some browsers might be able to run the AIR install package with it. Most browser won’t…

29
Dez

Composing music – while solving logic puzzles

Auditorium is a logic puzzle. Auditorium is a music omposition application. Auditorium is simple gorgeous:

Playing Auditorium

If you play Auditorium, you place bricks on a board, which attract or deflect streams of particles.
If you move bricks around, Auditorium generates music, if the particle streams passes so called audio-containers.

Let the stream pass all audio-container you’ll get move to the next layer. Gorgeous!

31
Jul

CPreferencesManager : A preferences Manager for Adobe Flex/AIR

Here’s a small helper class CPreferencesManager which manages application preferences by means of a key/value set, which I added as a comment to coldfusionjedi’s nice blog:

Sample usecase: Make window positions persist after relaunch of an application:

Continue reading ‘CPreferencesManager : A preferences Manager for Adobe Flex/AIR’

12
Mai

Parleys: Enterprise RIA with Flex and Java

Just a short note, that Parleys just published a new video Enterprise RIA with Flex and Java.

As a Flex coder, you might give this AIR-based viewer a try and explore Parleys right from your desktop. Visit this page to learn more about Parleys Flex/AIR offerings.

12
Mai

Links: Obfuscating Flex/AS code

Much like Java, Flex compiles code into a bytecode representation for the Flash virtual machine (Flash VM). While opening VM code using a text editor, certain tools are able to retrieve significant portions of information for compiles Flex app. Much like obfuscators for JAVA, obfuscators for Flex/AS try to hide as much as possible in compiled code.

Continue reading ‘Links: Obfuscating Flex/AS code’

16
Apr

Minimizing Flex’ default context menu

In case you want to add custom menu items to the default menu item of a Flex app, here is a small snippet to get you started:

Continue reading ‘Minimizing Flex’ default context menu’

12
Apr

Data visualization video tutorial

In case you’d like to learn how to visualize data using Flex or AIR, check this video and see how easy it is to visualize data using DataGrid, AdvandedDataGrid and a CoverFlow component of Doug McCune.

Actually, the author of the video uses one single data source and visualized it using different data-driven components.

Duration: 11 minutes.

09
Apr

TATrace: A simple Flex Trace component

Besides the full features Flex debugger, the trace() method is a useful way to inspect variables during debugging a Flex application: If you start a Flex application in Debug mode, trace() prints the value of the passed expression to consol.

Another way is to register a variable for permanent traceing. This way, the variable gets traced, each time it changes its value.

Based on the following TATRace component, you request tracing of a variable using a small piece of MXML. Suppose you’d like to trace a variable ‘traceableVariable’, then you just add [Bindable] in the line just before the declaration of the variable. This enables the variable to be referenced as ‘{traceableVariable}’.

Mark a variable as traceable

To trace each change of traceableVariable, add this element in your main MXML file