Toolbox

WiX Installation, Creating PowerPoint Decks, and More

Scott Mitchell

Contents

Create WiX Installation Files
Create PowerPoint Presentations Programmatically
Source Control for Projects Big and Small
Six Degrees of SQL Hacks

Create WiX Installation Files

Most Windows-based applications today are set up using the Windows® Installer, which is an engine for installing, repairing, and removing applications. When installing an application, the relevant information and files are packaged into an MSI file.

There are many open-source and commercial tools for creating MSI files. One popular open-source option, spearheaded by Rob Mensching, is the WiX toolset from Microsoft, which provides command-line tools that process an XML file to generate an MSI file. The command-line environment allows for integration with automated build processes. By using an XML file to specify the installation package's details, this information can be maintained in source control and inspected and modified programmatically. However, command-line tools and XML files are much harder to master.

Creating installation packages using WiX can be as easy as point and click with WiXAware 1.0 by InstallAware Software Corporation. WiXAware is a GUI for creating, editing, validating, building, and installing MSI packages using the WiX toolset. Rather than having to enter the XML source file's content by hand, WiXAware lets you navigate the XML document via a tree, adding new elements and attributes through property windows and dialog boxes. And WiXAware works directly with the native WiX XML source file, so it can still be maintained in source control and edited by other developers or utilities through the raw XML format.

Creating an Installation File with WiXAware

Creating an Installation File with WiXAware(Click the image for a larger view)

WiXAware is much more than just a graphical XML editor, though. It includes a graphical designer that you use to build custom user interface screens, and offers tools for validating installation packages using the Microsoft Internal Consistency Evaluators (ICE) and WiXCop, a validation tool created by Derek Cicerone. At the click of a button, WiXAware will compile and link the XML source file, creating the installation package. The installation package can then be executed with the MSI log output to the Debug window.

Creating MSI installation packages can be accomplished using a variety of tools. If you currently use or are considering using the WiX toolset, check out WiXAware. It simplifies creating, editing, validating, and building the XML source files, thus improving productivity and easing WiX's learning curve.

Price: $499 for a single-user license.

www.wixaware.com

Create PowerPoint Presentations Programmatically

Reporting is an integral part of any business application. Commonly, these reports are delivered through a Web page, PDF document, or Microsoft® Excel® spreadsheet. It's rare for reports to be available as Microsoft PowerPoint® applications, yet that is the document format of choice for managers, the sales staff, and others who use report data in meetings and presentations. These users must often resort to copying and pasting report data into their presentations. So why not give these users the report data directly in PowerPoint?

Aspose.Slides for .NET version 2.6, from Aspose Pty Ltd., provides a library for programmatically creating, opening, reading, modifying, saving, and converting PowerPoint files. It supports all versions from PowerPoint 97 to PowerPoint 2007 and can be used to work with PowerPoint Presentation (PPT), PowerPoint Template (POT), and PowerPoint SlideShow (PPS) files. With the Aspose.Slides for .NET intuitive class library, working with PowerPoint presentations is a breeze. To create a new presentation, simply create an instance of the Presentation class; to open an existing presentation, just pass the file name to the Presentation class's constructor. The various pieces of a PowerPoint presentation-slides, text, tables, pictures, and so on-all have corresponding classes with straightforward members. With a surprisingly scant amount of code, you can retrieve your report data and render it as a PowerPoint presentation. Aspose.Slides for .NET also makes it easy to convert PowerPoint to PDF.

Aspose.Slides for .NET directly generates the binary contents of the PowerPoint presentation and therefore does not have any reliance on Microsoft Office. You can use it in server-based scenarios without having to install Office on the server.

If you have coworkers who copy report data from a Web page into PowerPoint, help them reclaim their time. With Aspose.Slides for .NET you can quickly and easily turn your report data into PowerPoint presentations.

Price: $599.00 for a developer enterprise subscription.

www.aspose.com

Source Control for Projects Big and Small

Every software company needs some form of source control. Source control applications work by providing a centralized repository of code for a particular project or program. Developers can get the latest version of the code, make their contributions, and then commit their changes back to the repository. Without a controlled, centralized code repository, it is all too easy for one developer to accidentally overwrite the changes made by another. Even if you're working on a project by yourself, source control makes sense because the program saves a version of every copy of the software that's checked in. This history of changes provides a backup of the application's source code, allows the developer to retrieve and examine old code, and can be used to roll back the source code to a previous version, if necessary.

