Introduction to the node.js module express.js

My last post covered module loading in node…or at least try to cover the basics in an understandable way… This time, it is time to create something a bit more useful, a proper web application, using a module called “express”. And instead of me talking a whole lot about what I am about to talk about, let’s just get into it…

The first step is to install express. This is done using the NPM as always. The only thing to really decide is whether or not you want to install it globally using the -g parameter, or just locally. Me, I am just going to do it locally, so I use the following command

npm install express

If you install it globally, you can use express to create a “skeleton” application by running the following command

express -s -J <folder name>

This will give you a fullblown express app to start working with. But as I intend to explain the basics, I will start from scratch, and thus just install express to begin with.

More...

Modules and module loading in node for n00bs

Ok, so in my previous post, I introduced Node to newcomers. And I am in now way condescending towards people new to Node. But, wait…Chris, you are always condescending!? Not quite true, but in this case I am definitely not, as I am myself a n00b in the area.

The goal with my blogging about node is to share the stuff I learn along the way, in a way that I think make sense to a C# dev like myself. It might not be the correct node lingo, and I might be wrong in some cases, but I just call it as I see it…

This time around, it is time to have a look at modules in node, and how we load them.

More...

Build keynote day one–Julie Larson-Green

After Steve Ballmer, Julie Larson-Green took the stage. And I know that it might not be politically correct to say it, but I love that it is a woman stepping on stage doing it. It is good for the industry, and everyone agrees with that, but pointing it out is apparently a problem to some. And the fact that she does it with a confidence that just outshines most of the people doing the TechEd keynotes is just awesome.

Unfortunately, I think she was dealt a somewhat bad hand. The stuff that she was showing off was cool, but very far from game changers unfortunately…

More...

Build keynote day one–Steve Ballmer

[Updated: Now with proper spelling…]

I do not get to go to Build this year as I am min Madrid speaking at TechEd Europe, which to be honest, feels pretty great. No, we didn’t get two tablets and a presentation by Steve Ballmer, but TechEd has been at the top of my list of places I wanted to speak at for quite some time. So I’m ok with that…

Instead, I downloaded the keynote from day one, and thought I would reflect a bit on what was said. Starting out with Steve Ballmer’s part

More...

Getting started with Node.js or Hello World in JavaScript

Node.js has got a whole lot of attention for some time now, and I guess it is time for me to get myself an opinion on what it is, and why it is so cool. And while doing so, I will try and write some blog posts offering my opinion and learnings regarding the platform.

In this first post, I will walk through setting up the “environment” needed to build apps, build an initial “Hello World” app to see that it al works. But let’s start with the first question you will ask if you have never worked with Node. What is Node? Well, it is basically a application runtime built on Chrome’s JavaScript runtime called V8. And what does that mean? Well, it means that you get a way to run JavaScript efficiently outside of the browser.

More...

Another conference, another keynote…

Ok, so I have just been at my first TechEd keynote on the nothern hemisphere and probably my 50th keynote all in all…and to be honest, it doesn’t get that much better… And by that, I don’t mean that keynotes don’t get better than the one I just saw. I mean that they don’t get better with time… Ler

In this case, it was pretty uneventful. A lot of IT-Pro stuff, which is to be expected at TechEd, but also a bit of Dev-Div stuff from Scott Gu. So even if most of it was out of my interest zone, there were a few cool things. Such as the announcement of pricing changes on Azure, as well as changes in licensing for using MSDN licenses in Azure for dev/test.

The biggest announcement being that shut down instances in Azure will not be charged in the future, and charging will be done per minute instead of per hour. So this makes for a great dev/test platform that won’t rack up too much cost as one can shut down instances when not in use, without having to delete them and thus cause long startup times…

Ok, that was about all I could get out of the keynote… Sorry if it wasn’t a lot, but at least it was something…

Next up on my personal schedule is to run off to the Microsoft Solution Experience stand and answer questions about Windows 8 development…

Where are we going?

Yesterday I saw a few blog posts coming online, talking about the future of Microsoft’s development sphere. There was one from Scott at OdeToCode that talked about the future of .NET, and that open source might be the the thing that “saves” it. And then there was another one called “The Dying Platform: .NET”. I decided to highlight the later one on Twitter and Facebook, and got a few different replies. All of them more or less solidifying my beliefs, so I decided to write this post about it… And by that, I mean that people with a close connection with Microsoft and/or long experience of the Microsoft spehere, said it was wrong, and the more “regular Joe” developers said that it was spot on…

First of all, due to the fact that a couple of people fairly close to me told me that it was wrong, I will start off by explaining what parts of that second blog post I agree with, and why.

More...

Building a simple custom STS using VS2012 & ASP.NET MVC

In my previous post, I walked through how “easily” one can take advantage of claims based authentication in ASP.NET. In that post, I switched out the good old forms authentication stuff for the new FedAuth stuff. In this post, I want to take it a step further and actually federate my security, but instead of just using the Windows Azure ACS’s built in identity providers, I want to build a very simple one of my own.

A lot of the solution is based on the STS project that we could get by using VS2010 and the WIF SDK. However, this project was a Web Site project using Web Forms, and I really wanted a MVC version for different reasons.

If you are fine with using VS2010 and the WIF SDK, adding a custom STS is really easy. Just create a new web project, right-click the project and choose “Add STS Reference…” and then, walking through the wizard, there will be a step that offers you to select an STS. In this step, you choose “Create a new STS project…”, which will generate a custom STS project that you can modify to your needs. Unfortunately, that option isn’t available in VS2012. Using the “Identity and Access” add-on, you are only allowed to connect to an existing STS, the ACS or a local test STS, not an STS project.

More...

Claims-based identities in ASP.NET MVC 4.5 using the standard ASP.NET providers

Lately I have done a bit of work with claims-based identities. Most of it has been about doing federated security using the Windows Azure Access Control Service. However, I have also been working with a client that wanted claims-based identity management without federating it. For the moment, they just want to run locally, but they want to be prepared for a future where they might expand and move to a federated paradigm. And also, the way that they handle multitenancy is a perfect fit for claims…

Interestingly enough, working through their scenario, I found that there is a lot of information on the web about how to set up claims-based identity management using federation, but there is not a whole lot around for running it locally… It might not be that surprising considering that federated security has some really good points. Having been faced with this lack of information, I had to come up with a solution on my own, and building on what I built for them, I decided to create an extended example…

More...