神刀安全网

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

Just yesterday we made the Evolve 2016 conference app completely open source on GitHub , and feedback has been fantastic with 57 stars, 26 forks, and tons of buzz on Twitter. While you are probably already digging through the code I wanted to take a moment to reflect on the development of the mobile application and some fun statistics of the application when it finally went live.

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

Development

The Xamarin Evolve conference application is packed full of everything you need for a mobile conference including:

  • Session & Speaker details
  • Latest announcements and social feed
  • Ability to hand curate your favorite sessions
  • Push Notifications
  • Floor & Venu Maps
  • Wi-Fi configuration
  • Tons of other awesome stuff

From the start it was clear that Xamarin.Forms was perfect for the app being able to present loads of data while still integrating with native features. Each platform was spiced up with platform specific colors, styles, paddings, and navigation, which was all crafted in shared code. This lead to a beautifully crafted application (designed by the amazing Antonio García Aprea ) on all platforms that looked and felt native… because it is native!

What you may not have known is that the entire application was built by just two people. Pierce Boggan, our amazing engineer on the evangeist team, wrote the backend, and I buit the entire front end! What is really awesome is that it only took us about 5 week total to build it out.

The Backend

We chose Azure App Service’s Mobile Apps as our backend service. Being familure with C# and .NET enable Pierce and I were able to get a backend for the app up and running in under a day. More importantly this enabled us to implement a custom authentication so attendees could log in with their Xamarin account, online/offline data syncronization, push notifications with Azure Notification Hub, and a flurry of other awesome features. The entire backend source code can be found on that Github link.

What really impressed us was how fast and resilent the backed was (not to mention a superb value as we were blown away at how low the total cost was.). The mobile app has only been out for 2 weeks and it has handled the traffic spectacularly. I was surprised how chatty I made the backend becasue in those 2 weeks there were nearly 1 MILLION requests processed!

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

What I love about this graph is the peaks and valleys of network traffic and the workload of the server, which all had auto scale turned on. As we can see 1 MILLION network calls and ALL of the rest of the services including push notifications, SQL Server, and more only cost a little over $30!

Shared Code

Everyone loves sharing code across platforms and all of libraries we included helped drive the app sharing anywhere from 90% all the way up to 99% of code on Windows Mobile and Desktop! We came up with a pretty great architecture of abstracting our business logic from our presentation layer, but also abstracted all of our code data models that were shared across our mobile apps and our Azure backend.

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

Components and Plugins

The conference could not have been completed with out Xamarin Components and Plugins , many of which are now open source. We immediatelly installed tons of awesome plugins, but also integrated some great .NET libraries such as Humanizr and NodaTime.

Testing

I can’t take credit for this one as our amazing automotion expert Ethan Dennis wrote an amazing suite of Test Cloud tests to enusre the app was regression free throughout development.

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

Continous Integration & Deployment

For me, 2016 is the year of CI and CD. I ahve been talking about it for a while now during sessions, live coding, and I am sure to have told you if you saw me at Evovle. I LOVE CI and CD! I can’t help myself. The tools are just so good now.

With EVERY single push of code to GitHub the Evolve conference app was automatically compiled, packaged, shipped to Test Cloud, and then deployed to HockeyApp . This enabled me to deliver the application for testing to 350+ Xamarins within 20 minutes of pushing code. What is really cool is that I even setup feature branches that had special builds for test cloud testing, and regression runs each night.

This was done for Windows with Visual Studio Team Services, and then I leveraged one of my favorite services Bitrise for all of my iOS and Android builds:

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

Fun with Numbers

Development is fun, but once the app is out someone is sure to ask you to analyze numbers and data from the mobile applications. This is where Power BI , a technology I knew nothing about, comes in and enabled me to analyze favorite sessions and feedback within a few minutes. I wrote a few SQL views and pointed Power BI and my Azure SQL database and BOOM done! Charts and graphs that every manager is sure to love. Checking out the numbers we had over 11,570 sessions favorited inside of the application.

James Montemagno: Xamarin Evolve 2016 App Development Retrospective

I then took it a step further and analyzed in real time all of the session feedback from attendees, which I thought was pretty awesome.

Retrospective

Before posting this I was asked on Twitter what I would change in the app if I could go back in time. This is a great question and I spent some time thinking about what went right with the app and what could be improved and here is my short list:

What went right:

  • Xamarin.Forms: This was absolutely the right call for the UI and it looks beautiful
  • Different navigation for each platform: Took a bit more time to hand curate and implement, but woth it
  • CI/CD: This saved my behind so many times I can’t even tell you. There is nothing like clicking commit and 20 minute later shipping an app update.

What went wrong:

  • I love Xamarin.Forms Dependency Service… but I think for testability I shoud have decoupled it and used a custom implementation or Unity for the container.
  • Unit Tests: If you know me I have a rough relationship with unit testing in mobile apps. I know I should do it, but my apps never have much. Right before Evolve started I found a very strange Time Zone issue that forced me to have to push out new versions of the app in a hurry. (This was all due because I sat next to my mancrush Greg Shackles )
  • .NET Native for UWP: Not really a development problem, but this caused TONS of problems since I didnt’ fully understand what it was doing and removing. Now that I know what it is trying to do and how to make it work nicely with Xamarin.Forms it wont be an issue.
  • Background Refresh… WHY WONT IT WORK IN RELEASE?!?!? As it does in debug.

What’s next?

With Evolve 2016 now coming to a close you can get your hands on the source code, but also leave feedback and create issues on the GitHub page. I can’t wait to see what you build with this awesome open source app!

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » James Montemagno: Xamarin Evolve 2016 App Development Retrospective

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址