This week on Herding Code, the guys talk about what they’ve been up to lately (including Kevin’s new Greater Than Parts site), lament the passing of Google Reader, talk about scriptcs, and even fit in a lightning round!
Download / Listen:
Herding Code 162: Whacha doin, Goodbye Google Reader, scriptcs and Lightning Round! [audio://herdingcode.com/wp-content/uploads/HerdingCode-0162-Discussion.mp3]
- What are you up to?
- He laments the quality of the code he’s working with.
- There’s a discussion of how bad code happens and how to clean it up.
- (07:58) Kevin’s been working on his GreaterThanParts site.
- He soft launched it on twitter and got more response than he expected, but it’s been holding up.
- Kevin was surprised how resistant developers were to trying out the site via Google / Facebook login, so he set up an anonymous (cookie based) login.
- Scott K has some specific feature requests.
- Jon asks if the design feedback was coherent or contradictory. Kevin says some was really good, a lot wasn’t
- (15:40) Jon talks about the ASP.NET Jump Start event he did in February and some upcoming Web Camp he’s doing – Denmark, Istanbul, Sunnyvale, San Diego. In his spare time he’s working on a book about programming Windows 8.
- Scott K mentions a blog post he read about a developer who was frustrated he couldn’t store password protected zip files or preview office docs. Jon says it’s an app model and it’s different than building desktop apps. Kevin wonders about how the updates will work for Windows Store apps.
- Scott K says he read about limitations in displaying help files. Jon says that some things are easier to do using the HTML dev model, and he’s seeing some people writing business logic in C# and using it in an HTML app.
- K Scott talks about the current campaign to pay developers for apps. Jon says he thinks that may be driven by the fact that all the tech columnists just write about the number of apps in the store, but he agrees that fewer quality apps is better. The Windows Store has a try / buy model, which effectively halves the number of apps required compared to Android and iOS. Jon talks about how he’s been using the Surface RT.
- (25:49) Google Reader
- K Scott asks if anyone’s upset. Kevin is.
- Scott K hasn’t used it in a while because he just uses Twitter and an RSS reader he likes.
- Jon says he used to read tons of feed, but he now gets most of his info off Twitter, Hacker News, and TheCadmus.com
- Scott K says he’s going to need to replace Reader because he follows some feeds he cares about that will never make their way onto Hacker News.
- Jon says he used to use Reader more when it had Google Gears support. He talks about how he tried to write his own RSS reader which never materialized, but he learned a lot along the way.
- Kevin says the bigger problem is that so many apps use Google Reader as an RSS sync backend.
- Jon says he’s happy that the whole RSS system isn’t dependent on Google Reader, and that it’s a good thing that major parts of the web stayed open.
- (34:45) scriptcs
- K Scott overviews the idea.
- Scott K says he thinks it’s interesting – a natural use of Roslyn. He’s been wanting something that would output assemblies so it could create projects.
- Jon talks about some of the samples they’ve got, including WPF, Mono, etc. He says he’d prefer it to PowerShell since it could be more portable and the syntax is better.
- Kevin says many of these ideas came from the Node community. He’s really enjoying the low overhead of working in vim. Scott agrees. Jon says he doesn’t see Visual Studio delays, maybe because he’s not using heavy add-ins. A border skirmish erupts. Kevin says that he thinks that .NET programming kind of requires Visual Studio. Jon like the new web tools stuff.
- (44:27) Lightning Round!
- K Scott asks if anyone cares about the S4 release. Nobody does. We’re all kind of tired of smartphone releases.
- K Scott asks what everyone thinks about the new Rearden.js library with the Rearden Metal templating system.
While at MVP Summit, Jon and the Scotts talk to John Papa and Ward Bell about Single Page Applications, the new ASP.NET and Web Tools 2012.2 SPA templates, and John and Ward’s new Hot Towel SPA template (you need a hot towel at a spa, get it?).
Download / Listen:
Herding Code 161: Single Page Applications with John Papa and Ward Bell [audio://herdingcode.com/wp-content/uploads/HerdingCode-0161-Single-Page-Applications.mp3]
- (01:10) K Scott asks John Papa about to overview what’s just been released.
- (01:24) Jon explains how he remembers the ASP.NET and Web Tools 2012 release, comparing it to a video game "map pack".
- (02:04) John says that one of the new features in this release is that you can create new File / New / Project templates for ASP.NET MVC using VSIX.
- (03:18) Scott K says you can find all the new goodies at http://asp.net/vnext.
- Hot Towel overview
- (03:37) K Scott asks what happens when you create a new Hot Towel project.
- (04:30) K Scott asks what’s included:
- Some other nice things: jQuery, Bootstrap, Moment
- The useful parts of the ASP.NET stack
- Durandal and getting the various libraries to play well together
- (06:00) Jon asks if everything in the Hot Towel parts fit together well, and if it was hard to get them to play well together.
- (07:14) Durandal uses Require.js for AMD for script dependency resolution. Hot Towel is still using ASP.NET Bundling and Minification system, although when you deploy you can use Durandal’s compilation system.
- (09:03) Ward talks about what he likes about Durandal.
- You can bring any thing you know from Caliburn.Micro in, including convention based view composition.
- It includes a lot of useful debugging and tracing information in the console. That includes intercepting problems with Sammy.js (which would otherwise just report "Error" without any context), binding failures, etc.
- (10:24) Hot Towel also includes Toaster, which is really useful for debugging.
- (11:15) Hot Towel has really been carefully assembled and and configured so it all really works well together.
- (12:06) John says Hot Towel solves a common problem people experience when getting started with SPA development – it’s hard to figure out which libraries to use and how to hook them together.
- What’s the sweet spot? Line of business apps? Websites?
- (13:20) K Scott asks if the sweet spot for Hot Towel is for for line of business applications. John says that’s what it’s been used for. It’s great for data intensive applications, but he says it’s not a good fit if you’re just building a website.
- (13:53) Jon asks about the SEO story. John says there really isn’t a great solution for it, but says that for most SPA stories – e.g. line of business CRUD apps – you probably don’t need or want search engines to be able to read it. For some cases, like a store scenario, you might want a hybrid solution. The store would be a standard website that’s SEO friendly, but when you shift to buying something you enter a SPA experience.
- Organize all the scripts!
- (15:45) K Scott asks how John organizes code for a SPA. John says he likes to put all the application specific scripts into a separate /scripts/app folder. Jon says he noticed that in the RTM version of the SPA template, and Ward and John confess to having been the driving forces behind that change.
- Bringing grownup architecture into client side coding
- Hello World and Hello World scenarios
- (26:37) K Scott asks if there’s a hello world style application when you create a new Hot Towel application. John says there is, but it’s absolutely minimal so that it’s actually useable as a starting point for an application. There’s no database. Ward says Hot Towel has two simple pages with just enough code to get you started; use the other SPA templates to learn about the frameworks, then build your real app with Hot Towel – if you’re going with a Knockout-based UI.
- (28:37) Scott K says he sees Knockout and Angular cluttering your HTML in ways that violate some of the principles discussed earlier. Ward that you can do both without declarative HTML binding if you want. There’s a discussion of convention based bindings; K Scott asks if the Caliburn.Micro convention based bindings are used in Hot Towel, Ward explains why it’s not done.
- (33:54) Ward says the thing that blows his mind is that we’re talking about a ToDo list like it’s rocket science. There’s a description of the canonical sample scenarios. Jon proposes the Contoso SPA, Scott talks about how everyone was writing blog samples a few years ago.
- Getting started with SPA development
- (40:27) K Scott asks for two things developers should do before getting started with SPAs. John says the first thing is to remember that you can apply your current good coding practices, the second is that you should treat the code as a real language and take advantage of patterns, especially the module pattern. Ward says use your intuition – if something smells bad, stop doing it and ask for help.
- (43:03) John says don’t worry too much about which framework is the best, just pick one that feels natural. There’s a discussion of how the different frameworks have different feels, and you can just pick one and get started.
- Did Silverlight development experience help?
- (45:15) Jon says he first encountered a lot of these issues in Silverlight development. John says yes, and explains how his skills applied. Ward says he can’t comment on how it’d have been for him if he hadn’t used Silverlight, but that if you do have Silverlight experiences they’ll definitely apply. John talks about his experiences with Code Camper.
- Can mere mortals create VSIX MVC templates?
- (50:18) K Scott asks how difficult it was to create a VSIX based MVC template and if listeners could start with it. John says he waited for Ward to figure it and he copied Ward’s work, which wasn’t too bad. Ward explains what was difficult – mostly it comes down to poor documentation and duplicate references to files. He says he also hit issues with pulling in NuGet packages from multiple sources. Hot Towel is available as a NuGet package as well.
- (58:11) The customary discussion of Ward’s wardrobe occurs.
- (1:00:00) John talks about his upcoming PluralSight courses. Ward says he’s excited that BreezeJS was selected as part of the SPA story for ASP.NET and that he and IdeaBlade are focused on helping people as they’re getting started with Single Page Application development.
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 [audio://herdingcode.com/wp-content/uploads/HerdingCode-0160-Glimpse.mp3]
- (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.
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 [audio://herdingcode.com/wp-content/uploads/HerdingCode-0159-RavenDB.mp3]
- (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%.
- 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.
- 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.