Introduction to .NET Florin Olariu & Andrei Arusoaie

Slides:



Advertisements
Similar presentations
1 Classic ASP vs. ASP.NET Technical Information and Market Adoption Lance Welker University of San Diego Dr. Rebman MSIT 526 December 20, 2005.
Advertisements

1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
ASP.NET vNEXT & development tools Marco De
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
1 CONFIDENTIAL.NET FEATURES OVERVIEW C# 6 ASP.NET 5 DNX PROJECT ASP.NET MVC 6 EF 7 A UGUST 4, 2015.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
Scott Hunter Principal Group Program Manager, App ASP.NET 5.
Session Information Goals CTAs Customer Evidence TBD
64-bit JIT + SIMD Garbage Collector Runtime components Compilers.NET Compiler Platform (Roslyn) Languages innovation.NET Framework 4.6.NET Core.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
ASP.NET 5 Unleashed Javier Lozano
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
ASP.NET Core* 1.0 The Future of Web Apps Shahed Chowdhuri
Microsoft Ignite /28/2017 2:36 PM
Introduction to.NET Florin Olariu & Andrei Arusoaie “Alexandru Ioan Cuza”, University of Iai Department of Computer Science.
ASP.NET Core* in 2017 The Future of Web Apps Shahed Chowdhuri
C# Diline Giriş.
DevOps with ASP.NET Core and Entity Framework Core
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Introducing the Microsoft® .NET Framework
Build and Learn ASP.NET Workshop.
What is .NET.
Introduction to .NET framework
.NET Omid Darroudi.
Introduction to .NET Florin Olariu
Introduction to ASP.NET Core
Introduction to .NET Florin Olariu
Getting started with .NET Core
Visit for more Learning Resources
Tulika Chaudharie / Harikharan Krishnaraju
Introduction to Visual Basic 2008 Programming
ASP.NET MVC Introduction
ASP.NET Core 2.0 Fundamentals
The Modern ASP.NET Tech Stack!
ASP.NET Core* 1.0 The Future of Web Apps Shahed Chowdhuri
Introduction to .NET Framework Ch2 – Deitel’s Book
Did your feature got in, out or planned?
Lean .NET stack for building modern web apps
Windows Communication Foundation and Web Services
CMPE419 Mobile Application Development
Microsoft Virtual Academy
1.1. .NET architectural components and .NET Core
Introduction to Silverlight
CS360 Windows Programming
MVC in ASP.NET Core: The new kid on the block
Explore web development with Microsoft ASP.NET Core 1.0
Microsoft Build /11/2018 2:12 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
Building Modern Web Apps with ASP.NET MVC 6
Explore web development with Microsoft ASP.NET Core 1.0
Microsoft Build /14/ :29 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Microsoft Build /15/2018 6:28 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Typescript Programming Languages
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
Should I Transition to .NET Core? Will it hurt?
CIS16 Application Development – Programming with Visual Basic
Entity Framework Core.
ASP.NET 5 on .NET Core Damian Edwards Principal Program Manager.
Introduction to .NET By : Mr. V. D. Panchal Content :
ASP.NET 5 és ami mögötte van – a gyakorlatban
CMPE419 Mobile Application Development
The Future is Now with ASP.NET Core 3.0
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Running C# in the browser
Blazor A new framework for browser-based .NET apps Ryan Nowak
What’s ASP.NET 5 and Why? Scott Hunter | Director of Program Management Scott Hanselman | Principal Program Manager.
Presentation transcript:

Introduction to .NET Florin Olariu & Andrei Arusoaie “Alexandru Ioan Cuza”, University of Iași Department of Computer Science

Organization People: Florin Olariu & Andrei Arusoaie & Dan Nastasa 14 weeks (full activity) + 2 weeks for evaluation Final grade = round(40% * Exam + 60% * Lab + 10% * Kata’s) Exam: max 40 points, midterm exam Lab: max 70 points = 20 lab activity + 40 semester project + 10 coding kata’s * bonus points! Criteria: min 50 (Exam + Lab) WEB: http://profs.info.uaic.ro/~arusoaie.andrei/lectures/NET/DotNet.html

Resources Books/movies: Microsoft: Getting started: https://www.asp.net/ (create your Microsoft account!) Ask for books using Facebook Microsoft: https://www.microsoft.com/net/core/platform Getting started: https://www.microsoft.com/net/tutorials/csharp/getting-started

Questions? Contact: Facebook: andrei.arusoaie@gmail.com arusoaie.andrei@info.uaic.ro florin@florinolariu.ro olariu@gmail.com Dan.Nastasa@centric.eu dan.nastasa20@gmail.com Facebook: Introduction to .NET (click!)

