Lazycoder

8Mar/13Off

Herding Code 160: Glimpse 1.0 release and Semantic Release Notes with Nik Molnar and Anthony vander Hoorn

Posted by Scott Koon

While at MVP Summit, Jon and the Scotts talk to Nik and Anthony about the Glimpse 1.0 release, Semantic Release Notes and NuGet versioning.

Download / Listen:

Herding Code 160: Glimpse 1.0 release and Semantic Release Notes with Nik Molnar and Anthony vander Hoorn

Show Notes:

  • Intro
    • (00:38) Nik and Anthony remind us of what Glimpse does.
  • High level: What have they been up to?
    • (01:27) Nik explains how they’re now sponsored by RedGate software, but it Glimpse continues to be an open source project under Apache 2 license. The end result is that they’re both able to work 40 hours a week on it.
    • Anthony talks about the change to remove the dependency on System.Web.dll, allowing for compatibility with ASP.NET Web API and OWIN.
  • New features in Glimpse 1.0
    • (03:24) Jon asks about new features. Nik says they’re mostly at feature parity with the previous release, with a lot of key refactoring. Some new features include:
      • Support for SignalR
      • Routes are available in Web Forms
      • They can determine and surface route constraints
    • They’re working on MVC 4 support, System.Web.Optimizations, and Web API.
    • Anthony says the big goal of refactoring is to allow for fortnightly releases, which meant they needed to rework the core into something they could build on quickly.
    • (05:42) Jon asks about MVC 4 support. Nik says that everything in the MVC 3 package works, with the exception of Task based async support and newly added features like System.Web.Optimizations and Web API. Synchronous controllers and AsyncControllers work.
  • Notifications, Semantic Release Notes
    • (06:25) Anthony talks about support they’ve added to work better with more frequent updates, including update notifications.
    • That got them thinking – can they also show more information about what’s in the update? What about plugin updates?
    • Nik talks about what they’re doing to pull information from NuGet about installed packages.
    • (11:08) Nik explains how the extensibility model uses an attribute which indicates that the plugin came from a NuGet package and indicates which version of the package it came from.
    • (12:12) They want to give you information about what’s changed between releases, which led them to Semantic Release Notes.
    • Semantic Release Notes are written in Markdown format, but include typed information (inspired by Todo.txt) which allows them to determine what’s changed between any two releases.
    • (15:45) Jon and Scott K ask about why they picked Markdown as opposed to some other formats. Nik explains a lot of reasons, including compatibility with any text based release notes system.
    • (17:20) This allows them to present "The Sports Center of Release Notes" which showcases the relevant highlights.
    • (17:40) Anthony says NuGet release notes are virtually unused because they don’t offer any value. They’ve been talking to developers who say they’d be happy to include release notes if they were actually useful.
    • (19:33) Nik says that another benefit of a text-based format is that it could be extracted from commit messages.
    • (20:20) Nik says that NuGet has raised the water level the experience of installing release notes, understanding what an update does, configuration, overall experience.
    • (21:28) Nik says that Semantic Release Notes could also inform developers of Semantic Versioning problems – e.g. if you’ve got a breaking change, you should be bumping the major version number.
  • Problems with NuGet packages targeting product versions
    • (22:15) Anthony says they’ve run into some issues they’ve run into with NuGet. One issue they’ve run into is that developers often unwittingly install the Glimpse core package rather than the Glimpse.MVC package, which pulls in the core. They’re thinking about instead they could look at packages already installed in the project, determine that it’s an MVC project (for instance), and recommend installing the correct package (Glimpse.MVC in this case).
    • (26:00) There’s a discussion about problems to be considered with dependency scanning, notifying users, etc.
    • (27:55) Scott K asks about how this would work with locally hosted NuGet servers, MyGet, etc. Nik says they’ve seen a lot of cases of custom Glimpse plugins for things like e-commerce and internal information.
    • (28:55) There’s a MyGet feed with the nightly release, as well as a community feed for plugins.
    • (29:38) Scott K asks about how it works with local packages specifically.
    • (30:10) Nik talks about the problem with package explosion. NuGet allows you to target a specific .NET framework version, but not product versions. Jon asks why not just install Glimpse.MVC2, Glimpse.MVC3, etc. Anthony says this is a problem for any project that tries to factor things into a core with version specific dependant packages.
    • (34:28) Jon says they’re working hard to solve this problem, but would like to not have to. Anthony agrees: this is something he’d like see handled by NuGet itself.
    • (25:28) Nik says this is a growing problem, with examples from Windows 8 development. Jon talks about how he sees this problem in MVC 4. Anthony says he sees things moving in a good direction and that these are growing pains.
    • (37:25) Scott K asks if this is a problem that they’re seeing just because they have an ecosystem.
    • (38:40) Jon says he sees some people using VSIX instead of NuGet in cases where NuGet is limited. Nik says he’s frustrated that you can’t package up tooling – you can create a custom Web Platform Installer package at the high level, you can create a package.config at the project level, but there’s no solution for the installed tooling.
  • Miscellaneous jibber jabber and future possible features
    • (40:55) Anthony talks about the problems they’ve run into with XML documents and Sandcastle.
    • (42:48) Jon asks about possible future features. Scott K he’d like to see a plugin for Fiddler. Anthony talks about how they’re in a unique position with insight into the entire request pipeline, from browser through server and back to the browser.
    • (45:30) Scott K talks about how OWIN support allows access to a lot of other web stacks, too.
    • (45:55) Nik says that they include the Glimpse request ID as a header now, so you can trace the request in Fiddler or other network tools.
    • (47:00) Anthony says they’re realizing that they can do a lot more than just surface troubleshooting information for people who are learning, talking about the potential for an extensible mini-dashboard which can show really intelligent information – e.g. inform me if a request makes more than three database calls.
    • (50:14) Jon asks if there are any plugins which analyze security. There’s a discussion about automated OWASP analysis.
    • (52:10) Anthony says they’re talking to Brendan Forster about displaying decision trees visually.
    • (54:54) Jon asks what they’re looking at doing long term. Nik says they’re looking at doing some monthly conversations for developers.
    • (56:14) Jon asks how people can get involved. Answer: go to GetGlimpse.com.

