PureMVC
Home
About
Code
Docs
FAQ
Forums
News
Showcase
Contact
Jobs
Welcome,
Guest
. Please
login
or
register
.
May 22, 2013, 10:21:07 PM
News:
ATTENTION: Spambots must die! Humans must visit
http://contact.futurescale.com
to request forum access.
PureMVC Architects Lounge
Announcements and General Discussion
General Discussion
PureMVC with netStream / netConnection / Camera / Microphone objects
Pages: [
1
]
« previous
next »
Author
Topic: PureMVC with netStream / netConnection / Camera / Microphone objects (Read 1170 times)
benissimo
Jr. Member
Posts: 12
PureMVC with netStream / netConnection / Camera / Microphone objects
«
on:
February 25, 2012, 07:26:16 AM »
Hi
I read an old thread in these forums which said that basically netStream objects could be thought of as dataProviders to a video object, and therefore needn't be part of the Model but could be bundled into the view component.
I'd like to continue this discussion if possible...
I can see the reasoning behind the above. A netStream doesn't really contribute to the domain model, its just a platform-specific (and therefore non-portable) method of transporting data to the view tier. If this is the case and I understand it correctly, then what does this mean for the various other players in a video application?
Does this mean the netConnection is also part of the view? After all, its also platform-specific and tells us nothing about the domain model. In which case where should the actual netConnection object be created and where should it be stored?
To the netStream we also likely need to attach Camera and Microphone objects. These are clearly view components, but should they be created inside the stream viewer component? And for setting various options (eg camera bandwidth, microphone codec) should the view component expose those objects and let a command set the properties?
Maybe its better to create a WebcamVO object to hold these relevant parameters, and pass that VO into the webcam view component, in which case does this VO belong in the model since its just a convenient way to group together a bucket of numbers.
I guess if I can summarise those random thoughts into a coherent whole:
when using these built-in AS3 classes such as netConnection are these immediately good candidates to stay out of the model since they are necessarily platform-dependent? And more generally are there good rules of thumb to determine where object creation and storage should be carried out?
Thanks,
Ben.
Logged
puremvc
Global Moderator
Hero Member
Posts: 2790
Re: PureMVC with netStream / netConnection / Camera / Microphone objects
«
Reply #1 on:
February 25, 2012, 04:40:34 PM »
Consider a simple form. Username, password, and 'remember me' fields. You define the text inputs and the check boxes that gather input from the user's mouse and keyboard inside a 'Form' view component of some sort, and then mediate it to carry away information from it or pass data to it (e.g., populating the form from a cookie).
So, why would we treat camera and microphone inputs any differently? Certainly we can pass a WebCamSettingsVO to such a component by sending it off in a note that it's mediator is interested in. When input streams into the component, we can send progress events with data that the mediator can send off to a command for processing before storage, or even straight to a proxy method that will store the data if you're say, streaming to disk or across the 'net. Those packets of data can be handled by the Proxy, who only needs to know about the data object and what to do with it, and is not tied to the business of webcams and microphones beyond handling data VOs and settings VOs.
Don't put the NetStream, Camara or Microphone management into a command (which should be isolated from the boundaries where input comes from), or a mediator (which should just shuttle data to and from the view component). Make the view components, just like simple, boring forms, handle getting the data from the user and dispatching it as need be in events.
-=Cliff>
Logged
benissimo
Jr. Member
Posts: 12
Re: PureMVC with netStream / netConnection / Camera / Microphone objects
«
Reply #2 on:
April 18, 2012, 06:07:16 AM »
Hi
just wanted to say thanks for the thorough, and quick, response to my question - much appreciated!
I also want to add that I got down to work building an app using the puremvc framework with the help of your O'Reilly book "Actionscript Developer's Guide to PureMVC". I would wholeheartedly recommend this book to anyone using PureMVC. It has been next to my keyboard the entire time I've been coding and I find myself constantly referring to it and occasionally lifting techniques wholesale. Its been invaluable to me during this project. No connection with the author here, just glad to pay back with a good reference.
I'll almost certainly have more questions as I learn more, but in the meantime thanks Cliff for leading the way with this framework!
Ben.
Logged
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements and General Discussion
-----------------------------
=> General Discussion
=> Getting Started
=> Architecture
=> Public Demos, Tools and Applications
===> Fabrication
-----------------------------
PureMVC Manifold
-----------------------------
=> Port Authority
===> Contributor Central
===> Client Side
===> Server Side
=> Port to AS2
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to AS3
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to ColdFusion
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to C++
===> MultiCore Version
=====> Demos and Utils
=====> Bug Report
=> Port to CSharp
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Dart
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Haxe
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Java
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to JavaScript
===> Demos and Utils
===> Native JS Branch
=====> Bug Report
===> PrototypeJS Branch
=====> Bug Report
===> Objs Branch
=====> Bug Report
===> MooTools Branch
=====> Bug Report
===> ExtJS Branch
=====> Bug Report
=> Port to Objective C
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Perl
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to PHP
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Python
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Ruby
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to TypeScript
===> Standard Version
=====> Bug Report
=====> Demos and Utilities
===> MultiCore Version
=====> Bug Report
=====> Demos and Utilities
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.11
|
SMF © 2006-2007, Simple Machines LLC
Loading...
Copyright © 2006-2008 Futurescale, Inc.