SlideShare ist ein Scribd-Unternehmen logo
1 von 60
ASP.NET MVC Zero to Hero
Md. Mahedee Hasan
Microsoft MVP , Visual Studio and Development Technologies
Senior Software Architect, Leadsoft Bangladesh Limited
Trainer, Leads Training and Consulting Limited
Microsoft Community Contributor
Blog: http://mahedee.net
MVP | Software Architect | Trainer | Technical Blogger | MCTS
1
MAHEDEE.NET
2
Introduction to .NET
What is Microsoft .NET?
Another Programming Language?
.NETFramework
Programming Languages
C#, Visual Basic, C++, J# etc.
Markup Languages
HTML, XML etc.
Software development platform
Language neutral
Framework is a basic
or essential
supporting structure
of a system
A
framework
MAHEDEE.NET
3
Introduction to .NET …
Operating System + Hardware
.NET Framework
.NET Application
Narrow view of .NET framework
MAHEDEE.NET
4
ASP.NET
ASP – Active Server Page
Asp.net is an open source server-side web application framework
Designed for Web development to produce dynamic Web pages
Introduced in 1998
Introduction
MAHEDEE.NET
5
ASP.NET
ASP.NET is a new ASP generation.
ASP.NET pages are compiled, which makes them faster
Normally written in VB (Visual Basic) or C# (C sharp).
Introduction …
MAHEDEE.NET
6
ASP.NET
MAHEDEE.NET
7
ASP.NET Web form
Support multiple languages
Improved performance
Control-based, event-driven execution model
More productive
Allows clean cut code
MAHEDEE.NET
8
ASP.NET MVC
MAHEDEE.NET
9
Why .NET?
Easy to learn
Payment is high
High market demand
Develop scalable enterprise application
• Companies looking for .NET developers
• Microsoft
• Google
• CISCO
• Wipro Ltd
• Deloitt
• KPMG
• Marriott International
• Edward Jones
MAHEDEE.NET
10
Why .NET? …
Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M
MAHEDEE.NET
11
Why .NET? …
MAHEDEE.NET
12
Why .NET? …
.NET developers are one of the highest paid
associates
Yearly Income (India) Rs. 334,959 per year [1]
Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M
Highest paid .NET developers
ASP.NET MVC Developers IIS Administrator
MAHEDEE.NET
13
Average salary for .NET developers
International Market $45,569 ~ $103,575 per year [1]
Salary in Bangladesh
1. http://www.payscale.com/research/US/Job=.NET_Software_Developer_%2F_Programmer/Salary
2. http://www.salaryexplorer.com/salary-survey.php?loc=18&loctype=1&job=781&jobtype=3
MAHEDEE.NET
14
Job condition in market places
Lots of works
for .NET
developers
Specially for
asp.net
Many Bangladesh
Freelancer work in
.NET platform
.NET developers
are mostly top
rated
Comparatively
large project
MAHEDEE.NET
15
Job Opportunity in Local Market
MAHEDEE.NET
16
Job Opportunity in Local Market …
MAHEDEE.NET
17
Famous web application developed by asp.net
MAHEDEE.NET
18
Future of .NET
Cross Platform Framework
MAHEDEE.NET
19
Future of .NET …
.NET can be used to build
AR/VR application using
unity
Tizen allows .net
developers to build app in
Samsung devices including
Tvs and mobile
MAHEDEE.NET
20
Future of .NET …
MAHEDEE.NET
21
Future of .NET
Is an independent organization
To improve open source software development and
collaboration around the .net framework
MAHEDEE.NET
22
What is MVC?
Application
MAHEDEE.NET
23
What is ASP.NET MVC?
It is Software Architectural pattern
Software Architectural
Pattern
Software
Design Pattern
Run on ASP.NET Framework
MAHEDEE.NET
24
ASP.NET MVC Routing
MAHEDEE.NET
25
ASP.NET MVC Design Principle
Separation of Concern
Convention over configuration
MAHEDEE.NET
26
What is View Engine?
Rendering HTML from views to the browser.
View
Engine
Razor
Traditional
ASPX
Spark
Nhaml
etc
Razor is a markup
language embed with
server-based code
MAHEDEE.NET
27
ASP.NET MVC design goal
MAHEDEE.NET
28
ASP.NET MVC Folder Structure
MAHEDEE.NET
29
Layout
Provide a consistent look and feel on all the
pages of the application
Layout
Configuration
• Page level
• Folder level
• Root level
MAHEDEE.NET
30
Controller
Controllers are classes that handle incoming browser requests
Retrieve data, and then specify view templates and return a
response to the browser
MVC requires the name of all controllers to end with "Controller"
Controller classes inherited from Controller base class
The Controllers Folder contains the controller classes
MAHEDEE.NET
31
Action and Parameters
Action is a public method
The controller defines action methods
Controllers can include as many action methods as needed
Action methods typically have a one-to-one mapping with user
interactions
Can take one or more parameter
MAHEDEE.NET
32
Razor Template
MAHEDEE.NET
33
Introduction to EF
ORM often reduces the amount of code that
needs to be written
MAHEDEE.NET
34
Introduction to EF …
MAHEDEE.NET
36
EF Development Approach
MAHEDEE.NET
37
Annotation
Annotation is a configuration option of the domain class
Key
ForeignKey
NotMapped
StringLength
Timestamp
ConcurrencyCheck
Table
Index
Required
MinLength
MaxLength
Database Schema
related Attributes
Validation Attributes
Identity and Security
MAHEDEE.NET
38
MAHEDEE.NET
39
Authentication
MAHEDEE.NET
40
No Authentication
All anonymous users
MAHEDEE.NET
41
Individual Users Accounts
Forms Authentication
Can also enable Microsoft, Google, Facebook, Twitter
MAHEDEE.NET
42
Organizational Accounts
Active directory services (Azure, Office 365, Local)
MAHEDEE.NET
43
Windows Authentication
Intranet – no anonymous users
Performance tuning and
scalability improvement tips!!
MAHEDEE.NET
45
• How affect in performance?
– Create pdb (program database – uses for debugging) files which
creates extra overhead.
– For this reason you may face timeout problem.
• Best Practice
– Always prepare release in release mode.
MAHEDEE.NET
46
Prepare release with release mode
• By default debug=”true” when you create a web application.
• It is necessary to set debug=”true” in development
environment.
• How affect in performance?
– If you set debug = “true”, application requires the pdb
information to be inserted into the file
– So results in a comparatively larger file and hence processing will
be slow.
MAHEDEE.NET
47
In Web.Config, Set debug=”false”
• Best Practice
– In deployment server, set debug = “false” in web.config
<system.web>
<compilation debug="false" targetFramework="4.5.1" />
</system.web>
MAHEDEE.NET
48
In Web.Config, Set debug=”false”
• Trace the application to monitor the executions of
application or a pages
• Uses for diagnostic purpose
• How affect in performance?
– Loaded extra information to the pages which degrades
performances.
MAHEDEE.NET
49
Turn off Tracing unless until required
• Best Practice
– Always set trace enabled = “false” unless or until you required to
monitor a page’s executions
<system.web>
<trace enabled="true" pageOutput="true" requestLimit="10"
localOnly="false" mostRecent="true" traceMode="SortByTime"/>
</system.web>
MAHEDEE.NET
50
Turn off Tracing unless until required
• Though, ASP.NET manages session state by default, we must
pay attention of session memory management.
• How affect in performance?
– When you store your data in in-process or on a state server or in
a SQL Database, it requires memory.
– It is also time consuming when you store or retrieve data in-
process or state server or SQL server.
MAHEDEE.NET
51
Carefully manage session state
• Best Practice
– If your page is static, it is recommended not to use session state.
In such cases where you don’t need to use session state, disable it
on your web form using the following directive:
<@%Page EnableSessionState="false"%>
– In case you use the session state only to retrieve data and not to
update, make the session state read-only using the following
directive.
<@%Page EnableSessionState ="ReadOnly"%>
– Consider carefully whether there is a need of the state server or
SQL Server mode.
MAHEDEE.NET
52
Carefully manage session state …
• Best Practice
– SQL Server session mode provides lower performance than state
server mode.
– Try to avoid keeping object in session. Since it requires serializing
then de-serializing which affected in performance.
– Use client-side state management than server side.
MAHEDEE.NET
53
Carefully manage session state …
• View State provides page level state management
• As long as the user is on the current page, state is available
and the user redirects to the next page and the current page
state is lost
• View State can store any type of data because it is object
type but it is preferable not to store a complex type of data
due to the need for serialization and deserialization on each
post back
MAHEDEE.NET
54
Disable View State of a page if not required
• How affect in performance?
– It increases the total payload of a page when submitted and
when serving request.
– Serialization and deserialization of the data is required when
submitting data and gets requested data.
• Best Practice
– Pages that do not have any server postback events can have the
view state turned off.
– The default behaviour of the View State property is enabled, but
if you don’t need it, you can turn it off at the control or page
level.
<%@ Page EnableViewState="false" %>
MAHEDEE.NET
55
Disable View State of a page if not required
• Finally block executes whether any exception occurs or not.
• How affect in performance?
– Sometimes application occupy resources where as it doesn’t
need it.
• Best Practice
– Always use a finally block to release resources like closing
database connections, closing files, disposing objects etc.
MAHEDEE.NET
56
Use finally block to release resources
• To show huge number of data in gridview, we cannot think
general way because it takes huge time to load.
• Best Practice
– To load grid view faster take advantages of paging, it shows small
subsets of data at a time.
– JQGrid is faster than asp.net grid view because it does
everything in client side.
MAHEDEE.NET
57
Use paging in grid view
• How affect in performance?
– The uses of web server controls increase the response time.
– Web server controls go to the server executes all of its life cycle
and then rendered on the client side.
• Best Practice
– Don’t use server control unless until required.
– Use HTML elements where suited.
MAHEDEE.NET
58
Minimizes number of web server control
• My blog site: http://mahedee.net
• TechNet Profile:
https://social.technet.microsoft.com/profile/mahede
e/
• Github Profile: https://github.com/mahedee
• Slide Share http://www.slideshare.net/mahedee19
MAHEDEE.NET
59
Q&A
• Email: mahedee.hasan@gmail.com;
Mahedee_hasan@leads-bd.com
• Tag me in facebook group post
• https://www.facebook.com/groups/mstech.bd
• https://www.facebook.com/groups/techshareonline/
MAHEDEE.NET
60
Q&A
• Me in Facebook:
https://facebook.com/mahedee19
• Me in Linkedin:
https://www.linkedin.com/in/mahedee
MAHEDEE.NET
61
Q&A
62

