Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MvvMCross and WindowsStore. #1055

Closed
PeterBurke opened this issue Jul 8, 2015 · 12 comments
Closed

MvvMCross and WindowsStore. #1055

PeterBurke opened this issue Jul 8, 2015 · 12 comments
Labels
s/needs-investigation Needs investigation by the MvvmCross team

Comments

@PeterBurke
Copy link
Contributor

We are currently developing a Forms.Presenter for "WindowsStore" at GitHub: Cirrious.MvvmCross.Forms.Presenter.WindowsStore.

Now MvvMCross has a NuSpec for WindowsStore that contains different assemblies to the NuSpec for Win81.

The issue occurs in package "MvvmCross.HotTuna.MvvmCrossLibraries"

The NuSpec for this package does contain 'File Nodes' for WindowsStore as follows:

<!-- store -->
<file src="..\bin\Release\Mvx\WindowsStore\Cirrious.MvvmCross.WindowsStore.dll" target="lib\netcore45\Cirrious.MvvmCross.WindowsStore.dll" />
<file src="..\bin\Release\Mvx\WindowsStore\Cirrious.MvvmCross.WindowsStore.pdb" target="lib\netcore45\Cirrious.MvvmCross.WindowsStore.pdb" />

The NuSpec for this package also contains 'File Nodes' for win81 and wpa81

<!-- windows common -->
<file src="..\bin\Release\Mvx\WindowsCommon\Cirrious.MvvmCross.WindowsCommon.dll" target="lib\win81\Cirrious.MvvmCross.WindowsCommon.dll" />
<file src="..\bin\Release\Mvx\WindowsCommon\Cirrious.MvvmCross.WindowsCommon.pdb" target="lib\win81\Cirrious.MvvmCross.WindowsCommon.pdb" />
<file src="..\bin\Release\Mvx\WindowsCommon\Cirrious.MvvmCross.WindowsCommon.dll" target="lib\wpa81\Cirrious.MvvmCross.WindowsCommon.dll" />
<file src="..\bin\Release\Mvx\WindowsCommon\Cirrious.MvvmCross.WindowsCommon.pdb" target="lib\wpa81\Cirrious.MvvmCross.WindowsCommon.pdb" />

NuGet for the WindowsStore FormsPresenter decides to link to the win81 assemblies, e.g. Cirrious.MvvmCross.WindowsCommon.dll where we would expect it to link to the Cirrious.MvvmCross.WindowsStore.dll assemblies.

I am currently investigating this issue. Note: NuGet looks at a project and decides the target it is looking for in the NuSpec via the ProjectTypeGuid in the CSPROJ file.

Also when VS 2015 first arrived there was just one new target WIN81. I actually developed a simple example after the RC came out.

WIN81 and in fact .NET assemblies going back many years are compiled as CIL that will load on both Intel and non Intel, so is the same as WPA81 (Windows Phone Apps direct no Silverlight) and Windows Store is not really a separate target either, it is a different distribution mechanism.

Also with the new Universal Store Apps there may be some new or varied input interfaces e.g. touch screens, but the universal app should be able to detect the hardware and adjust to it. Universal Apps should run on Windows 8.1.and later, but are not required to run on earlier versions of windows.

If your understanding of Windows Store etc. differs from my view, I would like to hear about it, so please add your comments.

@martijn00
Copy link
Contributor

It seems that you figured out this stuff. Please make a PR.

@PeterBurke
Copy link
Contributor Author

Thanks Martijn

I hope to get the first of a series of PR's for the MvvMCross-Forms shortly. I raised this thread however because I had some concerns about Cirrious.MvvmCross classes published in NuGet that MvvMCross-Forms references, in particular in relation to MvvMCross-Forms WindowsStore. For example Cirrious.MvvmCross has a WindowsStore target too but NuGet decides not to link to that and links to WindowsCommon instead.

Sometimes I feel like I am completely lost in a very large maze garden!

OK let's start at the beginning:

May 1 Microsoft releases Visual Studio 2015 RC with contributions from Xamarin and we are told that if you are developing a Xamarin.Forms cross-platform App there is a new target. The original targets were: iOS, Android, Silverlight on Windows Phone. The new Target Xamarin.Forms for Windows. The Index actually calls it "Xamarin.Forms for Windows Store".

The Setup and Installation Page has some images:

Before:
image

After:
image

and we see two new projects, one that Targets Windows 8.1 and one that targets Windows Phone 8.1 directly (no silverlight). I have checked the project type guid for the Windows 8.1 and it is the same as the WindowStore example project in MvvMCross-Forms.

So from that we might expect that NuGet would link to MvvMCross-Forms WindowsStore but as I stated previously it decides to link to WindowsCommon.

I also note that the term "WindowsStore" seems to be on the way out. As you recall there when Windows 8 first appeared there was a desktop where you could use a traditional mouse and keyboard and where applications where windowed, and there was the Metro / Modern Start surface with a different type of App called a Windows Store App or Modern App.

