COBOL and Visual Basic on .NET: A Guide for the Reformed Mainframe Programmer

On the mainframe, you built COBOL CICS screens and you loved what basic mapping support (BMS) mapsets could do for you. Maybe you coded your BMS mapsets manually or maybe you were fortunate enough to have a screen-painting tool that built the mapsets for you. Either way, the concept of designing a screen and assigning attributes to field positions (i.e., length, color , and so on) is something very familiar to you. Well, CICS/BMS, scoot over and make room for Hypertext Markup Language (HTML).

HTML is one of the main languages that you will be working with (directly and indirectly) when you develop the graphical user interface (GUI) portions of Web pages. When you develop Web pages, not only will you have an opportunity to set "field" attributes (font sizes, text color, and so on), but you will also build entire user interface features. In some cases, you will take full advantage of a screen-painting tool (Visual Studio .NET or other software) that will create the HTML code for you. In other cases, you will need to manually modify the HTML code. HTML (currently version 4.01) is used to present documents and information in all types of browsers. Thanks to the World Wide Web Consortium (W3C), HTML is an accepted standard. HTML is multivendor-, multibrowser-, and multiplatform -friendly.

Please familiarize yourself with the following basic HTML terminology:

Using your browser, navigate to any Web site or HTML page of your choice (see Figure 4-3 for an example). Then select View Source from your browser window to view the HTML (shown in Figure 4-4) that is behind the page of the Web site. Viewing the HTML code of Web pages can help you discover new HTML coding techniques.

Figure 4-3: Sample HTML rendered in the Internet Explorer browser window

Figure 4-4: Sample HTML as text data in the Notepad editor

Though the HTML in Figure 4-4 is displayed using Notepad, you could create your own HTML files in Notepad. However, you would be missing out on a lot of great editing enhancements that are available to you. Among many other things, Visual Studio .NET (VS .NET) includes a great editor. [11] This will mean much more to you when you are creating your ASP.NET Web applications and occasionally (with confidence) tweaking the HTML code.

Cross-Reference  

You can find more information on the W3C's HTML Recommendation at http://www.w3.org/MarkUp/ .

The Future of HTML: XHTML

The W3C is now working on the "extension" of HTML: XHTML. They have improved HTML by making it follow some of guidelines that XML follows. Due to sheer volume of the lines of HTML code in existence (responsible for the entire world's Web pages), the move toward XHTML is likely to be slow, not to mention difficult with regard to the cost of justifying a rewrite. Either way, you can adopt XHTML-type habits when you code your HTML files today, which will result in better HTML coding.

Visit the W3C Web site for more information about the XHTML Recommendation: http://www.w3.org/TR/xhtml1 .

 

Eventually, after you become an HTML expert, you will want to add logic to your Web pages. Perhaps you will want to add simple input validation to your Web pages. When you reach that point, you will want to explore the topic of client-side scripting. For your convenience, the next section serves to point you in the right direction.

[9] This basic explanation deals just with "static" HTML pages. In a later chapter (Chapter 14), I discuss Active Server Pages (ASP.NET). With ASP.NET, pages take on a more dynamic nature. The Web server processes the ASP.NET page before sending the resulting HTML page to the client browser.

[10 ] If there was a client-side script (VBScript, JavaScript, or JScript), the interpretation of the script would also occur at this point. In the next section in this chapter, I discuss client-side scripting.

[11] Generally, if a person prefers a tool designed just for Web page design/publishing (minus all of the great power that programming brings ), that person might choose one of the following products to author Web content: WYSIWYG, Dreamweaver 4.0, GoLive 5.0, FrontPage 2002, or Microsoft Publisher.

Категории