Massive Community Update 2014-06-12

So I’ve been doing a bit of an experiment. I’ve seen that those community updates are normally rather small. I’ve waited a whole week before posting something new to see if we have better content.

I like the “Massive Community Update” for the amount of links it provides and for the occasion to put James Chambers whole series in perspective.

If you’re still thinking about it… read it. It’s worth it.

Visual Studio “14” CTP

TWC9: Visual Studio “14” CTP Episode (channel9.msdn.com)

NDC Oslo 2014

0-layered architecture on Vimeo (vimeo.com)

Monitoring your app with Logstash and Elasticsearch on Vimeo (vimeo.com)

James Chambers Series

Day 7: Semi-Automatic Bootstrap – Display Templates | They Call Me Mister James (jameschambers.com)

Day 8: Semi-Automatic Bootstrap – Editor Templates | They Call Me Mister James (jameschambers.com)

Day 9: Templates for Complex Types | They Call Me Mister James (jameschambers.com)

Day 10: HtmlHelper Extension Methods | They Call Me Mister James (jameschambers.com)

Day 11: Realistic Test Data for Our View | They Call Me Mister James (jameschambers.com)

Web Development

NDC 2014: SOLID CSS/JavaScript & Bower talks | Anthony van der Hoorn (blog.anthonyvanderhoorn.com)

Browserify: My New Choice For Modules In A Browser / Backbone App (derickbailey.com)

.NET

Final Thoughts on Nuget and Some Initial Impressions on the new KVM | The Shade Tree Developer on WordPress.com (jeremydmiller.com)

C# - A C# 6.0 Language Preview (msdn.microsoft.com)

ASP.NET

Host AngularJS (Html5Mode) in ASP.NET vNext (geekswithblogs.net)

ASP.NET: Building Web Application Using ASP.NET and Visual Studio (channel9.msdn.com)

jaywayco » Is ASP.Net vNext The New Node.js (blog.jaywayco.co.uk)

Learn How to Build a Modern Web Application with Client Side JavaScript and ASP.NET (channel9.msdn.com)

Fire and Forget on ASP.NET (blog.stephencleary.com)

ASP.NET vNext Moving Parts: OWIN (whereslou.com)

POCO controllers in ASP.NET vNext - StrathWeb (www.strathweb.com)

Jon Galloway - A 30 Minute Look At ASP.NET vNext (weblogs.asp.net)

Miscellaneous

FIXED: Blue Screen of Death (BSOD) 7E in HIDCLASS.SYS while installing Windows 7 - Scott Hanselman (www.hanselman.com)

Guide to Freeing up Disk Space under Windows 8.1 - Scott Hanselman (www.hanselman.com)

GitHub for Windows 2.0 - You’ve Been Haacked (haacked.com)

Simplified Setup and Use of Docker on Microsoft Azure | MS OpenTech (msopentech.com)

Azure Redux Presentation Labs Link Dump

For those who were among us and left early, here are the links for the labs for Windows Azure that were suggested!

Documentation

General Documentation

Web Sites Documentation
Mobile Service Documentation

Virtual Machines Documentation

Labs

Web Sites

http://www.windowsazure.com/en-us/documentation/articles/web-sites-dotnet-get-started/
http://www.windowsazure.com/en-us/documentation/articles/web-sites-publish-source-control/
http://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/
http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/

Web Sites Backup/Restore

http://azure.microsoft.com/en-us/documentation/articles/web-sites-backup/
http://azure.microsoft.com/en-us/documentation/articles/web-sites-restore/

Web Sites (Bonus)

http://azure.microsoft.com/en-us/documentation/articles/web-sites-custom-domain-name/

Mobile Service

http://www.windowsazure.com/en-us/documentation/articles/mobile-services-html-get-started/
http://www.windowsazure.com/en-us/documentation/articles/mobile-services-html-get-started-data/

Community Update 2014-06-06 Visual Studio 14, @CanadianJames, ASP.NET, OWIN and Windows Auzre

So I skipped a day since it was slow day on Thursday.

Lots however were added for ASP.NET.

Enjoy the weekend everyone!

Visual Studio “14”

Visual Studio “14” CTP now available in the Virtual Machine Azure Gallery (blogs.msdn.com)

James Chambers Series on MVC/Bootstrap

Day 5: Bootstrap for the Asp.Net Developer | They Call Me Mister James (jameschambers.com)

ASP.NET

Automatic optimization of images, CSS and JavaScript (madskristensen.net)

QueueBackgroundWorkItem to reliably schedule and run long background processes in ASP.NET (blogs.msdn.com)

