Steve Anonsen and John Rivard: Inside LightSwitch

Sign in to queue

The Discussion

  • User profile image

    Great! Well done guys Smiley I must (again) give a tribute to man who did this game changing approach 20+ years ago in "PC FAND" development tool, started at CP/M machines to process large datasets (in fact, government level agriculture datacenters in centrally planned economy ...) and then ported to MS-DOS and then, unfortunatelly NOT ported to windows - obviously quite impossible in "one man show" scenario. He didnt use objects, there was no no ORMs, entities, DSLs, model-driven (not to mention -centric) development and many other buzzwords. In fact, here was declarative not only models (with at this level computed fields as you have now, validation checks, recordset change triggers...) and screens (not so much formalized UX but its controls layout at least, scripted by imperative pascal-like code - used also anywhere else), but here was also declarative reports and streaming-based semiparallel "change" queries (called "transformations" - so NO sql yet, no query optimizations, but low-memory consuption "jobs" with events attached even on grouped-by property changes to produce many output resultsets streams in single pass over all input streams), also role based permissions, network concurrency using file-locking added later etc. So it is great to see now similar approach properly extensible even on 2 and 3 tier architecture, Azure and so on! I always dreamed about this, knowing that its really difficult to implement this beast, as it must be done as close to SQL server as possible to be effective, togeter with integrated client based UI, so your app-server runtime and whole simplifying of even so complex deployment is really amazing, not to mention true object orientation, first-class CLR/JIT powered languages even for model calculated fields, great extensibility points at right places... In fact I am shocked to see this done Smiley. But the man who did it first for me was Gert Klötzer Smiley.


    Have a nice code, even in future !

  • User profile image

    Very cool.  Thanks folks.  Charles mentioned using Rx in the calculated fields discussion.   If the Data types were wrapper types, Rx could seem to handle this nicely.  Just need to figure out how to inspect expression to figure out which data types to hook into for a general solution.


    public class MyInt
        int value;
        Subject<int> changed = new Subject<int>();
        public int Value
            get { return value; }
                if (value == this.value)
                this.value = value;

        public IObservable<int> Changed
                return changed.AsObservable();

        public static void Test()
            var a = new MyInt();
            var b = new MyInt();
            var c = new MyInt();


            // Setup Sum function that is called after any change to args.
            Observable.Merge(a.Changed, b.Changed, c.Changed)
                .Subscribe(i =>
                        int result = a.Value + b.Value + c.Value;
                        Console.WriteLine("Update Sum: " + result);


            // Program can now set Values anywhere and Sum will be updated.
            a.Value = 1;
            b.Value = 1;
            c.Value = 1;
            c.Value = 5;



  • User profile image

    Thanks Steve & John, you've restored my faith in MS!

    Everyone who builds the multi-layered bussines applications which goes a little beyond the simple master-details forms, arrives at a framework which has to take care of these things.

    That's not something for everyone. I came under the impression that the people building visual studio & tools had no real world experience with this stuff. I always wondered what the dynamics/navision people thought about that.

    And here you are.


    After building my own orm/frameworks/viewmanagers/service layers and what not, I alway wanted to make it complete with some designers/wizards & tools to make building the app itself and bussiness rules a little bit easier.

    That's what lightswitch really is. And off course there will be trade offs, and it's a 1.0 (still beta) version.

    But it looks very very promising ! And not only for the ex-foxpro/ms access/clipper developers!


    And with the azure/cloud route, it has to be a sure winner.

    Any targets known about rtm/rtw ?



  • User profile image

    Yeah.  How I wanted this back when doing access apps Smiley  Is there  a reporting story yet?

  • User profile image

    Nice, staceyw.


Add Your 2 Cents