Under the hood of the FlexJS framework

Slides:



Advertisements
Similar presentations
Drawing, Skinning and Degrafa This presentation covers drawing, skinning and the use of Degrafa to make things easier. Understanding the basics of drawing.
Advertisements

JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Chapter 6 Preparing and Publishing Applications. Chapter 6 Lessons 1.Publish movies 2.Reduce file size to optimize a movie 3.Create a preloader 4.Publish.
FlexJS™ Flex™ For JavaScript Seattle Web App Developers Meetup January 15, 2015 Alex Harui Apache FlexJS, Apache Flex, FlexJS and Flex are are either registered.
© 2011 Delmar, Cengage Learning Chapter 13 Preparing Graphics for the Web.
Designer’s Challenge – Web-based Applications using Adobe Flex and OpenInsight Clay Borne President CLB IT.
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Mobile Application Development
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Visual Studio: Custom debugger visualizers. Creating Debugger Visualizers with Visual Studio : Introduction Code debugging is one of the most important.
Introduction to AppInventor Dr. José M. Reyes Álamo.
Introducing JavaBeans Lesson 2A / Slide 1 of 30 JDBC and JavaBeans Pre-assessment Questions 1.Which of the given symbols is used as a placeholder for PreparedStatement.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Technical Workshops | Esri International User Conference San Diego, California ArcGIS Viewer for Flex – Advanced Topics Lloyd Heberlie Björn Svensson July.
What’s Up With Flex? The last 15 months of Apache Flex and a look into the future Alex Harui Apache Flex PMC Chair August 4, 2013.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Lightning Talk Fred Rodriguez Nguyen Do CPSC 473 May 6, 2012.
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Title slide to be used at the start of a module. Developing Mobile Apps Roland Guijt
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Using Styles and Style Sheets for Design
Microsoft Visual Basic 2005: Reloaded Second Edition
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Adobe Presentation Brijesh Patel | Working with AIR Native Extensions.
Introduction CIS 136 Building Mobile Apps 1. What is a mobile app? 2  Computer program  Designed for small devices  Smartphones  Tablets  Other handhelds.
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
IE 411/511: Visual Programming for Industrial Applications
‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Mobile web Sebastian Lopienski IT Technical Forum 29 June 2012.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
Model View Controller A Pattern that Many People Think They Understand, But Has A Couple Meanings.
Wijmo Troy Taylor. What is Wijmo? -Wijmo is a kit of over 40 UI widgets, optimized for client-side web development. -HTML5 -jQuery -CSS3 -SVG.
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
The way of hybrid mobile development Hybrid Mobile Applications Telerik Software Academy
1 KaaShiv InfoTech  Presents  INTEL XDK For Inplant Training / Internship, please download the "Inplant training registration form" from our website.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 Flex for Flash Developers Sho Kuwamoto Sr. Director, Engineering Adobe Systems, Inc.
Unit-IV - Flash Player - Flex framework - MXML introduction - Action script introduction - Working with Action script - Flex data binding - Common UI components.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
Top 12 Frameworks for Android App Development
FlexJS 360|Stack Web Session #4 Alex Harui Apache Flex PMC Chair
IN THIS LESSON WE WILL REVIEW THE STRUCTURE OF THE INTERNET AND HOW BROWSERS ASSEMBLE WEBSITES BASED ON INSTRUCTIONS THEY RECEIVE FROM SERVERS. Internet.
 Can access all API’s made available by OS vendor.  SDK’s are platform-specific.  Each mobile OS comes with its own unique tools and GUI toolkit.
