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  PureMVC Manifold / Demos and Utils / Blog - A PureMVC Python / Google App Engine Demo on: April 13, 2008, 03:45:22
Attached is a *very* simple demo of a blog demo I wrote using PMVC Python and Google App Engine. This was more or less a proof of concept/test to see how PureMVC could integrate with the framework. I don't have a hosting account under App Engine yet, but you can download App Engine yourself and run the demo locally. Instructions on how to do so are in the install.txt file in the zip.

Right now it only includes basic post functionality and a home page that shows all posts. Also, undocumented right now but I will come back and fix that on the next update.

If you can understand the uncommented code, I'd certainly appreciate feedback on my integration here.

Update:

PureMVC Python Google App Engine Demo - Blog Announcement

The project has been moved to: https://github.com/PureMVC/puremvc-python-demo-gae-blog/wiki
2  PureMVC Manifold / Contributor Central / Serialization Proxy - AIR on: March 18, 2008, 10:54:34
Just thought I'd share this little tidbit of code I wrote tonight. It's mostly a helper class, but handles opening the files and running the appropriate functions you pass to it.

It allows for either synchronous or asynchronous read/write of data to local files on AIR using a FileStream.

If you go synchronous you simply pass a function that takes a FileStream as its only parameter and serializes your data to it.

For asynch, you need to create an object that implements either/both of IFileReadResponder or IFileWriteResponder and pass it to the asynch methods. Put the read/write code in the onComplete method, should probably rename it for clarity.

I've also attached a mini AIR app that tests the synchronous code (haven't yet fully tested the asynch code, but fairly sure it works).

You'll also have to excuse the lack of comments (will do at later date), but much of the code is pretty self explanatory.
3  Announcements and General Discussion / General Discussion / The Flex Show Interview with Cliff Hall - PureMVC on: January 30, 2008, 07:18:31
Check it out! Flex Show interview with Cliff on PureMVC!

http://www.theflexshow.com/blog/index.cfm/2008/1/30/The-Flex-Show--Episode-33-PureMVC-Framework
4  PureMVC Manifold / Standard Version / Framework Issues on: January 08, 2008, 06:58:11
I've been wrestling with some issues that have impeded me from releasing the initial version of the framework. I'm hoping someone has some experience that can shed some light on this:

The problem revolves around how Python's import operation works at runtime. I initially followed this methodology (for example):

from org.puremc.python.core.view import View

which imported the View class from the org.puremc.python.core.view module.

This method of importing works fine, until the import becomes cyclical. Meaning module A imports module B. Later down the line B imports A. this works fine in compiled languages, but in Python, the interpreter has yet to finish interpreting A because it has not finished with B.

After some research, it appears the best methodology is to just use a standard import and import the entire module. This solves the import problem, however now the classes need to be referenced by the entire package name and certain modules can't be found:

class MacroCommand( org.puremvc.python.patterns.observer.Notifier, org.puremvc.python.interfaces.ICommand, org.puremvc.python.interfaces.INotifier ):
AttributeError: 'module' object has no attribute 'observer'

The Python documentation is sparse at best at how import functions. I know there was a previous problem with cyclical import with the standard import, but it appears that "from _module_name_ import cls" was never checked or fixed.

This is a major roadblock and as far as I can see the only one at the moment.

The only immediate solution I know of is to break down the package structure and just have everything reside at a root level, possibly in a single file. I really don't like this solution as it breaks standards and file structure with the other PureMVC implementations.

I've attached the framework code as it is now (standard import implemented atm), but it's untested due to this import issue and I don't want to think of committing it to the repository until that is done.
5  PureMVC Manifold / Standard Version / Demo Application Ideas on: January 04, 2008, 08:52:30
So, I think it's a good idea to start throwing around some ideas for how to showcase the Python port. I think a few general things have been mentioned such as server-side applications and desktop applications running off 3rd Party GUI frameworks. I've mostly been looking into the desktop area, but I'd love to see any ideas anyone has.

As far as desktop development goes, wxWidgets uses classes similar to how MXML works (since MXML compiles down to AS3 objects, then down to swf) so I think this would be a good starting point, especially for people who may have programmed in Flex and are wanting to explore the Python code.

So far, the Python implementation is identical to the original AS3, syntax differences between the two languages aside. I'm finishing up the documentation (hopefully tonight). I will be running some unit test tomorrow to make sure everything works (my primary concern at the moment is the functionality of the singletons, but I will be posting detailed information on how I resolved this later on).

So, lets hear some ideas!
Pages: [1]