Question
Paymnet
Answer
Dot NET Homework Help

The Microsoft .NET Framework is a software framework for Microsoft Windows operating systems. It includes a large library, and it supports several programming languages which allows language interoperability (each language can utilize code written in other languages.) The .NET library is available to all the programming languages that .NET supports.

MVC:

MVC, or Model-View-Controller, is an architectural pattern used in software development. Although it’s been around for several decades, it has gained popularity recently as the crux of rapid development frameworks such as Ruby on Rails, Cake PHP, Monorail, and JavaScriptMVC.

The aim of MVC is to promote good programming practices and code reuse by separating a web application into three layers: data, presentation, and the interaction between the two. By separating these elements from each other, one can be easily updated without affecting the others.

Having a good understanding of MVC will be extremely helpful for anyone who is interested in learning a web framework like the ones mentioned above. Many frameworks are built around Ruby on Rails’s implementation of MVC, so understanding the core concepts well makes learning other similar MVC frameworks much easier.

To understand MVC, we will look at each layer in some detail. Throughout this article, I will use the classic example of a blog to show how the concepts of MVC work in a real application. In short, the model represents the data. The view represents the user interface (the web page), and the controller facilitates communication between the two.

The three layers of MVC in detail are:

The model

The model represents the data in the application. “Data” in this context means the nouns, or things, in the application that can be abstracted (generally using a database). For example, blogs store posts in a database. In an MVC application, this would imply a model called Post. Post would tell the application what type of data a post contains, which is usually a title, a date, and some body text.

In addition to defining the data that a “thing” would contain, it’s also the model’s job to interact with the database where the actual data for posts are stored, and to implement all logic relating to the creation, fetching, updating, and deleting, and other data manipulation of posts. The model is also built on top of an object-relational mapping (ORM), a system that connects the elements of the model object to the appropriate fields in the database. It will automatically handle all interaction with the database, allowing the developer to avoid writing SQL altogether.

The code in the model is often referred to as business logic. Business logic is all the rules that define data and how to interact with it. By isolating the business logic from the presentation layer, it is easier to write and maintain the logic for the application in a way that is both reusable and transportable (perhaps to another framework) without conflicting with the way the user interacts with it on the web page.

A common example of business logic is validation rules. When a new blog post is made, the application developer may want to ensure that the post has been given a title. This would be enforced by the model, because it is a rule applying to the expected format of the data.

When the new post is submitted via web form, the model looks at the data it receives and checks if it conforms to any validation rules that apply. If there are any errors, such as an empty title field in this case, the model rejects the data, and sends an error back to the user. If the data passes validation, the model will open a connection to the database and save a new post record, using its ORM.

It is a common mistake for developers just beginning with MVC to think of models as simply a fancy name for a database. It’s important to remember that the model is not the database, it’s an abstraction of the data itself, and everything the application knows about what the data is and how it works is part of the model. It is considered good practice to put as much of the code as possible into the model. Try searching Google for fat model, skinny controller for additional details on this idea.

The view

The view is the presentational layer of the application: the user interface. The view will look familiar to web developers who have done mostly procedural programming. For the most part, the view is simply the HTML page. Small bits of inline logic are included, such as simple loops to create tables or just printing dynamic data like in any other server-side script.

The goal in creating a good view is to have as little logic as possible – save the heavy lifting for the model and the controller. A view should be simple enough that someone who only works with markup and doesn’t program, like a designer, can work with it easily.

There will be a different view for each different page in an MVC application. In our blog example, the pages for viewing all blog posts, viewing a specific blog post, adding a new blog post, or editing an existing blog post will all be separate pages, and hence, separate views. Web frameworks that use MVC usually offer a method of dividing the view into even smaller sections to further modularize code.

There are many elements of a single page that will be in common with other pages on a site. Consider the logo and branding, navigation, and footer text. These are usually the same on all pages. To keep from repeating all this code in every view, the view offers us a layout (in Rails parlance), an HTML template that contains all the markup in common to multiple pages. When a page loads, the framework will take the specific view for that page and insert it into the overall layout.

