suavepirate / xamarin.flux Goto Github PK
View Code? Open in Web Editor NEWXamarin projects, templates, and examples using the Flux Pattern
License: MIT License
Xamarin projects, templates, and examples using the Flux Pattern
License: MIT License
Hi @SuavePirate , I have a question on the architecture setup for Flux.
I understand that the cycle for Xamarin.Flux is as follows.
Action
> Dispatcher
> Store
> ViewModel
> View
> ViewModel
> Action
...
so using event delegates, the ViewModel callbacks will mostly do DataBinding property change or UI-thread specific methods (such as show dialogs, navigation, etc ) or another Action
the problem i'm having is that what happens when i'm running another ViewModel that uses the same Flux Actions and Stores? because from what I read in this sample, it doesn't have event unsub.
Consider the scenario that I'm having problem right now.
VM_A
class uses Flux_Action_A
and Flux_Store_A
.
VM_A
navigates to VM_B
and then VM_B
navigates to VM_C
VM_C
uses Flux_Action_A
, Flux_Store_A
and Flux_Action_B
, Flux_Store_B
.
if OnEmitted
is called, doesn't this mean that VM_A
and VM_C
will get the callback and will run the UI logic on each callback implementations?
I'm hoping to get some insights from you.
Regards,
Shahman Teh.
Ello, I found the example clean and simple but was wondering what unit testing looks like.
Hi,
I am interested to know how and where the long running web request will fit into this architecture.
If possible could you include one in your sample app.
Regards
Rodwan
I have a fresh pull, and cleaned out the OBJ/BIN folders and receive this warning:
warning: Invalid type Xamarin.Flux.Startup.IoCConfig/<>c for instance field Xamarin.Flux.Startup.IoCConfig+<>c:<>9
Additionaly, I get a runtime error:
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:179
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/rttype.cs:5639
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00039] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/activator.cs:201
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/activator.cs:134
at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode parentNode) [0x00253] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\CreateValuesVisitor.cs:103
at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x000b1] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlNode.cs:175
at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00089] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlNode.cs:172
at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00054] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlNode.cs:223
at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydratationContext visitorContext) [0x00053] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlLoader.cs:122
at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) [0x00046] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlLoader.cs:76
at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType) [0x0002f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlLoader.cs:56
at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.Type callingType) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\ViewExtensions.cs:36
at Xamarin.Flux.App.InitializeComponent () [0x00001] in /Users/lamont/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux/obj/Debug/Xamarin.Flux.App.xaml.g.cs:19
at Xamarin.Flux.App..ctor () [0x00008] in /Users/lamont/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux/App.xaml.cs:14
at Xamarin.Flux.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00007] in /Users/lamont/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux.iOS/AppDelegate.cs:26
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at Xamarin.Flux.iOS.Application.Main (System.String[] args) [0x00001] in /Users/lamont/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux/Xamarin.Flux.iOS/Main.cs:17
PS- Great Xamarin video by the way. I'm so excited by this framework
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.