Experiments in Wackiness: Allowing percents, angle-brackets, and other naughty things in the ASP.NET/IIS Request URL - Scott Hanselman (www.hanselman.com)

Reconciling ASP.NET vNext with Damian Edwards on the Hanselminutes Technology Podcast: Fresh Air for Developers (www.hanselminutes.com)

Episode 136: WS-Federation and Microsoft OWIN Components with Vittorio Bertocci (channel9.msdn.com)

Improving Web Application Performance - Part Two Users & Environment (mitchelsellers.com)

Windows Azure

Optimizing calls to Azure storage using Fiddler (blog.maartenballiauw.be)

Community Update 2014-06-04 ASP.NET vNext, @CanadianJames MVC Bootstrap series and what we learned from C++

So the big news is that Visual Studio 14 actually reached CTP. Of course, this is not the final name and is very temporary.

If you want to install it, I suggest booting up a VM locally or on Windows Azure.

Enjoy!

Visual Studio “14”

Visual Studio “14” CTP Downloads (www.visualstudio.com)

Announcing web features in Visual Studio “14” CTP (blogs.msdn.com)

Visual Studio “14” CTP (blogs.msdn.com)

ASP.NET vNext in Visual Studio “14” CTP (blogs.msdn.com)

Morten Anderson - ASP.NET vNext is now in Visual Studio (www.mortenanderson.net)

James Chambers MVC/Bootstrap Series

Day 4: Making a Page Worth a Visit | They Call Me Mister James (jameschambers.com)

Web Development

To Node.js Or Not To Node.js | Haney Codes .NET (www.haneycodes.net)

ASP.NET

aburakab/ASP-MVC-Tooltip-Validation · GitHub (github.com) – Translate MVC errors to Bootstrap notification

Download Microsoft Anti-Cross Site Scripting Library V4.3 from Official Microsoft Download Center (www.microsoft.com)

ASP.NET Web API parameter binding part 1 - Understanding binding from URI (www.strathweb.com)

Cutting Edge - External Authentication with ASP.NET Identity (msdn.microsoft.com)

Forcing WebApi controllers to output JSON (blog.bjerner.dk)

Videos

What – if anything – have we learned from C++? (channel9.msdn.com)

Search Engine

Elasticsearch.org Elasticsearch 1.2.1 Released | Blog | Elasticsearch (www.elasticsearch.org)

Elasticsearch.org Marvel 1.2 Released | Blog | Elasticsearch (www.elasticsearch.org)

Dealing with human language (www.elasticsearch.org)

Late Community Update 2014-06-02 REST API, Visual Studio Update 3, data indexing, Project Orleans and more

So I was at the MVP Open Days and I’ve missed a few days. It seems that my fellow MVP James Chambers has started a great initiative about exploring Bootstrap and MVC with lots of tips and tricks. Do not miss out!

Otherwise, this is your classic “I’ve missed a few days so here are 20,000 interesting links that you must read” kind of day.

Enjoy!

Must Read

AppVeyor - A good continuous integration system is a joy to behold - Scott Hanselman (www.hanselman.com)

This URL shortener situation is officially out of control - Scott Hanselman (www.hanselman.com)

James Chambers Bootstrap and MVC series

Day 0: Boothstrapping Mvc for the Next 30 Days | They Call Me Mister James (jameschambers.com)

Day 1: The MVC 5 Starter Project | They Call Me Mister James (jameschambers.com)

Day 2: Examining the Solution Structure | They Call Me Mister James (jameschambers.com)

Day 3: Adding a Controller and View | They Call Me Mister James (jameschambers.com)

Web Development

How much RESTful is your API | Bruno Câmara (www.bfcamara.com)

Data-binding Revolutions with Object.observe() - HTML5 Rocks (www.html5rocks.com)

ASP.NET

ASP.NET Moving Parts: IBuilder (whereslou.com)

Supporting only JSON in ASP.NET Web API - the right way - StrathWeb (www.strathweb.com)

Shamir Charania: Hacky In Memory User Store for ASP.NET Identity 2.0 (www.shamirc.com)

.NET

Missing EF Feature Workarounds: Filters | Jimmy Bogard’s Blog (lostechies.com)

Visual Studio/Team Foundation Server 2013 Update 3 CTP1 (VS 2013.3.1 if you wish) (blogs.msdn.com)

TWC9: Visual Studio 2013 Update 3 CTP 1, Code Map, Code Lens for Git and more… (channel9.msdn.com)

.NET 4.5 is an in-place replacement for .NET 4.0 - Rick Strahl’s Web Log (weblog.west-wind.com)

ASP.NET - Topshelf and Katana: A Unified Web and Service Architecture (msdn.microsoft.com)

