De architectura: MVP in Flex / AIR components

•October 11, 2009 • Leave a Comment

More than one year ago we started to deeply study the Model View Presenter pattern because we found that there lot of good point to improve the architecture of our Flex application.
The aim of this post is to share our experience (bottom up approach) and the way we are used to define the building blocks of our architectures and try to start creating a little bit of culture of architectures in the Flex world.

We are not working on a new ActionScript framework, the word framework for us means something like Spring or Tapestry or Flex, we are only delivering as open source a class set we build over the last 14 months with some suggestions and sample about how to use the Model View Presenter as an organizational pattern to follow in complex Flex / Air applications.

The first thing that attracted us in the MVP pattern is that the presenter knows its associated view only trough the interface the view implement. This interface represents the way the presenter get information from the user interface and the way the view is updated by the presenter in order to show the data is working on.
A web or a desktop application is a matter of data manipulation and visualization, enforcing the separation between these two fields you are able to split data, presentation, and user input into specialized components self independent, pluggable and loosely coupled so that you can get the following benefits:

•    Development of component can proceed simultaneously
•    Each component have a common architecture
•    Developers can work on each component of an application (shared architecture)
•    Dependencies in the application are under control

We are used to put in place for each component a folder structure like this one

so that you have inside the view folder the MXML file that represents the GUI of your component on which, trough an interface, the presenter work on (i.e. get data and display data) and the folders in which you can store formatters and helpers.
The helpers are classes that can help your view to render data correctly, for instance if you need a filter function for a data grid in the view it’s better to have stored in an helper rather then put some complex scripts inside the view.
We follow the same logic for the formatting, if you are not using the standard formatters provided with the Flex framework the formatters classes can be stored in a separate folder so that you keep clean and easy to understand the view.
In the presenter folder we are used to put the big boss (i.e. the presenter) and its helpers, this is the core of each component because it contains the logic and the handlers of the user inputs (i.e. typing, mouse click, etc.).
The model folder is something that we don’t see as mandatory in each component, the model is defined at an application level or at a library level, we use the model folder only if a component has some specific needs such as value objects, identities, aggregate roots, enumerations or services that are related only to this specific component.

These are some points to keep in mind when dealing with model view presenter

•    Is the presenter that handle user input and data manipulation
•    While it is the view’s responsibility to display model data it is the presenter that governs how the model can be manipulated and changed by the user interface
•    This is where the heart of an application’s behavior resides
•    In many ways, a MVP presenter is equivalent to the application model in MVC
•    Most of the code dealing with how a user interface works is built into a presenter class

The main elements of our mvp architecture are

•    Mapper
•    Presenter
•    IMapperCandidate
•    Instructions

The Mapper class is the one that stores a dynamic list of UI elements that have to interact between each other, it contains a  reference to the instructions it has to deliver, it  is created in the application initialization and It’s able to get and dispatch events.

The Presenter class is the base class of each presenter, it requires an IView implementor (simply an empty interface that extends the IEventDispatcher) and the property on the model you want to watch as arguments in the contructor in order to be used in a service oriented application (the onServiceFault, onResult and onUpdateFault methods have to be overridden in order to handle the result).
Keep in mind that the _dataSet property contains the data the view is working on and that is a good practice play on this data through a strongly typed getter and setter.

The IMapperCandidate is an empty interface to help the application to add the UI element to the Mapper, this interface has to be implemented if the component presenter needs to be in touch with other components trough the instructions.

The instructions are represented through an Event subclass, it ss used to send notifications between components added to the Mapper, each Instruction is fired trough a specific subclass of the InstructionEvent class (the reason why you have to create a subclass is in order to allow the Mapper to dynamically create the Instruction trough reflection).

In order to get more samples and information about the MVP implementation we did you can browse our wiki http://agile.gnstudio.com/nabiro, in the next weeks other posts about our flex / air applications will be posted on this blog.

Outsystems releasases free version of Agile Platform

