Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 6: The User Interface (UI) Dave.

Similar presentations


Presentation on theme: "© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 6: The User Interface (UI) Dave."— Presentation transcript:

1 © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 6: The User Interface (UI) Dave Mercer

2 6-2 Objectives 1.Explain the purpose and common features of the User Interface (UI) 2.Explain how a UI integrates with a business process 3.Design a UI for an ASP.Net Web application 4.Use the Page_Load event with Web forms 5.Use common ASP.Net Server controls on Web forms 6.Discuss the concept of scope for variables and objects 7.Build variables with different levels of scope 8.Explain how ASP.Net Web applications are configured 9.Find Web application configuration files 10.List configuration sections 11.Make configuration file changes

3 6-3 The User Interface (UI) The main objective of a user interface is to allow people to send input to the program, and for the program to communicate back. Programs have interfaces when there is a need for them to communicate with people, either one way or both ways. Programs that perform work-related or task-related functions in which there is human involvement are considered good if the user interface is user-friendly.

4 6-4 Basic UI Requirements For Windows-based applications, the UI consists of a series of screens on which buttons, text fields, drop-down lists, images, and so forth appear. The screens are called Windows, and there may be multiple windows open at any given time. The two main things people do in applications are make choices and perform work. The easier it is for users to make choices and perform work, the more they will probably like your application.

5 6-5 User Interface Design The elements displayed on screens as an application is used should be driven by the expectations of the intended users as much as by the requirements of the application. Other important considerations include: –User demographics –Control and menu layout –Business process –User interface development

6 6-6 What Is a “Good” User Interface? Whether an application’s user interface is considered “good” or “bad” is subjective. Your best bet of designing a good UI is to have lots of feedback from users, an understanding of the main factors affecting your UI design, and a clear idea of the actual business process the UI must support.

7 6-7 Sample Joint Application and Design Development Process 1.Gather all specifications for the application. 2.Interview actual users to understand the business process. 3.Mockup sample screens to verify that the application and UI will support the intended business process. 4.Build a rough application. 5.Enlist your graphic design group to build representative screen mockups for each type of screen your application will display. 6.Create a finished version of the app. 7.Produce and test a finished version of the application.

8 6-8 The Page_Load Event When a user first requests a page in your Web application, the server processes the page in preparation for sending it to the client. This is called page loading. At this point, all the controls on the page can be initialized. In your code-behind page, you will find an event handler (called Page_Load) in which you can place code that will run when the page is loaded.

9 6-9 Scope The concept of scope refers to how variables can be called and how long they live (their lifetime). A good analogy to scope is the concept of local and long distance dialing on the phone system. If you can call someone without adding an area code to the number you dial, they are in the same “scope” as you are.

10 6-10 Scope in VB.Net There are a number of levels of scope in VB.Net. You can set them by the location of your declaration statements with variable declaration keywords such as Dim or Private. These levels may be applied to variables, Sub procedures, and other structures in VB.Net. On a higher level, within VS.Net applications, it is also possible to expand the scope of variables for access by other projects in the same VS.Net application.

11 6-11 Levels of Scope in VB.Net Some variables in VB.Net are only accessible directly by name within their scope. Other variables can be called from outside their scope by adding qualifiers to their names. Scope is set by a combination of location and the declaration keyword used to create them. Scope levels in VB.Net are: –Block Scope –Procedure Scope –Module Scope –Namespace Scope

12 6-12 Caching ASP.Net Applications Caching refers to the practice of saving pages, objects, and so on after they are instantiated for the first time, so that subsequent calls for the same page or object can be answered more quickly because the object does not need to be created from scratch again. Caching is very useful when identical pages or objects are reused. Properly setting up caching is an important part of optimizing your ASP.Net Web applications.

13 6-13 Output Caching and Data Caching Caching of pages (and parts of pages) is called Output Caching, while caching of data is called Data Caching. –Output caching can be accomplished by adding the @ OutputCache directive to your ASP.Net pages, or by using the Response.Cache properties and methods in your code. –Caching of data is accomplished by adding data items as name/value pairs to the Cache object.

14 6-14 Configuring ASP.Net Web Applications ASP.Net Web applications are configured by the developer with configuration files. These files are always named Web.config, except for the machine-wide configuration file named “machine.config”. Changes to these files cause your ASP.Net Web applications to run differently. You can set parameters for security, compilation, browser capabilities, and so forth in ASP.Net Web application configuration files.

15 6-15 The End


Download ppt "© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 6: The User Interface (UI) Dave."

Similar presentations


Ads by Google