LightSwitchInitial thoughts

time to read 4 min | 609 words

As promised, I intend to spend some time today with LightSwitch, and see how it works. Expect a series of post on the topic. In order to make this a read scenario, I decided that that a simple app recording animals and their feed schedule is appropriately simple.

I created the following table:

image

Note that it has a calculated field, which is computed using:

image

There are several things to note here:

  • ReSharper doesn’t work with LightSwitch, which is a big minus to me.
  • The decision to use partial methods had resulted in really ugly code.
  • Why is the class called Animals? I would expect to find an inflector at work here.
  • Yes, the actual calculation is crap, I know.

This error kept appearing at random:

image

It appears to be a known issue, but it is incredibly annoying.

This is actually really interesting:

image

  • You can’t really work with the app unless you are running in debug mode. That isn’t the way I usually work, so it is a bit annoying.
  • More importantly, it confirms that this is indeed KittyHawk, which was a secret project in 2008 MVP Summit that had some hilarious aspects.

There is something that is really interesting, it takes roughly 5 – 10 seconds to start a LS application. That is a huge amount of time. I am guessing, but I would say that a lot of that is because the entire UI is built dynamically from the data source.

That would be problematic, but acceptable, except that it takes seconds to load data even after the app has been running for a while. For example, take a look here:

image

This is running on a quad core, 8 GB machine, in 2 tiers mode. It takes about 1 – 2 seconds to load each screen. I was actually able to capture a screen half way loaded. Yes, it is beta, I know. Yes, perf probably isn’t a priority yet, but that is still worrying.

Another issue is that while Visual Studio is very slow, busy about 50% of the time. This is when the LS app is running or not. As an a side issue, it is hard to know if the problem is with LS or VS, because of all the problems that VS has normally.

image

As an example of that, this is me trying to open the UserCode, it took about 10 seconds to do so.

What I like about LS is that getting to a working CRUD sample is very quick. But the problems there are pretty big, even at a cursory examination. More detailed posts touching each topic are coming shortly.

More posts in "LightSwitch" series:

  1. (25 Aug 2010) Initial thoughts
  2. (05 Aug 2010) The Return Of The Secretary