Providing Intelligent Forms

 <  Day Day Up  >  

The portal requires forms for many reasons, from registration and profiles to creating business transactions. Data should ideally be entered only once. You can choose among several tools to create web forms. This section discusses the pros and cons of these approaches, and the trade-offs in development, functionality, and deployment.

All of these approaches store data as XML. InfoPath was designed from the start as a tool for creating XML documents, Office has been migrating more and more to XML with each new version, and naturally data behind custom .NET forms is stored as XML. The trade-offs center around application functionality, development costs, and ease of maintenance.

Web Forms

As discussed in Chapters 4 and 5, the .NET Framework provides powerful development tools to capture data from users, store and manipulate it as XML, and send it to databases and other destinations. The framework has been the predominant tool selected for EAI implementations , especially when the approach has been chosen by IT consultants who are paid by the hour .

Building .NET web forms is a custom programming effort that offers virtually unlimited control over the look and behavior of the application (see Table 11.1). Forms can be tailored to precisely match the functional requirements for the application and to have the exact user interface you want. There are no extraneous features in custom forms, so less user training may be required.

Table 11.1. Advantages and Disadvantages of Custom .NET Forms

Advantages

Disadvantages

Platform neutral

Development time and cost

No client footprint

No offline use

Easy to update centrally

Printing

Low dependence on versions of client software

Limited product support

No licensing cost

 

Another significant advantage of custom web forms is that they can be deployed on multiple platforms such as workstations, handhelds, and mobile units. They are not tied to the Windows operating system so you can support Unix and Macintosh clients as well.

On the other hand, you pay a price for custom web forms. The most obvious is the expense of developers building them in the first place. Before committing to this investment, you should ensure that your requirements cannot be met with an off-the-shelf system. In addition, typical custom web forms built with .NET do not support offline use; and like all browser-based applications, they may leave something to be desired in the printing department.

Office

With the introduction of native XML support in Microsoft Office XP and newer versions, organizations can take advantage of the familiar interface and rich functionality of these products to perform data entry for transactional systems. For instance, features such as the spellchecker can be handy in a form, and advanced formatting capability is useful in many scenarios.

Microsoft Office is ubiquitous in large and small organizations. You can almost take it for granted that users have Word and Excel, for instance, when sending documents via email. You do not need to conduct training to show users how to enter data in Office programs.

A retail web site could allow users to create orders offline via Excel (Figure 11.2). The company could create a spreadsheet that contained the order form, with fields such as customer name , address, and billing information, and a section for the items and quantities to be purchased. The user would download the spreadsheet from the company's portal. When the order form was complete, the user would click a submit button to execute a simple VBA script that would submit the XML data to a web service on the company's web site. If paying by check, the user could print the spreadsheet and enclose it with the payment.

Figure 11.2. Product Order Form in Excel

graphics/11fig02.gif


For high-quality printed output and control over print attributes and printer settings, Office offers many advantages over a typical browser. Printing is in many ways antithetical to the hardware-neutral browser approach. The ability to print pixel-perfect forms is still needed in many industries, and paper forms are not expected to vanish overnight.

By using Office, users can work offline, which is often not possible with web-based browser applications. This can be a major advantage for mobile workers with no or slow network connections. Data entry speed is not affected by the latency of the network, so users are not frustrated by the pauses between screens that are typically experienced with a browser-based multipage form.

Office provides built-in XML support. When saved as XML, the data in the spreadsheet in Figure 11.2 can be easily imported and manipulated. Figure 11.3 shows a portion of the spreadsheet as XML.

