Chapter 1: Setting up a Master

Chapter 1: Setting up a Master Toolbox 7 Browser and Version Platform Reason Needed IE 5.01 Windows Still in widespread use; has bugs, and should be used in testing Netscape 4.7 Windows Problematic browser because of partial CSS support. Despite the fact that it s over four years old, this browser remains on many institutional systems due to security and application concerns Mozilla Windows, Macintosh, Linux, and others Sophisticated browser with excellent standards support, cross-platform consistency, and an excellent browser for development Opera Windows, Macintosh, Linux, and others Good browser for CSS testing; OperaShow is an excellent CSS-projection feature not found in other browsers. The Macintosh version has not been advanced as far as other versions IE 5.0 Macintosh Popular browser used by many Macintosh users, especially those on operating systems earlier than OSX Safari Macintosh Sophisticated browser from Apple, of growing interest within the Macintosh community, but only available for OSX and above. Is the default browser on all new Apple computers Lynx Windows, Macintosh, VMS, UNIX Text-only browser helpful in testing for accessibility purposes note You can now run more than one version of IE on a given machine. This was only recently made public when a bug was found in the developer upgrade to IE 6.0. See www.skyzyx.com/archives/000094.php for more information. For a pay-per-view testing service, see www.browsercam.com/, which allows you to see your work on a variety of browsers and platforms you might not have for a reasonable fee. You can see how your site looks in the current version of Safari at www.danvine.com/icapture/, and to see how your site will look in the Konqueror browser, visit http://kcapture .eadz.co.nz/. My personal favorite browser in which to develop sites is Mozilla (see Figure 1-3). The reason is because there are a number of tools both within it and available for it so it becomes an ideal working environment (you can get similar functionality

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Unix Web Hosting services

6 Part I: Tools, Planning, and Content

6 Part I: Tools, Planning, and Content What can you do to navigate these difficult waters? The secret boils down to having a twofold approach. Select the browser you want to use for development Have a range of browsers to emulate your client s needs Fortunately, there are ways of determining which browsers you ll want to have for testing. One way is from general statistics, which show you that at this time, IE 6.0 is considered to be the most used browser on earth (see Figure 1-1). You can also look at your own server logs, which tell you the browsers visiting the sites in question (see Figure 1-2). Figure 1-2: Browser usage from Molly.Com, Inc. shows me which browsers are being used to access my Web pages. While you should always use statistics as a determining factor in how you will design and test a given site, you will want some specific browser in your toolbox no matter what (refer to Table 1-1). Ideally, you ll also have more than one platform to work on at the very least a version ofWindows and Macintosh operating systems. However, this is not entirely necessary, and I provide some helpful tips here if you don t have the luxury of more than one available testing machine. Table 1-1: Web Browser Toolbox Browser and Version Platform Reason Needed IE 6.0 Windows Considered the most commonly used browser IE 5.5 Windows Common browser, specific bugs in CSS support that require testing

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Unix Web Hosting services

Chapter 1: Setting up a Master

Chapter 1: Setting up a Master Toolbox 5 as to where you can find the tools in question. You re sure to find something new and helpful to add to your kit. Secret #1: Web Browsers AOL has closed Netscape s doors, and Microsoft has announced that no more standalone Internet Explorer (IE) versions will be produced and is waiting instead for the Longhorn Operating System, which includes an integrated browser. New browsers have been entering the market with somewhat daunting regularity Apple Safari has fast become popular among many Mac users, and Mozilla Firefox is attracting users who want a lean but sophisticatedWeb browser. Opera continues to improve quietly, and Mozilla continues to develop its capabilities, now under the auspices of a nonprofit agency, The Mozilla Foundation, whose goal is to preserve choice and innovation on the Internet. Browsers are clearly political. It s very difficult to write about Web browsers at this time because they are in such a state of flux, and historically have been in a state of flux. Web browsers have been a number one concern for designers. The Web browser is the primary piece of software used by the designer and the site visitor to access Web pages. As a result, the ways in which browsers interpret (or don t interpret) the languages and techniques we use to design our pages can cause significant frustration for both the designers and site visitors. Figure 1-1: As of this writing, Internet Explorer 6.0 for Windows is felt to be the most used browser.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services

Part I: Tools, Planning, and Content Why