Windows Azure

Episode 142: Microsoft Research project Orleans simplify development of scalable cloud services (channel9.msdn.com)

Tool

JSON to CSV (konklone.io)

Search Engines

The Absolute Basics of Indexing Data | Java Code Geeks (www.javacodegeeks.com)

Incompatibility between Nancy and Superscribe

So I’ve had the big idea of building an integration of Nancy and Superscribe and try to show how to do it.

Sadly, this is not going to happen.

Nancy doesn’t treat routing as a first class citizen like Superscribe does and doesn’t allow interaction with routing middleware. Nancy has its own packaged routing and will not allow Superscribe to provide it the URL.

Nancy does work with Superscribe but you have to hard-code the URL inside the NancyModule. So if you upgrade your Superscribe graph URL, Nancy will not respond on the new URL without you changing the hardcoded string.

I haven’t found a solution yet but if you do, please let me know!

Configuring Superscribe to a self-hosted OWIN application

We’ll start from my previous post with a single console application with a self-hosted OWIN instance.

The goal here is to provide a routing system so that we can route our application in different section. I could use something like WebAPI but the routing and the application itself are tightly linked.

I’m going to use a nice tool called Superscribe that allow to do routing. It’s Graph based routing but it should be simple enough for us to hook it up and create routes.

Installing Superscribe

Well, we’ll open up the Package Manager Console again and run the following command:

1
Install-Package Superscribe.Owin

This should install all the proper dependencies to have our routing going.

Modifying our Startup.cs to include Superscribe

First thing first, let’s get rid of this silly WelcomePage we created in the previous post. Boom. Gone.

Let’s create some basic structure to handle our routes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Microsoft.Owin;
using Owin;
using Superscribe.Owin.Engine;
using Superscribe.Owin.Extensions;

[assembly: OwinStartup(typeof(MySelfHostedApplication.Startup))]

namespace MySelfHostedApplication
{
public class Startup
{
public void Configuration(IAppBuilder app)
{

var routes = CreateRoutes();
app.UseSuperscribeRouter(routes)
.UseSuperscribeHandler(routes);
}

public IOwinRouteEngine CreateRoutes()
{

var routeEngine = OwinRouteEngineFactory.Create();
return routeEngine;
}
}
}

So this code basically create all the necessary plumbing for Superscribe to handle our requests.

Creating our routes

So we now have a route engine to work with. So let’s first create a handler for the default “/” URL.

We’ll also create a route for “/welcome” to use our default WelcomePage that we had earlier (just for demo purpose).

We’ll also create a route for “/Home” that will return a plain text (for the moment).

Here’s what it looks like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.Owin;
using Owin;
using Superscribe.Models;
using Superscribe.Owin.Engine;
using Superscribe.Owin.Extensions;

[assembly: OwinStartup(typeof(MySelfHostedApplication.Startup))]

namespace MySelfHostedApplication
{
public class Startup
{
public void Configuration(IAppBuilder app)
{

var routes = CreateRoutes();
app.UseSuperscribeRouter(routes)
.UseSuperscribeHandler(routes);
}

public IOwinRouteEngine CreateRoutes()
{

var routeEngine = OwinRouteEngineFactory.Create();
routeEngine.Base.FinalFunctions.Add(new FinalFunction("GET", o => "Hello world"));
routeEngine.Pipeline("welcome").UseWelcomePage();
routeEngine.Pipeline("Home").Use((context, func) =>
{
context.Response.ContentType = "text/plain";
return context.Response.WriteAsync("This is the home page");
});

return routeEngine;
}
}
}

That was simple.

Basically, we build a simple pipeline to an OWIN middleware.

What about NancyFX with Superscribe after?

Creating a Self-Hosted OWIN Application

So I know there’s a lot of demo that cover this already but this is normally part of my demo on OWIN/Katana and I always forget which package to install so… you dear reader are going to see my reminder on how to do it.

Creating a new console application

The first step is to create a new Console application. I’m not going to include screenshots of that since I’m pretty sure that you are all smart enough to not need a how-to on creating console app.

Startup.cs

Every OWIN app need a Startup.cs file. If you don’t have SideWaffle installed, you’ll need to copy/paste my code but why do that when you can have a template for it? Here’s my barebone one.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Microsoft.Owin;
using Owin;

[assembly: OwinStartup(typeof(MySelfHostedApplication.Startup))]

namespace MySelfHostedApplication
{
public class Startup
{
public void Configuration(IAppBuilder app)
{

app.UseWelcomePage();
}
}
}

The only thing that won’t work yet for anyone is the “UseWelcomePage”. We’re fixing that right now.