Show Links:

5Mar/13Off

Herding Code 159: Catching up with Oren Eini on RavenDB

Posted by Scott Koon

This week on Herding Code, the guys talk with Oren Eini (a.k.a. Ayende Rahien) about what’s new with RavenDB.

Download / Listen:

Herding Code 159: Catching up with Oren Eini on RavenDB

Show Notes:

  • (00:47) Introduction and review of document databases and RavenDB
    • Oren gives us a quick overview of document databases and RavenDB
    • Relational databases work for the kind of applications we were building in the early ’90′s. We can kind of make them work in our current applications but it takes too much work.
    • RavenDB is a document database which stores JSON documents.
    • JSON documents can store arbitrarily complex data very easily.
  • (04:35) Comparing accuracy and data consistency between document databases and relational databases
    • Jon asks about Oren’s comments on a recent .NET Rocks podcast in which he said that document databases allow us to be more correct than relational databases.
    • Oren gives a real life example of how an update to a customer’s financial information caused a change to her historical record, which caused some real problems.
    • Jon talks about some of the hoops we jump through in an attempt to maintain historical data in a relational database, e.g. soft deletes.
  • (08:42) Disk space concerns
    • Scott K says he hears DBA’s worry about disk space due to data repetition between documents and asks what other concerns people bring up.
    • Oren says there can be more computation and indexing, but on the other hand temporal data is orders of magnitude easier.
    • Data design principles were established back when space was expensive, that’s all changed now.
    • Oren says he hears people say that space isn’t cheap in the enterprise, but runs some numbers and concludes they’re either very inefficient or someone’s got their hand in the till. Scott K says that enterprises data storage is often expensive because they’re not tiering their data correctly to put low priority data on cheaper storage.
    • Oren says enterprises drive up storage costs by due to foolish backup strategies.
  • (14:42) Query and performance benefits
    • Scott K says that people often view document databases as a giant blob of text rather than structured data which can be searched, indexed, etc.
    • Oren says that you get full text search for free in RavenDB.
    • In relational databases, you’re always working with the very latest data, so you have locks, readers waiting for writers, etc.
    • RavenDB does a lot of precomputation in the background, so it can give you aggregate information immediately.
  • (17:27) RavenDB 2.0 release overview
    • Big improvements to performance on some key codepaths, in some cases over 1000%.
    • Support for JavaScript scripts on the server, which allows for scenarios like mass migrations and batching support on the server.
    • Management UI improvement, better management API coverage, performance counters, etc.
    • Dev improvements – sharding support, full support for async.
  • (19:40) 2.01 release overview
    • Files some rough spots in the 2.0 release – things that beta testers didn’t mind, but can be a little smoother.
    • They added a new feature – improves support for replicating to a relational database.
  • (22:05) Sharding improvements and migrations
    • Sharding’s been around since the beginning, but required you to specify a lot of things – lots of options, too much complexity, too many important decisions early in the development process.
    • Sharding support has been revamped – provide the endpoints, defaults take care of the rest.
    • Oren gives an example with sharding customer data. By default, documents are sharded together based on transaction id. You can specify a shard when you save based on a user specified id.
    • Some people have problems with the default approach because the document id includes the shard id. That’s necessary to prevent having to query all shards.
    • Jon asks how this works over time if you need to add shards, migrate data, etc. Oren says you can rebalance by biasing new data towards a newly added shard.
    • If you need to move data to a new server – for instance, a customer becomes large enough that you want to put all of their documents on a new shard, you’ve got two options for handling the id’s. Oren says some users migrate data, rewriting id’s during the process, but he doesn’t recommend that. Instead, he recommends using a sharding function which allows remapping document id’s to a new shard without changing id’s.
    • Jon obviously doesn’t get it and asks the same question again, also asking how you handle data modifications over time. Oren explains that you can just write a JavaScript function to update your existing documents if needed.
    • Kevin asks how long data a data migration takes. Oren types one up on the fly and explains the parsing and execution time.
  • (34:43) Time for some random questions!
    • Scott K notes that there’s a client that runs on Mono and asks if there are plans to get the server running on Mono. Oren talks about the general plan to handle that, but says it’s not high on the priority list.
    • (35:48) Scott K asks about compact scenarios, including clients that run on mobile and embedded instances that run locally. Oren notes that  clients are easy, because anything that can make a REST call can be a client. They had an embedded version that had very little interest.
    • (38:03) In disconnect scenarios, it’s usually simpler to cache JSON documents locally.
    • (39:10) Jon asks about merge support for occasionally connected scenarios. Oren says that’s intentionally not included.
    • (41:25) Jeremy Miller (@jeremydmiller) asks when Oren is going to fix Lucene.net’s flow control via exception madness. Oren says it’s not planned, and that Jeremy should ignore those exceptions.
    • (42:25) Philip (@autosnak) asks why RavenDB doesn’t do more for startups and small biz pricing-wise. Oren explains the offers they make available – open source is free, RavenDB basic edition is $5 / month, they donate a lot of license for a lot of other cases, and even the full versions are incredibly cheap compared with any other database. Shoot him an e-mail.
    • (44:44) Chris Whellams (@chriswillems) asks how to sell NoSQL and RavenDB to IT management and bosses that are addicted to SQL Sever. Oren outlines a strategy – start with a persistent viewmodel cache on a slow page to get a quick win, then use it for simple storage of ancillary application data (e.g. preferences), then use it in a spike on a new project. This is exactly what the MSNBC team did – they started with a non-operating RavenDB node in production, then slowly moved some things in without taking on any unnecessary risk.
    • (42:50) Jon asks for any closing thoughts. Oren says they’re starting on some weekly webinars for RavenDB users – or just if you’re curious about it. There’s a RavenDB course in the US in May.
    • FIN!

