Sunday, March 3, 2013

Adding a View Module to the Hot Towel Template

Once you get the Hot Towel Template from John Papa inserted into your solution, where do you go next? This post gives you the steps to create a Durandal view module which consists of the view in html form, a view model in javascript, and the nav bar link to the module. It is not hard at all. Here are the steps:

1. Choose a name for your module. Let's say "orders" for this example.

2. Duplicate one of the existing views in App/views and rename it "orders.html"

3. Duplicate one of the existing viewmodels in App/viewmodels and rename it "orders.js"

4. Go into orders.js and change the title of the view to "Orders View"
var vm = {
    activate: activate,
    title: 'Orders View'
};
5. Also in orders.js, change the activation message:
logger.log('Orders View Activated', null, 'orders', true);
Notice that message is changed as is the source argument. 

6. Go into App/viewmodels/shell.js and add a link to the new module to the nav bar:
function boot() {
    router.mapNav('home');
    router.mapNav('details');
    router.mapNav('orders');
    log('Hot Towel Loaded!', null, true);
    return router.activate('home');
}
7. Run your application. You'll see the new view module appear in the app. 



Friday, February 8, 2013

Authoring a Book on Windows Azure SQL Database

I am co-authoring an O'Reilly/MS Press book about cloud computing with prolific writer/speaker/coder Lenni Lobel. The book is about the super scalable, yet super easy-to-use cloud database system from Microsoft called Windows Azure SQL Database (WASD).

Look forward to thorough how-to information on:
  • Getting up and running with WASD
  • Differences between WASD and the normal SQL Server system
  • How to manage your system from the online management portal as well as familiar tools like SQL Server Management Studio and Visual Studio's SQL Server Data Tools
  • Programming against WASD using such tools as the Entity Framework ORM layer
  • Data security and backup
  • Tips on how to migrate your multi-tier applications into Azure
  • Advanced topics like sharding using Federation, integrating with Hadoop for big data processing, and hybrid public/private systems.
Look for it to be available later this year!