In the Package Manager Console run the following command:

1
Install-Package Microsoft.Owin.SelfHost

There. We should now have something that compiles! Not working yet but compiling. Baby step.

Starting the server itself

Since it’s a console application, we only have an empty Main() that does nothing and adding Startup.cs will not do any magic. We still need to wire-up things up neatly before going any further. Ready?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using Microsoft.Owin.Hosting;

namespace MySelfHostedApplication
{
class Program
{
static void Main(string[] args)
{

using (WebApp.Start<Startup>("http://localhost:8888"))
{
Console.WriteLine("Server started... press ENTER to shut down");
Console.ReadLine();
}
}
}
}

That’s it. You could remove the WriteLine but I like to have something in my window instead of a blank screen. The ReadLine is required or the server is going to be disposed.

Testing it

Now press F5 and open your browser to http://localhost:8888 and you should see a nice welcome page.

Enjoy!

Community Update 2014-05-28 Xamarin 3, JSON Generator, Bootstrap, CQRS video

This is a special edition with the Xamarin 3 that was just announced. Don’t miss out on the other content! We have Darrel Miller (BizCoder.com) that talks about WebAPI and OWIN, we have Bootstrap with RequireJS, NodeJS new release of Socket.IO and way more!

Enjoy!

Must Read

We are abstracting on the shoulders of giants - Scott Hanselman (www.hanselman.com)

Xamarin 3 Announcement

Announcing Xamarin 3 | Xamarin Blog (blog.xamarin.com)

Xamarin 3.0 | Xamarin (developer.xamarin.com) – Change log and more.

Xamarin 3 Unveiled – Visual Studio Magazine (visualstudiomagazine.com)

Xamarin.Forms - Write Once, Run Everywhere, AND Look Native? - Scott Hanselman (www.hanselman.com)

Web Development & NodeJS

JSON Generator – tool for generating random JSON data (www.json-generator.com)

Socket.IO — Introducing Socket.IO 1.0 (socket.io)

React Bootstrap (react-bootstrap.github.io)

ASP.NET

Bizcoder - Making your ASP.NET Web API funcky with an OWIN appFunc (www.bizcoder.com)

Devhammer’s Den - ASP.NET MVC, Bootstrap, and Internet Explorer Compatibility View (devhammer.net)

Bobris/Nowin · GitHub (github.com) – Pure HTTP Server in .NET (no HttpListener or IIS). Claims to be faster than NodeJS

Architecture and Methodology

“CQRS Class” - Videos - Viddler (www.viddler.com)

Search Engines

Side by Side with Elasticsearch and Solr (www.slideshare.net)

Community Update 2014-05-27 Security, Windows Azure, Windows Phone, #aspnet vnext

 

Must Read

The Siren Song of Backwards Compatibility - You’ve Been Haacked (haacked.com)

Calculate your WEI (Windows Experience Index) under Windows 8.1 - Scott Hanselman (www.hanselman.com)

Claims-based Authentication does not exist (for crying out loud) | leastprivilege.com on WordPress.com (leastprivilege.com)

Web Development

Easy Fix to a Common Angular Module Error | John Papa (www.johnpapa.net)

.NET

Fun With Windows Azure AD: Calling REST Services from a Windows Phone 8 App | CloudIdentity (www.cloudidentity.com)

SapiensWorks | Tips To Be More Productive (.Net/Java Edition) (www.sapiensworks.com).aspx)

ASP.NET

Morten Anderson - What’s cooking in ASP.NET vNext? (www.mortenanderson.net)

Performance Optimize Your ASP.NET Web App (channel9.msdn.com)

Community Update 2014-05-26 Javascript, #nodejs in Visual Studio, #aspnet on OSX and Linux and more

 

Web Development

Web Tools Weekly: Three Tips On .call, .apply And .bind w/ JavaScript Functions (derickbailey.com)

.NET

Building with Node.js Tools for Visual Studio (blogs.msdn.com)

.NET Native Deep Dive: Optimizing with Runtime Directives (blogs.msdn.com)

Announcing Update to Productivity Power Tools 2013 (blogs.msdn.com)

ASP.NET

ASP.NET vNext on OSX and Linux - dev/null (graemechristie.github.io)

Production Debugging: A story about “Exception code: 0xe053534f” - Fog Creek Blog (blog.fogcreek.com)

Basic Authentication in ASP.Net MVC Web API | Laxmilal Menaria Blog (blog.laxmilalmenaria.com)

Using Unity.Mvc5 and Unity.WebApi together in a project | FeedbackHound Blog (blog.feedbackhound.com)

Videos

INTRODUCING: The Future of .NET on the Server (channel9.msdn.com)

