Tuesday, September 1, 2009

InfoPath Forms vs. ASPX Pages in SharePoint Designer

When it comes to SharePoint 2007, one always has to make a choice whether to use InfoPath 2007 or design ASPX page. Here is a comparison I came up with on when It make sense to use InfoPath vs. design an ASPX

SharePoint forms

InfoPath 2007 form

ASPX Page ( using SharePoint Designer)

Design tools

InfoPath 2007- a Desktop application, part of Office Suite.

Since InfoPath forms are XML based, Programmers can theoretically design the InfoPath form in notepad

Can be designed in Microsoft© SharePoint Designer 2007 (aka Microsoft© FrontPage)

For programmers: Dependingonthe choice of tools, ASPX pages can be designed in notepad to Microsoft Visual Studio,

No-code design

Drag and drop support for form controls, table layouts etc. This is by far the best feature I have seen in InfoPath

SharePoint designer does provide drag and drop, simple validation and business logic without writting a code. However as far as User experience is concern, SharePoint designer is subpar compare to InfoPath 2007

Integration

You can submit an InfoPath forms to variety of sources including web services and SharePoint. Lookup data can also be brought from simple xml file to any line of business application and databases.


The built-in integration components to pull data from other sources are not as rich as InfoPath 2007.

Advanced design

This is big differential point. InfoPath 2007 forms out of the box look very nice. However does not support advanced scenarios

  • Tabs
  • Custom AJAX/DHTML
  • Show multiple/nested forms
  • Hand

SharePoint designer allows you to design advanced ASPX Page by direct coding html and JavaScript

Master Page

Out of the box, InfoPath forms are hosted in a new page without a master page. If you need to put a master page around your form for consistency, this require some work

1) Design a InfoPath form

2) Design a ASPX Page with master page

3) Drop <XMLFormView> control in the ASPX page and point to InfoPath

Complete Master page support

Compatibility

By design, a InfoPath form can be opened in

1) Any browser (e.g. IE, Firefox, Safar etc.)

2) Desktop App

You can optimize for Desktop, but you cannot optimize for a specific browser or an environment. This is a limitation with any form tools which support variety of tools. The choice of controls are limited to

This

Unfortunately, an ASPX pages can only be designed for browsers. But you have lot of choices to optimize for a specific browser.

Publishing to SharePoint

In spite of Microsoft's best efforts, the publishing to SharePoint is not as smooth as you would have expected from a non-programmers tool.

I love the "Blogging" feature of Word 2007; it's simple and intuitive for non-technical folks. I would have liked to see a similar approach in InfoPath 2007

Nonetheless with some training, I think InfoPath offers a great capability for publishing forms

In my personal opinion, designing an ASPX page and publishing to SharePoint is lot simpler in SharePoint designer than in InfoPath 2007

Error handling

Because InfoPath is designed for knowledge workers AKA non-programmers, the error handling is some what poor.

Most exceptions only make sense to the technical folks. But if you get some cryptic exceptions such as "Unknown error" or "exception occurred" , you are really out of luck unless you find some clues in the /12 hive log or the Event log

Pretty friendly and intuitive, you can do better error handling. You have more control on the flow compare to InfoPath 2007.

No comments:

Post a Comment