Skip to Main Content
Essential SharePoint 2007, 2nd Edition
book

Essential SharePoint 2007, 2nd Edition

by Jeff Webb
September 2007
Beginner content levelBeginner
448 pages
10h 2m
English
O'Reilly Media, Inc.
Content preview from Essential SharePoint 2007, 2nd Edition

Programming InfoPath

InfoPath implements a declarative programming model where you can define common tasks through rules and actions. You should try to use that approach as much as possible, but where it falls short, you can program InfoPath directly through COM or through .NET. Which approach you choose depends on a number of factors, described in Table 10-6.

Table 10-6. The InfoPath programming tools

Approach

Editor

Languages

Comments

COM

Microsoft Script Editor (MSE)

  • JScript

  • VBScript

  • Limited debugging

  • Legacy object model

  • No support for browser-enabled templates

  • Existing code base/examples

.NET

Visual Studio 2005 (VSTO/VSTA)

  • C#

  • Visual Basic .NET

  • Excellent debugging

  • New object model

  • Requires additional tool

  • Emerging code base/poor examples

In my opinion, if you are creating templates that require more than a little code, you should plan to program InfoPath in .NET. Visual Studio is a professional programming tool that gives you far more assistance than the script editor. Although the Visual Studio .NET environment is complicated, the command completion, syntax checking, and debugging tools make it a great deal easier to program with InfoPath.

If you are working on templates that already contain JScript or VBScript code, you will probably want to continue in those languages for those templates. You'll also probably want to move to .NET for new templates, however.

Installing and Choosing the Language

The default Office setup does not install programming tools. To be able to program InfoPath templates, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Office SharePoint® Server 2007 Best Practices

Microsoft® Office SharePoint® Server 2007 Best Practices

Ben Curry, Bill English
SharePoint 2007: The Definitive Guide

SharePoint 2007: The Definitive Guide

James Pyles, Christopher M. Buechler, Bob Fox, Murray Gordon, Michael Lotter, Jason Medero, Nilesh Mehta, Joris Poelmans, Christopher Pragash, Piotr Prussak, Christopher J. Regan

Publisher Resources

ISBN: 9780596514075Errata Page