Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection /

Exploring Rich Island development with Flex Builder – Part 1: Getting started

by Trilemetry

Trilemetry
  • Trilemetry, Inc.

Modified

3 August 2009

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flex 3 Flex Builder 3

Requirements

Prerequisite knowledge

This tutorial is written for:

  • Experienced SAP Netweaver ABAP developers without Adobe Flex experience.
  • Experienced Adobe Flex developers without previous SAP Netweaver ABAP experience.

User level

All

Required products

  • Flex Builder (Download trial)

Welcome to Part 1 of this nine-part tutorial series. Parts 1 through 6 focus on teaching Flex development to SAP developers. Part 7 teaches Flex developers how to create a Web Dynpro application so that they have a passing familiarity with the environment. Parts 8 and 9 show both SAP and Flex developers how to integrate the Flex application as a Rich Island into the Web Dynpro application.

In this part, you will explore the finished sample application from the user's point of view, learn the application's architecture and set up a project in Adobe Flex Builder.

Note: Flex developers can skip ahead to Part 7.

Exploring the finished application

In this section, you will explore the Rich Island application that is built from scratch in this tutorial series.

Description of the application

In this tutorial series, you will create an SAP Web Dynpro application that contains a table UI element with inventory quantities to create a wagon. You will also create a Rich Island using Adobe Flex Builder to visually represent the wagon assembly line (see Figure 1).

The finished Web Dynpro application
Figure 1. The finished Web Dynpro application

The assembly line has a clock display that counts down the time until inventory is depleted in one bin. As the clock counts down, you can see inventory values decrease in each bin. When inventory in any of the bins reaches a minimum threshold value, the bin will turn yellow, indicating that it is running out of inventory. It will turn red when it is out of inventory.

You can replenish inventory by increasing the quantity values in the SAP table UI element or in the colored bins of the rich island. The application recalculates the clock based on the new inventory amounts and resumes the countdown.

The application in action

Watch the following video to see how the rich island that you build in this tutorial series works:

Video:

Seeing the working application (2:28)

Understanding the architecture

In this section, you will learn about the basic structure of the application.

Introducing the application structure

ShopFloorBins.mxml file is the main Flex application file; this file:

  • Imports the SAP libraries to communicate between the Rich Island and the Web Dynpro application
  • Controls the animation and calculations for the clock
  • Calculates the inventory bin values as wagons are created
  • Tracks the threshold inventory in the bins

The application uses two child custom components (see Figure 2):

  • ClockComponent.mxml: The digital clock display component
  • BinComponent.mxml: A reusable component that is used five times to display the available parts inventory and color status
The ShopFloorBins architecture
Figure 2. The ShopFloorBins architecture

Introducing the variables used in the Flex application

This is a reference list of the variables you will create in this tutorial series.

  • _wagonInventory: The inventory data that will populate the colored bins. This is the same data that populates the SAP table UI element.
  • _wagonProductionRate: The speed at which a complete wagon is assembled.
  • _wagonYellowWarningAmount: The minimum number of wagons that can be created, based on the available inventory, when a bin turns yellow.
  • _inventoryNeededForYellow: The number of parts needed in a bin to make the wagons for the _wagonYellowWarningAmount.
  • _wagonRedWarningAmount: The minimum number of wagons that can be created, based on available inventory, when you want the bin to turn red and the assembly line to stop.
  • _inventoryNeededForRed: The number of parts needed in the bin to make the wagons for the _wagonRedWarningAmount.
  • _isWagonInventoryThereFlag: The indicator to alert whether the inventory data from SAP has arrived and is available for use.
  • _binPosition: The index of the data in the ArrayCollection.
  • _isProductionDataThereFlag: The indicator to alert whether the production rate data from SAP has arrived and is available for use.
  • _isRedWarningDataThereFlag: The indicator to alert whether the red warning data from SAP has arrived and is available for use.
  • _isYellowWarningDataThereFlag: The indicator to alert whether the yellow warning data from SAP has arrived and is available for use.
  • _productionTimer: An instance of the Timer class that will generate timed events and animate the clock and bin displays based on the _wagonProductionRate.
  • _applicationStarted: The indicator that alerts whether all data has been received and ensures the timer event is only initialized once.
  • _productionRateCounter: A counter that will be used with the _wagonProductionRate to decrease the inventory in the bins.
  • _secondsToCreateAvailableWagons: The number of seconds needed to create wagons based on the bin with the lowest amount of inventory. This value will change appropriately as inventory is used.
  • _clockMinutes: The minutes calculated from the _secondsToCreateAvailableWagons for display in the clock.
  • _clockSeconds: The remaining seconds (after the minutes are calculated) for display in the clock.
  • _clockDisplay: An instance of the Date class that is used to create a time to display on the clock.
  • mappedColumnNameForBinTitle: The ActionScript alias variable that is mapped to the Title column name in the SAP UI table element.
  • mappedColumnNameForBinQuantity: The ActionScript alias variable that is mapped to the Quantity column name in the SAP UI table element.
  • mappedColumnNameForBinParts: The ActionScript alias variable that is mapped to the Parts column name in the SAP UI table element.

Creating a Flex Builder project

In this section, you import and configure the starter Flex Builder project. You will use this project to create the Flex application that will become the Rich Island for the Web Dynpro application.

  1. In Flex Builder, select File > Switch Workspace > Other.
  2. In the dialog box, click the Browse button.
  3. Navigate to the C drive and click the Make New Folder button (see Figure 3).
Create a new workspace folder.
Figure 3. Create a new workspace folder.
  1. Name the new folder SAP_RichIslands.
  2. Click OK.
  3. Click OK to set the C:/SAP_RichIslands directory as the new workspace.

    Flex Builder will close and reopen in the new workspace.

  4. After Flex Builder reopens, select File > New > Flex Project (see Figure 4).
Create a new project.
Figure 4. Create a new project.
  1. Name the project ShopFloorBins and keep all the default values.
  2. Click Finish.
  3. Right-click on the ShopFloorBins project and select Properties.
  4. In the menu on the left, select Flex Compiler.
  5. For the Flex SDK version, choose Use a specific SDK then select Flex 2.0.1 Hotfix 3.
  6. Click OK.

Where to go from here

In this tutorial you were introduced to the wagon assembly line rich island that you will create in this tutorial series. You also learned about the application's architecture and the variables used in the application. Lastly, you created a Flex Builder project.

If you are an SAP developer, proceed to Part 2, where you will create the layout that is the display foundation of the rich island.

If you are a Flex developer, proceed to Part 7, where you will learn the basics of creating a Web Dynpro application.

If you are interested in learning more about Flex Builder, refer to the following resources:

Introducing Flex Builder (7:22)
Creating a Flex Builder workspace and project (7:04)
  • Flex Builder features
  • Flex Builder editor cheat sheet

Exploring Rich Island development with Flex Builder

For your reference, here are all the parts in this series:

  • SAP developers: Build an interactive Flex application from scratch
    • Part 1: Getting started
    • Part 2: Laying out and styling visual elements
    • Part 3: Handling data and binding it to controls
    • Part 4: Creating a custom component
    • Part 5: Animating with ActionScript
    • Part 6: Synchronizing data in components
  • Flex developers: Create a Web Dynpro application
    • Part 7: Creating an SAP application
  • Flex and SAP developers: Create a working Rich Island
    • Part 8: Creating a Rich Island and handling data
    • Part 9: Communicating between a Rich Island and a Web Dynpro application

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement