Screenflow based application in Adobe Flex/Flash - flash-cs4

I'm searching for some code samples for my Flash application. The app is based on screen-flows , i.e each screen is defined with some visual elements with some buttons which have async events associated with them(consuming web services basically). The buttons also have functionality to go back and forth between screens and jump to any screen. I want to define all of the visual elements and the functionality of the events in a XML file. Thus the model, view and controller are all in the XML. Does any framework allow this like Pure MVC? Where can I find some examples of this kind of functionality that I want?

There's a Flash implementation of Heirarchical State Machines here, which mentions XML and Flow Control:
http://code.google.com/p/troyworks/
(Note: There's a very slick screencasting application called Screenflow which may lay claim on that particular term these days...)

Related

Can a HTML/WinJS View use a user control built in XAML/C#?

I am hesitant to develop a Windows Phone app in the HTML/WinJS Universal App space because of the difficulty of building complex user controls. Before I go the XAML/C# route, I would like to find out if it is possible to use a user control built in XAML/C# inside of an HTML/WinJS view?
My initial feeling is that it is not possible due to XAML parsing not being available in the HTML space, but I am not certain that this is the case. Any thoughts?
Also, I am not interested in 3rd party solutions such as Xamerin. I am really trying to see if this is possible from a native approach.
No. The HTML and Xaml UI stacks in the Windows Runtime are separate and cannot be mixed. You can call non-UI C# or native Windows Runtime Components from JavaScript.
You can include HTML in a Xaml WebView, but there is no reverse hosting.
--Rob

Implementing State handling in windows 8 using MVVM Light

How i can implement state handling (running / resume / Terminate states ) using mvvm light. The major issue i a facing is with Navigation. I am totally uncontrolled with the navigation stack. How i can effectively manage this with MVVM Light.
Start a new project using either the GridView or SplitView templates and take a look at SuspensionManager.cs in the Common folder. It has a method called RegisterFrame which, when called, starts tracking all of the navigation events from the frame and attempts to save off and restore state when the application suspends and resumes.
The applications main frame is registered with the SuspensionManager in App.OnLaunched (App.xaml.cs) and Saving is done in App.OnSuspending.
Finally, take a look at LayoutAwarePage.cs, also in the Common folder. You can inherit from LayoutAwarePage to get Portrait and Snapped design time support. It also attempts to handle navigation state caching by leveraging the SuspensionManager. So, no matter whether your page is navigated to from another page or as part of a resume, the virtual method LoadState is called with the correct data.
Obviously this pattern is managing navigation state directly in the page itself, but you could tweak this pattern to create a sort of "SuspensionService" that your ViewModels could leverage in the same way.
You might be interested in the open source Okra App Framework that is freely available on CodePlex and NuGet (disclaimer: I am the lead developer on this project). This has been designed from the ground up for Windows 8 applications, in particular those that use the MVVM pattern (and you can still use the MVVM Light base classes to define your view-models).
Of particular interest it includes,
A navigation manager that understands the Windows 8 navigation model
A navigation stack that can automatically persist its state upon application termination
A mechanism for view-models to persist their own state (via a simple interface)
Automatic view and view-model construction and wiring up (by default using MEF attributes)

state handling in windows 8 using mvvmlight

Implementation of state handling in windows 8 using mvvmlight
Is there any method avilable in mvvmligt to manage states in WinRT? How I can duplicate the functionality of default Suspensionmanager by using WinRT? And the second one is about managing navigation cycle ie if I navigated from page A - > B. and the go for suspend and shutdown state. When I re start the application in need to open page B. and while presses back key I need to load A. How I can effectively implement this using MVVM light in my WinRT application?
These aren't really MVVM Light functionality. You'll need to do these yourself.
One option would be to create your own navigation service (see example here). The navigation service could use the suspension manager to build/manage a breadcrumb trail for the application. If you added an additional method:
public void GoToMostRecentPage()
{//blah}
You'd be able to call this method in the app start-up and take the user to the appropriate page.
I'd stick with the SuspensionManager. If you want to make it more MVVM friendly you can wrap it in a service that is injected into your viewmodels as required.
You might be interested in the open-source Okra App Framework that you can get from NuGet or the CodePlex site I linked to above. It is designed from the ground up to work great with Windows 8 and the MVVM pattern (and you can still use your MVVM Light base classes).
It has a navigation manager that automatically handles everything you mentioned above - managing the application's navigation stack, persistence of the stack on application suspension/termination and even allows view models to persist their own state via a simple interface (like how the SuspensionManager works for pages).
(disclaimer: I am the lead developer on this project)
I wrote this originally for WP7 and have been updating for Win8 RT. It allows you to attach attributes to properties you want to keep in your view models, then the PersistenceManager dehydrates them (serialized to file) when the app is suspended and rehydrates when it resumes.
There are examples for WP7 and Win8, basic MVVM pattern and MVVM Light
Obelisk

Rally AppSDK: Is there a way to facilitate "Inter-Panel" communication between Apps in the new layout schema

So I'm just getting used to and getting my arms around the new "panel-based" App scheme released with the 5/5/2012 version of Rally. At first it was a bit frustrating to lose the window real estate when I've been accustomed to full-page iFrames.
I am curious however - from a desire to optimize the way I use real estate onscreen for an App page - I would like to setup and utilize a multi-panel App whose components can communicate. For instance, I'd like to have one App panel display some control widgets and perhaps an AppSDK table, and a second App panel display a chart or grid that responds to events/controls in the first panel.
I've been scanning the AppSDK docs for hints as to how this might be accomplished, but I'm coming up short. Is there a way to wire up event listeners in one App panel that respond to widget controls in another?
We have not decided the best way to have the Apps communicate yet. That is something we are still spiking out internally to find the best way to do it.
Each custom App is in an IFrame so figuring out how to make them communicate can be a bit tricky. Once we figure out a good way to do it we will be sure to let you know.
Has this topic, "app Communication", been addressed yet? I would to have one Custom Grid show User Stories. When a user story is selected another grid show the related tasks.

Creating a image browser Boxee App

I am writing a Boxee App and I want to list all albums for a picasa account.
The problem I'm facing is that I have no idea of how to list albums and photos in the Boxee app.
The application itself should be fairly simple:
First a main screen where all your albums are listed, then when you click an album you see all your photos in a grid of say 4x5 photos
When you click a photo you go in to a view where one photo is displayed on the whole screen where back and forward lets users go back and forth in that gallery.
I have wrote a simple wrapper arround the gdata photos Python API which I was aiming to use so hopefully all the heavy lifting will be done by the gdata API.
Does anybody have some good links to example applications or tutorials to one or more of the features I want in the application?
Boxee uses an XML based approach for describing an application's interface. You'll need one XML for each screen of your application and you'll connect them together using the API.
You would build this XML screens using various controls defined by the XML API. Basically a control (a button, a list, a label, etc) is described as an XML node with attributes and child nodes. You can check a list of all the available controls here: http://developer.boxee.tv/UI_Controls
You can use the Python API to control various properties of the UI elements you coded in your XML files. For example you could fill a list with photos taken from a server, you could change the label on a button, load another screen and much more. Here are the Python API specs: http://developer.boxee.tv/Python_API
Make sure you read trough the Boxee dev pages and also remember that Boxee originated from the XBMC project so most of the documentation regarding XBMC skinning (http://wiki.xbmc.org/?title=Skinning_XBMC) also applies to Boxee.
Another thing that might help you is looking at other apps. Find an app that is somehow similar to what you want to do, find it in Boxee's app folder and peek at the code there.