Figure 11.3. Product Order Spreadsheet as XML
 <Cell ss:StyleID="s102"><Data ss:Type="String">Previews Page</Data></Cell> <Cell ss:StyleID="s102"><Data ss:Type="String">Code</Data></Cell> <Cell ss:StyleID="s102"><Data ss:Type="String">Quantity</Data></Cell> <Cell ss:StyleID="s102"><Data ss:Type="String">Title</Data></Cell> <Cell ss:StyleID="s141"><Data ss:Type="String">Retail</Data></Cell> <Cell ss:StyleID="s139"><Data ss:Type="String">Discount</Data></Cell> <Cell ss:StyleID="s141"><Data ss:Type="String">Price</Data></Cell> <Cell ss:StyleID="s102"/> <Cell ss:StyleID="s102"><Data ss:Type="String">Retail</Data></Cell> <Cell ss:StyleID="s102"><Data ss:Type="String">Total</Data><NamedCell   ss:Name="_FilterDatabase"/></Cell> </Row> <Row ss:StyleID="Defau1t">  <Cell><Data ss:Type="String">Page 2</Data></Cell>  <Cell ss:Index="3" ss:StyleID="s160"/>  <Cell ss:Index="5" ss:StyleID="s18"/>  <Cell ss:StyleID="s98"/>  <Cell ss:StyleID="s18"/>  <Cell ss:Index="9" ss:StyleID="s193"/>  <Cell ss:StyleID="s193"><NamedCell ss:Name="_FilterDatabase"/></Cell> </Row> <Row ss:StyleID="Default">  <Cell ss:StyleID="s100"><Data ss:Type="String">***</Data></Cell>  <Cell ss:StyleID="s100"><Data ss:Type="String">Previews and Accessories</Data></Cell>  <Cell ss:StyleID="s159"/>  <Cell ss:StyleID="s100"/>  <Cell ss:StyleID="s129"/>  <Cell ss:StyleID="s101"/>  <Cell ss:StyleID="s129"/>  <Cell ss:StyleID="s105"/>  <Cell ss:StyleID="s99"/>  <Cell ss:StyleID="s99"><NamedCell ss:Name="_FilterDatabase"/></Cell> </Row> <Row ss:StyleID="s152">  <Cell ss:Index="2" ss:StyleID="Default"><Data ss:Type="String">SEP030002</Data></Cell>  <Cell ss:StyleID="s168"><Data ss:Type="Number">1</Data></Cell>  <Cell ss:StyleID="Default"><Data ss:Type="String">PREVIEWS VOL XIII #11 *Special graphics/ccc.gif Discount*</Data></Cell>  <Cell ss:StyleID="s153"><Data ss:Type="Number">4.5</Data></Cell>  <Cell ss:StyleID="s154"><Data ss:Type="Number">0.75</Data></Cell>  <Cell ss:StyleID="s153"><Data ss:Type="Number">1.12</Data></Cell>  <Cell ss:Index="9" ss:StyleID="s153" ss:Formula="=RC[-6]*RC[-4]"><Data    ss:Type="Number">4.5</Data></Cell>  <Cell ss:StyleID="s153" ss:Formula="=RC[-7]*RC[-3]"><Data ss:Type="Number">1.12< graphics/ccc.gif /Data><NamedCell    ss:Name="_FilterDatabase"/></Cell> </Row> <Row ss:StyleID="s152">  <Cell ss:Index="2" ss:StyleID="Default"><Data ss:Type="String">SEP030003</Data></Cell>  <Cell ss:StyleID="s168"><Data ss:Type="Number">2</Data></Cell>  <Cell ss:StyleID="Default"><Data ss:Type="String">MARVEL PREVIEWS NOV 2003 EXTRAS graphics/ccc.gif *Special Discount*</Data></Cell>  <Cell ss:StyleID="s153"><Data ss:Type="Number">0.99</Data></Cell>  <Cell ss:StyleID="s154"><Data ss:Type="Number">0.4</Data></Cell> 

Microsoft is increasing its emphasis on support for XML as a first-class file format for Office. FrontPage 2003 includes new support for building dynamic web sites based on XML, including live views on Word XML, Excel XML, and InfoPath XML documents. FrontPage has also been improved as the preferred customization tool for Windows SharePoint Services and SharePoint Portal Server to provide high-quality page design and manipulation of web part pages.

Office provides quite a different end-user experience from a typical web form. Depending on your requirements, it may be a good fit for your data entry needs. Table 11.2 summarizes the advantages and disadvantages of Office as a form frontend.

Table 11.2. Advantages and Disadvantages of Office Forms

Advantages

Disadvantages

Rich environment

Big client footprint

Widely installed

Version issues

Familiar to users

Future upgrades

Works offline

Maintenance of files

Printing

Licensing cost


The advantages of Office are only conferred on users familiar with Office who have Office installed. The environment is quite rich, and the forms themselves are easily maintained . Printing is a trump card for Office applications, as they offer tremendous control over the look of printed documents. Offline use is a built-in feature with Office, and the richness of formatting and other helpful features is high.

While Office users are quite a large community, you may run into customers who do not have Office or do not want to use it. This is not a cross-platform solution for all operating systems. The Office client has a large footprint, and distributing updates and patches is a challenge. If you do not already own Microsoft Office, you must consider the licensing cost as part of the solution.

InfoPath

A new third option for data entry forms is InfoPath, a product added to the Office 2003 suite. InfoPath was designed from the ground up as a tool that assists with data entry through forms and that creates XML documents. It takes advantage of Office tools such as the spellchecker and advanced formatting, and it follows the task pane model so prominent in Office 2003 (Figure 11.4). A user navigating through the fields with the keyboard or mouse is presented with online help and editing tools as appropriate. For instance, in the Remarks field, users can choose fonts, colors, the spellchecker, alignment, text number ”all the standard word-processing features they might expect.

Figure 11.4. InfoPath Personnel Action Form

graphics/11fig04.gif


