Welcome!

Blog Feed Post

Flex Architecture and Design Patterns

Advice and help around getting Flex application architecture right

A lot of my readers and clients have been asking for advice and help around getting Flex application architecture right. In some cases, these capable developers are struggling to morph their initial fancy toys into robust applications.

If you have seriously dabbled with Flex, you probably can empathise with them. However, if you haven’t delved into Flex at all or have minimally glanced at its surface, you are probably stunned in amazement and possibly ridiculing the indiscipline and lack of knowledge of these developers. Interestingly though, the shortcoming isn’t of the developers alone and the problems aren’t because the framework is flaky. Its just that you can code yourself into a corner despite your proficiency in MXML and AS3 and this problem is not new. The fact that: “fluency in a language and the core framework != fluency in building an application effectively using it” is well established across multiple languages. We have all seen similar problems surface with C++, Java, .Net, PHP, Python, Perl, Ruby, JavaScript and pretty much any other widely used language.

Over the years the community of software developers have questioned, theorized and debated over the root causes of failures emerging from bad application design and inappropriate architecture.  The viewpoints and thoughts are varied (An illustration of which is beyond the scope of this post. I may write about it in a separate post in future.) and there is no consensus on the right solution yet. However, there are some points of agreement and universal appreciation. One such topic of agreement, is the notion of leveraging design patterns.

Design patterns have existed from the time the discipline of software development was a toddler back in the 70s, when it learnt to avoid its initial mistakes. Back then though, these patterns were not cataloged or adapted for specific areas of applicability. Now as the discipline is maturing into a teenager towards the end of the first decade of the 21st century, design patterns are entering the standard vocabulary of an average developer.

So, a Flex/AIR developer today can learn a lot of the theory about essential design patterns from the Gang of Four book or browse through the useful bunch of patterns applicable to enterprise application architecture. In addition, he or she could pick up one of the two design patterns books that pertains to AS3, namely:

Armed with all this knowledge, a Flex/AIR developer can hypothetically apply these gainfully to a real project. However, at this last link in the chain the story often breaks. Developers are left with tons of open questions around how to exactly use all their learning in the context of the core Flex framework features.

Its not a trivial effort to wire design patterns in conjunction with the existing framework classes. Using structural patterns with existing class heirarchies is not automatic and implementing behavioural patterns on top of the default flow is not intutive. In addition, you are left guessing on what could be implemented with AS3 alone and what could also rope MXML in.

At this stage, some developers just give up and some others seek refuge under any of the existing aggregations, especially if it seems to have official endorsement (read “Cairngorm”). Now, “giving up” can lead to code spaghetti and “seeking refuge” blindly can leave you in an obfuscated labyrinth, especially when you are deep into transforming your toy into a serious business application.

What then is a solution to the problem? How can one get Flex application architecture right?

To answer these questions to an extent, I wrote a chapter titled : “Leveraging Architectural and Design Patterns” in my book — Advanced Flex 3. That chapter neither addressed all the issues not did it include details on implementing these patterns in Flex. It merely discussed the topic at a very high level. Even then, many found it immensely useful. Going by the positive feedback and the following questions from the readers, I could guess that the thirst to learn more about Flex design patterns remains unquenched.

Therefore, I am starting on 3 related yet distinct initiatives, which might help you all. These are:

  • Thorough hands-on Flex architecture mentoring sessions
  • Three chapters instead of one on architecture and design patterns in Advanced Flex 4 (the next version of Advanced Flex 3)
  • A free book — “Flex Design Patterns” — on all aspects of architectural and design patterns in Flex. Chapters from which will be available for download right after they are written

In addition I am working actively on getting Fireclay ready for prime-time. I hope Fireclay will be a compelling and unique Flex framework when its version 1.0 is released.

If you would like to learn a lot by doing and want to gain substantial mastery in 3 days flat, then join me at the Flex Architecture BootCamp, the first of which is coming to New York between March 23 and March 25, 2009. Find out the details about this event at the Flex Design Patterns Eventbrite site.

At the Flex Architecture BootCamp, you will –

  • Learn how to build enterprise grade Flex applications
  • Learn to leverage the common design patterns in Flex and ActionScript 3 applications
  • Understand what Cairngorm, PureMVC, Mate, Prana and Fireclay are all about
  • Learn to preempt problems involved in building complex enterprise grade Flex applications. Build applications reliable, scalable and performant from the beginning.

More information online at the Flex Architecture BootCamp eventbrite site. In a few days I will announce the schedule for this BootCamp at other cities, which include Chicago, Atlanta, Dallas and Seattle.

When you register for the bootcamp at New York, don’t forget to avail a $75 discount using shanky_org as the discount code.