MVC frameworks typically offer other features in the view as well, such as helpers, classes that can be included in order to speed up common tasks such as encoding HTML entities or formatting times and dates. Another common feature is what is referred to in Rails as a partial.

A partial is to the view what the view is to the layout. It’s simply a very small chunk of reusable markup that can be inserted wherever it’s needed. A partial might be used in our blog example to contain the markup for an individual blog post. On the page that shows us one specific entry, this partial would be used just once, but on the index page, where all recent posts are shown, the partial would be called in a loop.

Partials are simply another way to organize the code into small chunks, following the programming practice called Don’t Repeat Yourself (DRY), which is one of the core philosophies of rapid development frameworks like Rails.

The controller

Think of the controller as the translator between the view and the model. The controller receives requests from the view (the user), decides what to do, communicates with the model as necessary to send or retrieve data, and then prepares a response for the user to be delivered back to the view. If models are the nouns of your application, the controllers are the verbs.

The controller is made up of actions, methods that operate on a model. Our blog would have actions for creating, viewing, editing, and deleting blog posts. When a user follows a link in the application, the request is sent through what is called the dispatcher, which accesses the appropriate action in the appropriate controller.

If a user goes visits a link to a single blog entry, the dispatcher will call the blog controller’s show action. The controller will then ask the model for the data for the blog post that the user is requesting. When the controller receives this data from the model, it will set variables with that data and pass it on to the view.

Again, it is common for new MVC developers to put most of their code into the controller. After all, it is the controller that receives data and decides what to do with it. In best practice, the controller will not do any manipulation of data or user interface itself, it will merely translate between the view and the model. It will present the model with requests for data that it can understand, and it will provide the view with data that it knows how to format and present to the user.

The big picture

Now that we’ve seen the details of the M, the V, and the C, let’s try to get an understanding of the big picture by looking at how they all work together. The diagram below illustrates a standard request cycle in an MVC application.

A typical MVC request cycle

The process begins when a user takes an action on a web page – submitting a form that adds a new blog post, for example. The request is sent to the blog controller, which extracts the data submitted via the HTTP POST request and sends a message to the blog model to save a new post with this data.

MVC INTRO-DOT.NET

The model checks the data against its validation rules. Assuming it passes validation, the model stores the data for this new post in the database and tells the controller it was successful. The controller then sets a variable for the view indicating success.

Finally, the view displays this message to the user back on the web page, and they know their new blog post has been successfully created. If, for some reason, validation of the data failed, the model would alert the controller of any errors, which would set a variable containing these errors for the view. The view would then present the original form along with the error messages for any fields that didn’t validate.

Though there is a lot to take in when first learning MVC, it’s really not as complicated as it sounds. Just remember that the model is the data, the view is the user interface, and the controller is the mediator. Even if not using a web framework that uses MVC design, the principles of separating presentation and business logic in an application are very helpful in creating clean, compact, reusable code that will be fun and easy to work with. Once the concepts of MVC are mastered, learning a new framework is a breeze.


NET Framework and Architecture

What is the .NET Framework?

The .NET Framework is a new and revolutionary platform created by Microsoft for developing applications.

It is a platform for application developers.

It is a Framework that supports Multiple Language and Cross language integration.

IT has IDE (Integrated Development Environment).

Framework is a set of utilities or can say building blocks of your application system.

.NET Framework provides GUI in a GUI manner.

.NET is a platform independent but with help of Mono Compilation System (MCS). MCS is a middle level interface.

.NET Framework provides interoperability between languages i.e. Common Type System (CTS) .

.NET Framework also includes the .NET Common Language Runtime (CLR), which is responsible for maintaining the execution of all applications developed using the .NET library.

The .NET Framework consists primarily of a gigantic library of code.

Definition: A programming infrastructure created by Microsoft for building, deploying, and running applications and services that use .NET technologies, such as desktop applications and Web services.

Cross Language integration

You can use a utility of a language in another language (It uses Class Language Integration).

.NET Framework includes no restriction on the type of applications that are possible. The .NET Framework allows the creation of Windows applications, Web applications, Web services, and lot more.

The .NET Framework has been designed so that it can be used from any language, including C#, C++, Visual Basic, JScript, and even older languages such as COBOL.


ASP .NET and AJAX