Microsoft has long offered developers Visual SourceSafe®, which was last upgraded with the Visual Studio 2005 release. Now, with Visual Studio Team System, Microsoft has released another source control tool, one designed specifically for supporting much larger developer teams.

The TortoiseSVN Interface

The TortoiseSVN Interface(Click the image for a larger view)

There is also a healthy third-party and open-source source control market. One such popular open-source offering is Subversion version 1.4.2. Like other such tools, Subversion provides a centralized repository for storing source code and maintains a history of changes. Subversion can be configured to support access to its repositories through HTTP and HTTPS, enabling remote developers to interface with the source code repository. And Subversion also supports both the "check-in, modify, check-out" and "modify and merge" workflows.

Whereas most commercial source control programs provide a GUI to the repositories and Visual Studio integration, Subversion offers neither. It is simply a source control engine and provides only a command-line interface. Fortunately, an additional open-source project-TortoiseSVN-provides a more user-friendly, graphical interface, although there is no Visual Studio integration. However, TortoiseSVN is integrated with the Windows shell. Once you have established a working directory for a particular Subversion repository, you can lock, merge, update, diff, or view statistics for any file by right-clicking on it in Windows Explorer and choosing the appropriate option from the TortoiseSVN context menu. Don't let TortoiseSVN's lack of Visual Studio integration dissuade you from considering Subversion. In fact, soon after I started using Subversion, I found the Windows shell to be a more intuitive interface for working with the underlying source control system than the Visual Studio IDE.

Price: Free (open-source).

subversion.tigris.org and tortoisesvn.tigris.org

Six Degrees of SQL Hacks

Most books on SQL focus on its syntax and semantics, specifying the structure of the SELECT statement, how the GROUP BY clause can be used, and so forth. While such information is helpful for beginners, seasoned database professionals are more interested in scenario-based learning. They want to read about queries and techniques that can help them tackle their difficult problems. What queries can you use to identify overlapping ranges in data? How do you create and maintain an audit table, or compare and synchronize tables? If this is the kind of information you are searching for, check out SQL Hacks, written by Andrew Cumming and Gordon Russell and published by O'Reilly.

SQL Hacks provides 100 hacks that cover a gamut of scenarios. The book's 12 chapters range from SQL-specific hacks that explore how to accomplish common data-related challenges using SELECT, INSERT, UPDATE, or DELETE queries, to ones that look at interoperating with peripheral technologies, such as XML, XSLT, and Web applications. I found the "Number Crunching," "Organizing Data," and "Reporting" hacks the most interesting and applicable to my day-to-day work. Each hack is a terse, cut-to-the-chase look at how to tackle the posed challenge. All of the hacks address real-world challenges, but many are written in a light, humorous tone that improves the book's readability. One hack, for instance, illustrates how to find relationships among data by using SQL to play the "Six Degrees of Kevin Bacon" game (en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon).

Rather than focus on a particular database implementation, the authors decided to extend their hacks to SQL Server™, Oracle, MySQL, Microsoft Access™, DB2, and PostgreSQL. Many examples show executing database queries through some external application. When highlighting a database feature, Perl is typically used. When showcasing a language-specific feature, however, examples are in Perl, C#, Java, and Ruby. I found this variety distracting at times, but does open the book to a wider audience.

If you're already familiar with SQL syntax, but want to learn new techniques, pick up a copy of SQL Hacks.

Price: $29.99.

Send your questions and comments for Scott to  toolsmm@microsoft.com.

Scott Mitchell, author of numerous books and founder of 4GuysFromRolla.com, is an MVP who has been working with Microsoft Web technologies since 1998. Scott is an independent consultant, trainer, and writer. Reach him at Mitchell@4guysfromrolla.com or via his blog at ScottOnWriting.NET.

All prices were confirmed at press time and are subject to change. The opinions expressed in this column are solely those of the author and do not necessarily reflect the opinions of Microsoft.

MSDN Magazine does not make any representation or warranty, express or implied with respect to any code or other information herein. MSDN Magazine disclaims any liability whatsoever for any use of such code or other information.