Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Public Demos, Tools and Applications / PureMVC framework for TypeScript on: November 08, 2012, 04:17:55
I just published a blog post announcing the brand new PureMVC for TypeScript framework http://www.tekool.net/blog/2012/11/07/puremvc-for-typescript/

I hope soon on PureMVC as new supported language. ;)
2  Announcements and General Discussion / Public Demos, Tools and Applications / PureMVC Employee Admin demo for jQuery Mobile on: January 29, 2012, 09:13:14
Now that jQuery Mobile reached its final stage and even 1.0.1 last week, I took time to finish an Employee Admin demo for jQuery mobile I started last year and that some here were aware of.

Read the blog post explaining how it works.

3  Announcements and General Discussion / Public Demos, Tools and Applications / PureMVC Employee Admin demo for jQuery on: January 07, 2012, 02:56:27
Hi all, as it has often been requested, I finally made an Employee Admin demo that uses a jQuery and jQuery UI components to show what can be achieved using PureMVC for JavaScript : http://www.tekool.net/blog/2012/01/07/puremvc-employee-admin-demo-for-jquery/

This is a good app skeleton to start with, it includes YUICompressor, a dedicated ant task and a debug HTML file. I hope that it could help any JavaScript developer knowing jQuery a little to start with PureMVC.
4  PureMVC Manifold / Bug Report / [UNDER CONSIDERATION] Use Array.slice(0) to copy Observers instead of a loop on: February 19, 2011, 06:07:06
Here is the code used in View.notifyObservers() method to copy the Array we will loop over to notify observers :

:
public function notifyObservers( notification:INotification ) : void
{
  if( observerMap[ notification.getName() ] != null ) {

// Get a reference to the observers list for this notification name
var observers_ref:Array = observerMap[ notification.getName() ] as Array;

// Copy observers from reference array to working array,
// since the reference array may change during the notification loop
  var observers:Array = new Array();
  var observer:IObserver;
for (var i:Number = 0; i < observers_ref.length; i++)
{
   observer = observers_ref[ i ] as IObserver;
   observers.push( observer );
}

// Notify Observers from the working array                
for (i = 0; i < observers.length; i++) {
   observer = observers[ i ] as IObserver;
   observer.notifyObserver( notification );
}
}
}


This take a lot of CPU steps for nothing and as this method is heavily used, I think we can benefit a lot from changing it to:

:
public function notifyObservers( notification:INotification ) : void
{
var observers_ref:Array = observerMap[ notification.getName() ] as Array;
if( observers_ref != null )
{
// Copy observers from reference array to working array,
// since the reference array may change during the notification loop
var observers:Array = observers_ref.slice(0);

// Notify Observers from the working array                
for( var i:uint = 0; i<observers.length; i++) {
   observer = observers[ i ] as IObserver;
   observer.notifyObserver( notification );
}
}
}
5  PureMVC Manifold / Bug Report / [UNDER CONSIDERATION] Use of apply instead of call in Observer class on: February 16, 2011, 10:52:41
In PureMVC standard and multicore the notifiyObserver method use :

:
this.getNotifyMethod().apply(this.getNotifyContext(),[notification]);
where

:
this.getNotifyMethod().call(this.getNotifyContext(),notification);
would be more suitable.
6  Announcements and General Discussion / General Discussion / Maps all use Array instead of Object on: February 16, 2011, 04:57:04
All maps like "proxyMap", "commandMap", "viewMap", "instanceMap" etc in PureMVC Standard and Multicore version use an Array instead of an Object when Array is not needed.

It even lead to bugs like http://forums.puremvc.org/index.php?topic=107.0

Rem: Don't forget not to use Vector instead of Object as it's Flash 10> only.
7  PureMVC Manifold / MultiCore Version / Can't we create a specific GWT Java Multicore version? on: August 15, 2010, 06:06:08
As you may know the current Multicore version of the Java port is focused on GWT. As GWT doesn't support reflexion when declaring commands we use command instances instead of references to the command class object.

As said in the subject: can't we create a specific GWT Java Multicore version?
8  PureMVC Manifold / Bug Report / [FIXED] onRegister/onRemove missing in Mediator/Proxy on: August 15, 2010, 05:11:33
As said in the subject the Standard Version of the PureMVC Java Framework doesn't have onRegister/onRemove in Mediator and Proxy classes.

They are present in the Multicore version.
9  Announcements and General Discussion / Public Demos, Tools and Applications / PureMVC JavaScript Mootools EmployeeAdmin Demo on: March 14, 2010, 12:32:51
I just finished to port the EmployeeAdmin demo from Objs port to Mootools




