Puremvc

(Find the code on GitHub at https://github.com/PureMVC/puremvc-dart-multicore-framework/wiki.)

This is conceptually very deeply elaborated but still a lightweight framework and is developed by Cliff Hall from Futurescale. It is extensively documented at www.puremvc.org and exists for a whole range of programming languages (such as ActionScript, C#, Java, C++, Python, Ruby, and now Dart as well), allowing its use for a wide variety of platforms (browsers, desktops, mobiles, as well as servers). The Dart version being at 2.0.4, is a port of the Flash/Flex ActionScript3 reference implementation of the MultiCore Version, and it is production-ready. Make it available to your application by adding puremvc: ">=2.0.4 <3.0.0" to your pubspec.yaml and import it in your app with:

import 'package:puremvc/puremvc.dart';

Its primary goal is to allow modular programming to follow the MVC pattern by decomposing your app into so-called core actors or cores. Each core is, in fact, a separate PureMVC subsystem that can communicate with other cores in two ways:

  • Synchronously through interfaces
  • Asynchronously through pipes

PureMVC implements the MVC tiers as the Multiton classes (see http://en.wikipedia.org/wiki/Multiton_pattern), which register and manage communications between the workhorse actors that operate within those tiers; it also provides a handy frontend to the whole system known as Facade (http://en.wikipedia.org/wiki/Facade_pattern). Because methods for passing a message vary from platform to platform, PureMVC implements its own internal observer notification system for its actors to communicate with each other. These are not alternatives for events: your application's boundary classes will still interact with the DOM, services, and PureMVC via events. To dig deeper into this framework, analyze the Dart demo from https://github.com/PureMVC/puremvc-dart-demo-reversetext/wiki, which is an elaborate version of the Dart Editor web template that reverses text when you click on it; you can get the code with:

git clone git://github.com/PureMVC/puremvc-dart-demo-reversetext .
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.14.98