DEEP DIVE: The Future of .NET on the Server (channel9.msdn.com)

Using Excel as the front-end of an OData service

Preparing the project

First we’ll start by creating a WCF Data Service

image

Once the project is created, we’ll start by deleting Service1.svc and it’s related objects.

We’ll install the following package:

1
Install-Package Microsoft.OData.EntityFrameworkProvider -Pre

On Nuget Gallery

Ensure to create an EDMX for your database using EF6. On my side, I’m using the Not-Northwind simple database using all the available tables and none of the views.

Once this is created, we’ll start by creating a brand new service that we’ll call Northwind.svc:

image

The class it will generate your will not be compilable right away without injecting our classes.

The class will be called “Northwind” and inherit from DataService<…>.

We’ll replace this:

1
public class Northwind : DataService<MySourceClass>

By this:

1
public class Northwind : EntityFrameworkDataService<NorthwindEntities>

This will allow EF6 to connect with WCF Data Services to create a model on your database.

We can test this by hitting F5. It should return you this:

1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8"?>
<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xml:base="http://localhost:7146/Northwind.svc/">
<workspace>
<atom:title>Default</atom:title>
</workspace>
</service>

We see that we don’t have anything exposed. Let’s fix that now shall we? Going back to the code, we can add the following line to Northwind.svc.cs InitializeService method.

1
config.SetEntitySetAccessRule("Products", EntitySetRights.AllRead);

If we hit F5 again we should see this:

1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8"?>
<service xml:base="http://localhost:7146/Northwind.svc/" xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">
<workspace>
<atom:title>Default</atom:title>
<collection href="Products">
<atom:title>Products</atom:title>
</collection>
</workspace>
</service>

This means we are ready for hooking this up to Excel.

Wiring this up to Excel

This is surprisingly the easiest part. First, start Excel 2010 or higher and go to the Data tab and click on the following:

image

This will bring up a popup in which we’ll paste our oData URL:

image

Once you press next you will be prompted to select your table (select Products and click Finish).

image

It will ask you where you want your data and how.

At that point, it’s up to you to start playing with your data in Excel and expose other endpoint for your business user to start exploiting your data.

Community Update 2014-05-23 #MonkeySpace EU cancelled, #HTML5, #aspnet, #webapi and #cqrs

If you are European and were among the 13 who registered for MonkeySpace in Dublin, please be aware that the event was cancelled and for obvious reasons. We are always in need of good conferences and MonkeySpace had a great list of speakers.

Maybe it was a lack of promotion but anyway. Next year? They’re trying again. Keep an eye open!

Enjoy today’s links!

Must Know

MonkeySpace Europe Postponed : ragan.io (ragan.io)

Web Development

HTML5 Needs a New Animation API to Compete with Native - Marc Grabanski (marcgrabanski.com)

ASP.NET

Visually Located | Using the WebAPI to send errors for your apps (www.visuallylocated.com)

ASP.NET vNext Moving Parts: IConfiguration (whereslou.com)

The good, the bad and the ugly of ASP.NET Identity | brockallen on WordPress.com (brockallen.com)

Architecture and Methodology

Azure Development - CQRS on Microsoft Azure (msdn.microsoft.com)

Community Update 2014-05-22 Desktop app with #nodejs, #dotnet native and #OWIN

 

Web Development (Everything JavaScript and more)

Build Desktop Apps with JavaScript and Node WebKit | Flippin’ Awesome (flippinawesome.org)

rogerwang/node-webkit · GitHub (github.com)

heatmap.js | Create HTML5 Heatmaps with Canvas and JavaScript (www.patrick-wied.at)

.NET

NuGet Package of the Week: ImageProcessor - lightweight image manipulation in C# - Scott Hanselman (www.hanselman.com)

.NET Native Deep Dive: Help! I Hit a MissingMetadataException! (blogs.msdn.com)

My experience with .NET Native Preview (blogs.msdn.com)

Web Essentials on Visual Studio Web Express (madskristensen.net)

ASP.NET

Announcing ASP.NET Web API Recipes - StrathWeb (www.strathweb.com) – Incoming book to keep an eye on

CSS Validation with Visual Studio Web Essentials (blogs.msdn.com)

Two-factor authentication using SMS and email with ASP.NET Identity : The Official Microsoft ASP.NET Site (www.asp.net)

OWIN OAuth 2.0 Authorization Server in C# for Visual Studio 2013 (code.msdn.microsoft.com)

Architecture and Methodology

How to Use a Code Review to Execute Someone’s Soul | DaedTech (www.daedtech.com)

Microsoft Azure

