Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed approach and naming

  • Loading branch information...
commit 13d835e1697ba8d911008aaf9dd481a1a744cf08 1 parent 21097bc
@seanhess authored
View
4 examples/FlickrBook/src/FlikrBook.mxml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
- xmlns:control="flickr.control.*" xmlns:views="flickr.ui.views.*">
+ xmlns:control="flickr.control.*" xmlns:views="flickr.ui.views.*" xmlns:glue="flickr.glue.*">
<!-- Styles ________________________________________________________________________ -->
@@ -9,7 +9,7 @@
<!-- Controllers -->
- <control:MainGlue/>
+ <glue:MainGlue/>
<!-- Views ________________________________________________________________________ -->
View
0  ...krBook/src/flickr/service/ApplicationService.mxml → ...ook/src/flickr/control/ApplicationController.mxml
File renamed without changes
View
33 examples/FlickrBook/src/flickr/control/MainGlue.mxml
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<GlueMap xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="http://glue.seanhess.net/2009" xmlns:views="flickr.ui.views.*" xmlns:business="flickr.business.*" xmlns:service="flickr.service.*" xmlns:model="flickr.model.*">
-
- <mx:Script>
- <![CDATA[
- import mx.events.FlexEvent;
- ]]>
- </mx:Script>
-
- <model:Photos id="photos"/>
- <model:Config id="config"/>
-
- <Glue>
- <service:ApplicationService id="appService" config="{config}"/>
- <Route event="{ApplicationService.CONFIG_LOADED}" call="photoService.getInterestingness()"/>
- </Glue>
-
- <service:PhotoService id="photoService" photos="{photos}" config="{config}"/>
- <service:MockPhotoService id="mockPhotoService" photos="{photos}" />
-
- <Glue>
- <views:MainUI id="main"/>
- <Route event="{FlexEvent.CREATION_COMPLETE}" call="appService.loadConfig()"/>
- <Route event="{MainUI.INTERESTINGNESS}" call="photoService.getInterestingness()"/>
- <Route event="{MainUI.SEARCH}" call="photoService.search(main.search)"/>
- </Glue>
-
- <Glue>
- <views:PhotoViewer id="photoViewer"/>
- <Inject currentSet="{photos.currentSet}"/>
- </Glue>
-
-</GlueMap>
View
0  ...ickrBook/src/flickr/service/MockPhotoService.mxml → ...rBook/src/flickr/control/MockPhotoController.mxml
File renamed without changes
View
0  ...s/FlickrBook/src/flickr/service/PhotoService.mxml → ...lickrBook/src/flickr/control/PhotoController.mxml
File renamed without changes
View
49 examples/FlickrBook/src/flickr/glue/MainGlue.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<GlueMap xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="http://glue.seanhess.net/2009" xmlns:views="flickr.ui.views.*" xmlns:business="flickr.business.*" xmlns:service="flickr.service.*" xmlns:model="flickr.model.*" xmlns:control="flickr.control.*">
+
+ <mx:Script>
+ <![CDATA[
+ import mx.events.FlexEvent;
+ ]]>
+ </mx:Script>
+
+
+
+
+
+ <!-- MODELS :: These are the main models -->
+ <model:Photos id="photos"/>
+ <model:Config id="config"/>
+
+
+
+
+
+
+ <!-- CONTROLLERS :: Controllers can manipulate models and call services -->
+ <Glue>
+ <control:ApplicationController id="appController" config="{config}"/>
+ <Route event="{ApplicationController.CONFIG_LOADED}" call="photoController.getInterestingness()"/>
+ </Glue>
+
+ <control:PhotoController id="photoController" photos="{photos}" config="{config}"/>
+ <control:MockPhotoController id="mockPhotoController" photos="{photos}" />
+
+
+
+
+
+ <!-- VIEWS -->
+ <Glue>
+ <views:MainUI id="main"/>
+ <Route event="{FlexEvent.CREATION_COMPLETE}" call="appController.loadConfig()"/>
+ <Route event="{MainUI.INTERESTINGNESS}" call="photoController.getInterestingness()"/>
+ <Route event="{MainUI.SEARCH}" call="photoController.search(main.search)"/>
+ </Glue>
+
+ <Glue>
+ <views:PhotoViewer id="photoViewer"/>
+ <Inject currentSet="{photos.currentSet}"/>
+ </Glue>
+
+</GlueMap>
View
4 examples/FlickrBook/src/flickr/service/FlickrParser.as
@@ -2,6 +2,10 @@ package flickr.service
{
import flickr.model.Photo;
+ /**
+ * Services can do stuff for you, but don't manipulate live
+ * models
+ */
public class FlickrParser
{
Please sign in to comment.
Something went wrong with that request. Please try again.