GithubHelp home page GithubHelp logo

microsoft / bikesharing360_websites Goto Github PK

View Code? Open in Web Editor NEW
110.0 22.0 65.0 99.35 MB

BikeSharing360 Demo Apps Websites

License: Mozilla Public License 2.0

C# 13.35% JavaScript 48.86% TypeScript 1.12% HTML 11.78% SCSS 24.89% ASP.NET 0.01%

bikesharing360_websites's Introduction

#BikeSharing360

During our Connect(); event this year we presented 15 demos in Scott Guthrie’s and Scott Hanselman’s keynotes. If you missed the keynotes, you can watch the recording in Channel 9.

This year, we built the technology stack for a fictional company named BikeSharing360, which allows users to rent bikes from one location to another.

BikeSharing360 is a fictitious example of a smart bike sharing system with 10,000 bikes distributed in 650 stations located throughout New York City and Seattle. Their vision is to provide a modern and personalized experience to riders and to run their business with intelligence.

In this demo scenario, we built several apps for both the enterprise and the consumer (bike riders). You can find all other BikeSharing360 repos in the following locations:

*Mobile Apps *Backend Services *Websites *Single Container Apps *Multi Container Apps *Cognitive Services Kiosk App *Azure Bot App

Websites

This repo contains the BikeSharing360 web sites.

BikeSharing360 Public Web Site (MVC5)

The solution BikeSharing.Web.sln located in folder /PublicWeb/ contains the BikeSharing360 Public Web Site. This is a MVC5 project, developed using VS2015.

Project can be opened using VS2015 Update 3 or VS2017RC.

This web uses gulp tasks to manage assets and scripts. Output of gulp tasks is in the Content folder, and outputs of tasks gulps are not part of the csproj file. This is because if output files are part of the csproj, VS wants to include them in source control, what makes no sense for generated files.

The csproj file was modified manually to include a MSBuild Task to allow publish the output of gulp, even thought this output is not part of the project. Look at the csproj at line 710 and below for these changes.

BikeSharing360 Public Web Site (NetCore)

The solution Public_Web_Site_Core.sln located in folder /PublicWebSite_NetCore/ contains the BikeSharing360 Public Web Site. This is the NetCore version using csproj (no project.json).

Project must be opened using VS2017RC (No VS2015 support).

Code has been updated to use some of the new MVC Core features , like Tag Helpers.

BikeSharing360 Private Web Site (Netcore 1.1)

This repo contains also a demo private web site that uses the microservices to display some lists about the BikeSharing360 users' operations. The folder /PrivateWebSite/ contains all files for the private web.

This project is a netcore 1.1 website and must be opened with VS2017 RC (no support for VS2015). Contains some of the new features of the netcore 1.1 as AppServices logs integration and View Components as Tag Helpers among others.

This website needs a database. The appsettings.json has a connection string against a (local)\mssqllocaldb database named bikesharing-private-web. You can use the file _/PrivateWebSite/sql/SampleDb.sql to fill the database with schema and sample data (Note that you have to manually create the database.)

Also, you need to edit the appsettings.json file and update:

  • The connection string (Only if your database is located in any other SQL Server or has another name)
  • The APIs endpoints The private web site uses three microservices (rides, profiles and APIs). You need to provide the server on which these microservices run. Remember that those microservices are in the BikeSharing360 Backend Repository.

Once database is created you can login with any user with the password "Bikes360".

NetCore Tools VS2017 Demo

The folder VS2017-NetCoreTools-Demo contains a version of the BikeSharing360 Public Web Site shown by Beth Massi in the "Visual Studio 2017 Launch Event" Keynote.

Is a version of the Public Web Site that uses a database (created using Entity Framework code-first) that has a list of cities where BikeSharing360 operates. It is developed using netcore 1.1

In this folder there are three subfolders:

  1. NETCoreDemo_reset: Contains a project.json based version of the website (Visual Studio 2015 tooling).
  2. NETCoreDemo_start: Contains the same project but migrated to a VS2017 csproj format.
  3. NETCoreDemo_end: Contains the version after all updates done by Beth in the Keynote.

How to sign up for Microsoft Azure

You need an Azure account to work with this demo code. You can:

  • Open an Azure account for free Azure subscription. You get credits that can be used to try out paid Azure services. Even after the credits are used up, you can keep the account and use free Azure services and features, such as the Web Apps feature in Azure App Service.
  • Activate Visual Studio subscriber benefits. Your Visual Studio subscription gives you credits every month that you can use for paid Azure services.
  • Not a Visual Studio subscriber? Get a $25 monthly Azure credit by joining Visual Studio Dev Essentials.

Blogs posts

Here's links to blog posts related to this project:

Clean and Rebuild

If you see build issues when pulling updates from the repo, try cleaning and rebuilding the solution.

Copyright and license

  • Code and documentation copyright 2016 Microsoft Corp. Code released under the MIT license.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

bikesharing360_websites's People

Contributors

eiximenis avatar erikaehrli avatar microsoft-github-policy-service[bot] avatar stefankert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bikesharing360_websites's Issues

Hosting environment on Azure

Assuming I want to host those sites on Azure, what woudl be the hosting service I need to use? Are those running under IIS or any other runtime like node.js? Looking to the solutions I'm bit confused by the usage of csproj together with gulp and .Net Code.

I'm a newby, some basic guidance to run the cose would be appreciated.

Not compatible with Bootstrap v4 release 6

When running npm run build following error occures.

image

The reason for this error is, that in package.json, the reference to bootstrap is defined as the following.

"bootstrap": "^4.0.0-alpha.5",

Because of the defined logic for ^ the used package is always the last working package (non breaking Version). The latest version for bootstrap package currently is 4.0.0-alpha.6. The difference between the two versions consists of some files beeing renamed. For the PrivateWebsite this results in an error when performing the command above, because these two packages got renamed

  • _animation.scss -> _transitions.scss #21370
  • _tags.scss -> _badge.scss #21020

The wrong references are defined in scss/vendor/_bootstrap.scss.

There are two possible solutions.

  1. Change reference to bootstrap package in package.json to use specific version
    "bootstrap": "4.0.0-alpha.5",
  2. Change references _scss/vendor/bootstrap.scss to use correct filenames.

I would suggest to use solution 2. because it will fit up to future relases of bootstrap as well as the final release of bootstrap. So for this purpose I am doing a pull request that fixes this issue.

Cheers

Private Web Site - Logon issue

I'm able to build and run the Private Web Site.
Next step would be to create a new user, which I succeed (and I see the new entry being added on the DB tables) but when I attept to logon I get a null value error while creating the Claim.

Something like:

[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.Security.Claims.Claim..ctor(String type, String value, String valueType, String issuer, String originalIssuer, ClaimsIdentity subject, String propertyKey, String propertyValue)
System.Security.Claims.Claim..ctor(String type, String value)
Microsoft.AspNet.Identity.d__0.MoveNext()

This occurs only when providing the right password, with a wrong one it just tell me I'm wrong - which is correct behaviour.

Any hint?

Missing tables in SampleDB

Just after typing valid user and password an error occured

An unhandled exception occurred while processing the request.
WinHttpException: The server name or address could not be resolved
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
HttpRequestException: An error occurred while sending the request.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

It looks SQLDatabase sample does not reflect current data model... No Issues, Rides, Subscriptions tables etc. Please fix sample SampleDb.sql file.

Design Document - Spec

It's great to have the source code for these samples.

Seeing the design document and specification would be very helpful as a learning tool. Is there a chance of you posting them?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.