Category Archives: LightSwitch Love

Thoughts on Presenting LightSwitch to Professional Developers

Hello LightSwitchers,

It has been a very long time since I have blogged here. I have been dedicating my keystrokes to the book I am writing, LightSwitch in Action, but I am going to try and give my blog some attention (I know, I know, I have said this before).

Since I last wrote here, I have presented LightSwitch to three groups of developers (Pittsburgh .NET Users Group, Hampton Roads .NET User Group, and DevConnections). I have been very pleased that not only have they been very interested, they usually walk away with ideas on what kinds of projects they can use LightSwitch for. So, LightSwitch isn’t just for regular guys like me, experienced coders can benefit from it as well.

I posted more detailed feedback on my corporate blog. Check that out.

Until next time…

 

Seriously, Don’t Be Afraid of Code

I am loosely following the ProjectTrek example in “Beginning Microsoft Visual Studio LightSwitch Development” to create a project tracker of my own. As I was learning about calculated fields, an epiphany hit. Here it is.

LightSwitch is a great tool for modeling and displaying data, but its real value exists in its ability to empower non-coders (like me) to use code to accomplish the things they want to do when code is needed. In fact, it may be a great way to start learning how to write code.

For example, I want to add calculated fields to add total hours and total costs for a project. I can’t point-and-click to make that happen, but LightSwitch makes it very easy. All I need to do is add a calculated field to the entity (using the Computed Property button) and then click the Edit Method link in the Properties Pane for the property I just added.

When I click that Edit Method link, LightSwitch adds a method to the code for me. All I have to do is add the calculation function. Below is the code for two calculated fields. The only part I had to write are highlighted.

I didn’t know how to write those lines, but finding help on the Web is pretty easy. Also notice that LightSwitch called all the appropriate methods it needed (the first five lines) and then set up my new method for me. This may seem simple for a seasoned coder, but it probably would have taken me days to figure it out.

Tagged , ,