In Windows 10 Microsoft have moved to Universal Apps that will work on both surfaces and will be mostly sold via the Windows Store. So the term "Windows Store" in MvvMCross should likewise be replaced by something else more meaningful.

For more evidence of this changing terminology, Xamarin show us how to Add a Windows App to an existing Xamarin multi-targeted solution.

image

Notice the menu on the left hand side.

Installed > Visual C# > Store Apps > Windows Apps (selected)

That is the way it looks in Visual Studio 2013, but in Visual Studio 2015 the term "Store Apps" no longer appears.

image

Installed > Visual C# > Windows > Windows 8 > Windows (selected)

That type of project has the same project type guid as the one generated by VS 2013.

You will also note there are now two Universal App types in this menu. There is one for Windows 8.1 that is available in VS 2013 and now there is a new one for Windows 2010 Universal App.

A Universal App is one that should run on all windows platforms. The App needs to determine what it is running on and adjust its presentation along with its input handling accordingly.

Universal Apps in Windows 10 will be listed in the store as a single App that will run on all devices. The Windows 8.1 Universal App is not quite universal because you need a separate App for Phone. In fact when you create the Windows 8.1 Universal App from the above menu, VS actually creates two projects, the Windows 8.1 project and the Windows Phone 8.1 project (no silverlight).

You may be interested that Xamarin received a Pull Request on GitHub to Add platform support for Windows Universal App (Windows 8.1 and Windows Phone 8.1) ; PCL friendly data layer.

Recommendations for Cirrious.MvvmCross: We need to review the NuGet targets. WindowsStore probably will never be linked to by NuGet. For MvvMCross-Forms we are trying to work with WindowsCommon, I still have not determined that this will work.

Recommendations for MvvMCross-Forms: I will issue a PR to rename "Windows Store" to something else once I get MvvMCross-Forms working complete with Views. We should also plan to support Windows Phone 8.1 no Silverlight and Windows 10 UAP.

@stoneman
Copy link
Contributor

It's a long time since I've looked but I think that nuget installs WindowsCommon for Universal Apps or Windows Store 8.1 apps and installs WindowsStore for Windows Store 8.0 apps. If that is the case then I'd be happy to see WindowsStore removed from MvvmCross.

@PeterBurke
Copy link
Contributor Author

Thanks jonstoneman.

My priority now is to MvvMCross-Forms working, but I will take another look at this issue later. I would not want to break anything for other users and that makes it hard because we just don't know if there are any.

@martijn00
Copy link
Contributor

We've added a UWP project for MvvmCross now, and i am thinking we might want to make that move now. Should i remove WindowsStore? And should any nuspecs be updated to point to the right place?

@PeterBurke
Copy link
Contributor Author

Hi Martijn

You should never remove anything that someone might be using. It seems that we are still on version 4.0.0-beta2?

The standard procedure is to remove legacy features as you update versions. So what you can do now is to flag that support for the "Windows Store" will be dropped in a future release.

However this version currently would target Windows 8.1 tablets, so how many are there out there that have not yet upgraded to windows 10? In my case for my Surface Pro 3, that happened very early on, because the Tablet came with an it's own license. However I have two workstations running windows 8.1 using Licenses provided by Microsoft MSDN Universal subscription and these are running the enterprise version of Windows 8.1. For these, updating to Windows 10 was not offered nor was it forced. What I need to do is claim Windows 10 Licenses, download the ISO and then upgrade them.

I also have a Windows 10 Virtual Machine that I carried through the insider preview program.

However with so much to do, upgrading 8.1 to 10 is not a priority right now. OK what about the rest of Microsoft's enterprise clients? Even if thing go at top speed, they are unlikely to instigate upgrades of Windows 7 / 8.1 to Windows 10 for a while because it is an expense. Based on the Windows 7 release, which was surely very successful for Microsoft, this move will not pass the 50% mark for at least 18 months.

So my recommendation is to carry 8.1 into Version 4.0.0 release but include warnings that support for 8.1 will not be included beyond Version 4.5.0.

@Cheesebaron
Copy link
Member

Wait, so you are going to wait 5 minor versions before you want to remove a feature. That could take a year or more with the pace things are going in now.

My opinion is, if someone want's to create a new app targeting Windows 8.1, then they use MvvmCross 3.5.1.

MvvmCross 4.0.0 already has so many breaking changes, that removing Windows 8.1 support wouldn't change much anyways.

@PeterBurke
Copy link
Contributor Author

Actually there is no previous release that supports windows 8.1 tablet that is in any fit shape to be useful.

This was of course initiated by martijn but I contributed to actually getting it working. The 3.5.1 release was fraught with issues in the nuspecs and dependencies etc.

