Tuesday, 14 February 2017

Rahul Sharma: ASP.NET MVC

Rahul Sharma: ASP.NET MVC: MVC 3  VS  MVC 4  VS  MVC 5

CHAPTER-1

Web Applications:-


Web Applications are programs that are executed on a web server and accessed from a web browser.


Three Layers of a web application:-

  1. Presentation Layer
  2. Business Logic Layer
  3. Data Layer

Presentation Layer:-

Consists of the interface through which the users interact with the application.

Business Logic Layer:-

Consists of the components of the application that control the flow of execution and communication between the presentation layer and the data layer.

Data Layer:-

Consists of the components that expose the application data stored in databases to the business logic layer.

Architecture of a web Application:-

  1. Single Tier
  2. Two Tier
  3. Three Tier

Single Tier:-

In single tier architecture, all the three layers are integrated together and can be installed on a single computer. If the application needs to be accessed on multiple computers a separate installation required.

Two Tier:-

In two tier architecture, the three layers are distributed over two tiers, a client and a server. The presentation layer resides on each client computer, the business logic layer resides either on client or on server, and data access layer resides on the server.

Types of two tier architecture:-

1> Fat Client and thin server:-

The architecture in which the business logic layer resides on the client is known as the fat client and thin server.

2> Fat server and thin client:-

The architecture in which the business logic layer resides on the server is known as the fat server and thin client.


Three Tier architecture:-

In three tier architecture, the three layers of the application are placed as three different entities. This architecture is used for those applications in which merging the business logic layer with the presentation layer or the data layer may degrade the performance of the application.


MVC( Model View Controller):-

Model:-

Refers to a set of classes that describes the data that the applications work with.

View:-

Refers to the components that define an application user’s interface

Controller:-

Refers to a set of classes that handle communication from the user and the overall application flow. A controller responds to user input , communicates with the model, and decides the view to render.


Features of ASP.NET MVC:-

Routing:-

MVC has a powerful routing system. Routing is a feature that enables you to develop applications with comprehensible and searchable URLs.

Scaffolding:-

MVC provides a scaffolding feature that provides a quick way to generate the code for commonly used operations in a standardized way.

Convention over Configuration:-

Asp.Net MVC Supports Convention over Configuration, which is a software design paradigm that aims at reducing the number of decisions taken by developers.

Bundling and Minification:-

Bundling is a technique provided by MVC that allows you to combine multiple files , such as CSS and javascript into a single file. Bundling improves the request load time by reducing the number of requests to the server.
Another Technique minification removes  unnecessary white space and comments from javascript or CSS Code, and shorten variable names.


Structure of an ASP.NET MVC Projects:-
























Sunday, 12 February 2017

Visual Studio:-


Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services.

Visual Studio supports different programming languages and allows the code editor and debugger to support (to varying degrees) nearly any programming language, provided a language-specific service exists. Built-in languages include C, C++ and C++/CLI (via Visual C++), VB.NET (via Visual Basic .NET), C# (via Visual C#), and F# (as of Visual Studio 2010). Support for other languages such as Python,[ RubyNode.js, and M among others is available via language services installed separately. It also supports XML/XSLTHTML/XHTMLJavaScript and CSS. Java (and J#) were supported in the past.


Versions of Visual Studio:-

Product nameCodenameVersion numberVersion of
cl.exe
Supported .NET
Framework versions
Release date
Visual Studio 97Boston5.0N/AN/AFebruary 1997
Visual Studio 6.0Aspen6.012.00N/AJune 1998
Visual Studio .NET (2002)Rainier7.013.001.0February 13, 2002
Visual Studio .NET 2003Everett7.113.101.1April 24, 2003
Visual Studio 2005Whidbey8.014.002.0, 3.0November 7, 2005
Visual Studio 2008Orcas9.015.002.0, 3.0, 3.5November 19, 2007
Visual Studio 2010Dev10/Rosario10.016.002.0 – 4.0April 12, 2010
Visual Studio 2012Dev1111.017.002.0 – 4.5.2September 12, 2012
Visual Studio 2013Dev1212.018.002.0 – 4.5.2October 17, 2013
Visual Studio 2015Dev1414.019.002.0 – 4.6July 20, 2015
Visual Studio 2017[64]Dev1515.019.102.0 – 4.6.2; Core 1.0Not released

Thursday, 9 February 2017

MVC (Model View Controller):-


