Everyone’s aiming for the “citizen developer,” but lately that elusive customer has led Microsoft on a snipe hunt. With LightSwitch, the company has a rapid application development (RAD) tool, that no one—not even Redmond or its partners—seems to know quite what to do with.

When Microsoft announced the Visual Studio LightSwitch beta in August 2010, the target audience was Access users. The developer community response was predictably negative, envisioning monstrosities similar to what corporate users often created with Microsoft Access, which grew until they “became self-aware and literally devoured the entire office,” blogged Kevin Hoffman, “The .NET Addict,” in July 2010.

“Finally, as this story always ends the same way, someone from IT was tasked with converting this Access DB/Excel sheet/pile of sticky notes into a legitimate, supportable, maintainable application.”

One year later, with the first release of Visual Studio LightSwitch, Microsoft had refined its target: both end-user developers and professional developers. But several Microsoft partners who offer Silverlight controls have only cautiously tinkered with LightSwitch extensions. Developers continue to disdain the IDE despite its proclaimed utility for prototyping and productivity. And fear abounds over Microsoft’s Silverlight strategy as the market shifts away from that cross-platform plug-in toward HTML5 plus JavaScript.

In February, Microsoft announced exciting changes for LightSwitch in the Visual Studio 11 beta, which comes with a Go Live license, meaning projects built with the beta can be deployed to production. With major enhancements such as OData support, the IDE is poised for greatness, according to its small but vocal fan club. Amid all the obfuscation, will LightSwitch finally shine?

Doing the right thing
“There’s a lot of misinformation around LightSwitch,” said Beth Massi, Microsoft’s senior program manager for the Visual Studio community. “This is definitely a developer tool. It is in Visual Studio. We’re targeting an end-user developer. It is RAD, not a code generator. You are describing an app, and it is making technology choices for you under the hood. Basically, the only code you write is the only code you could write, which is the business logic.”

Like dBase, Visual FoxPro and Visual Basic before it, LightSwitch is designed for quickly building data-centric apps. Unlike these earlier dev tools, however, it abstracts today’s .NET stack for three-tier applications with:
• Presentation in Silverlight
• Logic in C# or VB .NET, and data via OData and the Entity Framework, both hosted in ASP.NET
• Data storage in SQL Server Express (included in LightSwitch), SQL Server or, in the cloud, SQL Azure

“It’s designed to launch users down a path of success,” praised Rich Dudley, developer evangelist for ComponentOne, a maker of Windows and .NET controls. “If you start your app in LightSwitch, later you can deploy it to a Web server where the department can consume it, and you can scale and maintain it,” he said.

Unlike Access, he said, “Here’s a tool that will get you 80 to 90% of what you need and lighten the load off your developers. Microsoft always likes to highlight that it’s forcing the Model View ViewModel pattern…plus the Entity Framework, OData services for the communication layer, and Silverlight for the UI.” His colleague, product manager Dan Beall, concurred: “It’s actually forcing you to do something right.”

Productive, portable and scalable
The promise of LightSwitch, then, is for quickly building line-of-business applications that manipulate structured data, such as customers and orders, while being portable and scalable.

From a UI standpoint, LightSwitch screen design is hierarchical and declarative, replacing the typical WYSIWYG form designer with a process whereby the detail in the data model itself allows a UI to be interpreted and generated (not to mention easily re-skinned or updated without altering a line of code).

From a data standpoint, the ADO.NET Entity Framework lets you program against a conceptual application model instead of a specific relational storage schema, which avoids hard-coded dependencies. LightSwitch is designed to sidestep the typical context shifting that slows citizen developers down when they must switch from specifying application behavior to defining regular expressions. Business Types, such as Email or PhoneNumber, come with appropriate input masks and UI behavior.

Authentication, permissions and security are also built into LightSwitch’s underlying technologies, including IIS and ASP.NET, and developers have the opportunity to make important access control decisions at each application layer.

Finally, when it comes to deployment, LightSwitch applications, which are generated in Silverlight, can run on desktops, inside the browser, or in the cloud. A SQL Server Express database is included in LightSwitch. Scalability is built-in, unlike those Access or shared Excel files business users are so fond of. And the MVVM pattern at the heart of the LightSwitch application is contained in an ApplicationDefinition.lsml (XML-compliant LightSwitch Markup Language) file, detaching it somewhat from platform specifics.
#!
All about OData
The LightSwitch team itself recently took advantage of this separation of concerns with the latest beta version in VS11. “We changed the entire middle tier from WCF RIA services to OData, which is a REST-ful way of doing CRUD [create, read, update and delete] operations against data sources,” said Microsoft’s Massi.

