5.3 Draw.aspx Web Applications
I am just about to finish this tutorial. I have given you a couple of code samples to chew on, but they are pretty simple in nature. Now I would like to present you with a more substantial application, just so that you can see C#, the CLR, the FCL, and .NET in general in action.
This program is called Draw.aspx and is a simple Draw Poker game that runs as a web forms application. Remember that web forms applications run on the server side, and present their UI to the browser as HTML. In fact, the Draw.aspx game can be played by any common browser running on any common OS in the world. The Draw.aspx program must be hosted, however, on a machine running Internet Information Services (which is the only web server at the time of this writing that hosts managed code).
Perhaps I should apologize. Web form applications are a fairly advanced type of managed application (which I cover in detail in several tutorials in this series). So it could be argued that you would be better served with a more typical style of application for your first submersion into C#. But, I am guilty of being excited by the technology, and I wanted your introduction sample application to show off some cool abilities.
In general, I did try to keep Draw.aspx fairly simple. Like all web-sites in general, web form applications must manage state transitions very rigidly. Draw.aspx is so simple that it really only runs in two states. These are the state where a user begins a deal and the state where the user selects cards to hold then draws. The Draw.aspx game is so simple, in fact, that it has no notion of betting, scoring, winning or losing of any kind.
What it does show, however, are some very advanced features. First, you will see that it includes image and control manipulation on an active web page. Second, Draw.aspx shows how the FCL web forms classes adjust their HTML output as needed to support the various browsers. You will see in the Draw.aspx sources a solid introduction to C#, object oriented programming, the FCL collection classes and other utility components, as well as general development in the .NET environment. If you spend some time groveling around in the sources for this sample you will come away with some useful nuggets of information.
Enjoy Draw.aspx. Enjoy C# and the .NET Framework. Have fun, and I will see you in the next tutorial!
Popular Posts
-
<%@page contentType="text/html" import="java.util.*" %> <!-- http://www.roseindia.net/jsp --> ...
-
Syntax of JSP Scriptles are: <% //java codes %> JSP Scriptlets begins with <% and ends %> .We can embed any a...
-
JSP pages are high level extension of servlet and it enable the developers to embed java code in html pages. JSP files are finally compiled ...
-
Learning about Events (Continue) Lets program the Form_Load event. "MsgBox" is Visual Basic command that launch a message box. for...
-
Syntax of JSP Declaratives are: <%! //java codes %> JSP Declaratives begins with with .We can embed any amount of java c...
-
Steps to follow: 1. Write Relation.java as shown in Code-11.5.a below. Please note that the Relation is an interface. (You are welcome to d...
-
package interfaceexercise; // Define an interface with three abstract methods. // Any class that implements this interface has to // impleme...
-
In this section we are going to implement insert data, delete data, and update data using with JDBC database and also using of JavaScript. ...
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Using JavaServer Pages...
-
Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his...
No comments:
Post a Comment