Morten Anderson - Remote debugging a windows Azure website (www.mortenanderson.net)

Search Engine

Elasticsearch.org Elasticsearch 1.2.0 And 1.1.2 Released | Blog | Elasticsearch (www.elasticsearch.org)

Community Update 2014-05-21 #nodejs, image optimization, #fubumvc, #elasticsearch and #IsTDDDead

If you haven’t seen the debate on “Is TDD Dead?”, you should definitely take a look at it. The debate include Kent Beck, Martin Fowler and David Heinemeier Hansson (creator of Ruby On Rails). The debate is basically around “Is TDD making your code badly design?”. There is currently 3 videos and there is going to be one more on next Tuesday.

Enjoy

Architecture and Methodology

Is TDD Dead (martinfowler.com) – This is a compilation of all the hangout videos that were done. This is a must watch.

Web Development

AutoFixture — a Node.js Test Fixture Library | John Teague’s Blog (lostechies.com)

Bloggers: Know when to use a JPG and when to use a PNG and always Squish them both - Scott Hanselman (www.hanselman.com)

ASP.NET

Calling WCF Web Services from JavaScript - Development With A Dot (weblogs.asp.net)

A Better Development Web Server for .Net with FubuMVC 2.0 | The Shade Tree Developer on WordPress.com (jeremydmiller.com)

Search Engines (Lucene, Solr, ElasticSearch)

Reindexing your ElasticSearch data with scan/scroll « Euphonious Intuition (euphonious-intuition.com)

Lucene Scoring and elasticsearch’s _all Field – Control+R (jontai.me)

Elasticsearch.org This Week In Elasticsearch | Blog | Elasticsearch (www.elasticsearch.org)

Massive Community Update Back from vacation edition with #aspnet #vnext, #nodejs and more

So I was on vacation for the past week and came back yesterday hence the missing week in the updates.

What I’m posting today might be newer to you than it is to me. This update cover from 2014-05-11 to today.

Enjoy!

Web Development

Edge.js (tjanczuk.github.io)

Backbone.fwd: Forward Events From One Backbone Object, Through Another (derickbailey.com)

10 Angular Tips from TechEd 2014 | John Papa (www.johnpapa.net)

.NET

The .NET Native Tool-Chain (blogs.msdn.com)

Announcing ASP.NET Session State Provider for Redis Preview Release (blogs.msdn.com)

Enabling the .NET Compiler Platform (“Roslyn”) in ASP.NET applications (blogs.msdn.com)

ASP.NET vNext

aspnet/KRuntime · GitHub (github.com)

The Next Generation of .NET – ASP.NET vNext (blogs.msdn.com)

Introducing ASP.NET vNext - Scott Hanselman (www.hanselman.com)

ASP.NET vNext (davidfowl.com)

ASP.NET vNext Overview (davidfowl.com)

A 30 Minute Look At ASP.NET vNext - Jon Galloway (weblogs.asp.net)

ASP.NET vNext: the future of .NET on the Server (blogs.msdn.com)

INTRODUCING: The Future of .NET on the Server (channel9.msdn.com) – Video of course

DEEP DIVE: The Future of .NET on the Server (channel9.msdn.com) – Video of course

ASP.NET

Improvements to ASP.NET Web Forms (blogs.msdn.com)

DarksideCookie | Understanding OWIN – more on hosting (chris.59north.com)

Announcing new Web Features in Visual Studio 2013 Update 2 RTM (blogs.msdn.com)

Attribute-based rate limiting with WebApiThrottler - Stefan Tech Notes - Blogging about programming and software architecture (www.stefanprodan.com)

OWIN Protocol Middleware, Cookies and Reference Mode Sessions: We Need Your Feedback! | CloudIdentity (www.cloudidentity.com)

Architecture and Methodology

A better domain events pattern | Jimmy Bogard’s Blog (lostechies.com)

SaaS Builders: Beware The Free Trial (derickbailey.com)

CQRS & Event Stores (www.youtube.com)

Microsoft’s New Running Shoes - You’ve Been Haacked (haacked.com)

Windows Azure

Azure: VM Security Extensions, ExpressRoute GA, Reserved IPs, Internal Load Balancing, Multi Site-to-Site VPNs, Storage Import/Export GA, New SMB File Service, API Management, Hybrid Connection Service, Redis Cache, Remote Apps and more… - ScottGu’s Blog (weblogs.asp.net)

My Switch to Azure Websites (wildermuth.com)

Open Source

GitHub Data In Your Website - You’ve Been Haacked (haacked.com)

Search Engine (Lucene, Solr, ElasticSearch)

