Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
June 26, 2017, 01:54:39 AM
Home Help Search Login Register
News: Please DM @puremvc on Twitter to gain forum access. Spambots are why we can't have nice things.
  Show Posts
Pages: [1] 2 3 4
1  PureMVC Manifold / Bug Report / Re: Facade.getInstance should be a classmethod instead of a staticmethod on: September 21, 2009, 04:24:26 PM
Hi Chris,

I agree that there is probably a better way of writing getInstance() but I wrote it the way I did to stay in keeping with the original AS3 documentation.

This is taken from the comment string in Facade.as:

Code:
     
     *    public class MyFacade extends Facade
     *    {
     *        // Notification constants. The Facade is the ideal
     *        // location for these constants, since any part
     *        // of the application participating in PureMVC
     *        // Observer Notification will know the Facade.
     *        public static const GO_COMMAND:String = "go";
     *         
     *        // Override Singleton Factory method
     *        public static function getInstance() : MyFacade {
     *            if (instance == null) instance = new MyFacade();
     *            return instance as MyFacade;
     *        }

Cliff, what's the AS3 official standing on Facade.getInstance()? Should the user always override, I've noticed some examples which use ApplicationFacade.getInstance()?

I think that the python port should stay in tune as much as possible to make use of the AS3 documentation and examples.

Toby.
2  PureMVC Manifold / Bug Report / Re: MacroCommand.execute() does not execute subCommands in FIFO order on: September 21, 2009, 04:10:12 PM
Hi Chris,

Sorry for the delay getting back to you...

Well spotted, I'll commit this change to the repository asap.

Toby.
3  PureMVC Manifold / Standard Version / Re: Thread safe? on: February 28, 2009, 07:08:32 AM
Hi ejot,

Did you make the thread safe changes?

If so can you provide me with a patch?

Toby.
4  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin Demo on: March 18, 2008, 10:27:23 AM
OK, i will provide executables for Mac and Windows that requite the user to install Python, PureMVC and wxPython.


5  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin Demo on: March 18, 2008, 08:09:21 AM
Yeah sure, i will sort the proper downloads out when i have cleaned up the code.

Do you think providing just the source is ok? or should i make windows / mac executables?

Toby
6  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin Demo on: March 18, 2008, 07:27:01 AM
Thanks Joel, I hadn't tested on windows.
7  PureMVC Manifold / Demos and Utils / EmployeeAdmin - A PureMVC Python / wxPython Demo on: March 18, 2008, 05:33:30 AM
hi Guys,

I have completed the Employee admin demo, The UI stuff is a bit slap dash and needs some tidying.

Toby.
8  PureMVC Manifold / Standard Version / Re: PureMVC Python 0.4 on: March 18, 2008, 01:59:11 AM
Hi Cliff,

Python ships with Tkinter which uses Tcl/Tk but its very out of date.

The other options are PyQT4 (QT) and wxPython (wxWidgets)... Personally i prefer wxPython.

9  PureMVC Manifold / Standard Version / Re: PureMVC Python 0.4 on: March 17, 2008, 05:45:24 PM
I have nearly finished porting the Employee Admin flex demo, the port works really well!!

I think this is going to be great framework for the python community. Unfortunately a lot of python developers are not familiar with design patterns, especially in the area of desktop development where MVC can really shine.

Here is a screenshot...


Toby.
10  PureMVC Manifold / Standard Version / PureMVC Python 0.4 on: March 15, 2008, 08:04:20 AM
Hi,

I have Tageged version 0.4 in the repository. It is fully documented and passs all unit tests.

To install run:
python setup.py install

Demos on their way.

Smiley
11  PureMVC Manifold / Standard Version / Re: Python Port 0.0.1 All Tests Passed :) on: March 13, 2008, 09:16:44 AM
I have ported all documentation (except for code examples) and made some more minor improvements.

http://www.tobydehavilland.com/puremvc/PureMVC_Python_0_2_1.zip

Smiley
12  PureMVC Manifold / Standard Version / Re: Python Port 0.0.1 All Tests Passed :) on: March 13, 2008, 05:25:08 AM
I Have have a new version which is more stable:

Finalized the import statement.
I decided to go with "import x" and loose the "import x as y"
"import x as y" causes the same circular import problems, and seems slightly sloppy.
Typing the full package name is a bit annoying but its robust.

Improved all Singleton classes
AppFacade.getInstance() and Facade.getInstance() now refer to the same location in memory
Singletons are now generally more robust