UWP a la Xamarin in the mean time is not ready to rock n roll. Has anyone else had a problem with Xamarin reachability? I registered for the https://resources.xamarin.com/xamarin-forms-private-preview.html, got an automated response and nothing more.

I even asked a question about it in one of the forums https://forums.xamarin.com/discussion/comment/131578#Comment_131578 and the consensus seems to be that Xamarin generally to not respond to forums expecting other forum members to do that.

There seems to be no dedicated forum for UWP on Xamarin.

What I do know from the limited information released so far is that their UWP is lacking fundamental forms elements right now, so it literally is not ready for prime development.

Now of course it would simplify things a lot if we could we could drop windows 8.1 as well as direct windows phone 8.1 (that we are not yet supporting) and support UWP instead for both windows 10 and windows phone 10 (not even released yet).

In my opinion let it be known that support for windows 8.1, direct windows phone 8.1, and windows phone 8 Silverlight will cease by release 4.5.0, and I chose this release number to allow for 5 minor versions if we need them. We don't have to use them, we can skip to that release in a month if UWP is more solid by then.

@PeterBurke
Copy link
Contributor Author

Hi
Miguel de Icaza, has a personal blog. He used to write once every month, but this has now increased to once per month. Today he published again see http://tirania.org/blog/

He mentions that they are now on Cycle 5 with Service Release 4 due out shortly.

Implicitly what we need to get started on Universal Apps will not happen in a service release but may occur when they move to Cycle 6. He concludes that he will cover what will be in Cycle 6 in a future blog.

@Cheesebaron
Copy link
Member

Implicitly what we need to get started on Universal Apps will not happen in a service release

Care to elaborate? I have no idea what you are talking about. Why does Xamarin have an impact on whether we can create UWP projects or not? Are we talking Xamarin.Forms? No? Then I don't see any issues. We already have UWP support.

@PeterBurke
Copy link
Contributor Author

Yes, Visual Studio 2015 allows you to create UWP Apps for windows 10. However if you code a form within a portable project using the new features , then this App will not work on iOS and Android.

However if you build an App that targets windows 8.1 + iOS + Android (where we are now), then that app will run on Windows 10 and Windows 10 Phone when it is released.

So the issue is really about the new features that are in the Universal App for Windows 10. The Windows Universal App concept actually has been around for a while now and that is why the Windows 8.1 Tablet target actually already implements some universality.

What Xamarin are doing with their preview project is creating the next release of the universal app concept, and that requires extensions to their frameworks and XAML format.

I received an email from Xamarin just one hour ago, it reads: "I just checked with the Forms team and this is not open to anyone at the moment. By submitting your information you will be considered to be part of private preview once it goes live. I asked the Forms team and do not have a timeline at the moment. We 're usually pretty good about letting our community know when these things open up so I'd expect a blog post or email when the time is getting close."

Microsoft Universal App adds many new aspects that are not available for Xamarin Cross Platform yet, and that is what the preview is all about. Examples include XAML that adapts for different screen sizes, special events like the orientation event that allow you to adapt the presentation, many different types of input device etc.

Suggested reading:
https://visualstudiomagazine.com/articles/2015/05/27/adaptive-layout-windows-universal-app-plat.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/dn609832.aspx
https://msdn.microsoft.com/library/dn975273.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/dn894631.aspx

@PeterBurke
Copy link
Contributor Author

There was a video released last week that shows you the new UWP features in action, view it here: https://channel9.msdn.com/Shows/Inside-Windows-Platform/UWP-Layout-using-SplitView-and-RelativePanel-in-C-with-XAML

They basically allow you to have a set of 3 general screen form factors each with their own XAML definitions. Plus each XAML definition can reconfigure itself depending on screen geometry.

Another concept is called "uwp continuum" that is all about dynamically changing presentation in response to changes like orientation, window resizing in desktop mode, switching from desktop to tablet mode e.g. by removing a detachable keyboard, surrounding the window with a traditional desktop frame when switching to desktop mode, and so on.

I am still struggling with Xamarin.UITest as it does not work the way I want it to. For example in most of the teams I have worked in recently there were a lot of developers checking in code all the time and before checking a build server would run all the automated tests that had to pass. UITest cannot easily be automated for local automated testing like that. They do have a test cloud, but in my view that would be something a dedicated tester might use during final release testing. It requires visual inspection of screen shots etc.

So I have written a lot of code that can run automated tests on a check-in server, Android only at this stage. It compiles and signs APK packages, interfaces into the Hyper-V in order to start and stop different versions of the Visual Studio Emulator for Android VHD's so that tests are run on multiple simulated devices.

This code I will share from my own GitHub repo, but use in the example that is in MvvmCross-Forms repo. I then hope to publish an article on the Xamarin developer site that will point back to here.

@martijn00 martijn00 added the s/needs-investigation Needs investigation by the MvvmCross team label Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s/needs-investigation Needs investigation by the MvvmCross team
Development

No branches or pull requests

4 participants