Mosaic is an application development framework, with a particular emphasis on Silverlight. It provides an extra layer on top of the popular Prism toolkit, with the goal of improving productivity, improving code quality, and assisting developers with the proper
use of Prism.
Mosaic is still in development. We will be uploading source code over the next few months, building out the framework described below.
Knowledge of Prism, Dependency Injection, and the MVVM design pattern are required to effectively use the Mosaic platform.
Building enterprise applications is hard. It's slowly getting easier, but it's still not easy.
Silverlight and the .NET framework is a great start for developers: it's an excellent development platform that reduces the number of skills required to create good software. But sometimes... just sitting a developer down in front of "Silverlight"
and the ".NET framework" can feel like this:
"Here's a hammer, a hand saw, and a screwdriver. Build me a house."
...uh... well, most people could probably put together something that looks like a wall, and maybe attach it to another wall to make a room... but it's probably going to look terrible and collapse when the first storm hits.
In comes Prism and modern design patterns like MVVM. These are great... but they're really just a better set of tools. It's like:
"Here's a nail gun, a state-of-the-art table saw, and an electric screwdriver. Build me a house."
...well, that's better... but it still doesn't get me very far. A lot of developers read about Prism and download it and expect it to be this:
"Here's all your tools, and directions on how to build a house."
...but that's not what Prism is. There are no directions.
In comes Mosaic. Mosaic has three main parts:
1. A set of tools that layer on top of Prism and the MVVM pattern.
Some of the Prism stuff is a bit "raw"... difficult for the average developer to grasp. The Mosaic tools attempt to alleviate some of this. Think of it as:
"Here's a guide for your table saw to let you make perfect 45 and 90-degree cuts."
... well, now my table saw is a lot easier to use. Thanks Mosaic!
2. An abstraction layer for your Model that helps decouple your code from ORM implementations, and addresses their weaknesses.
ORM tools are great and all... but do I really want to spray entity framework references all over my UI code? Or NHibernate references? Or DevForce references? What if EF starts to suck and I want to switch to DevForce? If I've bound directly to EF objects
on my UI, it's gonna be a lot of work to rip that out.
That aside, most ORM-generated objects just don't have the flexibility that you need in a real-world UI. Some of them try... but they are usually clunky if you want to add custom properties, or do special formatting, or whatever.
But most importantly, you rarely if ever want to expose your data model as an API to your application developers. They are invariably clunky in comparison to the conceptual operations you are trying to perform. Mosaic gives you a way to use a robust object
model in your code, similar to one that an ORM would generate, but tailor it to be easy to use.
3. A suggested pattern for putting together a complete application that uses Prism and MVVM, along with code snippets and supporting libraries.
Prism alone will not get you a complete, working application. Nor will MVVM. Nor will an ORM tool. You need to know how to put them together. The examples and documentation out there are not that great... they don't give you an overall picture of what you
need to do.
Mosaic shows you how all of these pieces work together, and provides code snippets and documentation to make common tasks easy.