Changing Bits: Choosing a fast unique identifier (UUID) for Lucene (blog.mikemccandless.com)

Insecure default in Elasticsearch enables remote code execution (bouk.co)

Community Update 2014-05-08–Free #pluralsight video, #nodejs, new #dotnet release

For those reading daily, I’m sorry about not posting yesterday. Sickness strikes everyone and sadly, I was struck too in the process and was not able to be present.

Here’s what was talked about yesterday and today:

Must Read

FREE Pluralsight video: (www.hanselman.com)

Interview: Deploying NuGet.org - Octopus Deploy (octopusdeploy.com)

Web Development

Polyfill The ‘template’ Element With Jade Mixins (derickbailey.com)

The Absolute Beginner’s Guide to Node.js | via @codeship (blog.codeship.io)

.NET

What’s New in the .NET Framework 4.5, 4.5.1, and 4.5.2 (msdn.microsoft.com)#v452)

Separating the UI Code from the Business Code: What’s Reasonable? – Visual Studio Magazine (visualstudiomagazine.com)

Projecting computed properties with LINQ and AutoMapper | Jimmy Bogard’s Blog (lostechies.com)

Missing EF Feature Workarounds: Cascade delete orphans | Jimmy Bogard’s Blog (lostechies.com)

ASP.NET

ASP.NET 4.5.2 and EnableViewStateMac (blogs.msdn.com)

Jonathan Channon Blog - Introducing Owin.StatelessAuth with Nancy/Angular demo (blog.jonathanchannon.com)

HangFire – Background job processing for ASP.NET (hangfire.io)

Scheduling Background Jobs from an ASP.NET Application in .NET 4.5.2 – Marius Schulz (blog.mariusschulz.com)

Tools

json2csharp - generate c# classes from json (json2csharp.com)

Search Engine (ElasticSearch, and more)

Elasticsearch.org This Week In Elasticsearch | Blog | Elasticsearch (www.elasticsearch.org)

CoreOS follow-up: Sinatra, Logstash, Elasticsearch, and Kibana (marceldegraaf.net)

Community Update 2014-05-06 – #backbonejs, #microsoftazure, #webapi, #elasticsearch

Must Read

A Lesson in Compassion - You’ve Been Haacked (haacked.com)

Want To Know What It’s REALLY Like To Be An Entrepreneur? I’ve Got A Podcast For You. (derickbailey.com)

Web Development

Part 1: Backbone.js Deconstructed - Tech.pro (tech.pro)

Bizcoder - The much maligned User Agent header (www.bizcoder.com)

Blogging

madskristensen/MiniBlog · GitHub (github.com) – If you don’t know this yet, you should. It’s blogging back to basics.

Azure

Cloud Power: How to scale Azure Websites globally with Traffic Manager - Scott Hanselman (www.hanselman.com)

ASP.NET

SAAS Ecom: Open Source billing for .NET MVC 5 / Stripe | I’m Pedro Alonso (www.pedroalonso.net)

A primer on OWIN cookie authentication middleware for the ASP.NET developer | brockallen on WordPress.com (brockallen.com)DarksideCookie | Understanding OWIN – hosting and middleware (chris.59north.com)

Using Web API as a proxy for downloading files | Davide Guida (davideguida.altervista.org)

Architecture and Methodology

Score one for CQRS | XENA (xena.toftdals.dk)

Search Engine

Using Luke with ElasticSearch | Mostly Technical (rosssimpson.com)

Querying Elasticsearch | Max Horstmann’s Coding Blog (maxhorstmann.net)

Community Update 2014-05-05 – #fubumvc, #angularjs, #visualstudio and way more

Don’t miss this talk from David Heinemeier Hansson (creator of Ruby on Rails). I found it very interesting.

Must Read

FubuMVC Lessons Learned: Semantic Versioning | The Shade Tree Developer on WordPress.com (jeremydmiller.com)

The Case Of Slow Visual Studio Startup (geekswithblogs.net)

ongoing by Tim Bray · Security Farce (www.tbray.org)

Keynote - Writing Software - David Heinemeier Hansson - RailsConf 2014 (www.confreaks.com) – Very interesting video by the creator of Ruby On Rails.

Web Development

Douglas Crockford - The Better Parts, This talk is about using programming languages more effectively, and using the experience to create and select better… (www.ustream.tv) – Watch out. Video.

AngularJS with touch of GulpJS - Bit of Technology (bitoftech.net)

.NET

The Reactive Extensions for .NET 2.2.4 Released (blogs.msdn.com)

.NET Memory Analysis: Object Inspection (blogs.msdn.com)

Missing NHibernate features in Entity Framework | Jimmy Bogard’s Blog (lostechies.com)