In future posts, you will hear from me on when I may start writing Advanced Flex 4 (its definitely not happening till Flex 4 beta is out and that I think isn’t happening until May 2009).

Information on the free book — Flex Design Patterns — will be available soon.  I am currently trying to setup a repository and a methodology to manage the writing process. I am keen to use the docbook format and may use the GitHub to host all content and code. If you have any suggestions or recommendations on any alternative tools, then please chime in.

That it for now, but you know a lot’s coming, so stay tuned!

More Stories By Shashank Tiwari

I am a technology entrepreneur, innovator, author and, as some say, a “thought leader”. I like to solve challenging computing problems, especially those that drive innovation. Being a polyglot programmer, I can program fluently in many languages, including Java, Python, C++, C, Ruby, ActionScript, JavaScript, Objective-C, Haskell, Scala, Clojure, PHP, Groovy, Lisp and Perl. I must admit that I like to learn programming languages and if there is a new interesting one coming, I wouldn’t be far behind getting to grips with it. Over the last many years I have built some cutting edge enterprise and consumer software applications, many of which have leveraged large data sets and the web based programming paradigms. This means I also know a lot about data bases and persistence. I am very conversant with relational databases, embedded databases, object databases, text based data and XML. Having leveraged web based programming paradigms, I have first hand experience with a lot of web development frameworks, including but not limited to Adobe Flex, Spring MVC, Rails, Grails and Django. Not to forget, I obviously have worked a lot with HTML, JS and CSS. My experience and interest are varied and diverse and range a wide spectrum of application development realms that include the server, the client and the middleware. Besides, programming, I am also deeply interested in mathematics and theoretical computer science. This motivates me to bring my knowledge of applied mathematics, statistical modeling, artificial intelligence and sometimes simply data structures, to good use, when I build applications. A couple of domains like financial mathematics and scientific computing seem to have been good fit for such expertise. I am an ardent supporter of open source software and try and contribute to open source code bases and causes. I like the plurality and variety that software development offers; the choice of programming languages, the abundant availability of tools and libraries, the existence of multiple operating systems and the possibility of varied software development methodologies. As a member of the technology community, I am an active contributor to the ever evolving software development languages, methodologies and standards. I am an expert group member on a number of JCP (Java Community Process) specifications, for example JSRs 274, 283, 299, 301 & 312, and have been recognized as an Adobe Flex Champion.I run and organize a few community events like Flex Camp Wall Street, Show Ramp and Polyglot World. I bring together all my expertise in terms of services and products via my primary venture, Treasury of Ideas LLC, in which I play the role of a Managing Partner. Treasury of Ideas LLC, through its focus on innovation and value optimization, offers many best of the breed services and products and has incubated many ideas to help translate them to reality. Our clients range from large enterprises, government agencies, not-for-profit organizations to promising new startups. I write regularly in many technical journals and magazines, present in seminars and mentor developers and architects. I have authored a few books, including Advanced Flex 3 (friends of Ed/APress, 2008) and Professional BlazeDS (Wrox/Wiley, 2009) , and am in the process of authoring a few more. You can learn all about my books and public talks by browsing through the Publish & Present page at www.shanky.org.

Latest Stories
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (CloudNative) and process redefinition (SRE). Rob Hirschfeld’s recent work in Kubernetes operations has led to the conclusion that containers and related platforms have changed the way we should be thinking about DevOps and...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
The next XaaS is CICDaaS. Why? Because CICD saves developers a huge amount of time. CD is an especially great option for projects that require multiple and frequent contributions to be integrated. But… securing CICD best practices is an emerging, essential, yet little understood practice for DevOps teams and their Cloud Service Providers. The only way to get CICD to work in a highly secure environment takes collaboration, patience and persistence. Building CICD in the cloud requires rigorous ar...
Companies are harnessing data in ways we once associated with science fiction. Analysts have access to a plethora of visualization and reporting tools, but considering the vast amount of data businesses collect and limitations of CPUs, end users are forced to design their structures and systems with limitations. Until now. As the cloud toolkit to analyze data has evolved, GPUs have stepped in to massively parallel SQL, visualization and machine learning.
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
"ZeroStack is a startup in Silicon Valley. We're solving a very interesting problem around bringing public cloud convenience with private cloud control for enterprises and mid-size companies," explained Kamesh Pemmaraju, VP of Product Management at ZeroStack, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Enterprises are adopting Kubernetes to accelerate the development and the delivery of cloud-native applications. However, sharing a Kubernetes cluster between members of the same team can be challenging. And, sharing clusters across multiple teams is even harder. Kubernetes offers several constructs to help implement segmentation and isolation. However, these primitives can be complex to understand and apply. As a result, it’s becoming common for enterprises to end up with several clusters. Thi...