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

Pages: [1]
Print
Author Topic: Any need for an Event type and/or Data type in PureMVC?  (Read 7494 times)
myIP
Jr. Member
**
Posts: 11


View Profile Email
« on: April 16, 2009, 05:42:54 »

Is there any need to use an Event type and/or Data type between the 3 tiers in a PureMVC application?  Some 3rd party libraries seem to use them, however, in most if not all examples from puremvc.org uses just value-objects and enums.  In other words, if the 3rd party library (such as XIFF) uses an event type and data type, should I use them instead of value-objects and enums?  Or should I use both? 

Thanks.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 16, 2009, 06:18:01 »

Certainly, you may use any custom datatypes that must pass between your model and view tiers. VOs and Enums are just handy patterns to use if you are starting from scratch.

In the case you mention, XIFF, you have custom datatypes like Roster, Message and Presence. These typically will have to make it across the tiers to a view.

Fortunately, Dave Keen has put together a very keen (heh.. heh..) PureMVC/XIFF demo which you can check out here:

http://www.actionscriptdeveloper.co.uk/puremvc-tutorial-flex-puremvc-jabber-and-xiff-3-introduction/

-=Cliff>
Logged
myIP
Jr. Member
**
Posts: 11


View Profile Email
« Reply #2 on: April 19, 2009, 02:28:34 »

I started off 2 months ago with that tutorial!  I wanted to learn just PureMVC and when I was half way thru it, I realized I needed to learn XIFF.  Now I am doing an IM application in Flex.  Its coming along, but just ran into a crux last week with it.

The reason why I asked the question in my original post is because, documentation for XIFF (beta version) is scarce.  I see that it has a data and event package, but I am unsure on when and how to use them.  So I think, I am going to take another attempt to implement them into my project.  But if the attempt ultimately fails, then I will use custom value-objects.

Thanks again.
Logged
Pages: [1]
Print