Beth's Chinese blog
We are extremely happy to announce the release of Microsoft® Visual Studio® 11 Beta! This release also includes the next version of LightSwitch!
Please see the LightSwitch Team Blog and the LightSwitch Beta Resources page on the Developer Center for information on new features available in LightSwitch. We’ll be rolling out more in-depth content and training in the coming weeks so keep checking back. My personal favorite is the new OData support so you know I’ll be writing a lot about that in the next few days. ;-)
Read Jason Zander's blog for information on new capabilities in Visual Studio 11 and .NET Framework 4.5. Beta comes with a “Go Live” license which means you can now start using Visual Studio LightSwitch for production projects!
We also created a new forum for Beta. Please post questions and feedback in the LightSwitch in Visual Studio 11 Beta Forum.
Enjoy!
Last week I had the pleasure of speaking again at Techdays Netherlands on Visual Studio LightSwitch. It’s my third time speaking there and the venue is top-notch at the World Forum in The Hague.
Check out all the session recordings for Techdays 2012 on Channel 9.
My first session was in a big room that had about 100 people, almost all of them professional developers (they get paid to write code everyday). In this session we build my version of the Vision Clinic application from scratch, end-to-end, including security and deployment. We do write some code but only some simple business rules and calculated fields, and in the end we have a full-blown business application. The goal is to show what LightSwitch can do for you out of the box without having to know any details of the underlying .NET technologies upon which it is built. The recording is available on Channel 9. I suggest downloading the High Quality WMV:
When I asked who had downloaded LightSwitch already, about 75% raised their hand. I also asked how many people were not professional developers (didn’t get paid to write code) and a few people raised their hand. This is pretty much what I expected since this was a pro developer conference. What I showed in the session is pretty close to what I included in the LightSwitch Training Kit. If you look under the “LightSwitch Overview” on the right-hand sidebar on the opening page of the training kit, you will see the complete demo code and demo script that you can use for training folks at your local user groups. :-)
I also brought some LightSwitch Reviewer’s Guides that marketing created to help convince business decision makers of the value of using LightSwitch. I ran out of them within seconds. I was able to snag the PDF version that you can download here:
Visual Studio LightSwitch Reviewer’s Guide
Here are some more resources to check out that will help introduce you to Visual Studio LightSwitch:
In this session I showed some more advanced development and different levels of customization that you can do to your LightSwitch applications. There were about 75 people in the session. I was happy to see so many people ready to dive deeper. I started off by showing the Contoso Construction sample application that has some more advanced features like:
Download the Contoso Construction Sample
Video Presentation: Advanced Development & Customization Techniques
This session demonstrated the many levels of LightSwitch customization from simple code customizations and custom classes all the way to building full blown extensions. I showed how to access the code behind queries so you can write more advanced LINQ statements. I showed some advanced layout techniques for screens. I also showed how to flip to File View and access client and server projects in order to add your own classes. We injected some business rules into the save pipeline in order to email new, updated and canceled appointments. I also showed off the LightSwitch entity API to create an audit trail, and I demonstrated the free Office Integration Pack extension from Grid Logic to create reports with Word and import data from Excel.
I went through the 6 LightSwitch extensibility points. Shells, themes, screen templates, business types, custom controls and custom data sources. I showed how to install and enable them and then we built a theme. I showed off the LightSwitch Extensibility Toolkit which helps LightSwitch extension developers build these types of extensions. LightSwitch extensions are similar to other Visual Studio extensions, they are also VSIX packages you just click on to install and manage via the Tools –> Extension Manager. Here are some more resources for building LightSwitch extensions:
Also check out all the available LightSwitch extensions on Visual Studio Gallery. In particular I recommend these free ones:
As well as ones available from our partners, like:
I came in a day early to speak at a local user group outside of Amsterdam at Sogeti. It started off a little loud because we were sitting near the kitchen in the cafeteria but once they cleaned up, it quieted down. I didn’t mind too much because I’m good at yelling ;-).
There was about 50 people in the Masterclass and I demoed LightSwitch for about two and a half hours. I basically did the two presentations above back-to-back. I got a lot of good feedback and people seemed to really enjoy the class. Afterwards, a lot of us hung out and drank real Heineken and pondered the meaning of software development. Thanks to Michiel van Otegem for organizing this and thanks to all of those who attended.
Anytime you attend a conference you get to have fun, especially ones in the Netherlands ;-). One particular highlight was that I got to meet Jan Van der Haegen in person. Jan is a “LightSwitch hacker” so-to-speak and avid blogger. He is one of the most passionate people I know about software design and LightSwitch development. He drove 3 hours from Belgium to The Hague to see me and we chatted for hours. He gave me a lot of great feedback about how to improve the LightSwitch development experience and extensibility model.
We decided to tag along with Gill Clereen and Bart De Smet for dinner where we talked about life, code and everything in between. Jan and I shared a bottle of wine which was an awesome Petite Syrah from a local (to me) Livermore winery -- Concannon Vineyards. It was so cool to see it on the menu that I had to order it. However we didn’t finish it and in Europe they do not have the concept of take out (a.k.a. doggie bag). So they struggled to find a bag for us and ended up giving us one from what I’m told is a five and dime store. LOL. Here’s a (really bad) picture of Bart holding the bag, Jan in the middle and Gill on the right.
Until next time, Netherlands!
Often times in business applications we have a lot of information to present on a screen, and depending on the user’s screen resolution that information may scroll off the page. Visual Studio LightSwitch’s screen templates are set to automatically apply a vertical scrollbar to screens when this happens, however, sometimes we rather allow the user to resize sections of the screen how they see fit. It’s common in screen design to use splitter controls to do this. Splitters are a useful UI feature where the width or height of a control on the screen can be modified to show more or less information. In this post I’ll show you how you can enable splitter controls to appear in LightSwitch as well as control how scrollbars behave.
First create a screen with all the information you want to display. For this example I will use the ContactDetails screens we created in the Address Book Sample. In this example, Contacts have many Addresses, PhoneNumbers and EmailAddresses. By default, LightSwitch will place the Contact fields at the top of the screen with a Tab Control of three DataGrids representing the children.
Here is what the screen looks like:
And here is the content tree for the screen:
Imagine that over time our contacts get more and more email addresses, phone numbers, and/or addresses. If the user’s screen resolution is low (or the size of the application shell is not maximized) then LightSwitch will place a vertical scrollbar on the screen by default (I added the green box for clarity ;-))
This is controlled by selecting the topmost Rows Layout and under the Appearance properties you will see “Vertical Scroll Enabled” checked. Notice there is also a “Horizontal Scroll Enabled” property you can use to enable horizontal scrollbars when needed. All group controls in LightSwitch have these properties (i.e. Rows Layout, Columns Layout, Table Layout)
Leaving this checked however, means that the user cannot see all the email addresses and the First & Last name fields at the same time. There are a couple things we can do here. One is we can disable vertical scroll of the screen. Once we do that LightSwitch will automatically place the scrollbar into the grid itself instead.
But what if we aren’t using a DataGrid (or list control) below the list of fields? Or what if we want the user to choose how many rows they need to view at a time? In those cases, we can allow the user to resize the panels of information using a splitter.
In order to provide this functionality, we can place a splitter between the list of fields at the top and the tab control below. While the application is running in debug mode, click the “Design Screen” at the top-right of the shell to open Customization Mode. Select the nested Rows Layout control for Contact and under the sizing properties you will see a check box “Is Row Resizable”.
Check that and then click Save to save your changes. You will now see a splitter control that you can use to resize the top and bottom panels.
In this case you probably also want to set a minimum and maximum height of this Rows Layout panel so that the user doesn’t use the splitter to wipe the grid completely off the screen. Right now if you take and drag the splitter off the screen, the grid will completely disappear. In order to stop this, you can set the MinHeight and MaxHeight properties. You can enable a scroll bar to appear in the top panel when needed by checking “Vertical Scroll Enabled” as well.
You can also add vertical splitters in a similar way. Instead of displaying DataGrids in separate tabs, say we want to display them side-by-side. Open customization mode again and change the Tabs Layout to a Columns Layout.
Then select each DataGrid and in the Sizing properties, check “Is Column Resizable”.
Now you can resize all of the columns containing the DataGrids. The DataGrids will automatically put a horizontal scrollbar at the bottom so users can see all the fields as necessary.
Splitters and scrollbars really start helping you out when you have sections of information and/or commands that you want to allow the user to resize. Here I modified the Contoso Construction example to allow resizing of the tab control of commands on the left and the information on the right.
There are a lot of things you can do with the LightSwitch Screen designer in order to provide completely customized layouts. Controlling scrollbars and adding splitters is just another way you can achieve what you want. For more tips and tricks on customizing screens see:
Last Fall I started posting a rollup of interesting community happenings, content, samples and extensions popping up around Visual Studio LightSwitch. If you missed those rollups you can check them out here:
Looks like folks took a few well-deserved days to ramp back into the groove after the holidays (including myself). But there were still a lot of awesome things around LightSwitch this month, especially the number of submissions The Code Project had in the LightSwitch Star Contest. A lot of really interesting applications and some great case studies for LightSwitch as well as some for Azure. Check them out…
In November The Code Project launched the “LightSwitch Star” contest. They’re looking for apps that show off the most productivity in a business as well as apps that use extensions in a unique, innovative way. Prizes are given away each month. Soon they will announce the January winners as well as the two grand prize winners of an ASUS U31SD-DH31 Laptop!
Check out all the submission we had in January and make sure to log onto Code Project and vote for your favorites. Here’s a breakdown of the 13 apps that were submitted in January (see all 34 apps that have been submitted here). There are some very creative “business apps” here – like a campaign manager for Dungeons & Dragons!
There are a lot of really interesting real-world LightSwitch production applications that were submitted. Some departmental apps, a few personal apps, some enterprise apps as well as a couple start-up companies. There are also some great case studies here for Azure, in particular:
In December I kicked off a series aimed at beginner developers just getting started with LightSwitch and was featured in the MSDN Flash Newsletter. In January we updated the Learn page of the Developer Center to feature this series and it’s been getting some great traffic!
I also released the completed source code for the sample we build in the series: Beginning LightSwitch - Address Book Sample
We also updated all the How Do I video pages to show the sequential list of videos so that you can easily get to the previous and next videos in the series. This makes it a lot easier to navigate through the over 20 videos in the correct order. Just click into any video page like this one and you will see the video navigator at the bottom of the page.
Here’s some more of the fun things the team and community released in January.
The team also released a control extension sample that you can learn from. Check out the announcement on the team blog: Many-to-Many Control Released!
Build your own extensions by visiting the LightSwitch Extensibility page on the LightSwitch Developer Center.
The Visual Studio LightSwitch Facebook Page has been increasing in activity thanks to you all. Become a fan! Have fun and interact with us on our wall. Check out the cool stories and resources.
Also here are some other places you can find the LightSwitch team:
LightSwitch MSDN Forums LightSwitch Developer Center LightSwitch Team Blog LightSwitch on Twitter (@VSLightSwitch, #VisualStudio #LightSwitch)
The community has been using the hash tag #LightSwitch on twitter when posting stuff so it’s easier for me to catch it (although this is a common English word so you may end up with a few weird ones ;-)). Join the conversation! And if I missed anything please add a comment to the bottom of this post and let us know!