The change will be seamless to end users, but now, she said, “When you create a LightSwitch app, your middle tiers are automatically OData services. The Azure DataMarket supplies all data sets via OData feeds. SharePoint list data, Excel, Microsoft PowerPivot, and other reporting and analysis services are all exposed as OData feeds. This really opens the door for companion apps such as mobile clients or Windows 8 Metro style apps.”

Perhaps no one is more excited about OData than Michael Washington, a Los Angeles-based Microsoft Silverlight MVP, who runs lightswitchhelpwebsite.com.

“In this last release, the key thing is they added OData communications,” he said. “People were expecting, ‘Hey, Silverlight’s dead, so why isn’t LightSwitch generating HTML5 pages?’ Instead, it’s like your house is burning down, and someone hands you a telephone instead of a garden hose. The answer really is the telephone.

“I got hit by this OData thing too; honestly, it took me weeks to get my head around it. But they’re right, the telephone is truly the answer. Now you can do a water drop. Trust me, you need the telephone. OData can handle everything.”

Based on HTTP, AtomPub and JSON, OData is a Microsoft-sponsored REST API standard for database-style CRUD using the HTTP verbs POST, GET, PUT and DELETE. LightSwitch developers can consume feeds from, say, the SAP NetWeaver Gateway and SQL Server Reporting Services, not to mention data sets (such as weather, traffic and geospatial) hosted in the Azure DataMarket.

“We still support connecting to RIA services, but it was sort of a black box that only the Silverlight client knew how to talk to. When we switched out the technology stacks of the middle tier, we opened it up,” said Massi.

Not only does LightSwitch now consume OData feeds, however, it also produces them. In a tutorial on his blog, Washington demonstrated how to build an Android client that calls the LightSwitch OData feed and business layer, including its security and business rules.

The three-hour work week
Regardless of the uncertainty swirling around Silverlight, the biggest argument for LightSwitch is still productivity. “Honestly, for the apps that LightSwitch builds, Silverlight is the best solution today,” said Massi. “If you want to build heavy-duty data entry type stuff, Silverlight is a very good choice, based on the community, tooling, and the set of vendors producing controls today. Apps that were taking months to build, take days to build.”

Or even less, according to Washington: “This can shave development time and expense by 95%, period, end of story. I’ve got 30 LightSwitch projects on my site that I’ve built over almost two years.”

Washington has been very involved in Microsoft’s MVVM concept, writing 50 articles on it over the years, he said. Unfortunately, “People who tried to do MVVM projects never got it completely. They kept going back to Web forms. Now with LightSwitch, that’s not the case; people can get it done.”

That productivity stands in stark contrast to the current process, which is to define a business project, hand it off to IT or contractors, and finally, months later, get a finished product that doesn’t do what it needs to do, because the hand-holding required by stakeholders never happened. In fact, according to Philadelphia-based senior business integration analyst Christopher Finlan, the speed can be downright dizzying.

In three hours, he said, he was able to build an app in LightSwitch that had been under development for two weeks by a consultant. “The estimated value of what I provided, they said, would save the company €55 million over the next five years,” he said. “I thought, ‘You mean I just wrote a €50 million application?’ ”

In the last few months, Finlan built five or six applications, all now in production, he said.

Another application he’s built uses OData to tie together customer-relationship management, financial and line-of-business data. He uses ComponentOne’s OLAP control for LightSwitch to display the information. But is this a one-off application, or something that can evolve? The latter, he said: “There were a couple things in there that I didn’t know how to do and didn’t have time for, so I turned it over to my developer because he knows C#.”

That’s exactly the value proposition Massi’s team is touting. She points to the LightSwitch Star Contest from last year on The Code Project, which garnered 30 entries, ranging from Church+ (a church-management application covering everything from relationship management to financials) to Data Centre (a New Zealand-based cooperative project to store product information).

Six of the apps were cloud-based and hosted in Azure, Massi noted.

Some Microsoft partners, however, see LightSwitch playing a bit part rather than a starring role. “Unfortunately, it seems people are using LightSwitch for the stuff they were using Access for,” said Evan Hutnick, developer evangelist for Telerik, another Microsoft .NET partner.

“We’re not seeing anything monumental, just forms over data.”

