Upload
angela-peters
View
216
Download
0
Embed Size (px)
Citation preview
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Module 2
Creating Web Applications by Using Microsoft®
Visual Studio 2010 and Microsoft .NET–Based
Languages
Ing. Taylor Figueroa HDOCENTE UNIVERSIDAD ECOTEC
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Module Overview
• Choosing a Programming Language
• Overview of Visual Studio 2010
• Creating a Simple Web Application
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Lesson 1: Choosing a Programming Language
• Features of Visual Basic
• Features of Visual C#
• Scenarios for Mixed-Language Environments
• Considerations for Choosing Between Visual Basic and Visual C# for an Application
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Visual Basic 10.0 can be used for developing any type of .NET Framework application or service
CLR helps to reduce memory waste from unclaimed objects
Visual Basic Text Editor features the color-coding of keywords, variables, constants, and statements
Visual Basic command syntax is based on English language constructs
Visual Basic is case-insensitive
Features of Visual Basic
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Features of Visual C#
Is the most popular .NET programming language
Is based on English language keywords
Has short syntax, and all statements are terminated by a semicolon
Allows some unsafe language constructs
Is similar in syntax to JavaScript
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Scenarios for Mixed-Language Environments
When working with both Visual Basic and Visual C#When working with both Visual Basic and Visual C#
When working with blocks of code, or with entire projects and solutions in the language less preferredWhen working with blocks of code, or with entire projects and solutions in the language less preferred
When working with projects and solutions of code in mixed programming languagesWhen working with projects and solutions of code in mixed programming languages
When you master the preferred language and can at least understand the code in the less preferred language
When you master the preferred language and can at least understand the code in the less preferred language
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Considerations for Choosing Between Visual Basic and Visual C# for an Application
Do you prefer Visual Basic or Visual C#?
Do you need to work with legacy applications?
What is the available development time for writing the code?
Do you reuse the existing .NET Framework code?
Do you use default namespaces?
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Lesson 2: Overview of Visual Studio 2010
• Advantages of Using Visual Studio 2010
• Available Project Templates
• Features of the Integrated Development Environment
• Visual Studio 2010 Start Page
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Simplifies application development:
• Navigable design and code windows
• Built-in debugging support
• Integrated Web browser
Learn the IDE once:
• Single IDE for multiple project types
• Single IDE for Visual Basic, Visual C#, Visual C++,
and Visual F#
• Increases developer efficiency
Advantages of Using Visual Studio 2010
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
The list of available project templates is based on your project type and template selections The list of available project templates is based on your project type and template selections
Available Project Templates
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
ToolboxToolbox
Server ExplorerServer Explorer
Output paneOutput pane
Solution ExplorerSolution Explorer
Properties paneProperties pane
Features of the Integrated Development Environment
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Recent Projects Recent Projects
Get Started Get Started
Latest NewsLatest News
Guidance and Resources
Guidance and Resources
Visual Studio 2010 Start Page
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Lesson 3: Creating a Simple Web Application
• Web Application Development Process
• Web Application Project Files and Folders
• Web Site Project Files and Folders
• Choosing Between a Web Site and a Web Application Project
• Web Application Files
• Deploying a Web Application
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Visual Studio 2010 automatically creates the required files and the default code when you create a new project or Web siteVisual Studio 2010 automatically creates the required files and the default code when you create a new project or Web site
Design Design 11
Develop and DebugDevelop and Debug22
DeployDeploy33
Web Application Development Process
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
In Visual Studio 2010, you can create a Web application project by using the ASP.NET Web application project templateIn Visual Studio 2010, you can create a Web application project by using the ASP.NET Web application project template
Web Application Project Files and Folders
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
In Visual Studio 2010, you can create a Web site project by using the ASP.NET Web site project templateIn Visual Studio 2010, you can create a Web site project by using the ASP.NET Web site project template
Web Site Project Files and Folders
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
The choice of a project template depends on your requirements and your
preferred development workflow
The choice of a project template depends on your requirements and your
preferred development workflow
ASP.NET Web application project template
• The Web application project template provides a tighter control over the project, because resources are defined explicitly
• The Web application is opened from within Visual Studio 2010 by using the Open Project dialog box
ASP.NET Web siteproject template
• The Web site project template is easy to use, because resources are defined implicitly by being in a folder
• The Web site is opened from within Visual Studio 2010 by using the Open Web Site dialog box
Choosing Between a Web Site and a Web Application Project
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Web application files are files that support the development of your Web application:Web application files are files that support the development of your Web application:
Other files
Files that are not based on a programming language will have their own extensions. For example, a Report file uses the .rdlc extension, and a text file uses .txt
Web application files
Visual Studio 2010 supports a number of application file types and extensions, such as ASP.NET Web Forms (.aspx), master pages (.master), and classes and code-behind pages (.vb or .cs)
Web Application Files
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
Creating a Web application project
Write code for the Button control
Populate the ASP.NET Web Form
Build and debug the solution
Demonstration: How to Create a Simple Web Application Project
UN
IVER
SID
AD
TEC
NO
LÓ
GIC
A E
CO
TEC
. ISO
9001:2
008
After creating and testing your Web application, you can build and
deploy the Web application
After creating and testing your Web application, you can build and
deploy the Web application
After development and personal testing, use
the test server for testing the Web application
After development and personal testing, use
the test server for testing the Web application
After testing, deploy the Web application to the
production server
After testing, deploy the Web application to the
production server
Deploying a Web Application