BT

Your opinion matters! Please fill in the InfoQ Survey!

Introducing Napa – A Web Based IDE for Outlook/SharePoint

| by Jonathan Allen Follow 255 Followers on Aug 07, 2012. Estimated reading time: 2 minutes |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

VBA, the macro language for Office, is essentially at a dead end. Based on COM version of Visual Basic, it is stuck with a technology that hasn’t had a meaningful update in over a decade. Visual Studio Tools for Office exists, but isn’t available to non-professionals and can be difficult to use due to the mismatch between COM and .NET technology. And then there SharePoint, which has never had a good story for casual developers. Toss in the need for macros in the hosted version of Office and SharePoint and you end up with quite a mess.

This is where Project Napa enters the seen. Somasegar introduces Napa as,

“Napa” provides a lightweight, browser-based companion to the Visual Studio rich client and is a great way to get started with Office and SharePoint development without having to install anything onto your machine. Available through http://dev.office.com/, it supports building apps for Office and SharePoint, apps which can be surfaced through an Office 2013 application (e.g. Excel), through an Office Web App (e.g. Excel Web App), or through SharePoint. These apps are based on a new Cloud App Model, where UI and other client-side logic is implemented with web standards (e.g. HTML, JavaScript, CSS) and where any back-end app logic runs on a server, giving developers the freedom to use their choice of development tools, languages, and hosting environments.

Using straight JavaScript may turn out to be problematic. Even under ideal circumstances language isn’t as friendly to casual users as Visual Basic. Long standing inconsistencies in the syntax, case sensitivity, and the use of characters instead of keywords can conspire against the novice programmer. These are not insurmountable, but the way the JavaScript is used may prove to be.

To create a button one of course needs a function to receive the click event. This is pretty much the same in any language, the difference is in how you wire it up. In VB (COM or .NET) the function is attached to the button declaratively. In C# one uses the event handler syntax, which takes a single line of code.

In the example offered by Somasegar, you need to assign an anonymous function to Office.initialize. This anonymous function calls $(document).ready, passing in a second anonymous function. Inside that function is a third anonymous function that attached to the button’s click event using another jQuery operation. This kind of function nesting may be acceptable to skilled web developers, but is not appropriate for someone trying to create a simple macro in Excel.

Fortunately you don’t have to write code that way. As seen in this walk through, one can still choose to use traditional JavaScript techniques from the late 90’s. With some basic instruction on HTML and Office’s async model, the casual developer should be able to build simple applications.

Using Napa requires you to sign up for an Office 365 developer site.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT