Friday, January 11, 2013

Flex mobile development tips and tricks – Part 1: Data handling


Handling data is one aspect of mobile development that requires traditional application developers to adopt a different way of thinking. For instance, for many mobile applications it is important to persist (store) data when the user closes or switches away from the application, when an incoming call is received, or when the application is forced to shut down for some other reason. In addition, mobile application Views are destroyed and recreated often. As a result you'll need to think about how to handle your data between views. So, the two main scenarios in which you need to save data are:
  • Between application executions (that is, when closing and restarting the application)
  • Between views within your application

Thursday, January 10, 2013

view transitions in Flex Mobile Platform


Using view transitions


While navigating through a Flex mobile application from view to view, by default one view slides off the screen as the new one slides on. You can change the animation or effect used in this view transition using one of four different classes that are available in the spark.transitions package in Flex 4.5:
  • SlideViewTransition
  • CrossFadeViewTransition
  • FlipViewTransition
  • ZoomViewTransition

Creating an alert popup in Flex Mobile Platform

Sunday, May 27, 2012

Important topics about Flex


Basic information to be known by a Flex Developer for interviews

Component's creation life cycle

Major events dispatched during a component's creation life cycle.

Components are instantiated, added or linked to a parent, and then sized and laid out inside their container

After all components are created and drawn, the Application object dispatches an applicationComplete event. 
* This is the last event dispatched during an application startup.

Single View/ Multiple View

Containers with a single view, such as BoxForm, and Grid containers, create all of their descendants during the container's instantiation because these containers display all of their descendants immediately.

Containers with multiple views, called navigator containers, only create and display the descendants that are visible at any given time. These containers are the ViewStackAccordion, and TabNavigator containers.


Deferred creation

You could increase the startup time and decrease performance of your applications if you create too many objects or put too many objects into a single view. To improve startup time, minimize the number of objects that are created when the application is first loaded. If a user-interface component is not initially visible at startup, avoid creating that component until you need it. This is called deferred creation. Containers that have multiple views, such as an Accordion container, provide built-in support for this behavior. 

You can use ActionScript to customize the creation order of multiple-view containers or defer the creation of other containers and controls.

After you improve the actual startup time of your application as much as possible, you can improve perceived startup time by ordering the creation of containers in the initial view. The default behavior of Flex is to create all containers and their children in the initial view, and then display everything at one time. The user will not be able to interact with the application or see meaningful data until all the containers and their children are created. In some cases, you can improve the user's initial experience by displaying the components in one container before creating the components in the next container. This process is called ordered creation.






#will be continued .... 

Saturday, October 29, 2011

The GesturePopUp class

Just found this awesome example on Gesture. A gesture starts with a mouse down on a box and ends after the user has moused over several boxes and releases the button.






source

Saturday, October 22, 2011

How to drop a SQLite database

To "drop" a SQLite database, all you have to do is delete the SQLite database file you were accessing.


Just awesome ;)

How to know does a table exist in Adobe AIR SQLite


public function doesTableExist(connection:SQLConnection, tableName:String):Boolean{
    connection.loadSchema();
    var schema:SQLSchemaResult = connection.getSchemaResult();

    for each (var table:SQLTableSchema in schema.tables)
    {
        if (table.name.toLowerCase() == tableName.toLowerCase())
        {
            return true;
        }
    }
    return false;
}

source

Freelance