Home > BTI420 ASP.NET dev, Windows > Get ready to create ASP.NET MVC web apps

Get ready to create ASP.NET MVC web apps

January 27, 2013 Leave a comment Go to comments

This document will help second-year students in Seneca’s Software Development (BSD) degree program get started with ASP.NET MVC web development.

This document was most recently updated in January 2013.

As suggested above, the intended audience is students in Seneca College’s Software Development degree program.

This is the first in a series of five posts that enable students to get started with ASP.NET MVC web development. The five posts are:

  1. Get ready to create ASP.NET web apps
  2. Creating your first simple ASP.NET MVC web app
  3. Data persistence choices for ASP.NET MVC web apps
  4. Adding HTML Forms to ASP.NET MVC web apps
  5. Designing an ASP.NET MVC web app (version 1)

.

What you need to know to begin this course

Your professor assumes that you have little or no knowledge of or experience with ASP.NET. In addition, he assumes that you do not have substantive knowledge of and experience with the C# programming language, the .NET Framework, or the Visual Studio development tool.

However, as a result of passing the BSD program’s first two web programming courses (BTI220 and BTI320), you should have knowledge of and experience with:

  • Some DOM, HTML, CSS, and JavaScript (although you will learn more in this course)
  • Some HTTP (you will learn more in this course)
  • Concepts that cover web app operation, request lifecycle, authentication and authorization, state maintenance, and so on

.

In addition, as a result of passing the introductory object-oriented programming course (BTP200), you should have knowledge of and experience with:

  • OOP principles – modeling real-world concepts as software objects
  • Classes as a building block for building apps
  • Classes that “are” things – they typically model (represent) real-world objects
  • Classes that “do” things – they control the app’s logic and flow
  • A comfort level with C syntax

.

The current web development environment

Historically, there has always been two dominant web app dev approaches:

The Model-View-Controller (MVC) software design pattern is now the de facto web app development approach. There are two dominant frameworks – ASP.NET and PHP:

Other than these two, you’ll see some Ruby on Rails and Java solutions (e.g. Spring) out there. What about the future? Who knows… the whole landscape may get upset by something, maybe Node.js.

.

Getting started with ASP.NET MVC web development

How do we get started? We will focus on the tasks that will bring us early success:

  1. Creating an ASP.NET MVC project
  2. Getting started with the development and execution environment
  3. Getting started with Visual Studio 2012
  4. Getting started with ASP.NET MVC and its conventions
  5. Getting started with C# and the .NET Framework
  6. On your own computer, install Visual Studio 2012

.

Create a new project

What is an ASP.NET MVC project?

  • Well, it is basically a folder structure
  • Source code files and other resources
  • Located on your local computer (or a USB memory stick if you are using a College computer)

.

Development environment, version 1 (today/this week)

  • Web browser with its included developer tools
  • Visual Studio 2012, to work with “ASP.NET MVC 4” projects
  • In-app data store(s)
  • Localhost-based web app execution

Development environment, version 2 (soon)

  • Web browser with its included developer tools
  • Visual Studio 2012, to work with “ASP.NET MVC 4” projects
  • In-app and/or hosted data store(s)
  • Windows Azure-based web app execution

.

Let’s get started with Visual Studio 2012

  • I’ll assume little or no prior knowledge
  • Start, stop, new, re-open, etc.
  • IDE layout – menu, solution explorer, output window

.

Getting started with ASP.NET MVC and its conventions

  • Create a project (and re-open it later)
  • Kinds of projects, and what you should use for the next few weeks
  • Examine/inspect a project’s structure, and its components, and conventions that you need to know now
  • What is MVC? Explain…
  • Where’s the M, V, and C parts?

.

Getting started with C# and the .NET Framework

  • It has a familiar C-style syntax
  • However, all the pain is gone
  • “Top Ten”, coverage coming soon
  • History of C#, Peter’s brief version

.

The two main things that new devs need to know about ASP.NET MVC:

  1. The front controller pattern, in that a URL does not reference a file system resource
  2. The app dev process relies on programming conventions

If you have trouble learning both of these, you will not be successful in this course

.

How does the front controller pattern work?

  1. When you request a resource in an ASP.NET MVC app, the ASP.NET runtime receives the request
  2. The URL is inspected, because it will determine what happens next
  3. The request is routed to a specific method in a specific “controller” class

.

Let’s create a project… File > New > Project… What are the choices?

Basic

  • Infrastructure
  • No controllers or views, therefore no pages

Internet

  • Infrastructure
  • AuthN and AuthZ infrastructure
  • Home controller and Index, About, and Contact methods

Until further notice, use the “Basic” project type. The project name doesn’t really matter today, so you can call it “project1”.

.

Summary, and what’s next

In this post, you learned about the current state of web app development.

We also covered the tasks you needed to perform to get ready to develop ASP.NET MVC web apps. Finally, you learned something about the kinds of projects that you can create in Visual Studio.

In the next post, you will create a simple ASP.NET MVC web app.

.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: