Defining the Solution

The new system will be named Invoicer.NET, and will consist of several parts. The core of the new system will be an OrderProcessor component that will run on the server, reading information from the Excel file and committing it to a record in the SQL Server database. This component will run continuously on a server computer and will be implemented as a Windows service. This component is used in both the first and second stage of the design.

Of course, the client won't interact directly with the OrderProcessor component. Instead, the sales manager will receive the e-mail and forward the spreadsheet to the OrderProcessor. Figure 16-1 diagrams the first iteration of the system. Notice that the sales manager just copies the e-mail file to the appropriate directory. The OrderProcessor component uses Windows file system events to ensure that it is notified whenever a file arrives. This is a simple, robust approach to implementing a queue-like behavior. Polling a database or manually scanning a directory would incur more system overhead. Another benefit to this approach is that it is quite effective for a smaller organization that might not have a Web server where it can host an ASP.NET Web site or an XML Web service. However, the sales manager is still a bottleneck and a possible single point of failure for this system because all traffic must be routed through that e-mail.

Figure 16-1. Architecture of the system: stage 1

graphics/f16dp01.jpg

As the system enters its second stage, a dedicated ASP.NET client will perform the task that the sales manager performs manually transferring the files. On the back end, the OrderProcessor will still perform the raw data crunching, but the ASP.NET Web page will enable sales staff to upload their spreadsheets directly. Optionally, a Windows client can be added to perform a similar task through an XML Web service. Figure 16-2 shows both of these approaches.

Figure 16-2. Architecture of the system: stages 2 and 3

graphics/f16dp02.jpg

Finally, a more advanced Windows client can be developed that works natively with an XML Web service and bypasses the Excel layer. We'll explore how you can prepare for this design at the end of this chapter.



Microsoft. NET Distributed Applications(c) Integrating XML Web Services and. NET Remoting
MicrosoftВ® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting (Pro-Developer)
ISBN: 0735619336
EAN: 2147483647
Year: 2005
Pages: 174

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