Keep track of all the latest news and events on developer tools and technologies you care about
Tim Leung interviews Garth Henderson about how he uses LightSwitch.
Last week saw a major milestone in the development of the Microsoft LightSwitch, a new addition to the Microsoft Visual Studio family.
After being in development for more than 2 years, the product has been finally released. Many of those in the LightSwitch community have eagerly awaited this release for a very long time.
For those unfamiliar with LightSwitch, it enables you to quickly build data driven Silverlight applications for both the desktop and the web. A major selling feature is that applications are built using well-known patterns and best practices such as n-tier application layering and MVVM, as well as technologies such as Entity Framework and RIA Services.
It is possible to create entire applications using just the graphical designers and not have to resort to writing code. It appeals strongly to non developers and to those from Access, Excel VBA and Foxpro backgrounds.
But being a version 1 product, is LightSwitch really all that it's hyped up to be? Many of the sample applications are perhaps simplified 'academic' demonstrations of how an application might be. Is it really possible to write practical, large scale, production quality applications using LightSwitch?
In order to find out, I've been speaking to Garth Henderson from Vanguard Business Technology. Garth is an early adopter of LightSwitch and one of the most knowledgeable experts in the field. His recent work has been pushing LightSwitch to its limits.
Tim: What does Vanguard do and what kind of applications are you building with LS?
Garth: Vanguard Business Technology (VBT) is a division of a USA company formed to write affordable business applications for resale and hosting with current OO technology. Our initial research lead to a decision that .NET was a better platform for our goals than Oracle/Java. We think that Microsoft continues to provide the global community of developers with excellent collaborative stewardship for .NET. We do plan to integrate with systems written in Java and/or Oracle (or IBM) databases.
We started with Ajax based ASP.NET development. In 2010, we migrated to Silverlight 4 with RIA services. When LightSwitch Beta 1 was release in August 2010, we switched development to LS. By October 2010, we were running three LS applications in a company owned by our investors. We expanded our development efforts when B2 was released last March. All of our LS apps are now running with RTM. There were no problems with the upgrade.
The first LS products we will release support the construction and property management industries. Our applications are designed on an ERP foundation that we use to build industry niche solutions. We have been building the core as we migrated from ASP.NET, to Silverlight, to LS.
We have a broad perspective of software technology development as our core management group has worked with all major business app platforms as they emerged starting with IBM mainframes. Our joint experience serves as a pretty good “crystal ball” when selecting appropriate technologies. Microsoft has been working on .NET since 1998 when .NET was called DNA. Just now we are finally getting a .NET RAD biz app solution. Point: We see LS as a beginning of a technology that will quickly gain consensus and evolve.
Tim: What do you like most about LS?
Garth: The LS product comes closest to providing the RAD functionality and short development timeframes that I’m used to. To make LS even better, I’d like to help figure out a way to build LS apps dynamically. This is an open topic in the LS forum.
The extensibility and openness of LS is definitely at the top of my list of benefits. We are looking forward to using 3rd party commercial controls and extensions to help build our LS application products. The most remarkable fact about LS is that it is a Visual Studio product. Development with LS is a true pleasure. Everything we need is built into VS. VS development with LS connects everything together. Intellisense is right there for us. We can drill down through extremely complex hierarchies of relational entities.
The LS product is pure genius with the widespread use of T4 and MEF built into the architecture of LS. As we type code or change Designer properties, LS is automatically, with every keystroke, detecting if some related code needs to be changed. And . . . when some related code needs to be changed or generated, LS within VS will automatically change the code.
LS is written in Silverlight. It runs with the same version of application code in a web browser or on the Desktop. A lot of developers tell me that Silverlight will not survive. This is a crazy assumption. In 2010, MS released VS written in WPF. WPF is THE desktop technology for .NET. Silverlight is the web version of WPF. WP7 is the phone version of WPF technology. Yes, WPF and its dependents will evolve.
Silverlight uses XAML as the markup language. LS has its own tuned version of XAML called LSML to expedite business app development. It is very powerful One of the immediate opportunities is for 3rd party vendors to develop utilities that manage LSML.
The architectural support for business logic at the Model, ViewModel, and View is very well laid out. The Designers have context intelligent dropdown menus that take us exactly to the override method that we need to work with. We can even go directly to an Entity Property Changed method in the Screen Designer by right clicking on the Collection property in the left hand ViewModel list. Now that is a real timesaver.
LS allows the developer to continually stay focused on application development. A lot of thought and hard work went into making LS the great product that it is for RAD biz app programming.
Tim: How easy or hard has it been to learn LS? Are there any parts that you've found particularly challenging?
Garth: Business application development is quite different than boutique web site development. To date, most .NET development has been involved with ASP.NET web sites. I consider web site development to be a completely different industry than LOB/ERP development. LS is designed specifically for biz app development.
LS is very easy to use. You can do a whole lot without any programming code. It is a VS tool that a non-programmer can use. Yet, when you need to dig in and use code, it is available. LS bridges the gap between programmers and business process experts. Business experts can harmlessly hack around with prototypes and turn it over to a pro as a pretty good articulation of business requirements.
For professional developers adept with LS, the RAD Designers allow us to do some incredible real time prototypes using a projector in front of customers. In fact, LS is so good that I can use it has a requirements “take down” tool while interviewing our client’s subject experts. If the business process has existing data, a development copy of the database (or Excel spreadsheets) can be used as a Data Source. It is a quick task to use SQL Server Manager to import Excel spreadsheets into a prototype database table.
For me, the most challenging part was waiting until July 26, 2011 for a final release. There have been significant improvements between Beta 1, Beta 2, and the LS 2011 RTM.
Tim: One of the key features of LS is Rapid Application Development. Compared to how you were working before, has LS cut down on your development time?
Garth: I’d have to answer that question in respect to previous win forms, ASP.NET, and Silverlight app development. LS still has a way to go to match the RAD development that we had with our Linux/C++ system.
The biggest time saving was in not having to write all of the Model View code and custom wiring for an SL application. LS is a dream come true when it comes to maintenance. I can make all of maintenance and/or new functionality changes without ever having to worry about rewriting all of the extremely tedious View Model code.
Dropdown lookup controls are also a huge time saver and the GUI setup within the Screen Designer also shaves hours off of complex UI tasks with the use of Groups.
The debug runtime “Customize” designer flips from the Group/Property layout paradigm to a true WYSIWYG format. Yep, just run your app and there is a “Design Screen” icon in the upper right hand corner that switches to the Customize WYSIWYG Designer. But wait, it gets better: The WYSIWYG designer is displaying and running like your app with live data. Since this is running with Visual Studio, all changes that you make during your WYSIWYG design session are saved back to the LSML file.
Additional time saving tools can be created with the LS Extensibility Toolkit, but one of the true pleasures of LS development is the integrated LINQ Lambda syntax. LINQ syntax works with Screen Collections and the automatically generated Entity Collections with their respective methods to retrieve records. The LS Entity Designer manages a DataRuntime.cs (or .vb) code file that has the collections and a direct method to bring back a single record from the database based on the Primary Key value. LINQ object (dot) notation is supported in all code methods.
About the toughest part of writing an intelligent client application is the communication between the Client and the Server. LS does an exemplary job of supporting application level methods at both levels. I’ve run side-by-side tests of processing large data updates on the LS server side compared with Winforms technology. The results were identical. LS gives the developer the ability to decide what should be run on the Client and what should be run on the Server.
LS will scale if designed correctly. The current release of LightSwitch requires that a large system be designed in modules rather than one mammoth application.
When we consider the big picture of all of the LS RAD features/functionality, it seems to be a straightforward conclusion that LS is ready for primetime. Keep in mind that new LS technology is just the top 2% with 98% of the work being done by existing proven .NET technology – most of which has been in production for over 3-5 years now.
Tim: Having completed a LightSwitch project, is there anything you would have done differently?
Garth: No, I don’t’ think so. I depended heavily on working with a few friends to figure everything out. We split up the load and shared information.
Hehe . . . but there are a lot of things that I wish others would have done differently. It is a chicken and the egg scenario. Tools developers need to have great apps to study in order to build better tools and app developers need to have advanced tools to build great apps. We are getting there.
Initially, we all had to radically change the way that we thought about building a .NET app – especially an ASP.NET app. It has almost been a year now for me, and thinking in terms of LightSwitch is second nature. However, at first, it was really a challenge to dig in and figure out how LS worked. There wasn’t much documentation. We all kind of dug in a posted back what worked for us and what we liked best.
Everyday I’ve done something differently with LS. LS is a very rich environment. I’m constantly getting new ideas. Just today I figured out a pretty cool way to handle one-to-one table relationship support thinking in terms of the “LightSwitch way.”
Understanding the unique features and functionality of Screen Collections was probably the most useful part of LS development for me.
It is logical that LS would start to fuel a new generation of business development technology. LS is the first RAD OO system that is built using .NET technology. We can use LS (as it evolves) to improve global business and government. We are far from having the best systems for business and governments. Everything needs to be reengineered – with deeper considerations this time around. The point here is that biz app developers are people that solve real world problems with software. It isn’t about the technology, it is about improving the life quality for people everywhere. So, there is always more to do and more to discuss.
I can’t wait for .NET Workflow and SharePoint document management to integrate with LS biz app development. I don’t expect that it will take too much to make this happen.
Tim: What recommendations would you give those who are just starting out?
Garth: I’d say pick up a good book on LS. The book you want should teach you how to develop apps in LS. Many technical books are not much more of a reference manual of content that is already available on MSDN – which aren’t going to be much help. The best books will walk through a professional methodology explaining the process of building an LS application starting with requirements.
Until that kind of LS book is available, read through the MSDN documentation. Grab a copy of LS and build a few screens. See how easy it is. Then, look at some of the examples to see what kind of additional features and functions you want to accomplish. Join the forum and talk with us.
Use LS in your business. Put together and deploy a useful LS app for a client. Bottom line: Start making money with LS – both for yourself and the businesses your efforts support.
Tim: Garth – thanks for giving us a fascinating insight into the way that you work with LightSwitch and for sharing your experiences with us.
So there we have it. We've learnt that you can construct solid, scalable, real life enterprise solutions by using Microsoft LightSwitch. We've also seen how you can build a viable business model around LightSwitch and attract investors who will also see the benefit of rapid application development.
LightSwitch is architecturally solid and there are many areas throughout the product that enables you to be more productive and to reduce development timescales.
If you haven’t seen the light yet, join the vibrant community that Garth speaks about and make a start by downloading LightSwitch.