Part 2 - The idea
- A little more Live Mesh (CTP)
- The Actors
- The Modern Approach
1. A little more Live Mesh (CTP)
Today, online and offline tend to be two different approaches for building software. Most software companies offer either online or offline versions of their software.
If they somehow offer both then mostly sure one is a limited (reduced functionality) version of the other. Moreover companies tend to create a gap between the time when the offline and the online version gets updated. You always hear thing like "the online version does not yet support feature X that is available in the desktop version. Will be available soon". The bad thing is the soon might mean a couple of months.
Creating software that works the same way both online and offline is not a new idea but until not it would require a lot of overhead. There was the need to simulate either the offline environment online or the reverse.
Now, with Live Mesh, the online environment is simulated on the local machine with no overhead for the developer. The guys from Microsoft resolved this problem and they've simplified our lives.
There are some aspects that need to be clarified as pointed in Part 1 about online services and applications:
- The user experience: this problems was somehow resolved by enabling applications to be based on Silverlight. This technology enables web applications to deliver an improved experience compared to the classical web apps. It is client-side technology.
- The need of permanent connectivity: just like smart clients, Mesh Enabled Applications can run with no network connectivity, persist offline what needs to be processed online and continue the process when connectivity is available. In other words what can be done offline is done anytime and if Internet access is required the task is queued.
2. The Actors
Lets consider a company named InvoiceGuys which offers a service called InvoiceService that exposes functionality for processing invoices. Anyone can subscribe the this service - for the sake of simplicity we'll just ignore authorization and authentication; just don't do this in real life!
DeliveryGuys is a another company that delivers packages of any kind. They have all they need except an invoice processor. Also they have a lot of delivery boys that have laptops but the Internet connection is not the best possible - sometimes is just doesn't work. Moreover DeliveryGuys' employees are not technical and they know to use only a limited set of applications.
DelivertyGuys have the following requirements:
- the invoice processing must be automated
- because of the their non technical employees they want a unified experience for all their software
- there will be software that runs on the delivery laptops but also on the company's sales desktops that are always connected to the Internet.
- each workstation (mobile or not) must run the latest version of the delivery software and the update process must be transparent to the user
- all data must be synchronized between company's workstations
- managers must be able to access the application from any PC regardless of their local rights
3. The Modern Approach
Each of the previous requirements is analyzed:
1. "the invoice processing must be automated"
This is the easiest part. As mentioned above, InvoiceGuys offer the InvoiceService service so all we need to do is consume their it and, of course, pay whatever they require for using it. So our application will rely on a 3rd party service that might be offline sometime - remember this!
2. "because of the their non technical employees they want a unified experience for all their software"
3. "there will be software that runs on the delivery laptops but also on the company's sales desktops that are always connected to the Internet"
6. "the managers must be able to access the application from any PC regardless of their local rights"
Mesh CTP allows applications to work both online and offline. Moreover the same experience is offered both online and offline. Even from a public computer you can sign in and use the application.
4. "each workstation (mobile or not) must run the latest version of the delivery software and the update process must be transparent"
When connecting to the Internet, Mesh CTP synchronizes your local application with the latest available offline with no user interaction. While using the online version from a web browser you always have the latest version so there is no need to worry.
5. all data must be synchronized between company's workstations
This is what Mesh actually does - it synchronizes data across machines. This will not be a problem.
In conclusion, Mesh CTP is a good choice for the client application.
If Internet connection is available the user can use the local application of its web version. Both look and work the same and if the application is locally installed the choice is just a matter of preference. Also the application will use the online data and will synchronize immediately.
If no Internet connection is available then the application will connect to the local Mesh that has a cached version of the online data, will work as much as possible with it and will synchronize with the live environment when possible.
Basically the local data is just an extension of the live data.
The modern approach is that we can have applications that rely on services which might not be available all the time and also can run both offline and online - the application itself can be a software offered as a service.
Part 3 will present the actual implementation of the client application and a skeleton for the service.