Sunday, January 10, 2010

What I Learned from PDC - Server Technologies

The server is a provider of a set of services to support the client and the domain. The server is hosted on a machine that could be anywhere on the internet or on the same machine as the client. There are also a lot of applications (like Microsoft Office, video games) where the client (GUI) / server (Services) are integrated into one common executable. Think of a Server as software that is providing a set of services to many clients. Cloud computing has changed the notion that a Server as a physical machine on the internet -- that type of thinking makes it hard to grasp the ideas to come. Envision a server as a provider of a set of services -- authentication, billing, data retrieval and persistence, document management, 24/7 availability, scalability, compute power, social connection and interaction – and you will begin to understand why the industry is calling Cloud Computing the next step in the industry.

Data Services: It is about bridging data across the web between clients and servers. Data Services package data into RESTful style services that transport data to client applications via structured, parse-able text feeds in Atom (XML) or Json format. They also provide data access business logic that can be used to restrict data operations (CRUD). The foundation of all these services is called Windows Communication Foundation (WCF) and from this technology branches all the data related technologies like WCF Data Services, RIA Data Services, and OData.
Talking Points: Pablo Castro shows a Json / JQuery demo (at 20 min in) that has the browser providing the data proxy; at 34 minutes in is a data service server construction demo: FT12: ADO.NET Data Services: What’s new with the RESTful data services framework. You can also see, live, the limits of JavaScript debugging tools.

Data Abstraction: In modern .NET applications nobody programs SQL statements directly against the database. Instead, developers use tools like Entity Framework, n-hibernate or IdeaBlade to build an object based data abstraction layer. The abstraction layer simplifies the code that provides data operations CRUD and protects your applications from changes in the underlying database table and column structures (schema) that is necessary for physical storage and performance. This layer also provides metadata about the data source, which make it possible to create tooling to generate code and documentation from an empty data source. I think that all modern .NET software should take advantage of a data abstraction layer.
Talking Points: FT10: Evolving ADO.NET Entity Framework in .NET 4 and Beyond. I love this talk; it is all demos that show how Microsoft is listening to developers and tuning the Entity Framework to address real world development issues. Don Box and Chris Anderson show in Data Programming and Modeling for the Microsoft .NET Developer that you can create a database from the model or from code. It is worth watching.
Data Storage: Microsoft’s enterprise solution for relational data storage is SQL Server 2008. However data can be stored and accessed in other data providers like XML or the file system. If your application has more that one database (maybe resulting from the need to run disconnected), synchronization is going to be one of your largest problems. Luckily there is an app for that: Microsoft Sync Framework.
Talking Points: Mark Scurrell’s talk SV23: Using the Microsoft Sync Framework to Connect Apps to the Cloud is loaded with demos that show database synchronization in action, and very little code is involved.

Isolated Storage vs. Client Resource Access
Thin clients use HTTP cookies to store information on the client. This small bit of text is stored somewhere in your local hard drive, deep in the file system. Browsers are known for running their applications in a sandbox. This is used to promote secure operation of untrusted programs. The sandbox constraint is also true for rich client plug-ins . They run in a sandbox and have no access to client resources until the user gives permission. Silverlight applications have access to a larger storage area (1 MB , with the user’s permission) referred to as isolated storage. The isolated storage area can be used to store configuration information and user setting preferences. It can also be used to cache local record sets, making it possible to work in a disconnected mode.

A Silverlight application, with the user’s permission, can be installed to the desktop from the browser with a single mouse click and run in full trust or out-of-browser mode. With elevated trust, the Silverlight application can now access all your client resources and function as a thick client. Some of the more common scenarios here are to access COM software components (Microsoft Office, VB 6 Programs) and read and write to the local file system.
To really understand the ease of programming Out Of Browser (OOB) applications and the power of having the same code function as thin client and thick client, watch Joe Stegman’s talk CL20: Improving and Extending the Sandbox with Microsoft Silverlight 4.

No comments: