<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,8 +5,14 @@ package com.insideria.twitteria {
     import org.puremvc.as3.interfaces.*;
     import org.puremvc.as3.patterns.facade.*;
 
+	/**
+	 * A Facade is the class that deals with any access to the deeper
+	 * parts of the framework
+	 */	
 	public class ApplicationFacade extends Facade {
 		
+		// Here is a list of constants that represent notifications
+		// we'll be using elsewhere in the application
         public static const STARTUP:String 			= &quot;startup&quot;;
         public static const LOG_IN:String			= &quot;login&quot;;
 		public static const VIEW_TIMELINE:String	= &quot;viewTimeline&quot;;
@@ -20,14 +26,20 @@ package com.insideria.twitteria {
             return instance as ApplicationFacade;
         }
 
+		// this is a framework method
         override protected function initializeController():void {
-            super.initializeController(); 
+            super.initializeController();
+            // here we register notification constants to commands 
             registerCommand(STARTUP,		StartupCommand);
             registerCommand(LOG_IN,			LogInCommand);
             registerCommand(SET_STATUS,		SetStatusCommand);
             registerCommand(LOAD_TIMELINE,	LoadTimelineCommand);
         }
 		
+		/**
+		 * here we pass in the application instance so we can pass the reference
+		 * around with the startup note
+		 */		
 		public function startup(app:twitteria_puremvc):void {
 			sendNotification(STARTUP, app);
 		}</diff>
      <filename>puremvc/src/com/insideria/twitteria/ApplicationFacade.as</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,11 @@ package com.insideria.twitteria.controller {
 	
 	public class LogInCommand extends SimpleCommand {
 		
+		/**
+		 * Execute is where the main responsibilities of the command are 
+		 * executed. Here we set the credentials on the appropriate Proxy
+		 * and tell the system that we're ready to load the timeline
+		 */
 		override public function execute(note:INotification):void {
 			var userProxy:UserProxy = facade.retrieveProxy(UserProxy.NAME) as UserProxy;
 			var credentials:Object = note.getBody();</diff>
      <filename>puremvc/src/com/insideria/twitteria/controller/LogInCommand.as</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,10 @@ package com.insideria.twitteria.controller {
 	
 	public class ModelPrepCommand extends SimpleCommand {
 		
+		/**
+		 * Prepping the model means registering Proxies, which 
+		 * are members of the Model tier in PureMVC
+		 */		
 		override public function execute(note:INotification):void {
 			facade.registerProxy(new TimelineProxy());
 			facade.registerProxy(new StatusProxy());</diff>
      <filename>puremvc/src/com/insideria/twitteria/controller/ModelPrepCommand.as</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,10 @@ package com.insideria.twitteria.controller {
 
 	public class StartupCommand extends MacroCommand {
 		
+        /**
+         * A Macro Command is one that fires off other commands in 
+         * parallel. Here we kick off the model and view configuration commands
+         */
         override protected function initializeMacroCommand():void {
             addSubCommand(ModelPrepCommand);
             addSubCommand(ViewPrepCommand);</diff>
      <filename>puremvc/src/com/insideria/twitteria/controller/StartupCommand.as</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,11 @@ package com.insideria.twitteria.controller {
 	
 	public class ViewPrepCommand extends SimpleCommand {
 		
+		/**
+		 * Prepping the View means instantiating mediators
+		 * and giving them references to the parts of the view they
+		 * mediate
+		 */		
 		override public function execute(note:INotification):void {
 			var app:twitteria_puremvc = note.getBody() as twitteria_puremvc;
 			facade.registerMediator(new ApplicationMediator(app));</diff>
      <filename>puremvc/src/com/insideria/twitteria/controller/ViewPrepCommand.as</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,11 @@ package com.insideria.twitteria.model {
 	import org.puremvc.as3.interfaces.*;
 	import org.puremvc.as3.patterns.proxy.Proxy;
 	
+    /**
+     * I've chosen to make the Proxy implement a responder and deal with 
+     * service access through a delegate. This is one way of doing things, 
+     * not the only way.
+     */	
     public class TimelineProxy extends Proxy implements IProxy, IResponder {
     	
 		public static const NAME:String = &quot;TimelineProxy&quot;;
@@ -19,15 +24,25 @@ package com.insideria.twitteria.model {
             super (NAME, data);
         }
 		
+		/**
+		 * Interacts with the delegate to get data, 
+		 * which in this case calls back to result
+		 */
 		public function reload():void {
 			var delegate:TwitterDelegate = new TwitterDelegate(this);
 			delegate.loadTimeline();
 		}
 		
+		/**
+		 * When the delegate calls back
+		 */
 		public function result(result:Object):void {
 			var stati:Array = result as Array;
+			// hold a references to the payload 
 			currentTweets = new ArrayCollection(stati);
+			// this tells the MainViewMediator to show the timeline
 			sendNotification(ApplicationFacade.VIEW_TIMELINE);
+			// this tells the MainViewMediator that the timeline has changed
 			sendNotification(ApplicationFacade.TIMELINE_LOADED);
 		}
 		</diff>
      <filename>puremvc/src/com/insideria/twitteria/model/TimelineProxy.as</filename>
    </modified>
    <modified>
      <diff>@@ -11,17 +11,30 @@ package com.insideria.twitteria.view
         
 		public static const LOGIN_VIEW:int	= 0;
 		public static const MAIN_VIEW:int	= 1;
-        
+		
+        /**
+         * The ApplicationMediator is responsible for interpereting
+         * events from and then acting on the root application
+         */        
         public function ApplicationMediator(viewComponent:twitteria_puremvc) {
             super(NAME, viewComponent);
         }
 
+        /**
+         * A framework method that gives the mediator a chance to list
+         * which notes it cares to listen to
+         */
         override public function listNotificationInterests():Array {
             return [
 				ApplicationFacade.VIEW_TIMELINE
 			];
         }
 
+
+        /**
+         * A framework method that is called when any notification this 
+         * mediator cares about is sent through the system
+         */
         override public function handleNotification( note:INotification ):void {
             switch (note.getName()) {
 				case ApplicationFacade.VIEW_TIMELINE:
@@ -30,6 +43,9 @@ package com.insideria.twitteria.view
             }
         }
 
+        /**
+         * Helper method to get a hold of the view
+         */
         protected function get app():twitteria_puremvc {
             return viewComponent as twitteria_puremvc
         }</diff>
      <filename>puremvc/src/com/insideria/twitteria/view/ApplicationMediator.as</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,9 @@ package com.insideria.twitteria.view {
             return viewComponent as LoginView;
         }
 		
+		/**
+		 * When the view dispatches the login event, send the LOG_IN note
+		 */		
 		private function login(event:Event):void {
 			var credentials:Object = {username:view.usernameText.text, password:view.passwordText.text};
 			sendNotification(ApplicationFacade.LOG_IN, credentials);</diff>
      <filename>puremvc/src/com/insideria/twitteria/view/LoginViewMediator.as</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,8 @@ package com.insideria.twitteria.view {
         override public function handleNotification( note:INotification ):void {
             switch (note.getName()) {
 				case ApplicationFacade.TIMELINE_LOADED:
+					// Here we have a case of getting some data from a proxy
+					// and setting it on the view
 					view.currentTweets = getTimelineProxy().currentTweets;
 				break;
             }</diff>
      <filename>puremvc/src/com/insideria/twitteria/view/MainViewMediator.as</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,9 @@
 	&lt;![CDATA[
 		public static const LOGIN:String = 'login';
 	
+		/**
+		 * PureMVC has the views using POFEs - plain old flash events :-)
+		 */
 		public function login():void {
 			dispatchEvent(new Event(LOGIN));
 		}</diff>
      <filename>puremvc/src/com/insideria/twitteria/view/components/LoginView.mxml</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,9 @@
 	&lt;![CDATA[
 		import com.insideria.twitteria.ApplicationFacade;
 		
+		// We get a reference to our implementation of the Facade here
+		// so that we can call startup on it in the creationComplete event
+		// on the root tag
 		private var facade:ApplicationFacade = ApplicationFacade.getInstance();
 	]]&gt;
 	&lt;/mx:Script&gt;</diff>
      <filename>puremvc/src/twitteria_puremvc.mxml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c3b4e018f1589440be690d4dc2e5484fcb0d131</id>
    </parent>
  </parents>
  <author>
    <name>Tony Hillerson</name>
    <email>tony.hillerson@effectiveui.com</email>
  </author>
  <url>http://github.com/thillerson/twitteria/commit/87a36cfc1569dd0f23a14b837d0ae143cd315568</url>
  <id>87a36cfc1569dd0f23a14b837d0ae143cd315568</id>
  <committed-date>2009-01-30T18:21:10-08:00</committed-date>
  <authored-date>2009-01-30T18:21:10-08:00</authored-date>
  <message>commented some key PureMVC points</message>
  <tree>3d54e17508a8ae99f8c1df86ff1da5836619a8c6</tree>
  <committer>
    <name>Tony Hillerson</name>
    <email>tony.hillerson@effectiveui.com</email>
  </committer>
</commit>