This form has been designed to emulate the paper version. You can embed images and other objects in the form. This approach makes the form more familiar to long- term users, though it does not necessarily make the best use of screen real estate. As you wean your users from paper, you could design more streamlined versions of forms that would produce the same data.

Validation is powerful and flexible. For example, the task pane in Figure 11.4 lets a user check the validation rules for the form. The user can save the contents of the form to an XML file for transmission or further processing.

Behind this form is the industrial strength of XML. If you were to save the contents of the form to a file and open that file with Notepad, you could plainly see the data model (see Figure 11.5).

Figure 11.5. Personnel Form Data Viewed as XML
 <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution solutionVersion="1.0.0.26" graphics/ccc.gif href="http://www.govserver.net/sites/         <my:Thru></my:Thru>         <my:To></my:To>         <my:From></my:From>         <my:DutyFrom>active</my:DutyFrom>         <my:StatusTo>retired</my:StatusTo>         <my:StatusChangeDate xmlns:xsi="http://www.w3.org/2001 graphics/ccc.gif /XMLSchema-instance">2003-09-03</my:StatusChangeDate>         <my:ChangeHours>09:00:00</my:ChangeHours>         <my:ServiceSchool>false</my:ServiceSchool>         <my:ROTC>false</my:ROTC>         <my:0versea>true</my:0versea>         <my:Ranger>fa1se</my:Ranger>         <my:Familyproblems>false</my:FamilyProblems>         <my:ExchangeReass>true</my:ExchangeReass>         <my:Airborne>false</my:Airborne>         <my:SpecialForces>false</my:SpecialForces>         <my:OnTheJob>false</my:OnTheJob>         <my:Retesting>false</my:Retesting>         <my:MarriedCouples>true</my:MarriedCouples>         <my:Reclassification>true</my:Reclassification>         <my:0fficerCandidateSchool>false</my:0fficerCandidateSchool>         <my:ExceptionalFamilyMembers>fa1se</my:ExceptionalFamilyMembers>         <my:IdentificationCard>false</my:IdentificationCard>         <my:IdentificationTags>true</my:IdentificationTags>         <my:SeparateRations>false</my:SeparateRations>         <my:LeaveExcess>false</my:LeaveExcess>         <my:NameChange>false</my:NameChange>         <my:Other>false</my:Other>         <my:OtherDesc></my:OtherDesc>         <my:TodayDate>2003-09-16</my:TodayDate>         <my:Remarks>lkjhasd <font face="Lucida calligraphy" size="7" xmlns ="http://www.w3 graphics/ccc.gif .org/1999/xhtml">kaslkjh </font>         <my:certification>HAS BEEN VERIFIED</my:Certification>         <my:Commander>Lt Jones</my:Commander>         <my:ApprovalDate>2003-09-16</my:ApprovalDate>         <my:CopyType>Copy 1</my:CopyType>         <my:LastName>Porter</my:LastName>         <my:FirstName>Jon</my:FirstName>         <my:MI></my:MI>         <my:Grade>COL</my:Grade>         <my:SSN></my:SSN> </my:da_4187> 

InfoPath represents a halfway point between the custom form option and using Office itself for data entry (Table 11.3). Like Office, it is a rich client that can be used offline. It supports sophisticated field validation with features such as repeating areas used to enter a number of responses to a question. As with Office, it requires software licenses to be purchased and installation on each workstation. It is not a cross-platform tool, so your Macintosh and Unix users will need a different approach.

Table 11.3. Advantages and Disadvantages of InfoPath Forms

Advantages

Disadvantages

Rich environment

Big client footprint

Optimized for form filling

Printing

Familiar to users

Future upgrades

Works offline

Distribution of files

Printing

Limited to Windows platform

Not widely installed


You can publish InfoPath forms to shared folders, a web server, or SharePoint Portal Server. You can also send form data directly to a BizTalk server for additional processing, a topic covered later in this chapter. The form can be submitted via HTTP or through a web service. The wizard for publishing forms is extremely simple to use, requiring only the URL of the destination SharePoint site (see Figure 11.6). Forms published to a site cannot be edited there, but they can be overwritten with subsequent versions that are published.

Figure 11.6. An InfoPath Form Library in SharePoint Portal Server

graphics/11fig06.gif


Because InfoPath is a new product, there are few experienced InfoPath developers to be found. You can expect that this situation will change quickly and that Microsoft will make significant changes in the product after version 1.

Now that you have chosen one or more frontends for your portal forms, we turn to the EAI backend processing. We examine some options for building your EAI system. As with forms, we start with custom programming and then turn to the off-the-shelf programs.

 <  Day Day Up  >  


Building Portals, Intranets, and Corporate Web Sites Using Microsoft Servers
Building Portals, Intranets, and Corporate Web Sites Using Microsoft Servers
ISBN: 0321159632
EAN: 2147483647
Year: 2004
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net