Expand my Community achievements bar.

Creating custom pods

Avatar

Level 3
Hi,

I am starting to play with CoCoMo since i was building a
collaborative educational platform in flex / fms and CoCoMo is
doing most of the requirements by default.



Looking at some Pods like SimpleChat or the big WhiteBoard
the code is pure AS3 with no mxml even for Gui and layout. Was this
code generated ? is there any examples using custom pods ?

The simplest one i could find is the user listing Roster:
more than 1k LOC.

I know its a beta so maybe the best thing i can do is dig in
head first.



4 Replies

Avatar

Former Community Member
Hi ,



We have a set of pods like WebCamera, SimpleChat, Roster,
Note etc. These pod classes support some UI functionalities and
have some minimal default UI with them . We are fully aware that
users might want to build their own pods. All these pod classes
have their sharedModels underlying them. These sharedModels handle
sending messages to the server and receiving them and maintaining
the state of the pods.

For e.g. SimpleChat has SimpleChatModel , Note has NoteModel
, Roster uses the UserManager as its model and so on.



You can use the shared Models to build your own pods and own
UI's . The shared models have some basic API's like for chat , It
has history , sending messages to everyone or only to owners,
guests , presenters etc.



If you want to have new features to the model, you can just
subclass the model. Then based on the model, you can build your own
UI's fresh and new.

If you look at the SimpleChatExample in the examples folder,
you will see it just uses the SimpleChatModel and builds a Chat UI
based on a TextInput, TextArea and Buttons and it doesn't use our
SimpleChat pod at all.



Lastly, if you think the pod UI or the pod class we provided
servs your purpose, then you can just use it like in the
DefaultPods example and if you just need minor changes, you can
subclass the pod class itself and then use it.



Hope this helps.

Thanks

Hironmay Basu

Avatar

Former Community Member
Hi Coulix,



Just like most of the UIComponents in the Flex SDK, there
isn't a heckuva lot of MXML in the Cocomo SDK. That said, you can
use MXML to build applications using the components we provide.



hope that helps

nigel

Avatar

Level 3
The simple chat example was realy helpful

Actually since we started building with PureMVC we are trying
to see how we could integrate it with CoCoMo.


http://forums.puremvc.org/index.php?topic=848.0

Avatar

Former Community Member
Cool, we're always interested to see how people work with
Cocomo in other Flex frameworks. Do report back to us how the
thread you posted turns out - I can only watch so many threads at
one time :-)



nigel