Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

May 12, 2014

Web Desining in .NET (ASP.NET)

ASP.NET supports three different development methods:

  1. Web Pages, 
  2. MVC (Model View Controller), 
  3. Web Forms

Web Pages

Web Pages is the simplest programming model for developing ASP.NET web pages. It provides an easy way to combine HTML, CSS, JavaScript and server code:
  • Easy to learn, understand, and use
  • Built around single web pages
  • Similar to PHP and Classic ASP
  • Server scripting with Visual Basic or C#
  • Full HTML, CSS, and JavaScript control
Web Pages is easy extendable with programmable Web Helpers, including database, video, graphics, social networking and much more.


Web Forms

Web Forms is the oldest ASP.NET programming model, with event driven web pages written as a combination of HTML, server controls, and server code. Web Forms are compiled and executed on the server, which generates the HTML that displays the web pages.Web Forms comes with hundreds of different web controls and web components to build user-driven web sites with data access.

 

MVC 

MVC is a framework for building web applications using a MVC (Model View Controller) design:
  • The Model represents the application core (for instance a list of database records).
  • The View displays the data (the database records).
  • The Controller handles the input (to the database records).
The MVC model also provides full control over HTML, CSS, and JavaScript.
The Model is the part of the application that handles the logic for the application data.
Often model objects retrieve data (and store data) from a database.
The View is the parts of the application that handles the display of the data.
Most often the views are created from the model data.
The Controller is the part of the application that handles user interaction.
Typically controllers read data from a view, control user input, and send input data to the model.
The MVC separation helps you manage complex applications, because you can focus on one aspect a time. For example, you can focus on the view without depending on the business logic. It also makes it easier to test an application.
The MVC separation also simplifies group development. Different developers can work on the view, the controller logic, and the business logic in parallel.

Razor

Razor is a markup syntax that lets you embed server-based code (Visual Basic and C#) into web pages.
Server-based code can create dynamic web content on the fly, while a web page is written to the browser. When a web page is called, the server executes the server-based code inside the page before it returns the page to the browser. By running on the server, the code can perform complex tasks, like accessing databases.
Razor is based on ASP.NET, and designed for creating web applications. It has the power of traditional ASP.NET markup, but it is easier to use, and easier to learn.