MyShuttle.biz demo apps from Connect(); Visual Studio and Azure event


clip_image001

 

 

 

 

 

[**NEW!! – Updated on March 2015 – Compatible with VS 2015 CTP 6 **]

This is the first blog post of a series of posts regarding the MYSHUTTLE.biz sample applications implemented with the new Visual Studio 2015 Preview and .NET 2015 Preview.

Here’s the list of blog posts:

1. (Current blog post) Global Intro of the MyShuttle.biz demo apps from Connect(); Visual Studio and Azure event

2. Blog Post: MyShuttle.biz ASP.NET 5 Web Apps and Services

3. Blog Post: MyShuttle.biz and Cross-platform Mobile Development of native apps for iOS, Android and Windows with .NET and Xamarin

4. Blog Post: MyShuttle.biz and multi device development of hybrid apps for iOS, Android and Windows with Visual Studio Tools for Apache Cordova

5. Blog post: MyShuttle.biz Azure backend integration with LOB services (Invoicing, O365 API and SalesForce API)

As part of the Connect(); Visual Studio and Azure event delivered at NYC and online on Nov 12th 2014 (check the keynotes and sessions thru Channel9 here), we were working since late summer on a end-to-end scenario based on a set of comprehensive demo apps to showcase at this event.

We called that fictitious business application MyShuttle.biz. We even created a logo for this solution! 🙂

I’ll explain the Business Domain later on, so you know what the apps are about. But the main idea is about a highly scalable multitenant B2B solution for carriers and enterprise customers. Kind of an “Uber like” but enterprise-only app/system.

image

In this case, the business domain is just a channel we need in order to explain the different Microsoft development technologies provided under Visual Studio 2015 and .NET 2015. The theme or business domain could have been any other business domain. We just wanted a familiar and easy to follow domain.

You can see a live intro to the domain and the apps working together (push notifications between the apps, etc.) in ScottGu’s kenote with Nicole’s demos at Connect(); event (MINUTE 12:00 of that keynote).

The technologies

These demos span across all the different new technologies being presented at this event under the .NET 2015 Preview and Visual Studio 2015 Preview umbrellas.

Because these demos use all the different development technologies for different contexts, I’ll write different blog posts focusing on each context. This is just the ALL UP intro to the MyShuttle.biz demo apps.

image

Basically, it covers the following technologies all within a single business solution with many different apps and services connected between them:

Web applications

ASP.NET 5 MVC site (part of the new .NET 2015 wave)

SPA (Single Page Application) using Angular.js, jQuery, bootstrap and consuming our ASP.NET 5 Web API Services (part of the new .NET 2015 wave)

– Support for Bower, NPM and Grunt in VS 2015 Preview Tooling

Services, Azure, middleware and LOB integration

ASP.NET 5 Web API services (part of the new .NET 2015 wave)

ASP.NET 5 SignalR (part of the new .NET 2015 wave)

– Azure Web Sites

– Azure Mobile Service (Web API)

– Azure Web Job

– Azure Push Notifications Hub

Entity Framework 7

– Connected Services: O365 API and SalesForce API

Cross-platform Mobile apps

Universal Windows apps in C# (Windows Phone app and Windows Store app)

Xamarin C# apps (iOS app and Android app)

Cordova HTML/JS Hybrid app (for Android, iOS and Windows Phone)

IoT devices and Cloud Services for IoT

.NET Micro Framework client programs running on GHI FEZ Raptor board with many different IoT sensors (accelerometer, GPS, Compas, etc.)

– Azure services (like Azure Events Hub) gathering massive amounts of IoT events

Big Data and Cloud processes

HDInsight (Hadoop in Azure)

Azure Machine Learning

– Power Map and Power Query

If you want to have an introduction to “What is ASP.NET 5 and .NET Core 5 within .NET 2015”, check this blog post that I published a few days ago. With that info, you should be able to position the different .NET technologies that we’re using wthin this set of demo applications.

The Business Domain

MyShuttle is a B2B highly scalable multitenant SaaS solution that targets corporate scenarios in which carrier companies offer transport services to enterprise customers.

image

So this multi-tenant SaaS system would allow any number of carrier companies who must be syndicated with the system, to provide their services (cabs/shuttles) directly to any number of customers enterprises/companies who would also be registered in the MyShuttle.biz system. The final outcome? any employee in those customer companies would be able to request a cab/shuttle at any time in any place/city without worrying about how to pay. Everything would take place underneath between their company and the carrier company for that ride. That’s kind of the idea for the business domain.

The scenarios

Mobile First and Cloud First

The global scenario is described in the following image (although we’re not taking into account the IoT and Big Data scenarios in there. IoT and Big data scenarios are described in the next section).

