Web Server Programming
description
Transcript of Web Server Programming
Web Server Programming
Web Server ProgrammingVisual StudioCreating a Simple ASP.NET ApplicationContentThe .NET FrameworkVisual Studio 2012 EnvironmentA Simple ASP.NET Web ApplicationMuzaffer DOAN - Anadolu University2The .NET FrameworkMuzaffer DOAN - Anadolu University3The .NET Framework.NET Framework is a cluster of several technologies:.NET Languages: C#, Visual Basic.NET, JScript.NET, J#, C++The Common Language Runtime (CLR): The engine that executes all .NET programsThe .NET Framework Class Library: The class library for many prebuilt functionality (e.g. ADO.NET, Windows Forms, etc.)ASP.NETVisual Studio.NETMuzaffer DOAN - Anadolu University4.NET LanguagesC# is designed for .NET technologyC# and VB.NET uses the same .NET libraryC# and VB.NET codes are very similarVB6.0 and VB.NET are different languages because VB.NET is an object-oriented languageA C# programmer can easily understand and convert VB.NET programsMuzaffer DOAN - Anadolu University5Intermediate Language (IL)All .NET languages are compiled into another low-level language before the code is executedThis lower-level language is the Common Intermediate Language (CIL, or just IL)Because of this feature, C# programs can use VB.NET (or any other .NET language) componentsEvery EXE or DLL file built with a .NET language contains IL code.NET Framework should be installed on the computer that the .NET program is deployedMuzaffer DOAN - Anadolu University6CompilationMuzaffer DOAN - Anadolu University7
ExecutionMuzaffer DOAN - Anadolu University8
.NET Class LibraryMuzaffer DOAN - Anadolu University9
Common Language Runtime (CLR)Muzaffer DOAN - Anadolu University10
History of .NETMuzaffer DOAN - Anadolu University11
.NET Framework VersionsMuzaffer DOAN - Anadolu University12
Whats New in the .NET FrameworkMuzaffer DOAN - Anadolu University13
Muzaffer DOAN - Anadolu University14
ASP.NET VersionsASP.NET 1.0: First releaseASP.NET 1.1: Added performance, bug-fixes but no new featuresASP.NET 2.0: Prebuilt goodies that developers can use without writing much code. New features: Website navigation, easier database access, theming for web page designASP.NET 3.5: Embedded Ajax, LINQMuzaffer DOAN - Anadolu University15Now, in this course?In this course, well be developingASP.NET 4.5 applicationsover .NET Framework 4.5 on Visual Studio 2012 using C# 5.0.Muzaffer DOAN - Anadolu University16Visual Studio 2012Muzaffer DOAN - Anadolu University17Visual Studio FeaturesPage Design: Drag & drop style; you dont need to understand HTMLAutomatic Error DetectionDebugging ToolsIntellisense: Statement completion for recognized objects and listing information automaticallyMuzaffer DOAN - Anadolu University18Visual Studio 2012A powerful integrated development environment (IDE)Automates the steps required to compile source codeIntelligently detect errors and suggest code where appropriate as you are typing (Intellisense)Includes designers, enabling simple drag&drop design of UI elementsIncludes starter projectsEnables deploymentEnables debuggingetc.19Visual Studio VersionsVisual Studio ProfessionalVisual Studio PremiumVisual Studio UltimateVisual Studio Express Edition: Free, but some features are absentVisual C# Express: Contains only C#Visual Web Developer Express: Contains only web application tools20Visual Studio SolutionsYou create solutions in Visual StudioSolutions contain projectsSolutions can contain multiple projectsThis enables you to work on shared code2122
Solution ExplorerProperties WindowToolboxDesigner23
Source CodeSolutionProjectSource FilesCreating an ASP.NET Web Page2425
Do NOT select File -> New -> Project -> ASP.NET Web Forms Application26
27
Right-click the project name and select Add -> Add New Item
(equivalently: Add -> Web Form)28
29
Switch to Design View30
Put a Label, press the Enter key, and put a Button31
Double-click the button32
Write the code and press Ctrl-F533
Click the button34