Show Links:

26Feb/13Off

Herding Code 158: Nat Friedman and Joseph Hill announce Xamarin 2.0

Posted by Scott Koon

Nat Friedman and Joseph Hill from Xamarin join us for several big announcements: Xamarin Studio, Xamarin Component Store, iOS development in Visual Studio, and a new free Starter edition.

Download / Listen:

Herding Code 158: Nat Friedman and Joseph Hill announce Xamarin 2.0

Show Notes:

  • (00:45) Nat begins by catching us up on Xamarin’s first eighteen months.
    • Xamarin’s focus is on helping developers build mobile apps across multiple platforms.
    • They have 230,000 developers in their community, adding 700-800 per day, with over 12,000 paying customers.
    • They’ve had top iPad (Bastion), music apps (Rdio) and some large mission critical line of business apps.
    • What’s special about their platform is that you can target iOS, Android, and Windows Phone, share C# code across  all those platforms, and still deliver a native experience.
    • Nat say’s they’re the overnight success that took ten years to prepare, referencing the ten years they took to build Mono.
  • (03:20) Xamarin’s value proposition and customer base
    • Kevin asks which of their value propositions (.NET based development, cross-platform development) resonates more with users.
    • Nat says that many developers are initially attracted by C# development, although that’s not always the case (referencing an internal app at GitHub written by Objective-C developers who just liked sharing code between platforms).
    • Nat says there’s no real way to be a mobile developer now without having a cross-platform strategy – iOS might have looked like the only platform that mattered a few years ago, but now Android is more popular and Windows Phone is growing in popularity.
  • (04:47) Code reuse strategy
    • Kevin asks how the code reuse happens, since these are true native applications.
    • Nat talks about different cross-platform strategies and says that they don’t believe in write once, run anywhere.
    • With Xamarin, you separate the backend and UI code and write specific UI code for each platform, although you still write it in C#.
    • Rdio has over 150,000 lines of code which are shared between iOS, Android and Windows which covers networking, caching, authentication, etc.
  • (07:55) First big announcement: Joseph Hill announces support for building for iOS applications in Visual Studio.
    • Nat says that you can have one Visual Studio solution targeting iOS, Android and Windows Phone, and step through the code with the full debugging support you’re used to.
    • How does the Mac support work?
      • Scott K asks if this means that you have to run Visual Studio on a Mac. Nat says that’s not necessary, you just need to pair your Visual Studio instance with a Mac – it just needs to be on the network somewhere. That’s required both to be able to sign releases and to meet Apple’s license terms.
      • Jon asks if this would work with a Mac Mini, and Nat says that’s a popular option.
      • Scott K asks about a "Mac in the cloud" option; Nat says they’re not planning that.
      • Kevin asks if several developers could share one Mac. Nat says that Apple’s requirement is that each developer is supposed to have a license, and Joseph says that the Apple toolchain is build for single user rather than server support.
      • Jon ask if he can start playing with iOS support without having a Mac, Joseph explains that you can install and look around a bit, but you can’t build or deploy.
      • Kevin asks about the Interface Builder interaction.
      • Kevin asks if it was incredibly painful to set up this support for Visual Studio.
  • (16:14) Second big announcement: Nat announces the release of Xamarin Studio.
    • Xamarin Studio runs on OSX, Windows, and Linux.
    • It’s based on Mono Develop, but it’s a completely new user interface with a lot of great new features.
    • Visual Studio Express users can’t install extensions so Xamarin Studio allows them to do Xamarin development, also it’s what all Mac users will be using.
    • Kevin asks if it’s a fork of Mono Develop.
    • Kevin asks if Xamarin Studio is open source.
    • Jon asks how it was developed. Joseph says it’s still C# Mono code using GTK. Developers write Xamarin Studio in Xamarin Studio.
    • K. Scott asks if you can target non-mobile scenarios. Joseph says you can still target ASP.NET, console, class libraries, etc.
    • Kevin asks what happens to Mono Develop. Nat says it continues as an open source project, and they’ll contribute back to it as they develop Xamarin Studio.
  • (22:35) Xamarin as a Mono producer and consumer
    • Jon says it’s interesting watching the evolution of the Mono / Xamarin efforts as they’ve moved from supplying the Mono framework to being both building Mono and building a business on Mono.
    • Nat says it’s great working for a customer base rather than an opinionated crowd. "A really good signal that we’re doing good work is that people give us money for it."
    • Joseph talks about their model, explaining how their Xamarin business works well with their role as stewards of the Mono project.
  • (25:28) Third big announcement: Nat announces the Xamarin Component Store
    • Nat says they see developers solving the same problems over and over again, giving an example of a common requirement for a signature capture control.
    • The Xamarin Component Store is a library of pre-built components. Nat gives an example of an Azure Mobile Service component.
    • It works in both Visual Studio and Xamarin Studio.
    • Components include documentation, screenshots, and sample projects. Nat says it’s conceptually similar to NuGet, but gives you a lot better experience and makes it easier to get started.
    • There are a lot of component vendors who are contributing both free and paid components, and Xamarin has also contributed several based on their experience in supporting Xamarin developers.
    • Jon asks how they handle cross platform, native user interface with components.
    • Kevin asks how people can submit components to the store.
    • Nat says he thinks this will really be a compelling feature of their platform, since developers won’t have to build everything from scratch.
    • Kevin asks they handle purchases and vender payments.
    • Kevin asks if the components are curated.
    • Jon asks about component support for Android and Windows Phone.
    • Kevin asks if it’s possible to create Xamarin components using native Objective-C components. Nat says they support both Objective-C and Java code reuse.
    • Jon says the design on the Xamarin Component store website looks great and asks about Xamarin’s approach to design. Nat says that they’re selling a good design experience and design is an important part of that.
    • Kevin says he like hover screenshots, Nat says he really likes the hover menu control.
  • (39:35) Fourth big announcement: Nat announces the free Xamarin Studio Starter Edition
    • You can use Starter Edition to get started, build, and deploy applications.
    • Starter Edition is limited to 32KB of IL code.
    • Jon loves the idea of limiting the free edition based on compiled code size.
    • Kevin asks what kind of app will fit in 32KB. Nat says that using a lot of DLL’s will put you over the limit quickly, but images aren’t content. About 20% of the apps in the store would fit under the limit.
    • Joseph says they didn’t want to limit based on features. Jon talks about the frustration people see in Visual Studio version based feature limitations. Nat says pricing is hard; ultimately they want to get a lot of people using Xamarin and they think this is a good way to do that.
  • (44:53) Jon asks about support for languages other than C#.
    • Nat says they see people using F# and Java (using IKVM).
    • Joseph says that C# is their main focus – all the documentation is in C# – but they’re happy to see people using other languages.
    • Kevin asks for JavaScript support. Nat says they think it’s hard to build large scale apps in JavaScript.
  • (47:35) Nat talks about their upcoming developer conference.
    • The first two days are focused completely on training.
    • The second two days feature some great talks by community leaders, user interface designers, and more. The entire team will be on hand to answer questions.