DevExpress technical evangelist Seth Juarez concurred: “For some reason, from hardcore developers, there is some pushback that this is just Access-plus. On the other hand, business users seem to like it. LightSwitch is development with bumpers.”

He’s quick to add, however, that “It’s not Access, it’s using good architectural practices.”
#!
Microsoft’s marketing mishap?
“Some would argue that Microsoft should have pushed this as the next Access, rather than advertising it for developers who are then having to go and hack it to make it do the things they want it to do,” said Hutnick.

“The original marketing, did they try to say to Access people, ‘Here’s an app for you?’ Was that the right thing?” said Washington. “At the time, yes. There was a lot of backlash from MVPs saying this is a toy, it’s a joke. It was radically different. It’s like saying to someone who only knows how to drive a car, ‘Here’s a plane.’ ”

When asked whether Microsoft has made a mistake in marketing LightSwitch to developers, Massi was blunt: “I’m not in marketing, I’m on the engineering team, the team that builds the product itself.” The product is designed for an “end-user developer,” she emphasized.

Weighing in on both sides is Washington: “It is for developers. To pile on top of that, what we can do now with OData proves the point that it was always for developers.” Further, the idea that a tool like LightSwitch enables developers to write only high-value code is compelling.

“Take that ComponentOne OLAP control, for example; all the developers I regularly work with have that OLAP control,” said Washington. “Theoretically they can port it themselves, but they are all using the plug-and-play one because it’s easier.”

Indeed, why reinvent the control? The broad appeal of LightSwitch is just as critical, according to Washington: “I feel this citizen developer market is a lot bigger than the pro developer market.”

With luck, those citizens will soon shout their story from rooftops rather than whisper it to reporters in the parking garage.

“I’m a guy who likes to solve problems for people,” said Finlan. “Now I’m able to do things with C# that I never thought I could do. Over the weekend, I added e-mail notifications to a LightSwitch application, and it took me less than an hour.”

Still, he suspects too few like him even know of LightSwitch’s existence, while “Every programmer that I’ve seen turns their nose up at it. I think Microsoft has absolutely hit a home run with this, but they don’t know what to do with it. I don’t think they should rip it out of Visual Studio, but I do think they should throw it into Office. Nobody around here uses Access anymore.”

The current version of LightSwitch is available as a standalone application and a template within Visual Studio, but the next release may not include the standalone version. That could be a mistake. While most corporate users have Microsoft Office Professional installed by default, getting an instance of Visual Studio outside of IT department incurs licensing costs and administrative slowdowns in most companies.

With power users dizzied by Excel pivots and PowerPoint pies, it may take some exploration on Microsoft’s part to find the ideal opportunity to expose them to LightSwitch.

Massi, a former FoxPro developer herself, is convinced it can be done. “The people coming into the workplace now are definitely more tech savvy,” she said. “They don’t necessarily have computer science degrees. And then you have these IT departments that are so bogged down, they don’t have time to write these little productivity apps. This end-user developer is someone who has an idea and is not afraid to build it.”

While Microsoft partners may not yet be seeing major demand for LightSwitch extensions, they are impressed by the company’s grassroots efforts of late, spearheaded Massi, along with teams in Redmond and Fargo, N.D.

“One of the really good things is the community team,” said Telerik’s Hutnick. “They are really hammering the community with videos and tutorials. They’re doing a great job with showing people how to stick with the model. Wherever your data is, there’s one way or another to bring it in. For cloud, the data story is there. I think if they stay the course, you’ll probably see it take off.”

The LightSwitch ecosystem: Six points of extensibility
There are six areas where LightSwitch can be customized, whether by vendors, hackers or power users: controls, business types, data sources, screen templates, themes, and shells.

“LightSwitch has full extensibility,” said Massi. “For example, we just released a new shell, and you can totally switch the look and feel without writing one line of code. There are over 80 extensions now, and I’m encouraged by the amount that are free from the community itself.”

Why buy pretty plug-ins, anyway? As DevExpress technology evangelist Seth Juarez explained, citing author Edward Tufte, “We can take in more information when it’s presented visually. Analysts like to visualize their data so it’s easier for consumption.”

Microsoft is your source for two new shells and themes (Cosmopolitan and Metro), as well as Team Foundation Server integration tools and a many-to-many control to appease customer requests. But there’s a wider world of .NET and Silverlight controls out there waiting to be ported to LightSwitch. In fact, most Silverlight controls can be used directly in LightSwitch, but there are some LightSwitch-specific capabilities that come when the LightSwitch model is built in. Here’s an overview of what’s currently been ported to the RAD tool.

