Login Example
Preface
The Login Example aims to be a quick and easy "Show Me The Code" guide for Flex beginners and intermediate Flex coders that try to build large-scale Flex apps. While you can see the following code examples as a way I would recommend building these apps, I am not in the position to say that: "This is the way you have to do it".
Introduction
Please read the Feature Specification of the Login Example application. The following code examples provide solutions for several dimensions in Flex development:
- Flex SDKs (Flex 3.5 "Halo", Flex 4.1 "Gumbo", Flex 4.5 "Hero" and Apache Flex 4.8)
- Runtimes (Adobe Flashplayer & Adobe AIR)
- Mobile platforms (Google Android, Apple iOS TODO and BlackBerry Tablet OS TODO)
- Flex 3 to Flex 4 Migration Guide
- MVC Microarchitectures (Cairngorm 2.2.2, PureMVC 2.0.4 TODO)
- IoC Microarchitectures (Mate 0.9.1, Robotlegs 1.5.2, Parsley 2.4.1, Spring AS 1.1, Swiz 1.4)
- Eventarchitectures (AS3-Signals)
- Nanoarchitectures (M, VCb / VCp, Cpll, Cpsh, Ctl, Cmd, NoEvt, PInj)
- Design Pattern (Presentation Model, Code Behind, Presenter, Mediator, MVP TODO ... etc.)
- Cairngorm 3 Libraries (Validation Library, Task Library, Observer Library)
- Continuous Integration (Apache Maven, Flexmojos TODO)
- Build and Deployment Tools (Apache Ant with FlexTasks library)
- Testing frameworks (FlexUnit 4.0)
- Flex Automation (RIATest, FlexMonkey ... etc.)
- Server projects (AmfPHP 1.9, Zend AMF 1.11.11, BlazeDS TODO, GraniteDS TODO)
- Flex coding conventions (Flex 3, Flex 4)
- Project planning (see Login Example Feature Specification)
Screenshots
Login Example for Web
Login Example for Desktop
Login Example for Mobile
Client
Apache Flex 4.8 (Spark)
Flex 4.8 (Spark) with MVCpshCtlDS_PInjFeatures: Flex 4.8 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Push" (Cpsh), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
- Flex 4.8 (Spark) Login Example for Web with Parsley 2.4.1 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.8 (Spark) Login Example for Web with Spring AS 1.1 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.8 (Spark) Login Example for Web with Swiz 1.4 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
Adobe Flex 4.5 (Spark)
Flex 4.5 (Spark) with MVCpshCtlDS_PInjFeatures: Flex 4.5 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Push" (Cpsh), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
- Flex 4.5 (Spark) Login Example for Web with Parsley 2.4.1 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.5 (Spark) Login Example for Web with Spring AS 1.1 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
Flex 4.5 (Spark) Login Example for Web with Swiz 1.4 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
Flex 4.5 (Spark) Login Example for Desktop with Parsley 2.4.1 (MVCpshCtl, PInj), (air app) (svn repo)
- Flex 4.5 (Spark) Login Example for Desktop with Spring AS 1.1 (MVCpshCtl, PInj), (air app) (svn repo)
Flex 4.5 (Spark) Login Example for Desktop with Swiz 1.4 (MVCpshCtl, PInj), (air app) (svn repo)
Flex 4.5 (Spark) Login Example for Mobile with Parsley 2.4.1 (MVCpshCtl, PInj), (air app) (android app) (svn repo)
- Flex 4.5 (Spark) Login Example for Mobile with Spring AS 1.1 (MVCpshCtl, PInj), (air app TODO) (android app TODO) (svn repo)
- Flex 4.5 (Spark) Login Example for Mobile with Swiz 1.4 (MVCpshCtl, PInj), (air app) (android app) (svn repo)
Features: Flex 4.5 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Push" (Cpsh), "Command" (Cmd), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
- Flex 4.5 (Spark) Login Example for Mobile with Mate 0.9.1 (MVCpshCmd, PInj), (air app) (android app) (svn repo)
Features: Flex 4.5 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Push" (Cpsh), "Command" (Cmd), "Delegate" (D) & "Service" (S) Nanoarchitectures
- Flex 4.5 (Spark) Login Example for Mobile with Robotlegs 1.5.2 / AS3-Signals 0.8 (MVCpshCmd), (air app) (android app) (svn repo)
Adobe Flex 4.1 (Spark)
Flex 4.1 (Spark) with MVCpshStoTskDS_PInjNoEvtFeatures: Flex 4.1 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Push" (Cpsh), "Story/Task" (StoTsk), "Delegate" (D), "Service" (S), "Property Injection" (PInj) & "No Event" (NoEvt) Nanoarchitectures & Cairngorm 3 Task Library
- Flex 4.1 (Spark) Login Example with Parsley 2.4.1 (MVCpshStoTsk, PInj, NoEvt), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Spring AS 1.1 (MVCpshStoTsk, PInj, NoEvt), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Swiz 1.4 (MVCpshStoTsk, PInj, NoEvt), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Push" (Cpsh), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
- Flex 4.1 (Spark) Login Example with Parsley 2.4.1 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Spring AS 1.1 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Swiz 1.4 (MVCpshCtl, PInj), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (Spark) with "Model" (M), "View - Code Behind" (VCb), "C-Pull" (Cpll), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
- Flex 4.1 (Spark) Login Example with Parsley 2.4.1 (MVCpllCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Spring AS 1.1 (MVCpllCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Swiz 1.4 (MVCpllCtl, PInj), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (Spark) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
- Flex 4.1 (Spark) Login Example with Parsley 2.4.1 (MVCbCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Spring AS 1.1 (MVCbCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Swiz 1.4 (MVCbCtl, PInj), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (Spark) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D) & "Service" (S) Nanoarchitectures
- Flex 4.1 (Spark) Login Example with Parsley 2.4.1 (MVCbCtl), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Spring AS 1.1 (MVCbCtl), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (Spark) Login Example with Swiz 1.4 (MVCbCtl), (web app) (web test) (view source) (svn repo)
Adobe Flex 4.1 (MX)
Flex 4.1 (MX) with MVCbStoTskDS_PInjFeatures: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Story/Task" (StoTsk), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures & Cairngorm 3 Task Library
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbStoTsk, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbStoTsk, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbStoTsk, PInj), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D), "Service" (S), "Property Injection" (PInj) & "No Event" (NoEvt) Nanoarchitectures
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCtl, PInj, NoEvt), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbCtl, PInj, NoEvt), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbCtl, PInj, NoEvt), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures & "Domain-Driven Design" (Ddd) approach
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCtl, PInj, Ddd), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbCtl, PInj, Ddd), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbCtl, PInj, Ddd), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Property Injection" (PInj) Nanoarchitectures
Please note: Two Parsley projects. First project Parsley 2.4.1 (MVCbCtl, PInj) uses the Publish/Subscribe-Tags from Parsley. Second project Parsley 2.4.1 (MVCbCtl, PInj, Wire) uses the Wire-tag from the Cairngorm 3 Observer Library.
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCtl, PInj, Wire), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbCtl, PInj), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbCtl, PInj), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D), "Service" (S) & "Validation" (Val) Nanoarchitectures & Cairngorm 3 Validation Library
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCtl, Val), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbCtl, Val), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbCtl, Val), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Controller" (Ctl), "Delegate" (D) & "Service" (S) Nanoarchitectures
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCtl), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbCtl), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbCtl), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model" (M), "View - Code Behind" (VCb), "Command" (Cmd), "Delegate" (D) & "Service" (S) Nanoarchitectures
- Flex 4.1 (MX) Login Example with Mate 0.9.1 (MVCbCmd), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Parsley 2.4.1 (MVCbCmd), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Robotlegs 1.5.2 / AS3-Signals 0.8 (MVCbCmd), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1 (MVCbCmd), (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4 (MVCbCmd), (web app) (web test) (view source) (svn repo)
Features: Flex 4.1 (MX) with "Model - View - Controller - Delegate - Service" (MVCtlDS) Nanoarchitectures
- Flex 4.1 (MX) Login Example with Parsley 2.4.1, (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Spring AS 1.1, (web app) (web test) (view source) (svn repo)
- Flex 4.1 (MX) Login Example with Swiz 1.4, (web app) (web test) (view source) (svn repo)
Adobe Flex 3
Flex 3 with MVCtlDSFeatures: Flex 3 with "Model - View - Controller - Delegate - Service" (MVCtlDS) Nanoarchitectures
- Flex 3 Login Example with Parsley 2.4.1, (web app) (web test) (view source) (svn repo)
- Flex 3 Login Example with Spring AS 1.1, (web app) (web test) (view source) (svn repo)
- Flex 3 Login Example with Swiz 0.6.4, (web app) (view source) (svn repo)
- Flex 3 Login Example with Swiz 1.4, (web app) (web test) (view source) (svn repo)
Features: Flex 3 with "Model - View - Command - Delegate - Service" (MVCmdDS) Nanoarchitectures
- Flex 3 Login Example with Cairngorm 2.2.2, (web app) (view source) (svn repo)
Server
AmfPHP
- Login Example Server, AmfPHP 1.9, (svn repo)
Zend AMF
- Login Example Server, Zend AMF 1.11.11, (svn repo)
BlazeDS
- TODO
GraniteDS
- TODO
Used Nanoarchitectures
- "View - Code Behind / Component" (VCb / VCp)
- "C-Pull" (Cpll)
- "C-Push" (Cpsh)
- "Property Injection" (PInj)
- "No Event" (NoEvt)
- "Model" (M)
- "Controller" (Ctl)
- "Command" (Cmd)
- "Story/Task" (StoTsk)
- "Action Chaining" (AChn)
- "Delegate" (D)
- "Service" (S)
Frequently Asked Questions (FAQs)
Why have you created the Login Example?Please read my Letter of Motivation.
I am new to this website. Where should I start?Please check out this page.
What's a Nanoarchitecture?Please read this page about Nanoarchitectures.
Which Microarchitecture has the best performance?Don't know. Maybe somebody could create performance tests for it ;)
Which Microarchitecture do you prefer?I am not making that decision for you. It is up to you to decide which one suites best to your needs.
Why haven't you choosen Microarchitectures like PureMVC, SmartyPants or Flicc ... etc. for your Login Example?I am thinking of adding other Microarchitectures, too. If they fit into the concept I will definitely add them. One issue I have with PureMVC and Robotlegs (without AS3-Signals) is that they are using the Mediator pattern for their views. This feels quiet massive when you want to work with SkinnableComponents in Flex 4 (3 classes = Skin class + SkinnableComponent + Mediator). If you have a good solution please let me know. Thanks!
Why do you have only so few Robotlegs and Mate examples for the Login Example? Are you biased?No! I just have started adding Robotlegs and Mate examples to the Login Example.
Which Nanoarchitectures do you prefer?For Flex 4 applications, I recommend, you should have a look at the Login Example for Flex 4.1 (Spark) with MVCpshStoTskDS_PInjNoEvt Nanoarchitectures. For Flex 3 applications, consider to use the "Model" (M), "View - Code Behind" (VCb) Nanoarchitecture as shown in the LoginExample for Flex 4.1 (MX) with MVCbCtlDS.
How can I migrate my Flex 3 application to a Flex 4 application?Please read this Flex 3 to Flex 4 Migration Guide.
I have found issues in your code examples. Where can I post them?You can post problems and feature enhancements into my issue tracker, or, you can contact me directly.
Can I participate in your project?Sure! There are still things left for me to do (see issue tracker). Any help would be appreciated!
Would you be willing to donate your code and docs to a higher instance?Of cause! For the moment, I just haven't found the people sharing the same interest making the lifes of Flex beginners ... etc. easier building large-scale Flex apps. If I would see an authority growing up somewhere I would be happy to jump over.
Who is this guy occupying land in the web?Details about me can be found here.
More Code Examples
- Religion Chooser written in Flex 4.1 (Spark)
Feedback
Please feel free to post comments, suggestions or feature requests because the code is still work in progress.