Motivation Why C#? Open source The platform is new (written from scratch) Is the first time when we can say: “Write once => deploy everywhere!” It has been oriented to performance It has a very strong middleware system built-in According with the trends it is the most recommended high-level language that should be learned in 2017-2020 The sources can be found in github.

Goal Learn how to: Write business applications using .NET Core 2.0 Using best practices in writing maintainable software How to use design patterns How to use architectural patterns How to write decoupled code How to build responsive web applications How to work in teams using Agile Development (SCRUM approach) How to prepare for an interview .NET oriented (Andrei&Florin&Dan)Open for new challenges according with your(and market) needs

Agenda What is .NET Core? What is .NET Framework? Overview on ASP.NET Core What is new about this framework? Sample: Developing sample web application. OOP in .NET Core NET Framework – C# access modifiers and other common types

What is .NET Core? What is .NET Framework?

What is .NET Core? What is .NET Framework? Open Source. Developed & run on Cross Platform. Built on the .NET Core runtime & also on .NET Framework. Facility of dynamic compilation. Built in Dependency Injection (DI). MVC & Web API Controller are unified, Inherited from same base class. Smart tooling (Bower, NPM, Grunt & Gulp). Command-line tools. What is .NET Framework? Developed and run on Windows platform only. Built on the .NET Framework runtime. Supported (MVC, Web API & SignalR) Dependency Injection (DI). MVC & Web API Controller are separated. Image source: https://blogs.msdn.microsoft.com

Overview on ASP.NET Core

Overview on ASP.NET Core A unified story for building web UI and web APIs Integration of modern client-side frameworks and development workflows A cloud-ready environment-based configuration system Built-in dependency injection New light-weight and modular HTTP request pipeline Ability to host on IIS or self-host in your own process Built on .NET Core, which supports true side-by-side app versioning Ships entirely as NuGet packages New tooling that simplifies modern web development Build and run cross-platform ASP.NET apps on Windows, Mac and Linux Open source and community focused

What is new about this framework? Note: show the trick with dot.net!!!! -> open an browser and write down dot.net!!!!

What is new about this framework? Cross platform Cross platform First thing that needs to be signaled here is that till this version all the others .NET Framework version 1.0->4.5 were for development only for/in Windows platforms. During this period there was a framework called Mono Framework, open source and compatible with .NET With this new version Microsoft changed completely their attitude and created this new platform that now can be used not only on Windows but also on other platforms like: Mac or Linux. In the past the only IDE available to build strong/large applications was Visual Studio. Now we can use any editor (the best one is Visual Code -> can be installed on Mac or Linux as well) and we can execute any program using a console. To make it work on a cross platform, Microsoft built up a new set of runtime & libraries called CoreCLR and CoreFX which they compiled for every platform and generated builds. With making .NET Core a Cross Platform, Microsoft removed the tightly IIS bound "System.Web" and made it "Microsoft.AspNetCore" which will work for all platform hosting environment.

What is new about this framework? Cross platform Open source Open source With the world moving towards open source, Microsoft made this framework totally an open source. Also, the source code is available on GIT. You can now easily customize this framework according to your need.

What is new about this framework? Cross platform Open source Optimized .NET runtime & libraries Optimized .NET runtime & libraries With these changes, Microsoft also made changes to its libraries which were available in our GAC on installation of .NET Framework. One example that I can think of, is “System” library. The “System” library consists of many logical libraries, such as System.IO, System.Net, System.Configuration, etc. which getsloaded into memory every time you use “System” library. But, do you think there is a need to load the whole library when only a portion is needed? Suppose I need only System.IO, then my project should only refer System.IO instead of System as a whole. To make it a light weight and optimized, .NET Core now supports nuGet packages for each of this logical library and they will no more refer from GAC (which was available only on Windows platform)

What is new about this framework? Cross platform Open source Optimized .NET runtime & libraries Completely modular Completely modular Every time when there was a new feature added in any component of .NET framework, a new version was released by Microsoft. For example – with ASP.NET MVC, there was a routing concept introduced until ASP.NET MVC 4 which was there in Visual Studio 2012 (.NET framework 4.5). But with ASP.NET MVC 5, they introduced something called as Attribute Level Routing which was added in Visual Studio 2013 (.NET Framework 4.5.1). This kind of change in components may lead to introducing new release of framework version. But now, that is all gone with .NET Core, where everything is nuGet package. It became very easy to upgrade the component as it will introduce the release of nuGet package and not the whole framework. This makes everything modular.