Weitere ähnliche Inhalte

Ähnlich wie ASP.NET MVC Zero to Hero Guide

PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018Bhavesh Surani
 
JOB PORTALProject SummaryTitle JOB-PORT.docx
JOB PORTALProject SummaryTitle    JOB-PORT.docxJOB PORTALProject SummaryTitle    JOB-PORT.docx
JOB PORTALProject SummaryTitle JOB-PORT.docxchristiandean12115
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedAcquia
 
Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0Mayank Srivastava
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code projectPruthvi B Patil
 
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechVue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechDivante
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentationMaslowB
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM iZend by Rogue Wave Software
 
Which is better asp.net mvc vs asp.net
Which is better  asp.net mvc vs asp.netWhich is better  asp.net mvc vs asp.net
Which is better asp.net mvc vs asp.netConcetto Labs
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)clickramanm
 
Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...Rakuten Group, Inc.
 
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationvue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationDivante
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCMayank Srivastava
 
Appengine json
Appengine jsonAppengine json
Appengine jsonAurel Medvegy
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
Google app development
Google app developmentGoogle app development
Google app developmentAurel Medvegy
 
Google app developers
Google app developersGoogle app developers
Google app developersAurel Medvegy
 
Google development
Google developmentGoogle development
Google developmentAurel Medvegy
 