•August 25, 2009 • Leave a Comment

Full-version Agile Platform Community Edition provides developers
zero-cost opportunity to discover benefits of Agile web development

OutSystems®, provider of the industry-leading Agile Platform, today announced the immediate availability of the free Agile Platform Community Edition, providing developers with an easy way to create web business applications and explore Agile techniques without any vendor lock-in.

The Agile Platform Community Edition is a full version of the Agile Platform for building web business applications that can be deployed into production for personal use or by small businesses with up to five concurrent end-users.

For additional information, please visit: http://www.outsystems.com

Agile Alliance Announces Full Program for Agile 2009 Conference

•May 25, 2009 • Leave a Comment

The Agile Alliance, a non-profit organization dedicated to promoting the concepts of Agile software development, today announced the full conference program for its Agile 2009 Conference, set for August 24 – 28 in Chicago http://agile2009.agilealliance.org/ . In its seventh year, the Agile Conference is the premiere event for the growing Agile community, providing software professionals with the latest knowledge and shared experiences to help foster successful Agile development programs. This year’s conference will feature more than 300 sessions presented by 329 leading Agile experts and practitioners, based on a record number of speaking submissions gathered during the past six months. To review the latest schedule of Agile 2009 sessions, encompassing all levels of Agile experience, please visit http://agile2009.agilealliance.org/ .

Intelligere SCS RC1

•May 13, 2009 • 6 Comments

We are pleased to announce the new release of the new release of Intelligere SCS, a complete web conference system released open source.

In the next month a demo space will be arranged and published on the web, in the meanwhile the old web demo is still in place here (login as admin admin), the new space will provide free space and account for all the userS!

The new features are:

  • A control panel in order to handle sessions duration, speakers, user accounts and in order to manage invitation (php adn MySql)
  • The Flex to PPT converter now use Open Office so it’s no more needed the Microsoft Office license on the server or the .NET support
  • The screen sharing has been improved and debugged (30% faster than before)
  • The documentation has been improved (three different manuals in two different languages)
  • The file transfer between connected client has been added, it uses the Flash Player 10 new features
  • The software is compliant with the Flex 3.4 SDK
  • The RED5 synchronization and streaming support has been re-engineered and improved (RED5  RC1 compliant)
  • All the major bug have been fixed

Feel free to contact us for guided tour or for assistance.

Agile Conference 2009

•April 3, 2009 • Leave a Comment

agile-logoAgile 2009 is the premier international conference in agile development. The conference looks forward to hosting more than 1600 participants from all over the world in one of North America’s most exciting cities.

Agile 2009 will be an exciting international conference about techniques and technologies, attitudes and policies, research and first-hand experience, from both the management and technical sides of agile software development. The agile approach focuses on delivering business value early in the project lifetime and being able to incorporate emergent requirements. It accentuates the use of rich, informal communication channels and frequent delivery of running, tested systems, while attending to the human component of software development.

Agile 2009 gives attendees access to the latest thinking in this domain, and bridges communities that rarely get a chance to exchange ideas and thoughts. It brings together researchers from labs and academia with executives, managers, and developers in the trenches of software development. The conference is not about a single methodology or approach, but rather provides a forum for the exchange of information regarding all agile development technologies.

See you in Chicago http://agile2009.agilealliance.org/

Intelligere Flash Lite Server

•March 8, 2009 • 6 Comments

Intelligere Flash Lite Server (FLS) is a c++ opoen source component that gives to you the possibility to interact with the API of a symbian device from Flash Lite.
Using FLS you can  extend the capabilities of your Flash Lite application making some simple HTTP calls sending commands and getting back data in ths SWF file.

The workflow of the application can be summarized as following

fls

The main features of FLS are