Show Links:

14Feb/13Off

Herding Code 157: Amir Rajan on dynamic web development with Oak and Gemini

Posted by Scott Koon

On this episode of Herding Code, the guys talk to Amir Rajan about his Oak and Gemini projects, which bring Rails-inspired dynamic programming to ASP.NET MVC.

Download / Listen:

Herding Code 157 – Amir Rajan on dynamic web development with Oak and Gemini

Show Notes:

  • Overview – Developing with Oak
    • Oak is an approach to building single page applications that are heavy on JavaScript that takes a lot of inspiration from the Ruby community’s development approach.
    • Jon asks Amir to explain his development workflow, including SpecWatcher, NSpec, and Growl.
    • Jon asks about the File / New Project experience. Amir describes how that’s not even required – Oak works with WarmuP to build out a new project.
    • The next step is using Rake – Amir explains how Rake works. Running Rake builds the application and deploys, then sets up IIS against that instance.
  • Dynamic programming and Gemini
    • Oak leverages the dynamic keyword. Amir explains how it just augments what’s already there in ASP.NET MVC.
    • Amir explains how Oak works with Gemini, separate library he’s built to enable building dynamic objects. It allows you to attach properties and methods through mixins. He gives an example of using Gemini to extend a dynamic object with validation methods.
    • Amir describes how Oak leverages Gemini to take advantage of these decorated dynamic model objects throughout the different layers.
    • Scott K asks where the composition happens – is this a pipeline process?
    • Jon says it sounds like this is a more fleshed out version of some dynamic features that were started in ASP.NET MVC, like dynamic views and ViewBag. He explains how Gemini goes beyond Expando, because it also includes support for method missing.
    • Jon says Gemini reminds him of the Clay dynamic objects used in Orchard.
  • Data access and Cambium
    • Jon asks Amir about Cambium, the data layer. Amir says he customized Rob Conery’s Massive library to work with his Gemini objects, and points out that the resulting library uses remarkably little code.
    • Scott K asks Amir if he’s looked at Breeze. Amir says so far he’s just worked with standard ASP.NET MVC controllers, but he’s interested in looking at Breeze, Dapper, and NoSQL ORMs.
  • But why?
    • Kevin asks the silly question: why bother bringing Rails idioms to ASP.NET MVC – why not work in Rails?
    • Jon says the thing he sees Amir’s done is eliminate the shift between development and runtime modes in Visual Studio based development.
    • Jon asks about change tracking support in Cambium.
  • More about data – migrations
    • Amir explains migrations and schema generation in Oak and Cambium.
    • Amir says that SQL based migrations are important in many development environments.
  • Single page and Ajax
    • Jon asks Amir about the Single Page Application story in Oak. Amir explains some of the points of friction that exist in ASP.NET SPAs and explains how Oak is able to round-trip dynamic types.
    • Scott K. asks why it’s so hard to migrate schemas in .NET. Amir says that it’s due to our fixation on trying to define our models using code first in .NET types rather than in the database.
    • Jon asks how the first deployment and upgrade scenarios work in Oak.
    • Jon asks how Ajax interactions work. Amir explains how this works using the TaskRabbit sample to explain.
    • Amir explains how he’s relying on client-side rendering and templating more and more. He asks if we’re seeing that movement as well, and Scott K. agrees with him. They agree that focusing on serving JSON and rendering on the client solves a lot of problems.
    • Jon asks Amir if he’s using one controller to serve HTML and JSON, or if they’re split out. Amir says he’s got one controller to serve the HTML, then does everything else via a separate controller that serves JSON. He says he’s noticed that the ORMs have very little need for state with this approach.
    • Jon says he’s seeing the shift from a little Ajax interaction in mostly HTML focused servers to servers that are almost completely focused on serving JSON.
  • Some misc. questions
    • Jon asks about Canopy. Amir describes how Canopy is a stabilization layer on top of Selinium, and talks about why Canopy is built on top of F#.
    • Scott K. asks if Amir has looked at OWIN yet.
    • Jon asks about Async support in Oak.
    • Twitter question from Bobby Johnson: What do you do to limit the viral nature of dynamic in your code? Amir and Jon talk about how a lot of the assumed safety of static code is an illusion when you think about all the moving parts you’ve got no control over.
    • K. Scott and Scott K. think this is a fascinating project and like the code.
    • Scott K. and Jon joke about variants. Amir mentions that the dynamic nature of Gemini means that all the dynamic properties and methods are case insensitive.
  • Wrap up and getting started with Oak
    • Amir talks about how to get started with Oak.
    • Jon says the sample apps, documentation and screencasts are really nice.
    • Jon asks what’s next. Amir lists a better SPA story, better file uploads, adding dynamic to ServiceStack and Nancy, and growing the number of Gemini modules.
    • Kevin asks about the performance impact of this dynamic focus. Amir that he’s got an included test, and he’s found that dynamic is actually faster in a lot of cases which need to use reflection, such as ORMs, JSON serialization, and model binding.
    • Amir calls out the NSpec project and references their interview on Hanselminutes.