With hundreds of controls for Visual Studio, ComponentOne is “taking the best of our Silverlight Studio and packaging it into screen templates for LightSwitch,” said Beall. “Right now, we have three extensions.”

The OLAP control is a market leader, for example. With it, you can add a pivoting data screen into LightSwitch, add analysis, and create interactive views and reports. ComponentOne also offers Scheduler for LightSwitch for complete Outlook-style scheduling, and FlexGrid. The tools are US$295 each.

“FlexGrid is interesting. It may be the most important one,” said Beall. “We started by adding every feature that the out-of-the-box grid had. We don’t want someone to choose between ours and what’s in the box. Then we started adding the features people are requesting: conditional formatting, Web filtering tools, printing support, Excel export, grouping and preview.”

Keeping a finger on the pulse of LightSwitch is easy: “We learn mostly from the LightSwitch team and our own customers. The LightSwitch ecosystem is very open,” he said.

Infragistics has a $195 product, NetAdvantage for Visual Studio LightSwitch. This adapts the company’s Silverlight data visualization tools for geospatial representations, interactive map controls and snazzy gauge controls with “multi-scale, round or semi-round dashboard dials with the look and feel of an automotive dashboard or even an aircraft cockpit,” according to marketing literature.

DevExpress offers both a free and a paid reporting control. DXEditors for LightSwitch is free and includes such features as mask text edit to enforce data formatting such as telephone area codes, accounting and percentage editors, image display from a given URL, or database fields. The $99 XtraReports solution helps create a variety of reports, as well as mail merge and analytics.

First Floor Software adapted its Silverlight Document Toolkit as a LightSwitch-only extension for €39 Euros, or for €299 for both LightSwitch and Silverlight. The toolkit lets LightSwitch apps view XPS, PDF and Microsoft Office documents.

Finally, RSSBus Data Providers for LightSwitch connect applications to data from QuickBooks, Google, Salesforce.com, Facebook, Twitter, e-mail, Microsoft CRM, Amazon SimpleDB, Excel, OData, SAP, SharePoint, and PowerShell. The ADO.NET data providers range in price from $399 to $599 per development workstation, with free 30-day trials available.
#!
Will Silverlight last?
Meanwhile, Telerik has not made efforts to specifically port its Silverlight controls to LightSwitch, opting instead to guide customers via video tutorials through the process of using their Silverlight controls. “We have an offering for LightSwitch built on our Silverlight program, which had over 70 components in the last release,” said Hutnick. “Our target is not the point-and-click end user; pro developers are our target audience.”

Part of the problem, according to Telerik and other vendors, is that there is as yet no proven demand for LightSwitch controls. “It’s a possibility down the road, looking at our customer base, that if we have 100% of our people asking for components to go over to LightSwitch, we’ll do it,” said Hutnick. But the Microsoft partners are also watching Redmond for directional cues.

“LightSwitch is built on Silverlight,” he said. “As a C# and XAML guy, that’s awesome, but the worry in the rumor space is if they move that [presentation layer] to HTML5, at that point, all the extensions we have go away. That’s a totally different functionality, and there’s been a fair amount of Microsoft downplaying Silverlight.”

Enabling HTML5 output from LightSwitch is “a common request, but I can’t comment on what we’re building,” said Massi.

Chicken and egg
“DevExpress originally jumped out ahead of the pack with their reporting tools. I felt they were a market leader,” said Washington. “But for whatever reason, they didn’t follow up and continue along that path. ComponentOne is playing both sides [pro developers and citizen developers]. Telerik and DevExpress are waiting for the customers to show up. It’s a chicken and egg sort of thing.”

But that’s not stopping individual developers from adding on to LightSwitch. The Extensions section of the MSDN Visual Studio gallery lists such popular gems as the Pixata custom controls by Alan Silver, which include “the revolutionary toast utility,” a pop-up alert box.

Delordson Kallon of LightSwitch Extras has created more commercial LightSwitch extensions than anyone else, according to Washington. A set of 30 themes from Kallon costs $36. He also hosts LightSwitch apps in the Azure DataMarket, which makes one wonder: Could anything similar to the Apple App Store coalesce around LightSwitch?

More likely, the ecosystem will resemble that of SharePoint, Massi predicted. “SharePoint developers really love LightSwitch. You can deploy LightSwitch in SharePoint and create these amazing data mashups. But we didn’t really purposely pull it into SharePoint. It’s always amazing to build a product and see what people do with it.”