Question

There seems to have a buzz around the Lightswitch application framework. Reading some posts/forums/articles and listening to a video provdided some answers, but raised some others.

Extensibility? Is there several hooks to override or extend features?

Modularity? Can MEF/Prism be integrated? Is there a concept of dynamic modules that can be loaded at runtime?

Localizable? Any special features about localization in different languages?

Versionnable? Any concept of version so simultaneous version can co-exist?

Abstraction? The connection to data source can be abstracted and replaced?

Testability? Are the different components unit testable in an automated way? Easy or difficult to achieve?

Cross-cutting / NFR ? Any hooks so we can plug NFR code? (logging, caching, audit, secuity )

Is this a solid framework to build some PAAS application over?

Was it helpful?

Solution

Extensibility? When the built-in LS controls don't allow you to do what you need, you can use just about any Silverlight control (including 3rd party controls), or create your own custom Silverlight controls. There is a little more work to do than using LS controls, because the LS controls have some extra "smarts" built into them, so you can just drop them on a screen, bind, & use them. There are also extensibility points built into the framework that allows you to create your own "extensions" (shells, controls, themes etc).

Modularity? LS already uses MEF under the covers, so it's quite possible that it may be able to be leveraged further in the future. LS does generate code, but for itself, not for external consumption. There is an excellent article, however, by Microsoft's Eric Erhardt

http://blogs.msdn.com/b/lightswitch/archive/2011/04/08/how-do-i-display-a-chart-built-on-aggregated-data-eric-erhardt.aspx

that shows how to reuse the data model that LS constructs (in Eric's case, he uses it to create a RIA service that aggregates data for presentation in a chart control).

Localizable? I don't believe there are currently any built-in localisation features.

Versionable? For a web-based app, if the data schema didn't change, I don't see why you couldn't publish separate versions, but desktop (OOB) apps are click-once apps & are therefore governed by that technology.

Abstraction? If you were to create a RIA service for your data source, you could abstract away the implementation details.

Testability? Unfortunately, V1 was not written with "testability" in mind. If you extract out your business logic into Silverlight class libraries (for use on the client, or full .NET class libraries for use on the server), you can unit test that logic, but the code that you write in an LS application itself is not really unit-testable at this point in time.

OTHER TIPS

Let me give you my 2 cents based on an eval I just did:

Extensibility

You can of course add custom controls and apparently there will be a published extensability API.

Modularity

No. Lightswitch is not a code generator, it abstracts out implementation of the UI.

Localizable

Did not see anything, but I imagine this will occur in stages.

Versionnable?

You could TFS the Lightswitch project, but if you mean versioning from an execution standpoint ... it's as simple as deploying a new version of the app to the server. The client will check for updates on run and install as necessary from what I understand.

Abstraction

Yes, if you abstract it at the WCF RIA Services layer which is very easy to do.

Testability

Business rules can be implemented at the RIA Services layer so testing there should be a snap, but if you rely heavily on rules driven through the UI you will have to use another UI-based testing tool.

Cross-cutting / NFR

If you focus on getting the RIA Services tier of the app to be the central location for business rules and let the UI just focus on user experience you won't run into much overlap. I think Lightswitch is a good client for many solutions, but the core power of it is using it as a client for RIA Services which itself is not dependent on Lightswitch by any stretch.

I hope I at least provided some useful insight.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top