Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Improving workflow by dynamically loading XAML

$
0
0

Ok, so I know Xamarin doesn't have the ability to load XAML dynamically even though it is (was?) THE MOST requested feature (see this post from May http://forums.xamarin.com/discussion/17258/load-xaml-layout-at-runtime). Anyway, my typical workflow goes like this:

  1. Make some modifications in XAML or C#.
  2. Press F5.
  3. Twiddle my thumbs for a minute or two while it builds and deploy.
  4. Check my changes

    • If my change is OK (20% of the time) great!
    • If my changes are not OK (80% of the time) go to (1)

Now, I really don't like step number 3, it's a HUGE time waster because building, packaging and deploying is a lengthy process but even more because I totally lose my focus (aka flow. aka state of being in the zone) which I have to regain later. I'm starting to compare it to the time gained by not having to develop two separate apps. It's really frustrating.

So what I want to do is load XAML dynamically so I don't have to wait for a full build cycle to see by changes. I really can't see anything preventing a third party implement this so I'm planning to do it myself. Has anyone attempted this before? Are you guys going to add this in the near future? If you are please tell me, or give me a hint or something (if it's a secret for Evolve) since I don't want to invest my time implementing a feature that you guys are also implementing.

The way I'm planning to do it is by getting the XAML from the network, parsing it with an XML parser and then using reflection to build the layout in a big try-catch block. There are some edge cases (like new Images) but there are work arounds.

I'll be creating a GitHub project so if anyone is interested in helping you will be very much welcomed. I can foresee creating several different decoupled components, e.g: a server hosting the xaml file, and the Page subclass that builds the layout on the app side (these two can be developed in parallel).

What do you guys think?


Viewing all articles
Browse latest Browse all 58056

Trending Articles