What is new about this framework? Cross platform Open source Optimized .NET runtime & libraries Completely modular Introduction to CLI Introduction to CLI .NET Core also introduces a Command line application called as dotnet.exe. This application allows us to, create an application  execute the application run the Intermediate language host the CLR for any platform.

What is new about this framework? Cross platform Open source Optimized .NET runtime & libraries Completely modular Introduction to CLI Cloud ready environment Cloud ready environment With .NET Core, we can build cloud based internet connected applications, like Web Apps, IOT apps & mobile backend.

Sample: Developing sample web application DEMO Show the code Explain some parts like: controllers, views, models, startup, routing etc Explain CLI commands Host in IISExpress, Self-Hosting,

OOP in .NET Core Inheritance Inheritance Classes may derive from exiting classes. Existing classes are called : parent class. => and it is a generalization of the exiting class. Inheritance creates an “is –a ” relationship Example: Employee<=Manager, Architect, Technical Lead, Developer

OOP in .NET Core – inheritance Derived class indicates base class with colon. Notes: classes can contain properties and fields (built-in like int, string or custom like other classes or struct’s) Fields are used to support private methods Properties are used to expose functionality to other classes

OOP in .NET Core - inheritance Identify : properties, methods/behavior

OOP in .NET Core - polymorphism The possibility of taking many forms. Method overriding -> modify a method in the derived class : C# in order to be able to use method overriding we need to know: virtual  override. Virtual exists in base class, override in derived class.

OOP in .NET Core - polymorphism

OOP in .NET Core - polymorphism Another important aspect for polymorphism is “method overloading”. Means: we can have in the same class methods with the same name but different number of parameters.

OOP in .NET Core - encapsulation Encapsulation : a class should have a single responsibility. => don’t forget here, there is another set of principles : SOLID. Within the class we should have private functionality, that should not be exposed and only a : few well-defined methods that are public. Question: Why the method should be public?

OOP in .NET Core Inheritance Polymorphism Encapsulation There are 3 pillars in OOP. => Inheritance, polymorphism and encapsulation.

NET Framework – C# access modifiers and other common types

NET Framework – C# access modifiers and other common types What is an access modifier?

NET Framework – C# access modifiers and other common types What is an access modifier? An access modifier is a keyword used to specify the accessibility of a member or a type.

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#?

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private public => there is no restriction in regards with accessibility

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private protected => access is limited to the containing class or types derived from the containing class

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private internal => access is limited to the current assembly

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private

NET Framework – C# access modifiers and other common types How many access modifiers exists in C#? In C# we have four access modifiers public protected internal private private => access is limited to the containing type

NET Framework – C# access modifiers and other common types

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor Can be initialized only at the declaration

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor Can be initialized only at the declaration Can be used only by fields

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor Can be initialized only at the declaration Can be used only by fields

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor Can be initialized only at the declaration Can be used only by fields If is initialized via constructor can have different values

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor Can be initialized only at the declaration Can be used only by fields If is initialized via constructor can have different values Is a compile-time constant

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual readonly const Can be initialized: at declaration or in a constructor Can be initialized only a the declaration Can be used only by fields If is initialized via constructor can have different values Is a compile-time constant

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual Can be used for classes and methods

NET Framework – C# access modifiers and other common types Classes => prevents other classes to inherit from it. Methods => prevents from overriding virtual methods. Other common types readonly vs const sealed virtual

NET Framework – C# access modifiers and other common types Classes => prevents other classes to inherit from it. Methods => prevents from overriding virtual methods. Other common types readonly vs const sealed virtual

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual It is used for: methods, properties indexer and events.

NET Framework – C# access modifiers and other common types readonly vs const sealed virtual It is used for: methods, properties indexer and events. This allows us to override the behavior in a derived class.

One more thing…

One more thing… “Talk is cheap. Show me the code.”

One more thing… “Talk is cheap. Show me the code.” ― Linus Torvalds Write comments only when strictly necessary and keep them in sync with the code.

One more thing… “Talk is cheap. Show me the code.” ― Linus Torvalds Write comments only when strictly necessary and keep them in sync with the code. Establish a set of shared coding standards

One more thing… “Talk is cheap. Show me the code.” ― Linus Torvalds Write comments only when strictly necessary and keep them in sync with the code. Establish a set of shared coding standards. “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

One more thing… “Talk is cheap. Show me the code.” ― Linus Torvalds Write comments only when strictly necessary and keep them in sync with the code. Establish a set of shared coding standards. “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” – Martin Fowler

Questions Do you have any other questions?

Thanks! See you next time! 