Part I: Tools, Planning, and Content Why start a book on Web design secrets with tools? Shouldn t that be something left for an appendix, perhaps? After all, you want to get right down to the nitty-gritty, and I appreciate that. As any working Web designer knows, the master designer really needs very few tools at hand to create the ultimateWeb design toolbox. A great designer can make do with a text editor, a Web browser, an imaging software program, and an FTP client. So why all the fuss? Well, for one thing, in today s busy, mobile world, most Web designers work requires a range of specialty tools to help make life easier. This chapter comes first because I have an agenda. My goal is to celebrate the ideologies of the Web itself: open standards, cross-platform interoperability, accessibility, and portability. So while you ll find plenty of familiar commercial tools in this chapter, what you ll also find is a range of alternatives that are designed under open source licenses and that are available across platforms. In today s economic environment, many professional programs can cost significant money, making a comprehensive toolbox seem at first glance to be costprohibitive. Yet the Web is filled with alternative software that is either distributed under GNU open source licensing, as freeware, or as low-cost shareware. While typically the open source tools were in use on UNIX and related open source platforms such as the many variants of Linux, there have been many recent ports to Windows and Mac OS X. As a result, a world of free or very low-cost tools has opened up to theWeb designer. This chapter points you to those resources wherever available. note GNU licensing refers to licenses distributed under the GNU project, which first emerged as an alternative to UNIX systems, resulting in the now very popular Linux program, and related operating systems. The GNU project is part of the Free Software Foundation, whose mission is to preserve and promote free software. More information on this important alternative form of software distribution can be found at www.gnu.org/. The tools in this chapter help you to do the following: Author markup and CSS with ease Create great Web graphics Validate pages Test sites in a range of Web browsers Draw in vector-based environments Use bitmap imaging tools for Web graphic production Design animations Use plug-ins for video and audio Convert and clean up documents Compress documents While this chapter won t tell you how to use these tools, it will tell you which utilities you might want to consider adding to your toolbox; give guidance as to which tools are considered most useful and sophisticated, and provide resources

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Java Web Hosting services

Other Web APIsSo far in this book, you

InterFax charges per page to use the service, and you purchase a prepaid number of pages beforeusingthe service. More information about pricing is available online at http://www.interfax.net/ scripts/prices.asp?lang=en. For example, at the time of this book s writing, faxes can be sent usingthe service for a charge of approximately 7 cents to 11 cents per page depending on volume. InterFax offers a free developer program that allows you to send unlimited faxes to a single fax number, such as to your own fax number, for testing your programs. I ll quickly walk you through the steps forobtaining a developer registration and sending a test fax using the service. Setting Up a Free Developer AccountTo set up a free developer account, go to http://www.interfax.net/en/dev/index.html, as shownin Figure 7-1. Figure 7-1Click the Sign Up Now link and fill in the information requested on the registration form shown inFigure 7-2. 164Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services

Other Web APIsSo far in this book, you

Other Web APIsSo far in this book, you have explored several leading APIs in detail. This chapter provides a verybrief introduction to some additional Web APIs. You will also learn how to locate additional APIsfor use in your programs. This chapter specifically covers the following: .An introduction to InterFax faxing Web API .An example of sending a fax programmatically from Visual Studio .NET .An introduction to the UPS API .An example of submitting a request to the UPS API .An introduction to the FedEx API .An example of submitting a transaction using FedEx Ship Manager Direct .An introduction to the Bloglines API .Information on how to locate additional Web service APIsIf you want more information about any of the Web APIs covered in this chapter, visit the respec- tive Web sites. Comprehensive documentation and code examples are available for each of them. Faxing APIsIf you are like me, I m sure that at times you have wanted to send a fax from your computer with- out using a phone line. Luckily for us, fax Web APIs are available today that enable us to sendfaxes from our own programs with just an Internet connection. For example, a company calledInterFax Inc. (www.interfax.net) offers an XMLWeb service that allows faxes to be sent withand without file attachments to one or more fax numbers worldwide.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services

request.RefundTransactionRequest.Version = 1.0 request.RefundTransactionRequest.TransactionID = ID of your

Because PayPal has provided a test client called API Client that illustrates how to use each of the avail- able methods, they are not covered in this chapter. Please visit the Help Center in the PayPal DeveloperZone for more information on downloading the API Client project. Other Ways to Use the PayPal APIIn the previous section, you looked at an example of how to use the PayPal API in your applications. Here are a couple of other ideas of how you might use the PayPal API: .Perform a search for transactions that were denied so you can follow-up with those customersto make alternate payment arrangements. .Perform a search for transactions that were processed over a particular time period to calculateyour total sales revenue. Third-Party PayPal ExtensionsVarious third parties offer solutions that work with PayPal, including some that use the API. You canfind a list of what some of these third parties have done on the PayPal Web site. The list is currentlylocated at: https://www.paypal.com/us/cgi-bin/webscr?cmd=p/pdn/3p-solutionsSummaryPayPal is a leading online payment provider that allows buyers and sellers to exchange funds in variousways. Buyers can securely provide credit card and other payment methods to PayPal and then PayPalhandles disbursement to the specified merchant. PayPal has made various features available in an API tomerchants so that the transactions can be managed from custom programs. You learned the various fea- tures supported by the PayPal API, as well as how to call the API using SOAP. Additional examples areprovided in the API Client project in the Help Center of the PayPal developer site, as well as in the otherdocumentation contained on that site. With PayPal under your belts, let s turn to Chapter 7 where you learn about several additional APIs, including InterFax, UPS, FedEx, and Bloglines. 162Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services

request.RefundTransactionRequest.Version = 1.0 request.RefundTransactionRequest.TransactionID = ID of your