Model:-
              Refers to a set of classes that describes the data that the application works with. In addition, these classes define the business logic that governs how the data can be manipulated.

View:-
         Refers to the components that define an application's user interface.

Controller:-
                Refers to a set of classes that handle communication from the user and the overall application flow.


Wednesday, 8 February 2017

Three Layers of Web Application:-


Presentation Layer:-  
                                     Consists of the interface through which the users interact with the application.

Business Logic Layer:-
                                    Consists of the components of the application that control the flow of execution and communication between the presentation layer and the data layer.

Data Layer:-
                  Consists of components that expose the application data stored in databases to the business logic layer.
                                 

Monday, 6 February 2017

Microsoft Updated Windows Version Against Hackers

Microsoft has fortified the latest version of Windows to make it more secure than previous editions, but the strongest protections will be available only to those willing to pay a steep price for them. Windows 10 Anniversary Update has introduced many mitigation techniques in core Windows components and the Microsoft Edge browser, researchers Matt Oh and Elia Florio wrote in a blog post last week.


Saturday, 4 February 2017

Animations & Transitions in CSS


Transitions:-

<html>
<head>
<style>
div
{
width:200px;
height:300px;
background:red;
-webkit-transition:width 2s;
-o-transition:width 2s;
}
div:hover
{
width:600px;
}
</style>
</head>
<body>
<div>This is the Demo of Transitions using CSS</div>
</body>
</html>

Output:-

video




Animations:-

<html>
<head>
<style>
div
{
width:300px;
height:300px;
background:red;
position:relative;
-webkit-animation-name:animation;/* chrome */
-webkit-animation-duration:4s; /* chrome */
animation-iteration-count:infinite;
}
@-webkit-keyframes animation /* chrome */
{
0%{background:red;}
20%{background:green;}
40%{background:yellow;}
60%{background:pink;}
}
</style>
</head>
<body>
<div> This is the demo of animation using CSS</div>
</body>
</html>

Output:-


video



























Friday, 3 February 2017

CSS Selectors

ID Selector:-

<html>
<head>
<style>
#styl
{
color:blue;
margin-left:100px;
text-size:large;
}
</style>
</head>
<body>
<div>
<p id=styl>This is the example of ID selector.</p>
</div>
</body>
</html>

output:-







Class Selector:-

<html>
<head>
<style>
.styl
{
color:red;
margin-left:100px;
text-size:large;
}
</style>
</head>
<body>
<div>
<p class=styl>This is the example of Class selector.</p>
</div>
</body>
</html>

output:-







Id selector:- An ID selector is used to identify by using # symbol. You can apply only a single ID on one element.

Class Selector:- Class selector is defined by using a dot(.). You can apply multiple classes on single element.









Thursday, 2 February 2017

Sum of TextBox Values on Client Side using JavaScript

On Button Click:-

<html>
<head>
</head>
<body>

<script type="text/javascript">
function Add()
{
var num1=parseInt(document.getElementById("val1").value);
var num2=parseInt(document.getElementById("val2").value);
res=num1+num2;
document.getElementById("result").innerHTML=res;
}
</script>

First Number <input type ="text" id="val1">
Second Number <input type="text" id="val2">
<label id="result"></label>
<br><br>
<span style="margin-left:200px;"><input type="submit" value="Add" id="btn_result" onclick="Add()"></span>
</body>
</html>

output:-









On Text Changes in TextBoxes

<html>
<head>
</head>
<body>

<script type="text/javascript">
function Add()
{
var num1=parseInt(document.getElementById("val1").value);
var num2=parseInt(document.getElementById("val2").value);
res=num1+num2;
document.getElementById("result").innerHTML=res;
}
</script>

First Number <input type ="text" id="val1" onchange="Add()">
Second Number <input type="text" id="val2" onchange="Add()">
<label id="result"></label>
</body>

</html>

output:-









Wednesday, 1 February 2017

Adding Audio and Video on Web Pages using HTML 5 Multimedia Components...

To Add Audio on web page follow the below code:-
<html>
<head>
</head>
<body>
<Audio src="Enter audio path here with name and extension" controls="controls" ></Audio>
</body>
</html>

Output:-






To Add Video on web page follow the below code:-

<html>
<head>
</head>
<body>
<Video src="Enter video path here with name and extension" controls="controls" width="300" height="280" ></video>
</body>
</html>

output:-







Insert, Delete, Update Using Entity Framework and LINQ in ASP.NET 1> Create Database First 2> Create Table 3> Add ADO...