Ähnlich wie ASP.NET MVC Zero to Hero Guide (20)

PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
 
JOB PORTALProject SummaryTitle JOB-PORT.docx
JOB PORTALProject SummaryTitle    JOB-PORT.docxJOB PORTALProject SummaryTitle    JOB-PORT.docx
JOB PORTALProject SummaryTitle JOB-PORT.docx
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with Memcached
 
Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code project
 
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechVue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Which is better asp.net mvc vs asp.net
Which is better  asp.net mvc vs asp.netWhich is better  asp.net mvc vs asp.net
Which is better asp.net mvc vs asp.net
 
Mvc15 (1)
Mvc15 (1)Mvc15 (1)
Mvc15 (1)
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...
 
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationvue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Appengine json
Appengine jsonAppengine json
Appengine json
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Asp.net Developers portfolio and case study NicheTech
Asp.net Developers portfolio and case study NicheTechAsp.net Developers portfolio and case study NicheTech
Asp.net Developers portfolio and case study NicheTech
 
Google app development
Google app developmentGoogle app development
Google app development
 
Google app developers
Google app developersGoogle app developers
Google app developers
 
Google development
Google developmentGoogle development
Google development
 

Mehr von Md. Mahedee Hasan

Chatbot development with Microsoft Bot Framework and LUIS
Chatbot development with Microsoft Bot Framework and LUISChatbot development with Microsoft Bot Framework and LUIS
Chatbot development with Microsoft Bot Framework and LUISMd. Mahedee Hasan
 
