Uncategorized - Written by Niels on Thursday, December 14, 2006 22:48 - 2 Comments
Model(Locator), easy way to manage your data
After a hard day of work, where we overcome some problems I focused some more on the architecture of our application. After Raymond blogged some examples about bindings and events, I’ll put some design patterns against it.
So today I made an example of a Model. This is one pattern of the Model-View-Controller pattern. With the Model you can locally store and access your data. I also named it ModelLocator, because frameworks like Cairngorm and ARP also use this name.
So take a look at my example, i’ll hope you’ll understand how useful a Model can be. Also you can see how I’m starting to build my structure in Flex 2.
Next on my todo list is building a Controller. Then the MVC pattern will be complete. Also take a look at the Cairngorm framework. This Flex 2 framework is also based on the MVC pattern, but got many more features.
technorati tags:model, modelLocator, design, pattern, MVC, cairngorm, ARP, example
Popularity: 27% [?]
2 Comments
Yes this was a simple example, just to explain the advantages of a Model. But you’re totally right that you can implement other features to it like Dictionary and ValueObject. I also refered to the Cairngorm and ARP framework, where some of these features are implemented.
Maybe you can post an article sometimes about an advanced ModelLocator?
Leave a Reply
Most Popular Content
- NabAIR v0.1: Update to AIR 1.0
- Rotating arround 3D object in Away3D
- Away3D explorer for Flex
- Exploring Away3D in Flex
- 10 Great articles about RIA (Flex) usability
- i always watch online movies from Vimeo or Youtube, it is low resolution but mos...
- Yeah, it’s really weird. I think they will try to get this as popular as they ...
- online movies are cool but i wish the quality were better.".-...
- i changed port of usb and it run ok :D...
- this example is run ok on IE but not good on Firefox
i have 2 webcam. sirius us...
- Hello, nice example. Helped a lot. But can't this hovercamera3d rotate around th...
- As an ex-joox uploader, here are two sites I discovered that are equivalent to j...
- For all those who like shows like entourage check out premiumtvshows.com
...
Flex - Feb 25, 2008 20:11 - 7 Comments
Rotating arround 3D object in Away3D
More In Technology
- Away3D explorer for Flex
- Exploring Away3D in Flex
- The Flex community have closed their eyes for quality and perfection
- Login tutorial Ruby on Rails -> WebORB -> Flex 2 basic communication, now translated in English
- Noorderslag.nl: Flex is not application only
Usability - Feb 6, 2008 17:39 - 5 Comments
10 Great articles about RIA (Flex) usability
More In Interaction Design
- Busy with reading
- Rich Interactive Experience with Microsoft Surface
- Who needs a Wii when you’ve got Soap?
- Presentation about “Getting Real”
NabAIR - Feb 27, 2008 2:04 - 5 Comments
NabAIR v0.1: Update to AIR 1.0
More In Projects
- NabAIR v0.05: Update to AIR 1.0 beta 3
- NabAIR v0.04: View and listen to your Nabaztags inbox
- NabAIR v0.03: New skin, more voices, get info and sleep
- NabAIR v0.02: Position his/her ears, voice selection and save settings
- NabAIR v0.01: Control your Nabaztag on your desktop

Hey Niels,
You are on the right way with this. And I know this is supposed to be a simple example but I like to add some comment on it.
First thing: I wouldn’t set variables in your model. I would have given the Model 2 functions, setData() and getData(). Those functions can fill dictionary in your model. The Dictionary is a handy tool in which you can place attributes under a certain “key”.
Second thing I would do is incorparate the valueObjects in the model. So setting and getting the valueObjects goes through the Model. This is handy because a ValueObject is also a storage for data but it is also used in communication with the server. So you can send your ValueObject to a server function simply by getting them through the model.
Hope this is a bit usefull for you.
Good luck!