TypeScript for Alfresco and CMIS Steve Reiner CTO Integrated Semantics.
Phonegap API & Phonegap Bridge CIS 136 Building Mobile Apps 1.
Build Hybrid Mobile Apps with Ionic, Angular, & Cordova Brian
FlexJS World Tour Introducing Apache™ FlexJS™ San Francisco, California April 4, 2016 Alex Harui Apache Flex™ Apache Flex™, Flex, FlexJS and Apache™ are.
Working in a Mobile App Development Environment Lesson 2.
PhoneGap. web-based mobile development framework, based on the open-source Cordova project. use standard web technologies such as HTML5, CSS3, and JavaScript.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Creating mobile applications that integrate with SharePoint 2013 on-
A little more App Inventor and Mind the GAP!
Geospatial Research & Solutions GIS.ASU.EDU
Objective % Select and utilize tools to design and develop websites.
Tk Widgets in Javascript
Apache Cordova Overview
Objective % Select and utilize tools to design and develop websites.
Building Native Mobile Apps with Angular 2.0 and NativeScript
Compile, Build, and Debug
Phonegap Bridge Configuration file
Office 365 Development.
On the notion of Variability in Software Product Lines
Emerging Platform#3 Android & Programming an App
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
Bootstrap Direct quote from source: bootstrap/
Presentation transcript:

Under the hood of the FlexJS framework FlexJS: Deeper Dive Under the hood of the FlexJS framework Alex Harui Apache Flex PMC Chair August 4, 2013

Who am I? One of the original Flex SDK developers at Macromedia VP of Apache Flex Apache Flex PMC Chair 30+ years experience 11+ years at Macromedia/Adobe

Disclaimer Even though I am a full-time Adobe employee and spend my whole day on Apache Flex, everything I say here is just my opinion, and not an official statement on behalf of Adobe Systems Inc., or the Apache Software Foundation, or even the Apache Flex project itself.

FlexJS Use MXML and ActionScript to create either SWFs that run in Flash/AIR or HTML/JS/CSS files that run in browsers (or anywhere HTML/JS/CSS runs) without Flash. IE8, 9, 10, Chrome, Firefox, Android, IOS Mobile Apps via PhoneGap/Apache Cordova

DEMO http://people.apache.org/~aharui/FlexJS/DataBin dingTest/bin/js-release/ Shortened URL: http://s.apache.org/MQT JS debug and SWF versions: http://s.apache.org/ukh

Terminology API Surface – The total set of public properties, methods and events on a component Component Developer – Someone who is developing components for use by an Application Developer Application Developer – Someone who is building an Application by taking a set of components and gluing them together with ActionScript.

More Terminology Falcon – The name for the code-base for Adobe’s ASC2.0 that was donated to Apache Flex. FalconJS – The cross-compiler based on Falcon that was donated by Adobe to Apache Flex. Early prototypes used this compiler, but this code base is not under development at this time. FalconJX – A cross-compiler developed by Apache Flex committers that is currently being used to compiler FlexJS applications.

Philosophy Parallel Frameworks Plug-ins Composition over Inheritance Multiple Component Sets Just-in-time, not Just-in-case Rapid prototyping is important, but end-game optimization is critical

Parallel Frameworks The component developer does the hard work: Creates both a button.as and button.js Essentially, writes the component twice, once in AS and once in JS. Button.as can use Flash APIs Button.js uses HTMLElements, JS, and CSS The application developer writes one set of code Compiles and debugs in Flash Cross-compiles to HTML/JS/CSS

Beads (Plug-Ins) Instead of one Button with every property imaginable, Button optional properties are packaged into “Beads”. Beads are the name for plug-ins They should be highly-reusable Prompt for TextArea, TextInput, ComboBox, for example. Component when used as sub-components don’t need as much as when used at top-level Border on TextInput in ComboBox

Beads (cont’d) Different code for different runtime environments Toss out mouseover code on mobile, swap in touch code instead Use CSS to choose beads Wrap up a bunch of beads into a top-level component and proxy the model to the component API surface

Composition JIT compilers are used in the runtimes. The more you re-use code, the more efficient JIT is Flex startup is actually faster without JIT because it doesn’t re-use as much code A single feature can be written once and applied in several places. Text prompt example

