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 / Legends Of Valhalla - THOR on: November 13, 2010, 04:07:43
Hi,

We just released a new site: http://legendsofvalhalla.com

As usually we used PureMVC and as usually we loved doing it.  Thanks Cliff!

Best regards,
Sammi

Lead programmer @ gagarin.is
2  Announcements and General Discussion / Architecture / Multilingual views on: June 15, 2010, 02:43:49
Hi,

I am using my home brewed method for view localization.  It is simple and quite effective but I am still thinking of ways to simplify and thought I would get other people's opinion on a particular aspect of my method.

To simplify things I am not talking about the localization of the content - but interface elements like button labels and such.

Here is the flow right now:

1)  I have an XML document with all labels
2)  I have a Proxy that loads them and turns them into a smart vo
3)  The smart vo has a method to return a label identified by an id like SAVE or CLOSE
4)  My mediators collect the labels required for their views and pass them to the views as dictionaries
5)  The views use the dictionary to update all labels.

I have been thinking of skipping step 4 and 5 and just throw the whole smart vo to the views for simplicity.

The problem with that approach is that all the views get ALL the labels.  So even a simple view like "LogoutView" that only needs one label would get the vo with maybe 100 labels.

What do you think?  Maybe for an application that has only few views this is ok but what if the app has a lot of views?  Could/should I find a way to pass just a reference to the vo?

Best,
Sammi



3  Announcements and General Discussion / General Discussion / Smart VO on: May 31, 2010, 11:53:08
Hi,

I am looking into this Smart VO concept and I like it.  I have a few questions just to clarify things and it would be great if someone could share his experience/knowledge.

I usually have many Proxies that just have an XML document as data. Until now I have simply added getters and setters in the proxies to give PureMVC actors typed access to the xml.  I don't find it too bad but I do understand that a smart vo has benefits.  Especially for the views - I think.

Is it true that the main benefit is that the vo could be thrown at a view and the view then has typed access to the data?  Obviously the views have not had access to my getters/setters in the Proxies so code has been required to push the data into variables on the view - and to pull them back.

Since a VO isn't a core PureMVC actor it is fine to have the views import them and use and that simplifies the code...

... to push the data to the view
... to pull the data from the view again
... to have typed access to the xml doc

Am I right, almost right, wrong or even terribly wrong?

Best,
Sammi
4  Announcements and General Discussion / Architecture / Thinking about how it is best to Save/Load on: October 18, 2009, 10:44:56
Hi,

I am about to start a new PureMVC application and although my question really has nothing to do with PureMVC I am sure many of you have already encountered and solved a situation like mine.

The application is a drawing app. The user has a canvas to draw shapes onto.  The shapes have multiple updateable properties like fill color, line thickness, z-order and so on.  The user must be able to save and load drawings and my question is about how it is best to approach that.

I have made similar stuff in the past and then I have saved each shape's properties into the database making it fairly easy to redraw them when loaded.

I don't want to do that again if things like "class serialization" and/or "byteArrays" would somehow be more appropriate.

How would you save what has been drawn to the canvas? 

In PureMVC I will most likely have a VO for each shape on the canvas.  Would you serialize the value  objects and save them into the database as strings?  What happens if ( and when ) I need to alter the value objects? 

I hope someone here has some experience in this area and would be willing to guide me in the right direction.

Best,
Sammi
5  Announcements and General Discussion / Architecture / Real world PureMVC folder structure on: July 20, 2009, 06:20:07
Hi,

I always feel a bit lost on new projects when it comes to folder structure in a PureMVC application.  I really like the suggested structure:

\model
   \vo
\view
   \components
\controller

But that soon gets really messy in larger projects.  I find that my view and components folder get expecially messy.  That is why I always try to come up with a good folder structure within thos folders - and that is where I fail.

Either I get too granular or too general.  Often I end up with inconsistency and bad naming conventions inside the components folder.  I try to suffix 'real' views with View and other classes that the views use not.  But in the end there are so many classes that are not real views that the components folder get messy.  Then I sometimes move those classes outside of the components folder into some other folder but am never sure what folder name I could use that makes sense.

So I was hoping some of the more experienced PureMVC developers could share some of their experience in this area?

How does the folder structure look like in your real world application?  What structure do you use to keep everything clean and logical?

Best,
Sammi
6  Announcements and General Discussion / General Discussion / Hybrid CDROM on: January 01, 2009, 08:53:29
Hi,

I am creating a hybrid CD-ROM from a project that was creating with PureMVC - and having some problems.

I have my Application.swf that is a PureMVC application.  Then for the CD-ROM I created a Start.exe and Start.app that loads in Application.swf.

But it seems like it doesn't work.  Maybe I can't load a PureMVC application into a swf and expect it to work?  What happens is that the Application is loaded but no notifications seem to work.

Is that normal?  I think so - but hope not ;)

Best,
Sammi




7  Announcements and General Discussion / General Discussion / Orchid and PureMVC Studio. Where?? on: November 30, 2008, 07:57:59
Hi,

not really PureMVC related but on the Pirate Internet radio thing I heard this thing being mentioned:

Orchid UI framework by Samuel Agesilas

It is supposed to be an open source framework but I could not find anything about it on Google. Can anyone here point me to right direction?

Also.  I could not find the PureMVC Studio mentioned.  Has it not been released yet?

Best,
Sammi
8  Announcements and General Discussion / Architecture / Remoting with AMFPHP / ZENDAMF / WEBORB on: November 21, 2008, 04:00:34
Hi,

