My ASP.NET Work Activities
I have not read any blog entries about how developers are using ASP.NET in their work so I thought I'd write about my current projects. I think a professional blog should be used to keep your clients and colleagues informed about your work activities, project progress, and current research or studies.
Currently I am working a project that requires me to generate a PDF based on data supplied by an online form. Unfortunately there are over 200 form fields required so progress has been very slow. With that many form fields and associated database table columns, I have written a few scripts to generate ASP.NET code. I wrote scripts to define all the variables and variable assignments for hundreds of webcontrols. I used regular expressions for that and learned more about backreferences and submatches in VBScript.
I tried to use ceTe Software's DynamicPDF Designer and DynamicPDF ReportWriter for this project but it was very tedious to design the PDF entirely through code. The DynamicPDF Designer is an interesting tool, similar to Visual Studio with its own toolbox, properties window and design view but it was unable to import an existing PDF and that forced me to completely recreate a 5 page PDF.
Fortunately, I read an article about iTextSharp, a port of the iText, a free Java-Pdf library. I was able to import an existing PDF into Adobe LifeCycle Designer and get information on all the AcroFields. Now I am writing the ASP.NET code to populate the AcroFields with data from the SQL Server database and generate a PDF form that has been filled out with the required data.
I will probably use this on another project that also requires me to generate PDFs based on templates with data pulled from a database. Currently that project is also using Word RTF templates with fields defined by brackets. My ASP.NET code reads in the Rich Text File and replaces the brackets with data from the database. Unfortunately this requires me to figure out some RTF syntax to format text and the template file is very fragile. Making a minor edit to the template will often screw up my fields.
I am also working on many projects to customize the Storefront 6.0 ecommerce shopping cart from LaGarde. This shopping cart was developed in ASP.NET 1.1 and has never been upgraded for ASP.NET 2.0. That is the biggest reason for me being so unfamiliar with ASP.NET 2.0. Storefront 6.0 has had 8 service packs but now its development has been abandoned so there is a high demand for fixes, customizations, and maintenance by ecommerce sites that are deperate for support. Storefront 6.0 requires 5 projects in a solution and there are a huge number of classes. Fortunately I have found a way to make my work easier using the log4net logging service. Log4net allows me to "instrument the code" so I can figure out if a method is being called and if its variables have the expected value. This would all be a lot easier if I could use Visual Studio 2005 and ASP.NET 2.0.
This week I fixed a problem with the Freightquote component of Storefront 6.0. They made a slight change to the syntax of the XML request you make to their web service for obtaining shipping quotes. Apparently the developer of Storefront 6.0 is not going to bother to fix this. I will also be troubleshooting a problem with the changes USPS made to their web service.