Here's what I use.

packages:

- business
   Contains singleton with services (RemoteObject, WebService, HTTPService, 
SQLite), used by Command classes.

- commands
   Contains commands that are executed by the Controller when a matching event 
is triggered.
   Commands are responsible for fetching data from server and storing it in the 
model.

- control
   Contains AppController (singleton) that wires custom events to commands.

- dto
   Date Transfer Objects (aka Value Objects). These get passed around with 
custom events and are stored in Model, etc.

- events
   Custom events, usually dispatched by views. Controller listens for these 
events and executes matching command.

- model
   App models. Dispatches change event when data changes.

- view
   App views.

==========================================================

Where would you expect transfer object class
   dto package

Where would you expect a custom event class?
   events package

Where would you put a class that reads from and writes to the file system?
   commands package

What about a class that holds string values to display ion dialog boxes, on buttons, etc? Is that part of the view or should it be defined in the model?

Not in the view and certainly not in the model.
Most likely a static utility class -> package: utils

regards,
Muzak


----- Original Message ----- From: "Mattheis, Erik (MIN-WSW)" <ematth...@webershandwick.com>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Monday, February 27, 2012 10:19 PM
Subject: Re: [Flashcoders] MVC style Correction


I've been putting all my class files in one of three folders, model, view, controller. I'm mostly concerned with making the code as easy to understand as possible.

Where would you expect transfer object class - a class that just defines a set 
of values to pass as a group?

Where would you expect a custom event class?

Where would you put a class that reads from and writes to the file system? Air.File has methods that produce UI elements. What are benefits/drawbacks to writing the extra code to get File.browseForOpen() somewhere in the View?

What about a class that holds string values to display ion dialog boxes, on buttons, etc? Is that part of the view or should it be defined in the model?



_ _ _

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to