Visual Studio 2005 - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Visual Studio 2005

Description:

Distributed applications are composed of disparate resources in multiple ... Strive for a consistence look and feel throughout the site ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 22
Provided by: Chan138
Category:

less

Transcript and Presenter's Notes

Title: Visual Studio 2005


1
Visual Studio 2005
  • VS 2005

2
What VS 2005 Is
  • .Net development environment for distributed and
    dynamic Web applications.
  • Distributed applications are composed of
    disparate resources in multiple locations the
    database might be in New York, the inventory
    control software in Los Angeles, and the data
    entry software in Miami.
  • Dynamic applications enable the user interact
    with the Web.
  • Supports any .Net-compliant language
  • Does not require IIS for debugging
  • File System
  • HTTP
  • FTP

3
Creating a Web Site in VS2005
4
ASP.Net in a Multi-tier Environment
5
ASP.Net in a Multi-tier Environment(cont.)
  • The work done by any application program can be
    divided into three general functions
  • data storage data access logic (DATA SERVICEs)
  • application logic (BUSINESS SERVICEs)
  • presentation logic (USER SERVICEs)

6
The .Net Class Library
  • The .Net class library contains classes for
    building ASP.Net applications (pages).

7
ASP.Net Pages and Web Forms
  • An ASP.Net Web page includes HTML and program
    code.
  • ASP.Net Web Forms can be arranged in two files by
    VS2005- default.aspx contains the actual HTML
    and layout- default.aspx.vb contains the
    majority of the pages code

8
Namespaces
  • A namespace is a hierarchical way to identify
    resources in .Net. It is a system to describe
    where objects are stored.House.FirstFloor.Dining
    Room.ChinaCabinet
  • The examples
  • Imports System.Net.Mail
  • Imports System.Data
  • Imports System.Data.SqlCient

9
Sending Email via ASP.Net 2.0
  • First provide a namespace to the classes in the
    top of your class module as followsImports
    System.Net.Mail
  • Then Create the message bodyDim Mail as New
    MailMessage(From, To, Subject, Body)
  • Specify the mail serverdim ms as new
    SmtpClient(smtp.students.niu.edu)
  • Send the Mailms.Send(Mail)

10
Object Class
  • Object class is a conceptual representation of
    the properties and methods of an object.
  • Object.Property
  • Object.Method
  • WebForm controls appear as objects to your code
    (have properties and methods)
  • Standard Controls
  • Navigation Controls
  • Data Controls
  • Validation Controls
  • Login Controls

11
The ASP.Net Advantages
  • ASP.Net is compiled, not interpreted.
  • Real programming languages
  • Event-based programming model
  • Separate Code from Content
  • Real Debugging
  • Server Controls/User controls
  • Support Web services

12
General Guidelines For Site Design
  • Separate presentation from the business logic and
    the supporting data
  • Strive for a consistence look and feel throughout
    the site
  • Make the site as easy to navigate as possible

13
Creating a Consistent Layout
  • Master Pages define page layout from a single
    location
  • Separate page design from application logic
  • Allow site layout to be updated easily
  • Does not manage control appearance
  • Simple Process
  • Add a Master page to the web site
  • Define the layout in the Master page
  • Create content pages based on the Master page

14
Navigation Controls in ASP.Net
  • A set of tools driven by a description of the
    sites structure in XML (by default, kept in
    Web.sitemap file)
  • Menu
  • SiteMapPath
  • TreeView
  • Auto-generate hyperlinks and formatting

15
XML
  • XML stands for eXensible Markup Language
  • XML is a language defined by the World Wide
    Consortium (W3C at www.w3c.org)
  • W3C sets the standards for the Web
  • HTML is the most popular, but is very limited.
  • XML lets you create your own markup language!

16
HTML Code
  • lthtmlgtltbodygtltpgtltbgtFlat 10Cltbrgt998, Falling
    Cherry LaneltbrgtRonaldsayltbrgtSE2
    8KMltbrgtlt/bgtUKlt/pgtlt/bodygtlt/htmlgt

17
XML Code
  • lt?xml version1.0 ?gt
  • ltShippingForecastgtltSeaState valueFlat
    /gtltTemperaturegt10C lt/Temperaturegt
    ltmBarPressuregt998, Falling lt/mBarPressuregt
    ltWeatherStation LocationCherry Lanegt
    ltSupervisorgtRonaldsaylt/Supervisorgt lt/WeatherStati
    ongt
  • ltWind directionSE beaufortForce2
    /gtltVisibility distance8KM /gtltJurisdiction
    countryUK /gt
  • lt/ShippingForecastgt

18
Why XML?
  • Xml provides structure for your data.
  • Xml is suitable for exchanging information on the
    Internet.
  • People have different information needs, in
    different formats, at different times. In
    addition, many may platform issues to deal with.
    Xml is ideal for this type of situation. You can
    build solutions that exchange data inexpensively,
    anywhere, and anytime.

19
XML Rules
  • The document must have exactly one top-level
    element (or root element). All other elements
    must be nested within it.
  • Elements must be properly nested.
  • Each element must have a start-tag and an
    end-tag.
  • The element-type name in a start-tag must be
    exactly match the name in the corresponding
    end-tag.
  • Element-type names are case-sensitive.
  • Quoted strings can use either single or double
    quotes.

20
Web.sitemap
  • ltsiteMapgt encloses all other tags
  • ltsiteMapNodegt an entry in the menu navigation
    can contain multiple siteMapNodes
  • ltsiteMapNodegt attributes
  • Title the short name of the page displayed in
    the menu
  • Description the long name of the page used in
    the ToolTips
  • url the path of the page can not duplicate

21
Creating Web Applications with Visual Studio 2005
  • Lab1
Write a Comment
User Comments (0)
About PowerShow.com