Show Links:

18Jan/13Off

Herding Code 156: Catching up with Andreas Håkansson and Steven Robbins on NancyFx

Posted by Scott Koon

The guys catch up with Andreas and Steve on what’s new in NancyFx (a web framework for .NET that was originally inspired by Sinatra).

Download / Listen:

Herding Code 156 – Catching up with Andreas Håkansson and Steven Robbins on NancyFx

Show Notes:

  • Jon asks for a quick overview of NancyFx. Steve and Andreas both say you can write the same app on any number of web frameworks, so what really distinguishes them is the syntax and feel. Andreas says that the web only has a small set of things you really can do – there are only a few HTTP methods – but an infinite number of ways you can build applications; Nancy is one of them.
  • Diagnostics
    • Andreas says Diagnostics is a website built into Nancy itself. It covers things like request tracing and interactive diagnostics.
    • Steve explains how the interactive diagnostics lets you find out what routes were hit and why, poke at live code, etc.
    • Andreas says this works using companion classes for metadata which is then rendered via JavaScript templates, so you can customize it as much as you want.
    • Jon says the code for Diagnostics seems like pretty good sample code for getting an idea of how Nancy code works.
    • Jon asks about how authentication is handled to restrict access.
    • Steve says they’re using Handlebars for JavaScript templates with Backbone and Nancy on the back end.
  • Content Negotiation
    • Andreas explains how routes just return models, and the formatting is handled by response processors. There’s a syntax to allow for more control at the route level if needed.
    • Steve says the response processors are allowed to participate in the selection by specifying how applicable they are for both content types and model types. The content negotiation can also allow you to select different models based on the request, avoiding unnecessary code from executing and weighing the model down unnecessarily.
  • Serializers and dependencies
    • Jon asks about the JSON serializers they’re using, and why they’re not using something like ServiceStack or JSON.NET. Andreas explains that because the Nancy core ships without dependencies, they used Mono code.
    • Jon asks about where Nancy can be be embedded, outside of standard web hosting scenarios.
    • Steve says that because Nancy doesn’t have other dependencies and is strictly focused on returning a response for a request, it’s extremely easy to test.
    • Andreas points out that you can use other serializers very easily via a NuGet package.
    • Jon asks about how packages work in Nancy. Andreas explains how Nancy scans for classes that implement ISerializer.
    • Kevin asks about implementing a processor for generating hyperlinks between models.
    • Jon asks if people are sharing processors. Steve says that they’re so trivial to write that there’s no real point in sharing them.
  • Localization
    • Andreas says this was a community contribution. There are several conventions (including querystring values, URL segments) which can be used to set the culture for the context. There’s a helper on the Razor base class that returns a dynamic object which can return localized values from a resource. Assembly resources are used by default, but you can add others.
    • Steve says that you can also use localized views based on filename.
    • Jon asks for more information on how you’d set up a custom resource location.
  • Architecture, pipelines, and IoC
    • Jon says that he spoke with Jeremy Miller at Codemash, and Jeremy said that it took a while to get the processor architecture set up, but now it’s very easy to add in features. It seems like that’s also paid off for Nancy. Andreas agrees, the pipeline system and dependency injection really simplify adding in new features.
    • Jon asks about how Nancy uses TinyIoC and how you could use TinyIoC in other applications.
    • Kevin and Jon ask about how Steve wrote TinyIoC to run on multiple platforms. Steve describes some issues they’ve worked around and how assembly scanning can get tricky due to test frameworks injecting things into the app domain.
  • Non-standard uses of Nancy
    • Jon asks for some examples. Steve says they seen people embed it into WPF applications for an interface, to provide mobile support, and even on Raspberry Pi. They’d love to hear more about what people are doing with it.
  • Questions from Twitter / Misc. Questions
    • Jim Liddell (@liddellj) asks about the roadmap. Steve talks about work they’re doing for OWIN and Async support.
    • Filip W (@filip_woj) asks "Why tuples instead of classes and structs?"
    • Kristof Claes (@kristofclaes) asks "How do they determine when something is "too much ceremony"? Gut feeling? Set of defined rules? Talk? Compare to other FX?"
    • Ian Battersby (@Cranialstrain) asks "Why dynamic? And don’t say fluency ;)"
    • Tobi Tobsen (@t0bit0bsen) asks "Is there a NancyFx tutorial for devs w/o a background in web development or should they look elsewhere?"
    • Jim Liddell (@liddellj) asks "How do you view Nancy in relation to similar frameworks, such as OpenRasta?"
    • Kevin asks about asset management for Nancy. Steve says that’s probably better handled by external
    • Kevin asks about web socket support. Steve says just use SignalR.
    • There’s a Nancy store now.
    • Daniel Lee (@danlimerick) asks "How many hours a week do you spend on Nancy? What’s ratio of reviewing PR’s vs writing new features?"
    • Jon asks what Steve and Andreas are finding fun and interesting lately. Steve and Andreas both like Mongo.
    • Scott K. asks if they’ll add time zone localization support. They tell him to submit a pull request.