Ajax (Asynchronous JavaScript and XML) is a method of building interactive applications for the Web that process user requests immediately. Ajax combines several programming tools including JavaScript, dynamic HTML (DHTML), Extensible Markup Language (XML), cascading style sheets (CSS), the Document Object Model (DOM), and the Microsoft object, XMLHttpRequest.

Ajax allows content on Web pages to update immediately when a user performs an action, unlike an HTTP request, during which users must wait for a whole new page to load. For example, a weather forecasting site could display local conditions on one side of the page without delay after a user types in a zip code.


Web Application Deployment

Deployment Overview

Deployment of a Web application is similar to deployment of Connectors, EJBs, and Enterprise Applications. Like these deployment units, you can deploy a Web application in an exploded directory format or as an archive file.

Note: For development and production purposes, BEA recommends that you deploy applications in exploded (unarchived) directory format. This applies also to stand-alone Web applications, EJBs, and connectors packaged as part of an Enterprise application. Using this format allows you to update files directly in the exploded directory rather than having to unarchive, edit, and rearchive the whole application. Using exploded archive directories also has other benefits, as described in Exploded Archive Directories in Deploying WebLogic Server Applications.

Deploying a Web application enables WebLogic Server to serve the components of a Web application to clients. You can deploy a Web application using one of several procedures, depending on your environment and whether or not your Web application is in production. You can use the WebLogic Server Administration Console, the weblogic.Deployer utility, or you can use auto-deployment.

In the procedures for deploying a Web application, it is assumed that you have created a functional Web application that uses the correct directory structure and contains the web.xml deployment descriptor and, if needed, the weblogic.xml deployment descriptor. For an overview of the steps required to package and create a Web application, see Main Steps to Create a Web Application.

Google Maps is one well-known application that uses Ajax. The interface allows the user to change views and manipulate the map in real time. Ajax applications do not require installation of a plug-in, but work directly with a Web browser. Because of the technique's reliance on XMLHttpRequest, early applications worked only with Microsoft's Internet Explorer browser, but most other browsers now support Ajax.

Applications created with Ajax use an engine that acts as an intermediary between a user's browser and the server from which it is requesting information. Instead of loading a traditional Web page, the user's browser loads the Ajax engine, which displays the page the user sees. The engine continues to run in the background, using JavaScript to communicate with the Web browser. User input or clicking on the page sends a JavaScript call to the Ajax engine, which can respond instantly in many cases. If the engine needs additional data, it requests it from the server, usually using XML, while it is simultaneously updating the page.

Ajax is not a proprietary technology or a packaged product. Web developers have been using JavaScript and XML in combination for several years. Jesse James Garrett of the consultancy firm Adaptive Path is credited with coining the name "Ajax" as a shorthand way to refer to the specific technologies involved in a current approach.


Web Application Deployment

Deployment of a Web application is similar to deployment of Connectors, EJBs, and Enterprise Applications. Like these deployment units, you can deploy a Web application in an exploded directory format or as an archive file.

Note: For development and production purposes, BEA recommends that you deploy applications in exploded (unarchived) directory format. This applies also to stand-alone Web applications, EJBs, and connectors packaged as part of an Enterprise application. Using this format allows you to update files directly in the exploded directory rather than having to unarchive, edit, and rearchive the whole application. Using exploded archive directories also has other benefits, as described in Exploded Archive Directories in Deploying WebLogic Server Applications.

Deploying a Web application enables WebLogic Server to serve the components of a Web application to clients. You can deploy a Web application using one of several procedures, depending on your environment and whether or not your Web application is in production. You can use the WebLogic Server Administration Console, the weblogic.Deployer utility, or you can use auto-deployment.

In the procedures for deploying a Web application, it is assumed that you have created a functional Web application that uses the correct directory structure and contains the web.xml deployment descriptor and, if needed, the weblogic.xml deployment descriptor. For an overview of the steps required to package and create a Web application, see Main Steps to Create a Web Application.


Object-oriented programming

Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.