Chatbot development with Microsoft Bot Framework
Chatbot development with Microsoft Bot FrameworkChatbot development with Microsoft Bot Framework
Chatbot development with Microsoft Bot FrameworkMd. Mahedee Hasan
 
Introduction to Windows 10 IoT Core
Introduction to Windows 10 IoT CoreIntroduction to Windows 10 IoT Core
Introduction to Windows 10 IoT CoreMd. Mahedee Hasan
 
Whats new in visual studio 2017
Whats new in visual studio 2017Whats new in visual studio 2017
Whats new in visual studio 2017Md. Mahedee Hasan
 
Increasing productivity using visual studio 2017
Increasing productivity using visual studio 2017Increasing productivity using visual studio 2017
Increasing productivity using visual studio 2017Md. Mahedee Hasan
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkMd. Mahedee Hasan
 
Introduction to OMNeT++
Introduction to OMNeT++Introduction to OMNeT++
Introduction to OMNeT++Md. Mahedee Hasan
 
Feature and Future of ASP.NET
Feature and Future of ASP.NETFeature and Future of ASP.NET
Feature and Future of ASP.NETMd. Mahedee Hasan
 
Generic Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFGeneric Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFMd. Mahedee Hasan
 
C#.net applied OOP - Batch 3
C#.net applied OOP - Batch 3C#.net applied OOP - Batch 3
C#.net applied OOP - Batch 3Md. Mahedee Hasan
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingMd. Mahedee Hasan
 

Mehr von Md. Mahedee Hasan (15)

Chatbot development with Microsoft Bot Framework and LUIS
Chatbot development with Microsoft Bot Framework and LUISChatbot development with Microsoft Bot Framework and LUIS
Chatbot development with Microsoft Bot Framework and LUIS
 
Chatbot development with Microsoft Bot Framework
Chatbot development with Microsoft Bot FrameworkChatbot development with Microsoft Bot Framework
Chatbot development with Microsoft Bot Framework
 
Introduction to Windows 10 IoT Core
Introduction to Windows 10 IoT CoreIntroduction to Windows 10 IoT Core
Introduction to Windows 10 IoT Core
 
Whats new in visual studio 2017
Whats new in visual studio 2017Whats new in visual studio 2017
Whats new in visual studio 2017
 
Increasing productivity using visual studio 2017
Increasing productivity using visual studio 2017Increasing productivity using visual studio 2017
Increasing productivity using visual studio 2017
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity Framework
 
Introduction to OMNeT++
Introduction to OMNeT++Introduction to OMNeT++
Introduction to OMNeT++
 
Feature and Future of ASP.NET
Feature and Future of ASP.NETFeature and Future of ASP.NET
Feature and Future of ASP.NET
 
Generic Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFGeneric Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EF
 
C#.net applied OOP - Batch 3
C#.net applied OOP - Batch 3C#.net applied OOP - Batch 3
C#.net applied OOP - Batch 3
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Oop principles
Oop principlesOop principles
Oop principles
 
MS SQL Server
MS SQL ServerMS SQL Server
MS SQL Server
 
C# - Part 1
C# - Part 1C# - Part 1
C# - Part 1
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 

KĂźrzlich hochgeladen

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