image

In this diagram we have quite a few scenarios, but all are inter-connected between them thru Services in the cloud. We have web apps implemented using the brand new ASP.NET 5 (“Project K”), either MVC, Web API Services and even SignalR. Then we also have native mobile apps for the customers (based on C#, either .NET as Universal Windows apps or Xamarin native apps for iOS and Android). We also have a simpler mobile hybrid app implemented with Cordova (HTML/JS) and using the VS 2015 tooling for Cordova, a WPF desktop app and finally we’re integrating our processes (invoices) with LOB systems, thru VS Connected Services, like using O365 API and using SharePoint libraries as repository of .PDF invoices or using Salesforce API to upload customer’s data into the CRM.

IoT and Big Data

The second big scenario is about IoT devices connected to the cloud (Azure services) in order to gather massive amounts of IoT events coming from sensors. For instance, we could have a small board placed in the vehicles/cabs, with sensors attached to it like accelerometer, compass, GPS, or alarms coming from the engine regarding fuel level, breakouts or even accidents! Once we have that data in the cloud, we can analyze and learn about it with Azure Machine Learning and going further with Big Data analysis based on HDInsight (Hadoop in Azure). This is how this second scenario looks like from a high level point of view:

image

IMPORTANT NOTE: The demo apps and code for this second scenario (IoT and Big Data) will be available a few weeks later than the “Mobile First, Cloud First apps”. In this case (IoT and Big Data) we’re planning to publish it in late January or early February 2015 since we need to make major adjustments in the Azure backend.

So let’s start with the first part of, the web applications based on the brand new ASP.NET 5.

Public Web Site – ASP.NET 5 MVC

As my next blog post within this blog series, I will publish a specific blog post about ASP.NET 5 and MyShuttle.biz, so drilling down into technical details of this web site and the SPA web application. (Blog Post on Deep dive about the MyShuttle.biz ASP.NET 5 web Apps and Services).

This is a typical public web site. It’s main purpose is to show information about the business but in a pretty modern and clean way.

imageIf you scroll down, you can see how it provides a responsive design and even if you resize the browser, you can see how it would also be perfectly valid for mobile devices, like a smart phone:

image

I’m not going to get into details now, but in the deeper blog post about the MyShuttle.biz ASP.NET web apps, I’ll show how you can now take advantage of VS 2015 and make use of front-end web development frameworks and tools for JavaScript, HTML and CSS, like Bower, NPM, Grunt and Gulp, all of them integrated within Visual Studio 2015. At the same time, I will drill-down into the new features we now have in ASP.NET 5 and .NET Core 5. A lot of stuff, this is a new world, I tell you!

Private Web App – SPA (Single Page Application) Angular.js, jQuery, ASP.NET 5 Web API

The second application is a Web SPA which you can access by login in from the public web site. But it is in reality like a different web application, simulating a private web application especially made for the Carriers’ administrators. In this case, this application is a data-driven and CRUD app so you can create and update info about your drivers, vehicles, etc.

image

  image

image

Underneath, it is making heavy use of JavaScript, Angular.js, jQuery, LESS and Bootstrap and consuming the ASP.NET 5 Web API Services that you can have published as Azure Web Sites or, of course, in any ISS or even testing it in your local dev web server in Visual Studio. The Web API Services are also using the new Entity Framework 7.

Thanks to ASP.NET 5, .NET Core 5 and .NET Compiler Platform (“Roslyn”) you can develop and run ASP.NET applications in a Mac or Linux. Microsoft is also helping the community to build plugins for Sublime Text editor and Emacs, so you can have extended features like C# and ASP.NET Intellisense and refactoring tasks right within those editors. That will allow Mac, Linux and Windows web developers to work together on the same ASP.NET web projects.

The MyShuttle.biz web applications (public Web Site and SPA web app) have been tested in a Mac running on top of Mono and Kestrel (web server).

image   image

Again, for deeper technical details about this app and the ASP.NET 5 Web API Services it is consuming, and all the new thing you have about it in Visual Studio 2015 (new way of working with References, NuGet packages, .NET Core 5 framework running side by side, etc.), check my blog post about it.

You can also check the recorded keynote from Scott Hanselman at the Connect(); event in order to get a high level overview of this content, as he was using these demos that we created especially for this event: Cloud development with Azure and Visual Studio keynote (First demos in this keynote)

 

LOB integration with VS Connected Services, Azure, O365 API and SalesForce API

The MyShuttle.biz applications provide a LOB integration scenario which is triggered from the driver’s app (Cordova app running on any Smartphone). This app will generate the data related to a single ride that is required to create an invoice (ride’s cost, customer data, customer’s signature, etc.). That data is submitted to the cloud (Azure Mobile Service) and from there it triggers several actions. On one hand, by using Salesforce REST API it will upload the customer’s data to a Salesforce CRM, and on the other hand, an asynchronous process based on Azure Queues and an Azure WebJob that will generate a .PDF with the invoice data and finally that .PDF will be uploaded to a SharePoint library in an Office 365 site thru the O365 API.

image

Either the O365 API and Salesforce REST API code/references are provided in an easy to get started way by the new “Add Connected Services” in Visual Studio.

The Connected Services is, at the end of the day, like a API catalog that provides references and code, that you have right into VS, so you don’t need to research in the Internet for “HOW TOs”.

image

For deeper details about this demo (Azure WebJobs, Connected Services and the whole scenario you can see above) Check this blog post:

Blog post: MyShuttle.biz ASP.NET 5 Web Apps and Services

You can also check the recorded keynote from Scott Hanselman at the Connect(); event in order to get a high level overview of the LOB integration demo highlighted above, as he was using these demos that we created especially for this event:

Cloud development with Azure and Visual Studio keynote (MINUTE 27:41 until MINUTE 33:30)

Cross-platform mobile development for native apps: C#, .NET, Xamarin and C++

Next scenario is about the customer apps, so the enterprise employees using their mobile phones to request a shuttle/cab or the customer-admin using a Windows tablet (either Windows 8.1, Windows RT or Windows 10) in order to analyze his employees’ rides, expenses and even .PDF invoices by querying the SharePoint library thru the new O365 API.

In this case (scenario for end customers) you want to have the best user experience for the mobile app users, so you’d probably will want to create native mobile apps that can fully access all the device’s capabilities and provide the best performance. One choice is to invest a lot for each OS, like iOS-ObjectiveC/Swift, Android-Java, Windows-.NET or the best way to achieve a great ROI is to bet on a good cross-platform but native approach, like using C# (.NET + Xamarin) and target the three different OS platforms (iOS, Android, Windows) at once.

image

Using C# thru .NET and Xamarin you can reuse around 80% of your client code (like we did, reusing ViewModels based on MVVMCross framework or re-using Service Agents and other client app logic based on Portable Class Libraries) but having the possibility to customize the end user experience according to the different styles and design guides from each OS platform. Usually you’d want a clearly different design for Windows Phone apps, iOS apps or Android apps, since the look and feel of each environment is different, as you can tell when looking the above snapshot with our apps.

Because we are making use of PCL (Portable Class Libraries) a large percentage of the C# client code is also reused by the “TabletWindows Store App (shown above) and even our WPF desktop app, not just between the phone apps. At the end of the day, you can share C# code and PCL libraries between any device/machine that can run .NET or Xamarin (or ASP.NET 5 and Mono if talking about the server side).

Something new Microsoft is releasing about native apps and cross-platform, as well, is the new Visual C++ for Cross Platform Mobile Development. In this case, we created a cross-platform C++ library implementing an OpenGL transition that runs within the Android Xamarin app. Check the following link for more details about Visual C++ for Cross Platform Mobile Development.

Again, you can see deeper technical details in this blog post focusing just about the C# Native apps and Cross-Platform Mobile, here:

Deep dive on MyShuttle native mobile Apps powered by C# Cross-Platform-mobile development.

You can also check the recorded keynote from Amanda Silver at the Connect(); event in order to get a high level overview of this content, as she was using these demos that we created especially for this event: Visual Studio in a world of multiple devices (MINUTE 35:20 of that keynote)

 

Hybrid mobile apps: VS 2015 Tooling for Apache Cordova, HTML and JavaScript

Next scenario is about the driver app, so the drivers from each carrier can accept the ride requests from the customers. In this case, and since this application is simpler and you might not care so much about a personalized user experience per device, you might want to create the mobile app as a Hybrid app by using HTML/JS under a container like Apache Cordova, so it can access native capabilities of the device, like GPS, photo-camera or any other feature thru the Cordova plugins. This is what we developed for the driver’s app, by using Visual Studio 2015 Tools for Apache Cordova.

Cordova allows you to leverage your existing web developer skills (HTML/JS), assets and processes as a web developer to build mobile apps for iOS, Android and Windows. Your apps will not only have access to native device capabilities  (e.g. camera) through a common JS API, but also a rich array of custom plugins to add better-than-native functionality (e.g. turn the camera into a barcode scanner).

VS helps you build and maintain a healthy, well-configured dev environment by installing all the 3rd party dependencies you need for multi-device development locally. Even better, when a new version of any dependency in the tool chain is released, our team tests it for compatibility and notifies you when it’s safe to update.

image

In this case you can notice how the app is exactly the same running on the different OS, as it is 100% the same. The Pros are that you might get a fastest way to target the different platforms if you have a skilled team in JavaScript or TypeScript. The Cons are that you won’t get the same level of performance than when developing native apps (like when using C#, .NET, Xamarin and C++). But the point is that you gotta think about what is good enough for your specific scenario or application.

Again, you can see deeper technical details in this blog post focusing just about the MyShuttle.ord driver app created with Visual Studio 2015 Tools for Apache Cordova, here:

(TBD – Link to Deep dive on MyShuttle hybrid mobile App powered by Visual Studio Tools for Apache Cordova).

 

IoT and Big Data

Since the code for IoT and Big Data demos of MyShuttle.biz will be available in a few weeks (January/February 2015), I won’t provide details about it until then.

For now, you can take a look to Scott Hanselman’s keynote, at the section where we show our vision about IoT and Big Data for the MyShuttle.biz scenario:

Cloud development with Azure and Visual Studio – (MINUTE 33:35)

IoT devices with .NET MF

  image image

 

 

HDInsight Tooling in VS   Power Map
image   image

  Azure Machine Learning

image

These are just a few screenshots of what will publish in a few weeks (the IoT and Big Data demos), as mentioned above.

In the meantime, we’re providing a bunch of demos related to the rest of the scenarios (Web, Cloud, Native Mobile apps, Hybrid Mobile apps and LOB integration) and you can get deeper details in the links provided at the beginning of this blog post.

Download the code!

You can grab the code from here, at MSDN Samples.

Enjoy! 🙂


Comments (12)

  1. Timur says:

    Hello Cesar,

    Can the code be published to Github as is github.com/…/HealthClinic.biz (last demo on Connect HealthClinic ?

    Thank you,

    Timur

  2. Cesar de la Torre [MSFT] says:

    @Fred THe IoT demos are already included and published in the latest code download. Check it out. 🙂

  3. fred says:

    hi Cesar

    it's a long time  that you said "The demo apps and code for this second scenario (IoT and Big Data) will be available a few weeks later than the “Mobile First, Cloud First apps”. In this case (IoT and Big Data) we’re planning to publish it in late January or early February 2015 since we need to make major adjustments in the Azure backend."

    I really crazy about IoT , and wants to look at the code that guys wrote in Microsoft , it would be a great guideline for us , when and where source code will be available for download?

  4. Cesar de la Torre [MSFT] says:

    @Jeff

    I don’t know what can be causing that behavior in your dev machine.

    I have probably the exact same code/application deployed in Azure and I just tested it just in case and it runs ok.

    It takes less than 1 second to update drivers or vehicles when I test it..

    Have you tried different environments?, different dev machines and different SQL DBs?

    Try for instance to deploy it to Azure, or to run it in a different dev machine, etc.

  5. Jeff says:

    I have 04_Demos_ASPNET5 up and running on my local desktop machine.  When i try and edit a driver or vehicle at say : http://localhost:5000/Carrier#!/drivers/edit/16 and hit the save button on my 3Gighz 48 gig machine it takes 10 minutes for the record to be updated.  Any ideas as to what is wrong?

  6. esar de la Torre [MSFT] says:

    Btw, I published at MSDN Samples the RC compatible version of MyShuttle, a few weeks ago.

  7. Cesar de la Torre [MSFT] says:

    @Niels. As of today the published code is compatible with VS 2015 CTP6, but we'll published an updated version compatible with VS 2015 RC in a few days. We almost have it but we still need to do some more testing.

    This new "package" will also have the IoT demos. The blog post on the IoT/BigData demos might take me a little bit more of time to have it published, though.

  8. Niels says:

    Hi Cesar,

    Any chance of an update of the code to VS2015RC soon?

    Also stil missing the blog about the IoT/Big Data demo. Could you share some insights on that part of the demo?

    Thanks for your work

  9. @ Dhanilan It is working now. I had a draft copy of it (updating the blog post so it is compatible with VS 2015 CTP5) and for some reason it unpublished the original post. Sorry for that. 🙂

  10. Dhanilan says:

    MyShuttle.biz ASP.NET 5 Web Apps and Services link is not working.please let me know if the URL has changed.Thanks

  11. Atti says:

    Thanks for sharing the demo

  12. gcyoung says:

    Excellent, thanks!  I was wondering during the Connect() demos if there would be source code.  

    (Question in the first paragraph under the Vehicle screen shot, in the Private Web App section, should that be "IIS", rather than "ISS"?)

Skip to main content