10  Announcements and General Discussion / Public Demos, Tools and Applications / PureMVC EmployeeAdmin for Silverlight demo on: January 26, 2010, 02:01:43
I just finished to port the EmployeeAdmin demo to PureMVC C# as a Silverlight application :  http://www.tekool.net/blog/2010/01/26/puremvc-silverlight-employeeadmin-demo/

Hope this helps.
11  Announcements and General Discussion / Public Demos, Tools and Applications / PureMVC Loadup utility for Flash Demo on: December 06, 2009, 07:45:55
As some of you asked me recently to show how I used the PureMVC Loadup utility in a Flash project, I made a new demo : http://www.tekool.net/blog/2009/12/06/using-puremvc-loadup-utility-with-flash-ide/.

The demo contains four new classes needed to compile a project from the Flash IDE or from a Flash Builder pure ActionScript project. It's all what the Loadup utility need to work from Flash without using the Flex SDK. Thanks to Philip Sexton for that. ;)

I suppose that a minor update to the Loadup Utility could officially add this classes by separating flex and flash packages. But there are many other ways to achieve this.

Hope this helps.
12  Announcements and General Discussion / General Discussion / [Loadup Utility] Reference to UIComponent on: September 25, 2009, 02:41:33
While working with the Loadup Utility I realized that the three classes AssetOfTypeImage, AssetOfTypeSwf, AssetOfTypeText, implementing IAssetForFlex all make direct references to UIComponent. It first add unwanted weight to a pure ActionScript application and probably introduce problems to compile it from Flash IDE.

The reference to this three classes is not a problem in itself as they are intended to provide helpers for Flex components.

The problem is more that even if the utility implements an Asset Factory, the class AssetTypeMap make a reference to this three concrete class instead of letting the user choose the concrete class to build.

Here is the incriminated references in AssetTypeMap

:
39         protected function defaultMap() :Object {
40             var obj :Object = new Object();
41             obj[ Loadup.IMAGE_ASSET_TYPE ]     = [ AssetOfTypeImage, AssetLoadByLoader ];
42             obj[ Loadup.TEXT_ASSET_TYPE ]      = [ AssetOfTypeText, AssetLoadByURLLoader ];
43             obj[ Loadup.SWF_ASSET_TYPE ]       = [ AssetOfTypeSwf, AssetLoadByLoader ];
44             return obj;
45         }


To be honest, now, I don't have much time to explore this deeper. For my current needs, I simply modified the AssetTypeMap class to initialize its constructor with my own "defaultMap" which did not contains any UIcomponent reference.

But I'm sure we can do it better with a good implementation of an Abstract Factory where only the user create the client class which will decide to use or not use the UIComponent in the assets it needs.
13  Announcements and General Discussion / General Discussion / Non-visual module used as core in multicore on: September 15, 2009, 08:00:13
I often have the same problem. I need to use a connection protocol or a specific type of server that requires me to have a group of 3 or 4 proxies to manage each type of connection to do near the same thing. I have to use alternatively one or another type of server in different build of the same app.

I have no problem to implement the same interface in my different proxies type, use the same commands when needed and decide which type of proxies and command to use when registering command/proxies. But I find more elegant not to have to worry about the two different proxies type simultaneously in the same project, even if I separate them into different packages. A native implementation of the IOC in PureMVC here would have probably been the solution to my problem. But I'm afraid that looking into and using Spring ActionScript for PureMVC or another solution take me too long for the project I'm working on.

So I wonder if this might be a good practice to create a core that would have no visual elements at all. Only a mediator for the application class, a group of 3 or 4 proxies and at most one state machine to manage the connection / disconnection when it is persistent one. Pipes literally controlling the module from the shell and other modules, even if I have some basic controller for initialization ?
14  Announcements and General Discussion / Public Demos, Tools and Applications / Flash only «Modules with PureMVC pipes» demo on: August 09, 2009, 04:55:32
As some people asked me, I just created a Flash only demo from my first Flex «modules with PureMVC pipes» demo I've posted here.

We now have a Flash only PureMVC multicore example that loads externals modules and use PureMVC Pipes.

My blog post : Flash only «Modules with PureMVC pipes» demo
15  Announcements and General Discussion / Public Demos, Tools and Applications / Flex modules with PureMVC pipes simple demo on: June 15, 2009, 12:49:56
Here another demo to illustrate the use of PureMVC Pipes utility  : http://www.tekool.net/blog/2009/06/14/puremvc_flex_modules_and_pipes/

This demo mainly focus on loading Flex modules as SWF files and how to let modules communicate among them.
Pages: [1]