KĂźrzlich hochgeladen (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

ASP.NET MVC Zero to Hero Guide

  • 1. ASP.NET MVC Zero to Hero Md. Mahedee Hasan Microsoft MVP , Visual Studio and Development Technologies Senior Software Architect, Leadsoft Bangladesh Limited Trainer, Leads Training and Consulting Limited Microsoft Community Contributor Blog: http://mahedee.net MVP | Software Architect | Trainer | Technical Blogger | MCTS 1
  • 2. MAHEDEE.NET 2 Introduction to .NET What is Microsoft .NET? Another Programming Language? .NETFramework Programming Languages C#, Visual Basic, C++, J# etc. Markup Languages HTML, XML etc. Software development platform Language neutral Framework is a basic or essential supporting structure of a system A framework
  • 3. MAHEDEE.NET 3 Introduction to .NET … Operating System + Hardware .NET Framework .NET Application Narrow view of .NET framework
  • 4. MAHEDEE.NET 4 ASP.NET ASP – Active Server Page Asp.net is an open source server-side web application framework Designed for Web development to produce dynamic Web pages Introduced in 1998 Introduction
  • 5. MAHEDEE.NET 5 ASP.NET ASP.NET is a new ASP generation. ASP.NET pages are compiled, which makes them faster Normally written in VB (Visual Basic) or C# (C sharp). Introduction …
  • 7. MAHEDEE.NET 7 ASP.NET Web form Support multiple languages Improved performance Control-based, event-driven execution model More productive Allows clean cut code
  • 9. MAHEDEE.NET 9 Why .NET? Easy to learn Payment is high High market demand Develop scalable enterprise application
  • 10. • Companies looking for .NET developers • Microsoft • Google • CISCO • Wipro Ltd • Deloitt • KPMG • Marriott International • Edward Jones MAHEDEE.NET 10 Why .NET? … Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M
  • 12. MAHEDEE.NET 12 Why .NET? … .NET developers are one of the highest paid associates Yearly Income (India) Rs. 334,959 per year [1] Ref: 1. https://www.youtube.com/watch?v=auErLqIJY2M Highest paid .NET developers ASP.NET MVC Developers IIS Administrator
  • 13. MAHEDEE.NET 13 Average salary for .NET developers International Market $45,569 ~ $103,575 per year [1] Salary in Bangladesh 1. http://www.payscale.com/research/US/Job=.NET_Software_Developer_%2F_Programmer/Salary 2. http://www.salaryexplorer.com/salary-survey.php?loc=18&loctype=1&job=781&jobtype=3
  • 14. MAHEDEE.NET 14 Job condition in market places Lots of works for .NET developers Specially for asp.net Many Bangladesh Freelancer work in .NET platform .NET developers are mostly top rated Comparatively large project
  • 16. MAHEDEE.NET 16 Job Opportunity in Local Market …
  • 19. MAHEDEE.NET 19 Future of .NET … .NET can be used to build AR/VR application using unity Tizen allows .net developers to build app in Samsung devices including Tvs and mobile
  • 21. MAHEDEE.NET 21 Future of .NET Is an independent organization To improve open source software development and collaboration around the .net framework
  • 23. MAHEDEE.NET 23 What is ASP.NET MVC? It is Software Architectural pattern Software Architectural Pattern Software Design Pattern Run on ASP.NET Framework
  • 25. MAHEDEE.NET 25 ASP.NET MVC Design Principle Separation of Concern Convention over configuration
  • 26. MAHEDEE.NET 26 What is View Engine? Rendering HTML from views to the browser. View Engine Razor Traditional ASPX Spark Nhaml etc Razor is a markup language embed with server-based code
  • 29. MAHEDEE.NET 29 Layout Provide a consistent look and feel on all the pages of the application Layout Configuration • Page level • Folder level • Root level
  • 30. MAHEDEE.NET 30 Controller Controllers are classes that handle incoming browser requests Retrieve data, and then specify view templates and return a response to the browser MVC requires the name of all controllers to end with "Controller" Controller classes inherited from Controller base class The Controllers Folder contains the controller classes
  • 31. MAHEDEE.NET 31 Action and Parameters Action is a public method The controller defines action methods Controllers can include as many action methods as needed Action methods typically have a one-to-one mapping with user interactions Can take one or more parameter
  • 33. MAHEDEE.NET 33 Introduction to EF ORM often reduces the amount of code that needs to be written
  • 36. MAHEDEE.NET 37 Annotation Annotation is a configuration option of the domain class Key ForeignKey NotMapped StringLength Timestamp ConcurrencyCheck Table Index Required MinLength MaxLength Database Schema related Attributes Validation Attributes
  • 40. MAHEDEE.NET 41 Individual Users Accounts Forms Authentication Can also enable Microsoft, Google, Facebook, Twitter
  • 41. MAHEDEE.NET 42 Organizational Accounts Active directory services (Azure, Office 365, Local)
  • 43. Performance tuning and scalability improvement tips!! MAHEDEE.NET 45
  • 44. • How affect in performance? – Create pdb (program database – uses for debugging) files which creates extra overhead. – For this reason you may face timeout problem. • Best Practice – Always prepare release in release mode. MAHEDEE.NET 46 Prepare release with release mode
  • 45. • By default debug=”true” when you create a web application. • It is necessary to set debug=”true” in development environment. • How affect in performance? – If you set debug = “true”, application requires the pdb information to be inserted into the file – So results in a comparatively larger file and hence processing will be slow. MAHEDEE.NET 47 In Web.Config, Set debug=”false”
  • 46. • Best Practice – In deployment server, set debug = “false” in web.config <system.web> <compilation debug="false" targetFramework="4.5.1" /> </system.web> MAHEDEE.NET 48 In Web.Config, Set debug=”false”
  • 47. • Trace the application to monitor the executions of application or a pages • Uses for diagnostic purpose • How affect in performance? – Loaded extra information to the pages which degrades performances. MAHEDEE.NET 49 Turn off Tracing unless until required
  • 48. • Best Practice – Always set trace enabled = “false” unless or until you required to monitor a page’s executions <system.web> <trace enabled="true" pageOutput="true" requestLimit="10" localOnly="false" mostRecent="true" traceMode="SortByTime"/> </system.web> MAHEDEE.NET 50 Turn off Tracing unless until required
  • 49. • Though, ASP.NET manages session state by default, we must pay attention of session memory management. • How affect in performance? – When you store your data in in-process or on a state server or in a SQL Database, it requires memory. – It is also time consuming when you store or retrieve data in- process or state server or SQL server. MAHEDEE.NET 51 Carefully manage session state
  • 50. • Best Practice – If your page is static, it is recommended not to use session state. In such cases where you don’t need to use session state, disable it on your web form using the following directive: <@%Page EnableSessionState="false"%> – In case you use the session state only to retrieve data and not to update, make the session state read-only using the following directive. <@%Page EnableSessionState ="ReadOnly"%> – Consider carefully whether there is a need of the state server or SQL Server mode. MAHEDEE.NET 52 Carefully manage session state …
  • 51. • Best Practice – SQL Server session mode provides lower performance than state server mode. – Try to avoid keeping object in session. Since it requires serializing then de-serializing which affected in performance. – Use client-side state management than server side. MAHEDEE.NET 53 Carefully manage session state …
  • 52. • View State provides page level state management • As long as the user is on the current page, state is available and the user redirects to the next page and the current page state is lost • View State can store any type of data because it is object type but it is preferable not to store a complex type of data due to the need for serialization and deserialization on each post back MAHEDEE.NET 54 Disable View State of a page if not required
  • 53. • How affect in performance? – It increases the total payload of a page when submitted and when serving request. – Serialization and deserialization of the data is required when submitting data and gets requested data. • Best Practice – Pages that do not have any server postback events can have the view state turned off. – The default behaviour of the View State property is enabled, but if you don’t need it, you can turn it off at the control or page level. <%@ Page EnableViewState="false" %> MAHEDEE.NET 55 Disable View State of a page if not required
  • 54. • Finally block executes whether any exception occurs or not. • How affect in performance? – Sometimes application occupy resources where as it doesn’t need it. • Best Practice – Always use a finally block to release resources like closing database connections, closing files, disposing objects etc. MAHEDEE.NET 56 Use finally block to release resources
  • 55. • To show huge number of data in gridview, we cannot think general way because it takes huge time to load. • Best Practice – To load grid view faster take advantages of paging, it shows small subsets of data at a time. – JQGrid is faster than asp.net grid view because it does everything in client side. MAHEDEE.NET 57 Use paging in grid view
  • 56. • How affect in performance? – The uses of web server controls increase the response time. – Web server controls go to the server executes all of its life cycle and then rendered on the client side. • Best Practice – Don’t use server control unless until required. – Use HTML elements where suited. MAHEDEE.NET 58 Minimizes number of web server control
  • 57. • My blog site: http://mahedee.net • TechNet Profile: https://social.technet.microsoft.com/profile/mahede e/ • Github Profile: https://github.com/mahedee • Slide Share http://www.slideshare.net/mahedee19 MAHEDEE.NET 59 Q&A
  • 58. • Email: mahedee.hasan@gmail.com; Mahedee_hasan@leads-bd.com • Tag me in facebook group post • https://www.facebook.com/groups/mstech.bd • https://www.facebook.com/groups/techshareonline/ MAHEDEE.NET 60 Q&A
  • 59. • Me in Facebook: https://facebook.com/mahedee19 • Me in Linkedin: https://www.linkedin.com/in/mahedee MAHEDEE.NET 61 Q&A
  • 60. 62