The programming challenge was seen as how to write the logic, not how to define the data. Object-oriented programming takes the view that what we really care about are the objects we want to manipulate rather than the logic required to manipulate them. Examples of objects range from human beings (described by name, address, and so forth) to buildings and floors (whose properties can be described and managed) down to the little widgets on your computer desktop (such as buttons and scroll bars).

The first step in OOP is to identify all the objects you want to manipulate and how they relate to each other, an exercise often known as data modeling. Once you've identified an object, you generalize it as a class of objects (think of Plato's concept of the "ideal" chair that stands for all chairs) and define the kind of data it contains and any logic sequences that can manipulate it. Each distinct logic sequence is known as a method. A real instance of a class is called (no surprise here) an "object" or, in some environments, an "instance of a class." The object or class instance is what you run in the computer. Its methods provide computer instructions and the class object characteristics provide relevant data. You communicate with objects - and they communicate with each other - with well-defined interfaces called messages.

The concepts and rules used in object-oriented programming provide these important benefits:

The concept of a data class makes it possible to define subclasses of data objects that share some or all of the main class characteristics. Called inheritance, this property of OOP forces a more thorough data analysis, reduces development time, and ensures more accurate coding.

Since a class defines only the data it needs to be concerned with, when an instance of that class (an object) is run, the code will not be able to accidentally access other program data. This characteristic of data hiding provides greater system security and avoids unintended data corruption.

The definition of a class is reuseable not only by the program for which it is initially created but also by other object-oriented programs (and, for this reason, can be more easily distributed for use in networks).

The concept of data classes allows a programmer to create any new data type that is not already defined in the language itself.

Simula was the first object-oriented programming language. Java, Python, C++, Visual Basic .NET and Ruby are the most popular OOP languages today. The Java programming language is designed especially for use in distributed applications on corporate networks and the Internet. Ruby is used in many Web applications. Curl, Smalltalk, Delphi and Eiffel are also examples of object-oriented programming languages.

OOPSLA is the annual conference for Object-Oriented Programming Systems, Languages and Applications.


Visual Basic

A version of the BASIC programming language from Microsoft specialized for developing Windows applications. When first released in 1991, it was similar to Microsoft's QuickBASIC. With its visual user interface development tools, Visual Basic became very popular by the mid-1990s. Visual Basic 6.0, which was released in early 1999, was the last version of Visual Basic to be offered as a stand-alone development product. Visual Basic became part of Visual Studio.NET.

Visual Basic for Applications (VBA) is a subset that provides a common macro language included with many Microsoft applications.

Up until VB 5, the Visual Basic compiler only converted the source code written by the programmer into an intermediate language called "bytecode." Starting with VB 5, native executable programs can be generated.

The VB Runtime Module

No matter what the version, in order to run a VB program, the VB runtime module must reside in the target computer. This .DLL file, named VBRUNxxx (up to VB 4) or MSVBVMxx (VB 5 and 6), where x is the version number, contains necessary runtime libraries and also converts programs compiled to bytecode into the machine language of the computer. The runtime DLLs are widely available and typically accompany a Visual Basic application.


Window Presentation Foundation

Windows Presentation Foundation (WPF) is Microsoft's development tool for Web applications and rich client applications. With WPF, developers can use XAML, the Extensible Application Markup Language, to create custom controls, graphics, 3D images and animations that are not available in traditional HTML implementations.

WPF is one of the four main products in Microsoft's.NET Framework 3.0, previously known as WinFX. The other two are the Windows Communication Foundation, or WcF, the Windows Workflow Foundation, abbreviated as either WF or WinWF, and the Windows CardSpace. The .NET 3.0 suite is due to be released around the same time as Windows Vista, Microsoft's upcoming update to its Windows operating system. .NET 3.0 can also be used with Windows XP and the Windows 2003 Server.

Many developers still refer to Windows Presentation Foundation by its code name, Avalon.

You can now avail assistance for your Dot net homework from our competent experts and become the most appreciated student and the most sought professional in DSP. Negotiate unbelievable student friendly deals through our 24/7 customer service on live chat right now.

With our skilled team of experts, we strive to deliver you solutions with the maximum quality in its contents which would contain null plagiarism and follow a detailed approach to customize it in accordance to your needs. All of our professionals work with a determined work ethic and their experience in the field ensures you high grades always.