Your opinion about several crossplatform frameworks

XcenoXceno Xceno MalloyDEMember

Hi Xamarin Team,
first of all we really like to work with your products and this post is not supposed to lead to a philosophy war or rant about C# vs. Javascript in any way. We love C# otherwise we wouldn't be here ;)
So now here are my questions.

In order to have the highest rate of reusable code across platforms, isn't it more practicable to use PhoneGap?

What about huge crossplatform projects, are there significant advantages of using Mono compaired to a framework like PhoneGap?
We also tried Monocross and MvvmCross which are both great frameworks. Especially MvvmCross which is a very active and fast developing project.
But both of them gave us some headaches while starting out because there's really some fiddling necessary to get it all up and running.
When we tried PhoneGap we just downloaded and ran it which was a real ease at first.

Now we're debating about which one to use for small stuff like RSS-Readers and which would be more fitting for the big projects because
we want to avoid of getting stuck with one of the solutions in the middle of development.

Of course we would also appreciate to hear about any other experience with those frameworks from other developers!

Best regards

«1

Posts

  • CodeMonkeyCodeMonkey Adrian Estran GBMember ✭✭✭

    I've not developed using phonegap but the company I recently joined was using phonegap for their apps until they discovered mono. I was tasked with re-implementing one of the old phonegap apps in mono as a test case to see how long it would take, and what performance differences there where.

    I finished the mono version with two weeks to spare (was my first app so this even suprised me) and the difference in performance was very noticeable. Simple things like scrolling through a long list seemed laggy and unresponsive in the phonegap version.

    The phonegap version was also slated on the appstore for these performance issues so users do notice!

    I can't imagine building anything but the most basic of apps with phonegap (from what I have seen of the tech), maybe others think differently though?

  • XcenoXceno Xceno Malloy DEMember

    Thanks for your reply! Now that's a really serious issue as performance of course matters a lot. I was also totaly happy with how fast we built our first app with monotouch back then.

  • KarlWaclawekKarlWaclawek Karl Waclawek CAMember

    I am in a similar situation - trying out Xamarin right now.

    We started a cross-platform mobile app on PhoneGap, because there was a mandate to let our users bring their own devices, and to let the client decide what devices to purchase.

    Xamarin was part of the initial decision making process, but the majority of decision makers decided on PhoneGap. Now here are the major points of our experience (2 months):

    • PhoneGap is not as truly cross-platform as one might believe, not all features are equally supported on all platforms. Surprising indeed, as this was the core promise of PhoneGap.

    • Javascript is not an application scale programming language, too many global scope interactions, different libraries don't often co-exist nicely. We spent many hours trying to get knockout.js and jQuery.mobile play well together, and we still have problems.

    • Fragmented landscape for frameworks and libraries. Too many choices, and too many are not mature enough.

    • Strangely enough, for the needs of our app, decent performance could be achieved (not with jQuery.Mobile, though). We tried jqMobi (not very mature, but fast).

    • Very limited capability for interaction with other apps or cdevice capabilities, and this would not be cross-platform anyway, as there aren't any standards in HTML5 except for a few, like geolocation, camera and local databases.

    Praying that our clients don't pick Blackberries as their device of choice.

    Karl

  • XcenoXceno Xceno Malloy DEMember

    Thanks Karl that's a valuable insight. We already thought it would be like this, so it's good to get our concerns confirmed.

    Any other opinions anyone?

  • KarlHeinzBrehmeArredondoKarlHeinzBrehmeArredondo Karl Heinz Brehme Arredondo BRMember, Beta

    I have an uncommon solution..:

    As the original project came from Windows Mobile, I created a "simple" Windows.Forms using native controls but calling it ComboBox, TextBox and Label (and, of course, Form), so actually I have running on Windows Mobile (lie, no clients are using it anymore), iPhone, iPad and, also, ASP.NET... all calling myForm.Show(), or myComboBox.Add(new ComboItem(text, value)) and running something on Closing event, as to get some response from closing "dialog/form".

    So all UI manipulation is the same on all platforms. Since windows.forms for ASP.NET was created, I think that will be easy to make it on Windows Phone and Android (the only fear is different memory capacity from each cheap device, but as this is enterprise app, web can specify devices to use for better performance or viability).

    Only differences are how to populate a UITableView, since I do not created yet Forms.ListView, but on ASP.NET is a simple binding, or tabs, as on ASP.NET are handled by JQuery Mobile and calling C# events. So a form is:

    MyForm.cs (shared with all real things)
    MyForm.xib.cs (just on iOS project to take an event and call the real action)
    MyForm.aspx.cs (just on ASP.NET project to take an event and call the real action)
    MyForm.xib (just on iOS Project, iPhone and iPad each with it's own version)
    MyForm.aspx (just on ASP.NET Project)

    Indeed, some special things can be done in HTML to show things, like reports or another special things, so it run cross-platform too on everywhere, on ASP.NET is a div/panel/literalcontrol.

    If something do not have ThisProperty on each platform, or ThisMethod(), just create an extension like GetThisProperty() and SetThisProperty(value) and handle it properly with #if only once in life.

    But now, a windows C# developer can make a Form on iOS and asp.net.. and later on WP and Android, I hope.

    Karl

    -- the original one

    ^^ just kidding, but is funny now to receive e-mails signed by myself but wasn't me, I have to read some times trying to remember when I write this :)

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited January 2013

    What about huge crossplatform projects, are there significant advantages of using Mono compaired to a framework like PhoneGap?

    In my opinion there are several HUGE advantages including

    • native performance
    • easier to read code (IMO)
    • testability
    • shared code between client and server
    • support (although Xam could do better on bugzilla)

    This is why I do what I do!

    Don't underestimate the significance of native UX and performance right now: even an app that was really well written and that users wanted to use - Facebook - got TWICE the use when it dropped HTML and went native.

    Having said that, there are jobs where I use other non-Xamarin tools, and there may be jobs where PhoneGap is best - although I personally would suspect that those are on smaller rather than bigger projects.

    Especially MvvmCross which is a very active and fast developing project. But both of them gave us some headaches while starting out because there's really some fiddling necessary to get it all up and running.

    Thanks :) I can't deny there are some headaches with Mvx - especially because of my stubbornness on pushing forwards using Portable Class Libraries, and because I've continued to grow and build the code rather than sitting back and documenting it.

    My main suggestions are:

    • Persist with the C# approach - whether or not you use Mvx, the native power and shared code is awesome - see what @CodeMonkey said :)
    • Help with documenting the framework by posting questions here and on StackOverflow - questions help!
    • Help with documenting and publicising what is available by tweeting, star'ing, +1-ing, liking, blog-list-posting, etc - all these things help the Search Engines find the gold in the sand
    • For slightly more effort, maybe also consider helping by generating blog posts, tutorials, samples, wiki entries, etc. You'd be amazed how helpful even short one paragraph blog posts can be. And if you then add a gist too, even better!
      • For example, is there any way you can share some details of your MvvmCross experience so that other people can have an easier learning curve in the future?
      • This may sound like extra work... but actually I've found that writing about experience often helps me - it's amazing how often I find one of my old StackOverflow answers or one of my old blogposts when I'm looking for an answer to a new question.
    • Let the various mono community speakers, bloggers, and user groups know what you want to read and hear about. I know several of them often ask 'what would you like to hear about?' and often get very few answers...
    • For making MvvmCross setup easier:
      • Help persuade me to drop PCLs and focus on making Mvx projects 'easier to start' by using non-PCL (good luck with that!)
      • Help persuade Microsoft and Xamarin to prioritise making PCLs and PCL support better by posting bugs and comments on forums, on bugzilla, on Connect, etc.
      • Help writing some scripts or tools to make it easier the community can help a lot - e.g. see VSMonoTouch (which itself came out of MonoFlave)

    Failing that... feel free to send me money so I can stop working and focus on MvvmCross instead ;)

    Although actually... if I didn't have genuine work with genuine requirements, then I probably couldn't build new stuff for Mvx - everything needs balance!

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited January 2013

    Just to clarify...

    That last post was in no-way intended to be critical of the community. I'm stunned and very grateful by the number of people who have done blog posts, samples, presentations and even book chapters about Mvx. Thanks :)

    Oh... and on:

    In order to have the highest rate of reusable code across platforms, isn't it more practicable to use PhoneGap?

    This is probably correct as you can share more of the UI layer.

    But at the present time, I'm generally happier have 90% shared, performant C# code using native UI, instead of 95% shared, less-performant, harder to maintain and non-native-looking HTML with JS.

    PS I talk too much :)

  • ChWoChWo Ch Wo DEMember
    edited January 2013

    Help persuade me to drop PCLs and focus on making Mvx projects 'easier to start' by using non-PCL (good luck with that!)

    Hi Stuart,

    first of all I really like your work on MvvmCross! Architecture, code and especially the results are looking pretty good.
    But I have really heavy problems in getting started with your framework. I watched some of your slideshares, watched your YouTube videos and read your blog-posts. Then I tried to get started by doing your tutorial part 1.
    In the first step you tell me to add the projects Cirrious.Mvvm.Android and Cirrious.Mvvm.Binding.Android. These projects dont exist. So I want to try the existing projects Cirrious.MvvmCross.Droid and Cirrious.MvvmCross.Binding.Droid. After loading these projects I get lots of errors caused by referencing unknown Mvvm-projects. So I can't go further in your tutorial.

    So it seems that
    a) I did anything wrong
    or b) the tutorial isn't up to date

    Then I tried to get started in a different way. I read your "getting started"-section on github and followed the instructions in this link to set up my IDE for PCLs. First of all I wondered about all that stuff I need to get it run. I don't think everyone has a license for Visual Studio 2010 and a Mac with MonoTouch (to get the VSMonoTouch 2010 add on run) before starting the first project. But in my case it's OK. I have all of these. So I set up the PCL plugin, VSMonoTouch 2010, created the xml files for MonoAndroid and MonoTouch but I can't load your MvvmCross_All.sln completely. The IDE tells me that it can't find several projects used by MonoTouch.
    In VS2010 I see a new project template called MonoTouch Flavor but I'm not a able to start a new project. The new project types have strange names like ".BuildNotification" or ".CodeUITestBuilder" etc. When I try to create a new project of that types I get error messages telling me that "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE.BuildNotification.exe" could not be found. Obviously VSMonoTouch doesn't work correctly but I don't know why.
    This all is a bit frustrating since many people in the web having trouble to link and/or debug PCLs on different platforms after setting up their IDEs.

    After spending three days of headaches in getting started I think PCLs are really useful BUT only when
    a) PCLs are completely supported by Mono for Android, MonoTouch, Xamarin.Mac in MonoDevelop and VisualStudio without any hacks
    or b) when the IDEs and development tools are used and set up by professionals in these tools.

    PCLs don't work for me (as someone who is new on .NET, MonoDevelop and VisualStudio) right now. They make me more and more confused and complicate things instead of getting started with your beautiful framework.

    I am looking for a step-by-step instruction for beginners to get started with MvvmCross without doing any hacks. An instruction where I just need MonoTouch, Mono for Android, MonoDevelop and maybe VS Express for Windows Phone.
    I think the only way to get run a setup for this issue is using file linking in each project. It's a bit more work on maintain the projects but it's easier to understand what happens inside my IDE and fix errors by myself because most of them are caused by missing file links .

    I would write an instruction if I'd knew how to do the described setup correctly. Is it possible to create three MvvmCross class libraries (one for MonoTouch, one for Mono for Android and one for Windows Phone) that contain the whole MvvmCross framework? Which .cs-files do I have to link in each project? What do you suggest?
    Would it be useful for beginners just to download the DLLs of that libraries and link them in their projects (and your sample projects as well) without compiling them on their own machines?

    I woul like to give my part back to you and the community, but I really don't know how.

    PS I talk too much :)

    Me too ;-)

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    Can't answer all of those points right now... just a quick snack break at work




    I am looking for a step-by-step instruction for beginners to get started with MvvmCross without doing any hacks

    With the PCL version, I don't think this is possible.

    There is no official support for PCLs for either MonoTouch or MonoDroid, and there are bugs like the Mac Targets files which have been open since last Summer, have been fixed, but haven't been released yet.

    Is it possible to create three MvvmCross class libraries (one for MonoTouch, one for Mono for Android and one for Windows Phone) that contain the whole MvvmCross framework?

    Possible, yes. Fun, no. Maintainable - not without a huge amount of boring, error prone, manual effort (or you can try to use the Project Linker extension which has never worked for me... but which others swear by)

    This is where MvvmCross started - and I can tell you it was very hard work to code and develop a project this big before PCLs.




    If you get stuck in startup, then you can always post questions to StackOverflow, to here or to https://jabbr.net/#/rooms/mvvmcross ... people generally help each other out... and then one day someone will write and maintain those golden steps about setup.




    There is some effort underway to help people get started... e.g. the 2 solutions (so far) in https://github.com/slodge/MvvmCross-Tutorials/ can be downloaded and run just by unzipping the right .zip files in the bin directory.

    Those zips are created from the binary releases I've started doing on http://slodge.blogspot.co.uk/p/mvvmcross-binaries_7.html




    There is also some effort to get MvvmCross into NuGet - but we have to wait for 2.3 before we can even try that...




    One of the challenges here is we are on shifting sand... Any tutorial you write today is going to be out of date as new releases from Microsoft, Xamarin and (to some extent) me change the playing field.

    But I think the situation is getting better...

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited January 2013

    PS. If you're keen on going back to the pre-PCL option, please also remember that we have support for:

    • MonoTouch
    • MonoDroid
    • WP7/8
    • WinRT
    • Console/UnitTest
    • WPF

    And 'in progress' for:
    - Mono.Mac
    - Xam.Mac

    And 'hope for':
    - PSS
    - more new things :)

    So it's not just about 3 sets of projects...




    The two pictures from http://blogs.msdn.com/b/dsplaisted/archive/2012/08/27/how-to-make-portable-class-libraries-work-for-you.aspx show what I hope to avoid:

    and achieve:




    If it's too painful for people to do right now, I understand that...

    ... but I have a feeling the only way to get through the PCL pain barrier is to keep pushing forwards...




    (You're welcome to try non-PCL if you want to - I think @deapsquatter1's even done just that recently with the .Mac port)

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited January 2013

    For reference, here are key steps to get past.

    On the PC:

    • forget about VSMonoTouch for now.
    • get PCL support installed for VS2010 (it's already there for VS2012)
    • get MonoDroid installed
    • get WP SDK installed
    • then hack in the reference assembly .xml file for MonoDroid in Profile 104
    • then you should be able to build and run WP, WinRT and MonoDroid
    • when you create a PCL project, manually edit the file to say Profile104.
    • use the BuiltInVS2012 files or 'PC' files from http://slodge.blogspot.co.uk/p/mvvmcross-binaries_7.html

    On the Mac:

  • ChWoChWo Ch Wo DEMember

    For reference, here are key steps to get past.

    Thanks, I think this is really going to help me!

    But there are still a few questions:

    when you create a PCL project, manually edit the file to say Profile104.

    Which file? The .csproj of my PCL? Should I the Profile1-hack here to use this file on Mac?

    forget about Win8, WP or MonoDroid for now.

    Just for interest: Why? MonoDroid is available for Mac, isn't it?

    hack the targets file so that PCLs reference the MonoTouch assemblies and not the Mono ones

    Which file is the targets file? The .csproj, the .sln, a different file?

    Let's say I've already created a PCL (Profile104) in Visual Studio referencing your MvvmCross binaries to build apps for WP, WinRT and MonoDroid and I want now use this PCL on my Mac. What are the steps to get it run? Please correct me when I'm wrong.

    (To keep things simple, I work directly in my Dropbox directory. My complete solution is stored there.)

    1 - [On Mac] Do the Profile1-hack on the .csproj of the PCL.
    2 - Open the .sln in MonoDevelop
    3 - Add a new MonoTouch project for the GUI to the solution
    4 - Add references to your MvvmCross binaries (from BuiltInMonoTouch) to the new created MonoTouch project
    5 - Add a reference to the PCL project in that new created MonoTouch project
    6 - Create the GUI using MvvmCross

    After setting up this, I can switch between PC and Mac to compile and debug apps for each platform. Is this correct?

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    The .csproj of my PCL?

    Yes. Highly recommend the productivity tools for VS2012 - then you just right click and choose Edit Project File.

    Should I the Profile1-hack here to use this file on Mac?

    Yes - if you want to use it on the Mac

    Why? MonoDroid is available for Mac, isn't it?

    Because you wanted simple instructions, and the vast majority of people who talk to me currently use VS first. (this may just be who I talk to!)

    Which file is the targets file?

    The one that will one day soon ship fixed within Mono and that needs a 2 line fix - http://slodge.blogspot.co.uk/2013/01/if-pcls-will-not-build-for-you-in.html - it's been a problem since last May... will hold a party when it ships :)

    What are the steps to get it run? Please correct me when I'm wrong.

    You're wrong.

    Some PCLs you build on the PCL will run fine in MonoTouch.

    But some won't.

    To avoid problems, I recommend you always rebuild your PCLs against MonoTouch when using MonoTouch.

    To achieve this in a build tree, I currently store my projects with a lib directory which contains MvvmCross pre-built for VS and for MT: https://github.com/slodge/MvvmCross-Tutorials/tree/master/Lib/MvvmCross

    So on the PC I unzip the VS bundle, and on the Mac I unzip the Mac bundle (sometimes I have to use a third party unzip tool - Mac OSX unarchiver can be weird).

    For more on almost-portable portable libraries, see http://slodge.blogspot.co.uk/2013/01/almost-portable-binaries.html

    Xamarin have said they are looking at more portable support - and it's in the 6 month time frame. Sounds like I might get to have another party then :)

    After setting up this, I can switch between PC and Mac to compile and debug apps for each platform. Is this correct?

    Yes

    • Except that if you are consuming different MvvmCross assemblies for PC and Mac, then .



    This may sound complicated... but it isn't.

    Just break this down like any task. Try to get this working one step at a time - e.g. WP first, WinRT second, Droid third, Touch fourth - then you'll be happier. Stop looking at one big problem, start looking at four steps.

    Plenty of other people have managed it... but at least one of them was genuinely a rocket scientist :)

  • ChWoChWo Ch Wo DEMember
    edited February 2013

    Thanks again. It's a hard way to get started but I go further.

    I try to do your tutorial part 1 again. With the information you gave me I can do a bit more than before.

    I set up a PCL in VS and then I created a MonoDroid project that references that PCL. Sometimes I have to take a look on how you do the samples in the actual revision but most things work like described in the tutorial.

    But now I'm stuck (and tired ;-) ) again: The compiler tells me
    - that the MvxBind attribute used in the .axml file wasn't declared (I copied the MvxBindingAttributes.xml to my resources/values folder and set it to AndroidResource)
    - and that it can't find the System.Net.dll (this comes only when I override the OnModelViewSet method in my view)

    Edit: Sorry Xceno, I think I have gone offtopic to much.

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited February 2013

    At least you're having more fun than I am... it's 1:45 and I'm in tax accounting pain!

    If you're referring to the tutorial in the Wiki, then there's a block on https://github.com/slodge/MvvmCross/wiki - on the front of the wiki that says:

    Sorry... this Wiki is currently out of date... updating it for vNext is on my TODO list...

    If you would like to help, then please get in touch :)

    I did consider taking down the wiki, but the general consensus seemed to be it was better to have something up even if it was out of date.




    The good news, though, is it sounds like you have a working dev environment




    Note: I'm not apologising for the lack of up-to-date docs. I'd love it if we had them, and I will write them if no-one else does, but I'm confident I've been focusing on the right priorities for my customers and for the Mvx project so far, I can't afford to pay anyone to write docs, and I'm definitely sure I haven't been slacking :)




    Edit: yeah - sorry @xceno for stealing the thread :)

  • XcenoXceno Xceno Malloy DEMember

    Wow this one grew quick :D
    But there's nothing to apologize for! Your posts were a very good read and I think we'll stick with MvvmCross and if I have something to share in future I will definitely do so in order to contribute to the project.

    There's way too much stuff now to reply to in details, so I just wann say thanks so far for your detailed posts! :)

  • ChWoChWo Ch Wo DEMember
    edited February 2013

    At least you're having more fun than I am... it's 1:45 and I'm in tax accounting pain!

    urgh Everything in the world is more fun than this.

    Sorry... this Wiki is currently out of date... updating it for vNext is on my TODO list...
    If you would like to help, then please get in touch :)

    I know it's out of date. I hope to get finished that tutorial at the weekend by doing some things different. After I've done this I let you know about the things I changed (compared to the tutorial).
    The quickstart guide looks pretty good! Why do you hide it from the beginners by don't linking it in the getting started section on github? ;-)

    [P.S: Shame on me. I bookmarked that quickstart guide a few weeks ago...and forgot about it..]

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    Why do you hide it from the beginners by don't linking it in the getting started section on github? ;-)

    I'm still looking for that 25th hour in every day. Maybe you've got it and can lend it to me? ;)

    I think the Wiki on Github is editable by all-comers.

    The readme can be edited via pull request - or by emailing me a full updated file.

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited February 2013

    Small print:

    • other frameworks are available
    • you don't need a framework
    • if you're doing your first ever app project, consider just starting with code behind - you can do a bigger architecture on your second project.
    • enjoy coding
  • ChWoChWo Ch Wo DEMember
    edited February 2013

    Maybe you've got it and can lend it to me?

    Sorry, I don't think I can lend a minute to anybody. It's saturday morning but my bed is still far away ;-)

    Right now I do your quickstart. After that I try the tutorial again and update the wiki page for tutorial 1. Hope to get it done this weekend.

    So on the PC I unzip the VS bundle, and on the Mac I unzip the Mac bundle

    I found a quick hack for that problem (see EDIT below) (I like the idea of porting a project folder to another machine without changing files manually):
    For each reference to a PCL in my core PCL I edit the reference path manually (in the .csproj).

    So that this

    <ItemGroup>
    <Reference Include="Cirrious.MvvmCross">
    <HintPath>lib\MvvmCross\Windows_NT\Portable\Debug\Cirrious.MvvmCross.dll</HintPath>
    </Reference>
    </ItemGroup>

    becomes this

    <ItemGroup>
    <Reference Include="Cirrious.MvvmCross">
    <HintPath>lib\MvvmCross\$(OS)\Portable\Debug\Cirrious.MvvmCross.dll</HintPath>
    </Reference>
    </ItemGroup>

    The folder lib/MvvmCross has the subfolders "Windows_NT" and "$(OS)" containing the PCLs for the specific platform. Too bad that MonoDevelop on Mac doesn't resolve the $(OS) variable correctly here.

    EDIT: Argh! It doesn't work. Everytime MonoDevelop on Mac makes changes in the .csproj everything crashes. If anybody has an idea on how to prepare the csproj to solve that problem, please let me now.

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭
    edited February 2013

    I like the idea... let me know if you get it working...




    Also, if anyone wants to try to persuade me to shift away from PCLs... then your job just got even harder:

    http://slodge.blogspot.com/2013/02/the-future-is-portable.html

    The future is portable

    :)

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    P.S. If you're using up-to-date Mvx binaries, then it's probably easier using Swiss binding instead of Json - see http://blog.ostebaronen.dk/2013/01/awesome-mvvmcross-swiss-bindings-for.html

  • ChWoChWo Ch Wo DEMember
    edited February 2013

    I like the idea... let me know if you get it working...

    OK, it seems to work now. It's not exactly the same but I really don't like to rename folders every time I switch the environment.
    I changed the references in the .csproj of the PCL like this:

    <Reference Include="Cirrious.MvvmCross" Condition="'$(OS)' == 'Windows_NT'">
    <HintPath>lib\MvvmCross\VS2012\Portable\Release\Cirrious.MvvmCross.dll</HintPath>
    </Reference>
    <Reference Include="Cirrious.MvvmCross" Condition="'$(OS)' != 'Windows_NT'">
    <HintPath>lib\MvvmCross\OSX\Portable\Release\Cirrious.MvvmCross.dll</HintPath>
    </Reference>

    Note: MonoDevelop doesn't interpret this file correctly. So it displays both entries in the references section. This error doesn't matter because xbuild interprets the references correctly.

    Right now I do your quickstart. After that I try the tutorial again and update the wiki page for tutorial 1. Hope to get it done this weekend.

    As you can see, I haven't got it last weekend. I stucked on the quick start guide several times. I'm looking forward to keep my promise ;-)

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    Thanks Wosi...

    I'm not sure about the portable reference folder fix now... will continue to think...




    On the points

    1 [WindowsPhone]
    IMvxServiceConsumer is deprecated. Use ImvxServiceConsumer instead.

    2 [WindowsPhone]
    To change the base class of WP page, you must change the root element of the xaml to
    "local:BaseHomeView"

    and add the namespace
    xmlns:local="clr-namespace:Casino.UI.WP7.Views"

    For more information see http://blogs.msdn.com/b/jschaffe/archive/2011/03/03/creating-a-custom-base-page-for-windows-phone-7.aspx

    This is all done for you if you buy Resharper.

    3 [WindowsPhone]
    I got compilation errors after changing the base class of a WP page before I installed Service Pack 1 for Visual Studio 2012.

    I doubt you had genuine compilation errors - my guess it that this was just the XAML editor complaining. A rebuild might have shut it up.

    4 [Android]
    Do not create a SplashScreen.xml. Create a SplashScreen.axml instead and save it into the Resources\Layout folder.

    The xml one works for me... but I don't mind changing the instructions

    5 [iOS]
    I'm not sure whether it's a bug or an incorrect configuration on my Mac but I got compile errors before I switched all references to the binaries in BuiltInMonoTouch\Touch\Release. Debug binaries or anything in the Protable folder doesn't work for me.

    Yes, for now you need to switch the binaries when on the Mac - see http://slodge.blogspot.co.uk/2013/01/almost-portable-binaries.html

    Note added.

    6 [iOS]
    If you haven't already done: You must edit your targets file. See here: http://slodge.blogspot.co.uk/2013/01/if-pcls-will-not-build-for-you-in.html

    Note added.

    7 [iOS]
    I received SIGABRT error on startup and an exception saying "HomeView" could not be loaded.
    I found to ways to solve this problem. For both ways you have to change the base constructer call in the HomeView class.
    First: public HomeView (MvxShowViewModelRequest request) : base(request) // This results in an empty page with the typical blue header bar
    Second: public HomeView (MvxShowViewModelRequest request) : base(request, "HomeView_iPhone", null) // This works after you created XIB files for this view in Xcode.

    Don't understand why you needed the First way? The Second way already in the instructions.

    8 [Wpf]
    Don't be afraid of the amount of code files. They are all listed twice ;-)

    Fixed - although no-one really cares about wpf ;)

    9 [Wpf]
    I had some trouble with multiple entry points for my application. MSBuild generated a app.g.cs file implementing a second main method.
    Here is how to disable code generation for the main method (see approach 3): http://www.infosysblogs.com/microsoft/2008/09/how_to_write_custom_main_metho.html
    In short: Go to project properties in Visual Studio and modify the startup application in the Application tab. Set the startup object to Casino.UI.Wpf.Program.

    'In short' note added...




    Thanks

    I still don't expect it to be painless for newbies to get through the setup :( ... but it should be less painful now :) and at least you now have an app running on each platform :)

    Feel free to blog/post/wiki your experiences somewhere searchable - or feel free to just get on with building awesome apps :)

  • ChWoChWo Ch Wo DEMember
    edited February 2013

    my guess it that this was just the XAML editor complaining. A rebuild might have shut it up.

    Definitely not. I cleaned up and rebuilt the solution several times. Even restarting VS didn't solve this problem. After I installed SP1 it started to work. Maybe it's not the Service Pack itself. Maybe the VS has been repaired during the update. I don't know.

    Don't understand why you needed the First way? The Second way already in the instructions.

    You instruct this

    public HomeView (MvxShowViewModelRequest request) : base(request, "HomeView", null)

    I did it this way
    public HomeView (MvxShowViewModelRequest request) : base(request, "HomeView_iPhone", null)

    It might work on my machine doing it your way. But I tried to create simple view in Xcode for the HomeView class. After that I had to XIB files in my project: HomeView_iPad.xib and HomeView_iPhone.xib. Calling the base contructor with "'HomeView" causes the described exception in the window.makeKeyAndVisibile call. Changing the parameter in the constructor call to "HomeView_iPhone" solves that problem and my view appears as designed in Xcode.

    I still don't expect it to be painless for newbies to get through the setup :( ... but it should be less painful now :)

    I hope so ;-)

    Feel free to blog/post/wiki your experiences somewhere searchable

    As I promised I'm going to update your tutorial (at least part 1). I let you know when it's finished.

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    I guess HomeView_iPhone vs HomeView just depends on whether you've chosen an iPhone or a Universal UIViewController as your template?

  • ChWoChWo Ch Wo DEMember

    I think that is the point. I didn't know which template is correct.

  • ChWoChWo Ch Wo DEMember

    @StuartLodge

    I`m afraid you deleted too much information in the quick start guide. There are no details about the contents of the .cs files in the core project anymore. The line "This will give you a set of files something like:" is followed by whitespace.

  • StuartLodgeStuartLodge Stuart Lodge USBeta ✭✭✭

    Works in Firefox - but maybe not in IE...

    There's an easy solution if that's the problem...

  • ChWoChWo Ch Wo DEMember

    Oops, sorry. But thanks.
    It doesn`t work in Safari on Mac. That was my problem.

«1
Sign In or Register to comment.