I have started porting the documentation, I will upload when it is finished.
13  PureMVC Manifold / Standard Version / Python Port 0.0.1 All Tests Passed :) on: March 12, 2008, 03:17:50 PM
Hi,

I have ported and passed all of the unit tests. See below:

PyMate r8111 running Python 2.5.1 (python)
>>> unit.py

ControllerTest: Test instance not null ... ok
ControllerTest: Test instance implements IController ... ok
ControllerTest: Test registerCommand() and executeCommand(0) ... ok
ControllerTest: Test registerCommand() and removeCommand() ... ok
ControllerTest: Test hasCommand() ... ok
ModelTest: Test instance not null ... ok
ModelTest: Test instance implements IModel ... ok
ModelTest: Test registerProxy() and retrieveProxy() ... ok
ModelTest: Test registerProxy() and removeProxy() ... ok
ModelTest: Test hasProxy() ... ok
ModelTest: Test onRegister() and onRemove() ... ok
ViewTest: Test instance not null ... ok
ViewTest: Test instance implements IView ... ok
ViewTest: Test registerObserver() and notifyObservers() ... ok
ViewTest: Test registerMediator() and retrieveMediator() ... ok
ViewTest: Test hasMediator() ... ok
ViewTest: Test registerMediator() and removeMediator() ... ok
ViewTest: Test onRegsiter() and onRemove() ... ok
ViewTest: Test Successive registerMediator() and removeMediator() ... ok
ViewTest: Test removeMediator() and subsequent nofity() ... ok
ViewTest: Test removing one of two Mediators and subsequent notify() ... ok
CommandTest: Test MacroCommand execute() ... ok
CommandTest: Test SimpleCommand execute() ... ok
FacadeTest: Test instance not null ... ok
FacadeTest: Test instance implements IFacade ... ok
FacadeTest: Test registerCommand() and sendNotification() ... ok
FacadeTest: Test removeCommand() and subsequent sendNotification() ... ok
FacadeTest: Test registerProxy() and retrieveProxy() ... ok
FacadeTest: Test registerProxy() and removeProxy() ... ok
FacadeTest: Test registerMediator() retrieveMediator() and removeMediator() ... ok
FacadeTest: Test hasProxy() ... ok
FacadeTest: Test hasMediator() ... ok
FacadeTest: Test hasCommand() ... ok
MediatorTest: Test getMediatorName() ... ok
MediatorTest: Test getViewComponent() ... ok
ObserverTest: Test Observer Accessors ... ok
ObserverTest: Test Observer Constructor ... ok
ObserverTest: Test compareNotifyContext() ... ok
NotificationTest: Test Name Accessors ... ok
NotificationTest: Test Body Accessors ... ok
NotificationTest: Test Constructor ... ok
ProxyTest: Test Name Accessor ... ok
ProxyTest: Test Data Accessors ... ok
ProxyTest: Test Constructor ... ok

----------------------------------------------------------------------
Ran 44 tests in 0.009s

OK



The framework still needs a lot of improvement. I used the import "as" functionality as we discussed in the previous post... it is slightly better but still not perfect.

I had lots of other issues and things to mention but i have completely forgotten them... probably because i have been typing unit tests for the past 5 hours!!

When they come back to be i will discuss them.

I would also like to take over as project lead, if that is ok with everyone?

Toby.
14  PureMVC Manifold / Standard Version / Re: Framework Issues on: March 12, 2008, 06:45:23 AM
Thanks for your comments Nathan.

I thought about using "as" But i generally try to stay clear as it can cause headaches when debugging, but having said that it may be the best solution.

I have already started the unit tests, ill upload a new zip when they are done.

** UPDATE **

All unit tests for "core" package classes re-written and passed
Now working on "pattern" package classes
15  PureMVC Manifold / Standard Version / Re: Framework Issues on: March 12, 2008, 06:08:54 AM
I have re-written from scratch in conjunction with v 2.0.1

It is only a basic working package and a lot needs to be improved upon...

Run "main.py" to see some tests.

some issues:

At the moment  the facade class must always be imported using:

import *
NOT
from * import *

this means any references to constants in the AppFacade class must include the full package path which is annoying.

Also the Facade.getInstance and AppFacade.getInstance point to different locations in memory, does this matter? I was trying to think where this may break the application.

Let me know your thoughts.


[attachment deleted by admin]
Pages: [1] 2 3 4