Scott Smith

Blog Tutorials Projects Speaking RSS

Beer Locker: Building a RESTful API With Node - Passport

In this part of the beer locker series, we will dive into creating user accounts and authentication using Passport. By the end of this article you will have learned how to add user accounts, implement authentication, and control access to beer lockers.

Beer Locker: Building a RESTful API With Node - CRUD

In this beer locker part, we will dive a bit deeper and learn how to implement CRUD operations on our beer locker. By the end of this article you will have learned how to connect to a MongoDB, used Mongoose for object modeling, and have implemented GET, PUT, POST, and DELETE endpoints.

Beer Locker: Building a RESTful API With Node

In this multipart series we’ll be creating a RESTful API using Node, Express, Mongoose to interact with MongoDB, Passport for authentication, OAuth2orize for OAuth support, and explore best practices and tools.

The Birth of Bit: Making Ideas Happen

We all have ideas. In the space we work it is nearly impossible not to. We are developers and designers; the makers of the digital world. They key is having the ability to take the leap and transform an idea into a reality. Why do so many people not follow through with their ideas? Read on to learn practical tips on how to take an idea and make it real.

Deeper Dive Into ScriptCS

In this article, we will be exploring the newish REPL interactive mode, script packs, and many other cool features of ScriptCS.

Using @ and _ With HTML Helpers in Razor Views

Here is a tip for you .NET developers.

When you are using HTML helpers there are times when you need to add extra attributes to the HTML element being produced by the helper. Two attributes that are commonly added are the class and data- attribute. HTML helpers support the ability to pass in an anonymous object for setting these attributes. The helper will take each item out of the anonymous object and add them to the html element as attributes.

SignalR: Awesome Real-Time With .NET - Part 2

Welcome to part two of the series SignalR: Awesome Real-Time with .NET.

Part 1 - SignalR: Awesome Real-Time with .NET

Part 2 - SignalR: Awesome Real-Time with .NET - Part 2

For this post, we will start where we left off from part one. If you don’t want to follow part one and create the solution, project, code, etc, you can get the source on GitHub.

Step 1 - Specifying the route for the Hub

Because Hubs are at a higher level than PersistentConnections, there is no need to manually set the route for the Hub. Some of the magic I talked about before does this for us automatically by creating the route /SignalR. To change the route for the Hub you need to register the route in the Global.asax file and update any client side references to the Hub.

Chocolatey NuGet

Chocolatey NuGet?!

From the site:

Let’s get Chocolatey! Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind. Easy Install! To install chocolatey now, open a command prompt and paste some text

To install simply paste the following into a command prompt:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command “iex ((new-object net.webclient).DownloadString(‘http://bit.ly/psChocInstall’))” && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

Don’t feel comfortable running commands you found on some random blog? I don’t blame you. Head over to their site to learn more about Chocolatey NuGet.

SignalR: Awesome Real-Time With .NET

Welcome to part one of the series SignalR: Awesome Real-Time with .NET

Part 1 - SignalR: Awesome Real-Time with .NET

Part 2 - SignalR: Awesome Real-Time with .NET - Part 2

What is SignalR?

SignalR is an async signaling library for .NET to help build real-time, multi-user interactive web applications

Or…

A real cool .NET framework hosted in ASP.NET and a JavaScript library (on the client side that helps build collaborative web apps quickly and painlessly. It is open source and freely available on GitHub.

And…

It doesn’t have to be hosted in ASP.NET. It can also be hosted using OWIN (Open Web Interface for .NET) or self host (console, windows service, azure, etc.).

A JavaScript library isn’t the only client side implementation as well. As of today, there are jQuery, Native .NET, WP7, iOS, Silverlight, WinRT, and Android (via Mono) implementations.

Localtunnel

Ever wanted to share your localhost web server to the world? How about testing your localhost web server easily from mobile or other devices?

If so, then you should check out localtunnel.

Localtunnel allows you to easily share your localhost web server to the rest of the world.

Zen Coding

Never write HTML again!

Ok, so you might still need to write HTML, but Zen Coding provides an amazingly simplistic syntax for generating HTML. Take the following HTML for example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE HTML>
<html lang="en-US">
<head>
  <meta charset="UTF-8">
  <title></title>
</head>
<body>
  <div id="container">
    <div id="nav">
      <ul>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </div>
</body>
</html>

It is simple and straightforward but why type it out by hand if you don’t have to. With Zen Coding you don’t! The followng will generate the HTML shown above:

1
html:5>div#container>div#nav>ul>li*5

The Zen Coding concept is beautifully simple: You declare a series of nested HTML or XML elements using an intuitive and expressive inline syntax, and the plugin generates the markup for you.

There are addons to many IDEs, tools, and editors for Zen Coding including Visual Studio, Sublime Text 2, Coda, …

Learn more here: https://github.com/sergeche/zen-coding

Tinkerbin

Tinkerbin lets you play around with HTML, JavaScript and CSS without creating files or uploading to servers.

It also supports CoffeeScript, Sass (with Compass), Less, HAML, and more.

Try it here:

http://tinkerbin.com/

Windows 8 Camp in a Box

Microsoft provides free training events in the form of dev camps. One such dev camp is Windows 8 Developer Camp. Windows 8 Developer Camps are free, fun, no-fluff events for developers, by developers. You learn from experts in a low-key, interactive way and then get hands-on time to apply what you’ve learned.

If you don’t have the time or ability to attend these events in person, you can still benefit from them by downloading the Windows 8 Camp in a Box. There are two versions available: C# and JavaScript.

You can get it here:

http://www.microsoft.com/en-us/download/details.aspx?id=29854