Show Links:

8Jan/13Off

Herding Code 155 – Ward Bell on Single Page Applications and Breeze

Posted by Scott Koon

On this episode of Herding Code, the guys talk to Ward Bell about single page applications and the Breeze project.

Download / Listen:

Herding Code 155 – Ward Bell on Single Page Applications and Breeze

Show Notes:

  • General SPA discussion
    • Ward talks about how IdeaBlade has been building tools for working with data in rich clients for a while, and after seeing the move towards desktop experiences in the browser they started the Breeze project, which is open source and free.
    • Jon asks Ward to define single page applications (SPAs) a bit, and Ward says he sees SPA as a funny term since it just describes one attribute of the experience – it’s like calling a car a “horseless carriage.” Ward says the goal is to give the user a rich experience and not rely on the server to deliver that rich experience. A lot of the value comes from maintaining data and state on the client.
    • There’s a discussion about the value and best applications of SPAs.
    • Kevin says there are a few aspects of SPAs – there can be a lot of individual, interactive pages which are separately delivered by the server, or you can have a more full application which handles screen transitions on the client. Ward talks about the tradeoffs of the two approaches. The whole SPA application approach is especially important in newer scenarios like mobile or Window Store applications built in HTML/JS.
    • Scott K asks about the different approaches to data loading – do you preload some of the data, or does the first page request just deliver an HTML client which requests all the data.
    • Scott K asks how often Ward sees offline manifests and local data. Ward says he sees things going that way, but it’s still early. Scott K and Ward talk about the difficulty of synchronizing offline changes when you’re reconnected.
    • Scott K and Ward talk about the use of Web Sockets and / or SignalR to handle locks to allow for multiple users.
  • Breeze
    • Jon asks Ward how Breeze helps
    • Ward says that they’re not trying to solve solved problems – they’re focused on solving the data problem.
  • Breeze, Upshot, and the ASP.NET SPA template
    • Jon asks how this fits in with the former ASP.NET SPA template and Upshot. There’s a discussion the history and state of Upshot and RIA Services.
    • Scott K asks about whether Upshot will be released as open source… or the unreleased ASP.NET MVC Recipes source. Jon starts crying.
    • Jon and Ward talk about how one of the big features of Upshot was that there were both client and server side parts to it.
    • Ward said they’d learned from the Upshot, so they made Breeze very extensible while making for an easy path when using ASP.NET Web API and Entity Framework.
    • Ward says the current ASP.NET MVC SPA app is too simplistic, because it’s just one simple screen.
  • Working with Breeze – client state, server-side interaction
    • Jon asks Ward about how Breeze handles local state. Ward describes how the server can send down metadata (likely from an Entity Framework model) to the Breeze client code so it can understand the models, relationships, validation rules, etc. You can extend things if you need to, but you don’t need to bother with the tedium of creating client models that match your server-side models.
    • The generated client-side models are ready to be hooked up to Knockout so they’re easily bound to the UI.
    • Jon asks how things are different on the server. Ward says that standard ASP.NET Web API controllers are very repetitive – each controller has GET, PUT, POST, DELETE methods that are just boilerplate. Pretty soon you end up with thirty API Controllers which just contain a lot of boilerplate code. Breeze can just expose things as Queryables so you really just need one controller unless you want to customize things. Scott K says it sounds like it’s basically Repository<T>. Scott K says he’d like to see it go further – at Cascadia there were some talks about big data where queries were created on the client and sent to the server.
    • Jon and Ward talk about the difficulties of complex repetitive APIs with too many entry points.
  • How Breeze fits in with other frameworks like Ember, Angular, Backbone, etc.
    • Jon asks how Breeze fits in with Ember, Angular, and other SPA frameworks. Ward talks about different framework philosophies and how Ember and Angular both more of top to bottom stacks. Kevin mentions how Backbone differs – it’s more of a library vs. a framework.
    • Ward says that Breeze really targets the data scenario. Jon asks how close its vision is to Upshot’s. Ward explains how, other than Ember Data, nobody’s looking at solving the data scenarios – they don’t worry about caching, object graphs, change tracking, etc. Scott K says the other frameworks are really MVC focused, so they don’t consider data.
    • Scott K asks what happened to Batman.js. Nobody knows.
    • Jon asks if the happy path for Ember is Rails focused and Breeze is ASP.NET / Entity Framework focused. Ward says yes, with a clarification that we’re really talking about Ember Data.
  • Getting Started
    • Jon asks if it’s difficult to get started with Breeze.
    • Ward talks about the NuGet package that gets a sample project set up quickly.
    • Ward talks about the live tutorial that lets you play with Breeze in a browser.
    • Ward talks about the automated tests they’ve got for Breeze training. Jon compares it to Ruby Koans.
  • Jon, Ward, Kevin and Scott K talk about automated JavaScript testing options – Chutzpah, QUnit, Jasmine, Mocha.
    • Chutzpah is an automated JavaScript test runner that can run inside of Visual Studio.
    • QUnit is pretty simple – tests are functions that take true or false.
    • Jasmine is more BDD style.
    • Mocha is a test framework that supports different front ends, so you can use BDD, standard unit testing, etc. It’s also got great async support.
  • Ward brings up TypeScript and Scott Koon starts cursing.
  • Wrap up small talk
    • Jon says that the talk about mocha reminds him of coffee, and he asks Ward about his new espresso machine. Jon and Ward both get their coffee beans from Sweet Maria’s.
    • Jon says he’s still roasting his coffee on his barbeque.
  • Scott K asks what dependencies Breeze has. Ward says they write to EcmaScript 5 and have gotten rid of all dependencies other than one called Q.
  • It’s time for Pimp Yo Stuff, and Jon takes the occasion to praise Ward’s sartorial skill. Scott K says they’d like to
    • Ward pimps the DevForce and and Cocktail combination. Cocktail is DevForce + Caliburn.Micro.
    • Jon asks about the license for Breeze. Ward clarifies that it’s all free and open source, and they make their money on support and professional services.

Show Links: