Coder Social home page Coder Social logo

stephensmitchell-forks / .net-core-2.0-by-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from packtpublishing/.net-core-2.0-by-example

0.0 1.0 0.0 10.84 MB

.NET Core 2.0 By Example, published by Packt

License: MIT License

F# 0.07% C# 7.74% CSS 0.72% JavaScript 89.12% C++ 0.08% C 1.94% Ruby 0.14% PowerShell 0.06% ASP 0.01% HTML 0.11% Smalltalk 0.01%

.net-core-2.0-by-example's Introduction

.NET Core 2.0 By Example

This is the code repository for .NET Core 2.0 By Example, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

About the Book

With the rise in the number of tools and technologies available today, developers and architects are always exploring ways to create better and smarter solutions. Before, the differences between target platforms was a major roadblock, but that's not the case now. .NET Core 2.0 By Example will take you on an exciting journey to building better software.

This book provides fresh and relevant content to .NET Core 2.0 in a succinct format that’s enjoyable to read. It also delivers concepts, along with the implications, design decisions, and potential pitfalls you might face when targeting Linux and Windows systems, in a logical and simple way.

With the .NET framework at its center, the book comprises of four varied projects: a multiplayer Tic-tac-toe game; a real-time chat application, Let'sChat; a chatbot; and a movie booking application. You will start each chapter with a high-level overview of the content, followed by the above example applications described in detail. By the end of each chapter, you will not only be proficient with the concepts, but you’ll also have created a tangible component in the application.

By the end of the book, you will have built four solid projects using all the tools and support provided by the .NET Core 2.0 framework.

Instructions and Navigation

All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

For C# and .NET Core Samples: Open the Packt.DotNetCore2ByExamples.Examples.sln solution file in Visual Studio 2017

For F# Project: Open the F# sample project solution in Visual Studio 2017 and run the app.

For C++ and Ubuntu code samples: Ubuntu Code samples should be downloaded and opened with Visual Studio Code. C++ ExampleDll solution can be directly opened in Visual Studio 2017.

The code will look like the following:

# include<stdio.h>

int hello()
{
  return 15;
}

This book is aimed at experienced developers who use different platforms—Windows, Linux, Ubuntu, macOS—and want to try Microsoft .NET Core 2.0 cross platform. Developers using C#, C, or C++ for development who are interested in extending their knowledge of functional programming, beginners who want to understand F# and functional programming, we assume that you have a basic understanding of C# and are aware of the .NET framework and Windows.

The below section summarizes the chapter wise content and demo links.

Hello .NET Core 2

F# Console Application

Key takeaways

  1. Getting started with .NET Core 2.0 and required setup.
  2. Getting started with F# and required setup.

Ubuntu Code Samples

PInvoke Example

Example Dll

Key takeaways

  1. Getting started with PInvoke using .NET Core
  2. Introduction to NCurse and how to consume it from .NET Core

Getting Started

Tic-tac-toe

Key takeaways:

  1. Configuring services in ASP.NET Core apps.
  2. Configuring and using SignalR Core with ASP.NET Core

Demo

Play Tic-tac-toe

  1. The above link would take you to Register page. Register with your name and display image (size should be less than 1 MB) that you wish to use for playing instead of X or O icon, and click Register button.
  2. Upon registration, user would be navigated to the "Find Opponent Player" screen, to find an opponent player, against which you can play. Click on the button to find if you have any opponent player. If you don't find anyone, ask your friend to register and find opponent player. Both of you, should now be able to play a game of tic-tac-toe. Enjoy the game!

Chapter 4, 5 and 6

Let's Chat

Let's Chat Test

Faq Bot

Key takeaways

  1. Integrating Facebook login with your ASP.NET Core app. Google/Microsoft/Twitter can be learnt and tried from ASP.NET Core documentation
  2. Using configuration.
  3. Intro to authorization and authentication.
  4. Learn to develop simple FAQ BOT.
  5. Get started with simple unit tests.

Demo

Let's Chat - Online Chat Room

  1. The above link would redirect to Facebook login screen (if you are not already logged in to Facebook). Instead of fetching the user name and image from the user input, the app uses your Facebook profile to get user name and profile picture.
  2. Upon login, user would be redirected to Chat Room page. You would be able to chat with all the logged in people in the Let's Chat app. It displays the message when a user joins or leaves the room and also shows Online Users on the left panel. Happy chatting!

Chapter 7

Reference to Cloud Storage Resources with .NET Core 2.0

Chapter 8

Getting Started With EF Core

Movie Booking app

Extended Chapter 8

Key takeways:

  1. Getting started with Entity Framework Core.
  2. Learn to do simple CRUD operations using ASP.NET Core 2.0 and apply migrations.
  3. Deploy an ASP.NET Core app to Azure.
  4. Introduction to Razor pages. I feel Razor pages makes UI development fast and controller approach can be used to make Web APIs. This choice of UI and API development should be very productive, while still maintaining separation of concerns.

Demo

Movie Booking App

Just browse the link. The data is fetched from the DataStore class and getting it from SQL database (as hosting and deploying on Azure is a cost) is left as an exercise to the reader. Please refer to Getting Started With EF Core sample to accomplish the same.

Chat BOT

Chat with ASP.NET Core FAQ BOT and do simple converstaion like Hi, Why ASP.NET Core, MVC, about book, etc. Have Fun !

Chapter 9

Blazor Source Code

Key takeaways:

  1. Introduction to Blazor.

Usage Instructions

1. Clone or download the repository by clicking the Clone or download button.

2. For C# and .NET Core Samples:

  1. Open the Packt.DotNetCore2ByExamples.Examples.sln solution file in Visual Studio 2017
  2. Run the app as per chapter information given above.

3. For F# Project:

  • Open the F# sample project solution in Visual Studio 2017 and run the app.

4. For C++ and Ubuntu code samples:

  • Ubuntu Code samples should be downloaded and opened with Visual Studio Code.
  • C++ ExampleDll solution can be directly opened in Visual Studio 2017.

For a thorough undertsanding and extended reading, following resources are recommended:

  1. ASP.NET Documentation
  2. Entity Framework Core Source Code
  3. ASP.NET Core MVC Source Code
  4. Kestrel Server Source Code
  5. New Announcements from ASP.NET - Keep this repo on watch list for latest and greated updates.
  6. ASP.NET Core docker images
  7. SignalR Core Source Code
  8. ASP.NET Home Repository - Keep exploring, keep learning.

Though the demo apps should work in all modern browsers, we only checked them against Chrome, so in case you face any issues in other browsers, please try using Chrome browser for demos. For any issues, questions, suggestions or constructive feedback, please contact Rishabh Verma or Neha Shrivastava

Related Products

.net-core-2.0-by-example's People

Contributors

rishabh-v avatar romydias avatar

Watchers

 avatar

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.