Multiple Component Sets A one-size-fits-all Button works in most places, but not all

Multiple Component Sets A one-size-fits-all Button works in most places, but not all

Multiple Component Sets A one-size-fits-all Button works in most places, but not all A choice of Buttons means you have more decisions to make, but you don’t have to carry around excess code. And some folks have requirements to use JQuery or other frameworks.

Prototyping vs Optimization How do you choose from so many different buttons? Need utility to help you choose Maybe a few heavy buttons with lots of options baked in You will be able to toss out code you are not using. Debug-mode beads can give more warnings and do more parameter checking.

Just-in-Time Flex initializes a bunch of managers at startup that prepare for overlapping top-level windows, tooltips, and custom cursors. None of these are likely to be found in mobile apps You don’t even need PopUpManager unless you have floating non-modal popups Choose the right PopUpManager, and only instantiate it when you actually get around to showing a popup.

Component Patterns MVC Model Bead – stores properties Spark model is baked into the component View Bead – assembles sub-components, if any Spark Skins combine sub-components and the actual visuals Controller Bead – manages events, updates model and dispatches other events

Button.as Has no model. There are no properties! CSS for Button specifies a ButtonView as the view. ButtonView.as only knows how to display whatever is specified by the background-image style. That’s what the HTML Button does so that what we’ll encapsulate and present in AS. Flex buttons used for scrollbar arrows still think about text label layout. That’s not pay-as-you-go.

TextButton.as Wrapper that proxies label property to model. CSS for Button specifies model with label property. ButtonView.as only knows how to display the label. Different ButtonView could know how to display an icon with a label. Then you’d use a different model as well that supports an “icon” property or style.

Button.js Thin wrapper around HTML Button element TextButton.js is same since text behavior is built-in to HTML.

Button Skin For the basic component set, the skins are images you can specify as a background-image in HTML. Gif, png, jpg They are loaded on the fly, no embedding But the HTML5 Button set can load SVG as background-image You choose different components sets based on target devices.

Panel.as Specifies a PanelView that creates a TitleBar and ContentPane Another PanelView would create a TitleBar, ContentPane and ControlBar. Other PanelViews would include a StatusBar TitleBar is a Sprite with a TextField Some other TitleBar could be a Sprite with FTE Text

Panel.js Also specifies a PanelView. This one also creates a TitleBar and ContentPane. TitleBar is a DIV with some text in it.

TextPromptBead.as Overlays Text widget Different TextPromptBead can have different strategy for when to appear/disappear/reappear. Different implementation could change styles and text in a single text widget.

CSS in FlexJS CSS compliant Custom properties are prefixed AS-only properties are hidden in a custom media type in a media query. Need to create more and more sophisticated CSS implementations in the AS side

ValuesManager Abstraction for getting default values. CSS Styles, Resources, etc. If your app doesn’t use an expensive CSS feature, you may choose a less expensive ValuesManager

Compiling and Linking A Flex project contains MXML, AS, and SWCs The Compiler creates compilation units for every class defined in MXML, AS and SWCs FalconJX generates JS only for MXML and AS classes. It assumes that external JS files exist for every class in a SWC.

Block Diagram ApplicationMXML & AS Falcon Button.as (SWC) SWF HTTPService.as (SWC)

Block Diagram ApplicationMXML & AS FalconJX Button.js Button.as (SWC) Google Closure HTTPService.as (SWC) HTTPService.js

Next Steps More components More compiler work Release early versions Metadata Interfaces and other introspection Release early versions Basic features first, more features later Over time, we should be able to replicate most but not all of the current Flex SDK APIs

Summary We need help! All kinds of contributions welcome Testing Development Documentation Examples Look for me in the Apache Flex Discovery Room and on the Apache mailing lists.

Questions? http://flex.apache.org/ mailto:dev@flex.apache.org https://cwiki.apache.org/confluence/display/FLE X/Alex%27s+FlexJS+Prototype