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] 2 3 4
1  Announcements and General Discussion / Architecture / Re: AIR - Sqlite Proxy object on: April 21, 2008, 05:45:07
Rhysyngsun, does one put constants in a UML scheme? I am new to UML, but want to learn. Allready in this thread it has proven me that it is a nice way to communicate code concepts :)


I'm not sure as I don't use UML myself (I typically diagram on paper). I believe Cliff is more familiar with it than I.

I forgot to mention, those constants should be protected as well since only the Proxy would know about the structure of the database, so no need to expose them publicly.
2  Announcements and General Discussion / Architecture / Re: AIR - Sqlite Proxy object on: April 19, 2008, 03:10:15
Jiri, another recommendation I'd make with you SQL code is to code any table or row names as constants and simply concatenate them into your query strings. That'll avoid any typos that could potentially cause issues. This would also allow you to refactor your tables quickly although you'd still have to delete your local data store.
3  PureMVC Manifold / Standard Version / Re: RetrieveProxy Returning NULL on: April 19, 2008, 03:04:46
Cerin, are you passing NAME as the first parameter to the super constructor? That was the first thing that came to mind for me, your constructor for WorldProxy should look like:

public function WorldProxy()
    super( NAME, null );

Name is the important part, null would be whatever you're initializing data to.
4  Announcements and General Discussion / General Discussion / Re: Proxy VO Getters on: April 18, 2008, 08:19:44
The second parameter in super() is the value to set data as. So in this case you're probably going to get a null reference error. You'll want to change to this, so that data gets initialized:

super( NAME, new Valor() );

You don't want to initialize on the view, because the view should not be manipulating data, only displaying it.
5  Announcements and General Discussion / General Discussion / Re: Notification Stacking on: April 17, 2008, 11:59:48
If you're using Flex then there might be an easy solution for this using 'callLater'.

From the docs: 'The callLater() method queues an operation to be performed for the next screen refresh, rather than in the current update.'

Unfortunately, callLater is a method of UIComponent, instead of a top level function. Also, it would probably be bad practice to have a function called as a result of a UIComponent redrawing itself.
6  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Alternative to WebOrb and to RemoteObject on: April 17, 2008, 11:52:00
I tried WebOrb for PHP and found it to be too bulky for my purposes. I chose to move to AMFPHP instead due to its small filesize and similar feature set. All I really want from a remoting gateway is the ability to easily configure and add services and to have code access security. WebOrb seems more suited for enterprise level applications where you need a commercially supported product. I've also found PHPAMF to be faster as well.

I'll have to look into SSR in depth soon.
7  PureMVC Manifold / Demos and Utils / Re: Blog - A PureMVC Python / Google App Engine Demo on: April 17, 2008, 08:29:08
The demo has been updated to version 1.1. This version includes:

  • Edit/Delete post functionality.
  • A few changes regarding the view and redirects(see version.txt for further information)
  • Comments

It still remains a very simple demo.

amb, the updated demo deals with query strings which may help point you in the right direction. If you want to start a discussion about state in PureMVC Python and Google App Engine that would be great, but probably best for a dedicated thread.
8  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: April 17, 2008, 06:33:34
rbhadra, the compiler cannot find the PureMVC_AS3_2_0_1.swc file which should be located in the libs folder, however, without knowing your compile settings, I can guess that it is looking for it in the root of the project directory instead. Are you using Flex Builder or the command line compiler?
9  PureMVC Manifold / Demos and Utils / Re: Undo - A PureMVC AS3 Utility on: April 16, 2008, 03:32:08
It's in the trunk, probably just waiting on having the zip file uploaded:

10  Announcements and General Discussion / Architecture / Re: AIR - Sqlite Proxy object on: April 16, 2008, 10:58:06
I think eitehr way will be fine, the only difference is that with Notifications you would be able let other parts of you application respond to the events in a PureMVC way (i.e., on an error, update the UI to show an error message). The biggest difference is that the proxies are decoupled from each other and you don't have to worry about adding/removing listeners with notifications. Either way, though you're going to need something to discern what kind of result you're getting. I personally might even go so far as to write a custom Event subclass for this, this way I could customize the interaction between the proxies as much as possible.
11  Announcements and General Discussion / Architecture / Re: AIR - Sqlite Proxy object on: April 16, 2008, 10:14:22
Jiri, you'll also have to take into consideration that if you're using an asynchronous connection, methods such as getContacts won't be able to return a value immediately as your proxy will have to listen for a result event (and also error events) on the SQLConnection and then send the value off via a notification. Of course if your query results are expected to be small, you may find you are able to get away with a synchronous connection.
12  Announcements and General Discussion / General Discussion / Re: PopUp and DataProvider Issue on: April 16, 2008, 09:58:07

Sorry I didn't catch your post earlier.

The first thing I noticed is that you are using an older version of PureMVC, you can download the latest version here:


You can view release notes here to see what code changes you need to make to incorporate the update:


I updated your app on my copy, and I don't get the same problems, so I would suggest updating and see if that resolves the issue.
13  Announcements and General Discussion / General Discussion / Re: Proxy VO Getters on: April 16, 2008, 09:49:06
The second parameter in the Proxy class constructor is for passing your data to the data variable. This depends highly on your needs. If you've only keeping track of one data object, you can just pass that along, otherwise you may want to consider something like an ArrayCollection for storing a whole dataset. You then typically define a getter to return the data variable cast  to the appropriate data type.

So in your case (if I understand correctly that you're only keeping track of one), you would be doing:

public function ValorProxy()
super(NAME, new Valor(0))


public function get valor():Valor
return data as Valor;

Then in your mediator, assign the value of the valor getter to the value variable on your view instead of instantiating it in your view. Now your view references the data on the Proxy and the Proxy manages the data.
14  PureMVC Manifold / Demos and Utils / Re: PureMVC + Google App Engine - Blog Demo on: April 14, 2008, 02:45:45
Ok, sounds good to me.
15  PureMVC Manifold / Demos and Utils / Re: PureMVC + Google App Engine - Blog Demo on: April 14, 2008, 02:05:16
Glad to know my code was written well enough to understand easily.

The trickiest part is that when the server runs the script it continues to execute regardless of whether there are any requests from clients. I'm slightly worried how this will affect multiple concurrent client requests since they would theoretically share facade, mediator and proxy instances due to the singleton model. Mostly I'm worried about one client accessing a page and firing off a notification that other clients' request would then respond to.

It was just a quick demo so further testing is obviously necessary.
Pages: [1] 2 3 4