request.RefundTransactionRequest.Version = 1.0 request.RefundTransactionRequest.TransactionID = ID of your transaction Dim response As New PayPal.RefundTransactionResponseTyperesponse = pp.RefundTransaction(request) Exit Subhandle_error: MsgBox(Err.Description) Exit SubEnd Sub9.Input your specific User Name, Password, .CER Certificate location/name, and Transaction the lines of code where indicated. 10.Select File.Save All to save all changes to the project. 11.Select Debug.Start (or press F5) to run the project. Click the button to run the example. 12.After the operation finishes successfully, log in to the test personal account that you used earlierto perform the transaction. That is the account that should receive the refund. 13.Upon logging in to that account, you should see a window similar to Figure 6-13 that displays entry from the test business account. Figure 6-13These materials have been reproduced with the permission of PayPal, Inc.Copyright 2003 PayPal, Inc. All rights reserved.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services

.Payer E-mail address of buyer. .Receiver E-mail address of receiver.

Executing a QueryNow that you have a basic idea of the types of operations supported by the PayPal API, let s look atsome simple code examples to see how they work. PayPal API calls can be executed using SOAPopera- tions. As you recall, with SOAPoperations, you have to specify the location of the WSDLfile thatdescribes the Web API and then create a proxy so that your program knows how to communicatewiththe Web API. Visual Studio .NET handles the creation of the proxy for you when you add a Webreference. Walkthrough Example Calling the PayPal API Using SOAP from Visual Studio .NETLet s walk through a step-by-step example of using SOAPto call the PayPal Web service from VisualStudio .NET. In this example, you call the RefundTransactionoperation to fully refund a prior trans- action that you manually created earlier in this chapter. 1.Open Visual Studio .NET and select File.New.Project. 2.Select Visual Basic Project as the Project Type, and select Windows Application as the Template. For the project name, specify PayPalSample, and for the path, specify the location where youwant the project to be created. Click OK to create the new project. 3.Drag and drop one command button from the Toolbox onto the form. 4.Add a reference to the PayPal API by selecting Project.Add Web Reference. For the URLfield, specify the location of the WSDLfile, such as: www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl5.Click the GO button so that Visual Studio can locate the PayPal Web API. 6.Change the Web Reference Name to PayPalso that you can use a shorter name in your project. 7.Click the Add Reference button to add the reference to your project. Visual Studio .NET uses theWSDLfile to identify the methods that are available for execution from your project. 8.Add the following procedure to Form1to the Clickevent of the second button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles Button1.ClickOn Error GoTo handle_error create a reference to the paypal serviceDim pp As New PayPal.PayPalAPIInterfaceService set the required credentials for using the servicepp.RequesterCredentials = New PayPal.CustomSecurityHeaderTypepp.RequesterCredentials.Credentials = New PayPal.UserIdPasswordTypepp.RequesterCredentials.Credentials.Username = Your PayPal DevZone userid pp.RequesterCredentials.Credentials.Password = Your PayPal DevZone pwd pp.RequesterCredentials.Credentials.AuthCert = my_paypal_certificate.cer pp.Url = https://api.sandbox.paypal.com/2.0/ Dim request As New PayPal.RefundTransactionReqrequest.RefundTransactionRequest = New PayPal.RefundTransactionRequestType160Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services

.Payer E-mail address of buyer. .Receiver E-mail address of receiver.

.Payer E-mail address of buyer. .Receiver E-mail address of receiver. .ReceiptId PayPal Account Optional Receipt ID. If specified, other search values ignored. .TransactionId Transaction ID of the buyer or seller. If specified, other search values ignored. .InvoiceId Invoice identification key as set by merchant for original transaction. .PayerName Various name combinations. .AuctionItemNumber Auction Item Number. If specified, other search values ignored. .TransactionClass Classification (examples include All , Payments , Sent , Received , and so on). .Amount Transaction amount that was charged to the buyer. .CurrencyCode Currency code to search for (examples include USD , GBP , EUR , andsoon). .Status Status of transaction (examples include None , Completed , Failed , Pending , Denied , and so on). The TransactionSearchmethod responds by returning a TransactionSearchResponseobject about the transactions meeting the specified criteria. GetTransactionDetailsThe GetTransactionDetailsmethod requests details about a payment. Currently, theGetTransactionDetailsRequestobject that is passed to the GetTransactionDetailsobject sup- ports the following properties: .TransactionId Required. Unique identifier for a transaction. .Version Required. String that represents the version of the response schema (currently The GetTransactionDetailsmethod responds by returning a GetTransactionDetailsResponseobject with details about the particular transaction. MassPayThe MassPaymethod allows a merchant to make payment distribution requests. The MassPayRequestobject that is passed to the MassPaymethod currently supports the following properties: .EmailSubject E-mail subject to use in e-mail to recipients. .ReceiverEmail Required. E-mail address of recipients. .Amount Required. Amount to send to each recipient. .UniqueId Unique ID for each recipient to be used for tracking purposes. .Note Customized note for each recipient. The MassPaymethod responds by returning a MassPayResponseobject with details about the successor failure of the request.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services