I am in the process of adding remoting to my PureMVC application and I would like to hear from someone that has been doing that.  I know how to set things up and they work just fine - but there is this one thing:

In past past projects I have been a fan of XML and E4X for searching and filtering the external data. My proxies often have methods to search and filter. But with remoting I don't think the PHP classes can return XML objects - or can they??

How do you do this?  Do you return ArrayCollections or Arrays and then create your own methods to search/filter the data?

And finally.  Which remoting package do you prefer??  I think I like ZendAMF but they are missing a service browser that is extremely helpful when testing the classes.

Best,
Sammi
9  Announcements and General Discussion / Architecture / Commands calling mediators/proxies in timed sequence on: October 30, 2008, 09:34:02
Hi,

I have a command that runs when I want my application to return to idle mode ( IdleTimeoutCommand ). This command tells the views to transition to their idle state. 

I want a simple way of controlling - and timing - how the view go to their idle state.  For an example I want the menu to go first, then the background graphics, and so on.

Am I allowed to have the command call the view for an example with TweenLite.delayedCall()?

So call view A after 0.5 seconds, B after 0.8 seconds and so on?

Could it happen that the command is removed from memory before it gets to call the view?

Confusing???

Best,
Sammi
10  Announcements and General Discussion / Architecture / Tips for helpful tools on: October 21, 2008, 03:08:38
Hi,

I was hoping that some of you have tips on what methods/tools you find helpful for planing the architecture of your PureMVC applications.

Do you use Sequence Diagrams?  Simple flowcharts?  Maybe nothing like that?

How do you sketch the flow of your applications?

Best,
Sammi
11  Announcements and General Discussion / Architecture / Cancel notification like events? on: October 06, 2008, 06:09:42
Hi,

this may sound strange but I think I would like to be able to "cancel" a notification.  I have a command that is triggered on notification.  This command does stuff and one of the things it does is to evaluate if there is any need to anything at all.  If nothing needs to be done I would like to prevent any interested mediator from getting the notification.

These mediators only have to act on the notification if something changed.

Sounds silly??  Maybe I should simply not send the initial notification if the command will not have to anything.  But I want the command to decide if actions are needed.

Best,
Sammi

12  Announcements and General Discussion / Architecture / More on Constants placement on: September 14, 2008, 02:45:39
Hi,

I have read the threads and FAQ on where to place constants and they make sense.  I prefer to put them in the ApplicationFacade, even if they are quite many, but I can also understand why some put them in a seperate file.  If I understand the recommendations correctly constants for notifications from the commands and mediators are declared in the application facade but constants for notifications from the model are declared in the proxies. 

What I want to understand better is how you handle constants in "view components".  A view component has a constant for an event that it dispatches.  Let's call it "LOGIN". The mediator for the view listens for the event and sends a LOGIN notification.

Should I declare a LOGIN constant in the application facade for that notification or can I use the constant from the view component:

sendNotification(LoginView.LOGIN)

It doesn't seem like a good idea but still most of the views actually trigger an event that results in the mediators sending out a notification and it bothers me to be defining the same constant twice.

Hmmmm....

Sammi
13  Announcements and General Discussion / Architecture / StartupManager Utility or BulkLoader? on: August 26, 2008, 06:51:40
Hi,

I have an application that requires quite a bit of loading at startup.  I have already completed the task by using an InitialAssetsProxy that uses BulkLoader (google) for loading the many different assets.  When the proxy has loaded all the assets an InitialAssetsLoadedCommand is run. That command creates proxies that will manage the loaded assets, and sets their data property with values from BulkLoader.

Is this better or worse than using the StartupManager Utility?  Am I missing something that makes the StartupManager more powerful?

I have used the StartupManager for this before and it works great but I feel like it requires a lot more code.

Best,
Sammi
14  Announcements and General Discussion / Getting Started / Defer model/view preparation on: January 22, 2008, 03:22:05
Hi,

I am risking being taken for a silly guy - but I don't mind bacause I am.

I have been going over quite a few examples of PureMVC implementation and I can see that the usual PrepModel/PrepView commands seem to be used in Flex apps - but not in regular AS3 apps.

Is that because of the way Flex works?  Should I just register Proxys and Mediators in the Facade for simple apps? Or just in my StartupCommand?

Sorry about this silly question.

Best,
Sammi
15  Announcements and General Discussion / General Discussion / Great work Cliff on: November 28, 2007, 02:50:09
Hi,

I just read the documentation and best practices and I must say this looks really good.  I have made several projects using Flex/Cairngorm and although I understand Cairngorm quite well I find to be an overkill for my projects.  I had been warned that it might be difficult to "unlearn" what Cairngorm teaches and switch to PureMVC but after reading the docs I am not worried.  This is pure and simple.  I remember it took some time to get to understand Cairngorm and even more time to get used to the repetitiveness.  I will still give Cairngorm respect - it is the "King", used by many to create great project.  It is just not very good for smaller, one person projects.

Now I can happily switch to PureMVC and use it for both my Flex and Flash project. I have been using PixLib for my Flash based projects and I loved it.  I just find that it makes sense to use the same framework for both Flash and Flex.  I will be able to use PureMVC for my MVC needs and mix in PixLib's functionality for other things.

Great work Cliff!  Thank you very much for creating this and sharing.

Now I am off to my first app.

Best,
Samuel
Pages: [1]