-    Launch native video  player in full screen mode (launchVP)
-    Download a file from the NET (download)
-    Check the percentage of the download in progress (status)
-    Create the APN without opening the native selector (createAP) -> certificate is requested
-    Read variables without opening the APN selector (loadVariables)
-    Stop all the downloads (stop)
-    Close the whole application (exit)
-    Create a file (create)
-    Delete a file (delete)
-    Write content into a file deleting everything before (write)
-    Append content to a file (append)
-    Clear all the contents of a file (clear)
-    Rename a file (rename)
-    Check if a file exist (exist)
-    Get all the content of a directory (dir)
-    Create a directory (mkdir)
-    Delete a directory (rmdir)

In the RC2 version planned by the end of June 2009 the following feature will be added

-    Get a picture from the camera (mkPict)

You can get the source code from here.

Agile software development

•January 13, 2009 • Leave a Comment

agile-logo-4c-corp-sm

Our company believe in the Agilde Development methodology and work in this way since more than one year.

Agile software development is a collection of methodologies (Extreme Programming, Scrum, Crystal, and Dynamic Systems development, etc.) designed to solve the problems associated with the long development cycles of traditional waterfall development methods. Agile methods are iterative processes designed to be more flexible, and are driven by cooperation between programmers and customers. This leads to increased customer satisfaction as well as more rapid release of functional software.

The principles behind agile methods were laid out in the Agile Manifesto in 2001:
- Individuals and Interactions over Processes and Tools.
- Working Software over Comprehensive Documentation.
- Customer Collaboration over Contract Negotiation.
- Responding to Change over Following a Plan.

Since today we are proud to announce that GNstudio is a corporate member of the Agile Alliance.

Sun’s GlassFish team was at the Code Camp

•November 11, 2008 • Leave a Comment

Femtocell, are you ready?

•October 2, 2008 • Leave a Comment

In telecommunications, a femtocell—originally known as an Access Point Base Station—is a small cellular base station, typically designed for use in residential or small business environments. It connects to the service provider’s network via broadband (such as DSL or cable); current designs typically support 2 to 5 mobile phones in a residential setting. A femtocell allows service providers to extend service coverage indoors, especially where access would otherwise be limited or unavailable. The femtocell incorporates the functionality of a typical base station but extends it to allow a simpler, self contained deployment; for example, a UMTS femtocell containing a Node B, RNC and GSN with Ethernet for backhaul. Although much attention is focussed on UMTS, the concept is applicable to all standards, including GSM, CDMA2000, TD-SCDMA and WiMAX solutions.

For a mobile operator, the attractions of a femtocell are improvements to both coverage and capacity, especially indoors. There may also be opportunity for new services and reduced cost. The cellular operator also benefits from the improved capacity and coverage but also can reduce both capital expenditure and operating expense.

A number of ‘must have’ attributes will enable telecoms operators to implement femtocell technology, and thereby boost ARPU and market share.
Dropped calls, patchy reception or the dreaded no service zone – everyone has experienced one if not all of these inconveniences while talking on their mobile phone. It’s a common, sometimes daily, occurrence for many users, yet more and more people have opted to completely drop their landline and survive with only their mobile phone.
Click here to find out more!

According to a recent European Commission survey of 27,000 homes across the European Union, 24% currently use mobile phones-only at home – a number that’s expected to grow. And we’re already beginning to see how this impacts operator offerings, as landlines are decoupled from bundled services.

Consumers, especially younger consumers, are in part responsible for driving this trend. This group has certainly increased mobile phone usage within the home, and current indoor coverage is not always satisfactory for some wireless networks. This is where femtocell technology comes in. By enhancing the wireless signal, femtocells make dropped calls, patchy reception or “no service” a thing of the past.

Learn more about fetmocell here.

Flex camp Italy

•September 17, 2008 • 1 Comment

The Adobe User Group flex-developers.org invite you at Flex camp Milan, a free one day gathering with food, drinks, coding and time with the Flex and Apollo engineers covering everything you need to know about the upcoming release of Flex 3 and Adobe AIR.

Milan 07th November 2008 – 10:00 AM

For more information check the full agenda.