Architectures and Methodology

What Should I be looking for during Code Reviews? | Alexandre Brisebois on WordPress.com (alexandrebrisebois.wordpress.com)

CQRS: Command/Query Responsibility Segregation (www.slideshare.net) – I don’t normally share slides but those really well done.

Writing testable JavaScript: How AMD changed the way I see code

Well to start, what is AMD? This acronym means Asynchronous Module Definition.

In the old days of JavaScript development, we defined functions in JS files (or maybe you just wrote them inline in the HTML) and included them in our master page. Those modules got defined in the order we defined them whether we used them or not. Some errors could be possible by defining a JS file before another it depended upon. This would cause an errors when the page loaded without a clear answer of what was the problem. We would reorder our file declaration, hit save and reload.

Did you do that? I sure still do it (kinda) today. Especially for everything that is related to jQuery and its plugins. You make sure to define jQuery before the other modules and it’s almost guaranteed to always work. But here’s where it gets hairy.

When you write application code, there is many ways to do it. 10-15 years ago, people used to put all their code into one file called “app.js” or something along those lines. When you are downloading file at the blazing speed of 5 kilobytes per seconds, it’s important to minimize the amount of requests on your website and every request chewed precious seconds for your user.

Things have changed.

With tools like the built-in .NET Bundler and Minifier or packages like BundleTransformer, it’s now easy to package up your applications in one big file and have everything compressed to save on space. So the excuse to not separate your application in multiple files has been rendered moot in the last 5 years.

So we did. We split all our code in plugins, accessing the DOM with jQuery like never before. Splitting every component in a global namespace “window.MyApp.MyPage.myProperty” but it didn’t feel clean. Having to handle namespaces is boring very fast. You write a lot of boilerplate code like this:

1
2
3
window.myNamespace = window.mynamespace || {};
window.myNamespace.anotherOne = window.myNamespace.anotherOne || {};
// ... etc... etc...

And you had to write this at the beginning of every file to ensure that in whichever order things were loaded, you could actually use them. There had to be another way.

Introducing requirejs

requirejs is a tool that allows you to work with modules (one per file) instead of blocks of code. When writing a module, you can request dependencies.

1
2
3
4
5
define(["widget/myWidget", "myplugin"],
function(myWidget, myPlugin) {
//todo: write awesome code
return "...";
});

So you tell requirejs that you want some plugin and requirejs will ensure to download the required file, ensure that this file had their dependencies resolved and so on. All of this being auto-magically downloaded for you.

Another free bonus is we return a static contract. An object which will represent your whole module. This is way better than global function. First, you keep your private to yourself and expose what you want to be exposed. This allows for a behaviour similar to a class.

However, there’s a problem. Do you see it?

It downloads file individually, which is fine in development but becomes a problem in production even with our super fast connections. Even if connections have goten faster, latency (the milliseconds taken for the server to send you the first byte) can kill your performance if you request 20 files (20 files at 200ms is 4 seconds of wait). The classic .NET bundler is not the best tool with those kind of app since they are not contextually aware of the structure of your app.

It works best with something like NodeJS where access to files are local and not remote.

How can we fix this?

With NodeJS and r.js. Why? Because NodeJS allows you to run JavaScript outside of a browser and access your file system to retrieve all the required files. The RequireJS team wrote an optimizer for NodeJS that will compile all the modules you write into a single file.

Basically, you just show him what you want optimized, run the command line and let it go.

1
node r.js -o myapp.build-configuration.js

I’m not going to cover it all. Read the requirejs documentation for more info.

What are the advantages in using AMD/requirejs?

First, a module is highly testable. If you want to finally cover your client-side code with unit tests… it’s one of the more efficient way to do it. You define a module, you test its public components.

Second, splitting files for each part of your app instead of having a global file will definitely give a cleaner vision of what is going on in your application. The single application.js file with 20,000 lines of code is not funny anymore. It was fun when we saw an IDE crash from opening the file the first few times but we’re getting serious now. One file per page, widget, dialog and what not is the norm in most serious JavaScript application.

Third, having your dependencies resolved like your favorite package manager (npm, NuGet, etc.) is what we expect out of our tools. Tell the tool what you want, let the tool find your dependency. No more playing with global variable and playing the classic JavaScript Russian Roulette. Changing global state and hoping my code doesn’t break when I don’t click on the right buttons in the right sequence is not the way to go. Know what you are modifying at all time by looking at the requested dependencies.

Finally, having the peace of mind of knowing that your helped make Web Development a little bit better.

So I know that I haven’t covered everything but the point was to help convince you that asynchronous modules are the way to go. Have I convinced you?