Bill Blogs in C# -- Javascript

Bill Blogs in C# -- Javascript

Created: 12/2/2013 4:59:57 PM

I just finished reading Effective JavaScript, by David Herman. This is the latest edition to the Effective Software Development series. It follows the format for all the Effective books. There are 68 guidelines for developers to remember when working in the JavaScript language.

Like all Effective books, this is not a tutorial, and probably should not be your first JavaScript book. Usually, Effective books are great as your second book on a subject. I think Effective JavaScript is an excellent third book on JavaScript. Your first should be a good tutorial on the language. Your second should be JavaScript: The Good Parts (Douglas Crockford). This book should be next.

This book has seven different sections that will make yourself a better JavaScript developer. The organization helps developers (like me) who have quite a bit of experience in other languages, but are new to JavaScript.

The first chapter, Accustoming Yourself to JavaScript, will help you learn the idiosyncrasies of the JavaScript language. (Note: all languages have their idiosyncrasies, you just overlook the ones in your own favorite language). It will help you break those habits that are correct in other languages, but cause issues when you are working in JavaScript.

Then comes Variable Scope. This chapter provides great information about JavaScript's rules for variable scoping. Follow these guidelines, and you'll rarely be surprised by unfamiliar scoping rules in JavaScript.

Next is Working with Functions. This is the meatiest chapter of the book. Functions are the core building block for all JavaScript programs. You'll learn many techniques to compose functions. If you've never used a functional language, and you're unfamiliar with terms like higher order functions, closures, currying, and variadic functions, you may need to read this chapter twice. It's rather dense, and there is a lot of great information on how to build algorithms using proper, idiomatic JavaScript.

The next chapter, Objects and Prototypes, is very closely related. JavaScript isn't an object oriented language, but supports the concept that an object is a dictionary of string / value pairs. This chapter teaches you to work with that structure, including emulating many object oriented idioms in JavaScript. You'll learn about object prototypes, prototype inheritance, and JavaScript techniques for minimizing the visibility of object variables. This chapter, after the previous chapter, will make you a professional JavaScript developer. Even if you're familiar with JavaScript, these two chapters will make you a better JavaScript developer.

The next chapter, Arrays and Dictionaries, provide guidance on using two of the most common collection types in JavaScript. The information in this chapter will help you make better designs. You'll learn more about the capabilities of the different collection types, and how to make the best decisions for your code.

You're finally ready for Library and API Design. This chapter provides guidance on how to create libraries and APIs that are easy to use correctly, and hard to mis-use. You know this is important if you've been developing software for any period of time. You've used well designed libraries, and you've used libraries that are hard to use. The guidance in this chapter will help you make sure that you are creating software that is intuitive for others to use.

The final chapter, Concurrency, provides concise guidance on managing concurrency in JavaScript programs. You'll learn practical techniques for keeping your JavaScript programs responsive. You'll finish this chapter with a much better understanding of JavaScript's concurrency model. (It's different than C#'s, by the way). This chapter is a must read if you are creating modern JavaScript programs.

Is this book for you?

If you've been writing JavaScript for at least 6 months, you're ready for this book. I think every JavaScript developer will learn something from this book as well. At 200 pages, there's not any fluff, and it's a reasonably short read. It's well worth the time investment.

If you program in JavaScript professionally, this book is for you.

Created: 2/20/2013 5:23:06 PM

In this post, I'll drill a bit into the final of the 3 areas SRT is investing in for 2013: Continuous Client Experience.

Users are now expecting that their experience, their work, and their data follows them from one device to the next. It's not enough to have a presence on mobile, web, and desktop. It's important that users have a seamless experience as they move from one device to the next.

One high profile example is Netflix. I can start a movie on my laptop. When I get home, I can switch to my Roku and have the movie pick up in exactly the same location. My picks are the same on my phone as on the living room device. We just expect that experience to move from device to device.

OneNote provides similar behavior as a productivity application. My notes automatically sync in the cloud. As I move from machine to machine, or to my phone, all my data just follows. The newest version of OneNote doesn’t even have a “save” command. My work just moves to the cloud on a regular basis.

All the applications we are now writing for business users demand the same kind of synchronization. It's driving several design decisions.

We're putting data in the cloud, where it's accessible from multiple devices. We're putting more effort into how we synchronize data. We're putting thought into server side data crunching and client side rendering. We're designing applications that have more and more of their algorithms in the cloud. That lets us develop more and more of the functionality for a single server platform. Each client has a smaller footprint and less device specific code. That lowers the cost of creating a great experience on each device. Finally, we're investing in making great offline experiences that synchronize data when the device notifies applications that a network is available.

Put all these areas together, and we believe we're well positioned for an exciting 2013. There are major shifts underway in our industry, and we intend to stay at the forefront.

Created: 2/18/2013 3:41:40 PM

As I wrote last week, Single Page Web Applications are another area where we're investing in 2013. The term "Single Page Web Application" is probably familiar to most of my readers. But, for those that are not, wikipedia defines Single Page Applications as:

A single-page application (SPA), also known as single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.

You've probably used this type of application already today: Gmail, Facebook, and Outlook.com are all common examples. The latest version of the Azure developer portal is another great example of a Single Page Application.

These application types bring a desktop-like experience to web applications. Users do not have their workflow disrupted by pauses while the application posts to the web server and redraws an entire new page of content. Of course, these applications do send requests to the server, and receive new data. What's important is that these applications do that work using client-side code. These applications provide a true stateful application experience to the user. The web now becomes more of an application platform.

Single Page Web applications provide the mechanisms to give your users a better experience when using a browser based application. You'll see more and more adoption of these techniques, and the companies that adopt them well will be the companies that succeed in the marketplace.

We're making strong investments in this area to help our customers leverage these techniques. We've even launched a self-guided training lab: Choose Your Own Application so that developers can learn more about the toolkits that can be used to create these modern applications.

Current Projects

I create content for .NET Core. My work appears in the .NET Core documentation site. I'm primarily responsible for the section that will help you learn C#.

All of these projects are Open Source (using the Creative Commons license for content, and the MIT license for code). If you would like to contribute, visit our GitHub Repository. Or, if you have questions, comments, or ideas for improvement, please create an issue for us.

I'm also the president of Humanitarian Toolbox. We build Open Source software that supports Humanitarian Disaster Relief efforts. We'd appreciate any help you can give to our projects. Look at our GitHub home page to see a list of our current projects. See what interests you, and dive in.

Or, if you have a group of volunteers, talk to us about hosting a codeathon event.