Practical Node.js, 2nd Edition: Colored Print Book is Ready

The Practical Node.js, 2nd Edition print book is finally ready. It turned out the biggest thickest book I ever wrote (500+ pages). Practical Node, 2nd Ed. is even thicker than React Quickly.

The Practical Node.js, 2nd Edition print book is finally ready. It turned out the biggest thickest book I ever wrote (500+ pages). Practical Node, 2nd Ed. is even thicker than React Quickly.

Continue reading “Practical Node.js, 2nd Edition: Colored Print Book is Ready”

Full Stack JavaScript

My new book Full Stack JavaScript (my 4th traditionally-published book) comes with a series of screencast videos for better immersion in a wonderful and mesmerizing world of Node.js, Backbone and MongoDB. It’s a one thing to read through the text and another to follow up with dynamic videos which walk you through the book’s projects.

Full Stack JavaScript
Full Stack JavaScript

The videos and the source code are open source, meaning they are publicly available. Therefore, you don’t have to buy a book—you can just watch the 14 videos on YouTube (playlist) and go through the code on GitHub (repository).

Continue reading “Full Stack JavaScript”

5 Hacks to Getting the Job of Your Dreams to Live a Happier and Healthier Life

Getting a job of your dreams might be easier than you think. Apply these five hacks and see for yourself.

Study after study has showed that being satisfied and happy at a job is paramount for a healthy, productive and long life. In other words, if you’re miserable at a job, then other areas of your life will suffer as well: personal life, health, spirituality, family, friends, etc.

Here are the 5 Hacks that will help you to get your dream job:

  1. Write a book
  2. Create a strong web presence
  3. Boost your LinkedIn profile
  4. Speak at a conference
  5. Take a MOOC (Massive open-online course)

You can use these five hacks to get the job of your dreams in pretty much any industry or field. And most of them will cost you nothing or close to nothing!

Of course, any of these hacks are useless if you don’t know what your dream job is. If you are not sure, then before reading any further, answer these questions:

  • How much money do you want to make in a year or an hour?
  • How much maximum commute can you tolerate (e.g., 30min, 1hr)?
  • Do you like a certain area of your city?
  • Do you want to work with certain technologies or in a particular industry?
  • What kind of benefits do you want to have (ideally)?

Go crazy with these questions, let your fantasies go wild… yet remain realistic, otherwise you won’t believe it’s possible.

We are not separate people when we go to work and come back from it. We cannot separate our jobs from the rest of our lives. The quality of your job and its factors are in direct proportion to your happiness and physical and mental health.

So let’s start with my favorite hack.

Continue reading “5 Hacks to Getting the Job of Your Dreams to Live a Happier and Healthier Life”

Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development Is Out

The long-anticipated Express.js manual is ready and was sent to to print at this week (December 24, 2014). To summarize the book, Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development is all about understanding Express.js and building web apps with this framework and its middleware. Spend two minutes to read this post, to know how you can benefit from this valuable resource and the release.

Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development Is Out
Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development Is Out

Becoming a Better Node.js Developer

If you an intermediate or advanced beginner Node.js developer and want to become better at this cool, new technology, then you have lots of questions about the best practices and patterns. Most likely you’ve encountered Express.js, and you wish you knew more about useful settings and options to configure Express.js and its middleware.

The reason why I know these things is that, before I became proficient with Node.js and Express.js, I was a beginner just like you. Also, I’ve been in a position when I needed to learn Express.js quickly. In those sad moments, I was flat out miserable and often had to read the source code for the lack of a good documentation and examples. I wish I had Pro Express.js with me back then to explain the mechanisms in plain English, and provide inspiring code patterns that I could re-use in my projects. That’s why I’m confident that Pro Express.js will be great for intermediate Node.js developers (and advanced-beginners).

Pro Express.js can solve your pains and problems by providing the following benefits:

Continue reading “Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development Is Out”

URL Parameters and Routing in Express.js

TL;DR: This post is about URL parameters and routing in Express.js, and it’s an excerpt (Chapter 6) from my new book Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development. The book was released this week (~December 24, 2014), but we have a great limited-time offer for you which will be announced on Sunday, December 28, 2014 on Webapplog.com. This post is the last post in the series of excerpts from Pro Express.js with other posts as follow: Error Handling and Running an Express.js App, Express.js Security Tips, LoopBack 101: Express.js on Steroids, Sails.js 101 and Secret Express.js Settings.

To review, the typical structure of an Express.js app fig(which is usually a server.js or app.js file) roughly consists of these parts, in the order shown:

  1. Dependencies : A set of statements to import dependencies

  2. Instantiations : A set of statements to create objects

  3. Configurations : A set of statements to configure system and custom settings

  4. Middleware : A set of statements that is executed for every incoming request

  5. Routes : A set of statements that defines server routes, endpoints, and pages

  6. Bootup : A set of statements that starts the server and makes it listen on a specific port for incoming requests

This chapter covers the fifth category, routes and the URL parameters that we define in routes. These parameters, along with the app.param() middleware, are essential because they allow the application to access information passed from the client in the URLs (e.g., books/proexpressjs). This is the most common convention for REST APIs. For example, the http://hackhall.com/api/posts/521eb002d00c970200000003 route will use the value of 521eb002d00c970200000003 as the post ID.

Parameters are values passed in a query string of a URL of the request. If we didn’t have Express.js or a similar library, and had to use just the core Node.js modules, we’d have to extract parameters from an HTTP.request object via some require('querystring').parse(url) or require('url').parse(url, true) function “trickery.”

Let’s look closer at how to define a certain rule or logic for a particular URL parameter.

Continue reading “URL Parameters and Routing in Express.js”

Error Handling and Running an Express.js App

TL;DR: This text is an excerpt (Chapter 9) from Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development. The book will be released next week (December 24, 2014), and we’ll announce a great limited-time offer on it on Sunday, December 28, 2014. So stay tuned… and happy Holidays!!!

Good web applications must have informative error messages to notify clients exactly why their request has failed. Errors might be caused either by the client (e.g., wrong input data) or by the server (e.g., a bug in the code).

The client might be a browser, in which case the application should display an HTML page. For example, a 404 page should display when the requested resource is not found. Or the client might be another application consuming our resources via the REST API. In this case, the application should send the appropriate HTTP status code and the message in the JSON format (or XML or another format that is supported). For these reasons, it’s always the best practice to customize error-handling code when developing a serious application.

In a typical Express.js application, error handlers follow the routes. Error handling deserves its own section of the book because it’s different from other middleware. After the error handlers, we’ll cover the Express.js application methods and ways to start the Express.js app. Therefore, the major topics of this chapter are as follows:

  • Error handling
  • Running an app

Continue reading “Error Handling and Running an Express.js App”

Express.js Security Tips

TL;DR

This text is part of my new book Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development [Apress, 2014]. Security is important, that’s why I decided to publish this chapter on my blog. The book will be released very soon.

The set of tips in this chapter deals with security in Express.js applications. Security is often a neglected topic that is deferred until the last minute before the release. Obviously, this approach of treating security as an afterthought is prone to leaving holes for attackers. A better approach is to consider and implement security matters from the ground up.
Continue reading “Express.js Security Tips”

Azat Mardan on NodeJS and Express Interview at QConNY 2014

Here’s my interview with Brian Rinaldi of ModernWeb on NodeJS and Express at QConNY 2014 where I spoke about CoffeeScript. The inverview is 13 minutes long and discusses some controversial topics and my traditionally published book Practical Node.js.

Continue reading “Azat Mardan on NodeJS and Express Interview at QConNY 2014”

Job Security is Dead But There Is a Way

There is no such thing as a job security. You can trust my word on this, because I worked for one of the most stable employers in the world, the U.S. federal government, during 2007–2008, and had seen a lot of bright software engineers, analysts, technical writers, quality assurance engineers, and project managers let go due to the market downturn and budget cuts. Startups and private corporations are even more brutal. They won’t even give you a two-week notice! I know of a company that fired its lead software engineer with just ONE hour of notice… poor fellow didn’t expect it at all when he was coming to work in the morning just to go back home for the rest of the day right away!

Continue reading “Job Security is Dead But There Is a Way”

You’re Wasting $10,000 to $130,000!

Yes, you’ve read it right! You can be wasting anywhere from $10,000 to $130,000 right now by not sharing your technical expertise with others. In other words, you can keep the money by writing about tech. All this is doable while keeping your full-time job. You think it’s impossible? That programmers like to pay nothing for resources? Think again, because hundreds of authors already did it, with outliers like Nathan Barry and Sacha Greif making six figures. The best part is that (after the info product is ready) it’s mostly passive income!

Continue reading “You’re Wasting $10,000 to $130,000!”

Introduction to OAuth with Node.js and Online Subscription—RELEASED!

The much-needed Introduction to OAuth with Node.js mini-book is released!

Introduction to OAuth with Node.js
Introduction to OAuth with Node.js: Twitter API OAuth 1.0, OAuth 2.0, OAuth Echo, Everyauth and OAuth 2.0 Server Examples

Get your PDF, EPUB, MOBI copy here –> gum.co/hRyc
or sign up for Node.js and JavaScript Mastery Online here.

The online bundle has five (5!) books. Here’s the list of available books. It’s a $50+ value for only $4.87/mo.

Node.js and JavaScript Mastery Online: Colored code examples—paste into your projects!
Node.js and JavaScript Mastery Online: Colored code examples—paste into your projects!

If you read all the books in less than a month—great! Just cancel the subscription. But most readers prefer to keep it just so they have a handy reference when they need it.

The Introduction to OAuth book includes:

  • OAuth 1.0
  • OAuth Echo
  • OAuth 2.0
  • OAuth 1.0 Sign in with Everyauth
  • OAuth 2.0 Server

A typical modern web applications has to communicate with other services. Even if it’s your own service or application. This is usually done via an open standard for authorization or OAuth. Therefore, the ability to use OAuth in your work is paramount!

There are standards, specifications and fancy diagrams, and it’s useful to read them as the first step. However, developers often need hands-on experience to acquire the full understanding and confidence.

Introduction to OAuth in Node.js is a concise practical book that will help you to get started with OAuth 1.0, 2.0, Echo and implement a Sign in with Node.js using Twitter API (and hopefully any other) authentication.

We’ll go through the three main authentication methods utilizing minimalistic oauth module to explain basics, then use extensive everyauth with an Express.js app.

Get your PDF, EPUB, MOBI copy here –> gum.co/hRyc
or sign up for Node.js and JavaScript Mastery Online here.

Intro to OAuth with Node.js: OAuth 1.0 (One-Legged)

This text is part of Introduction to OAuth with Node.js mini-book which is available at gum.co/hRyc.

Introduction to OAuth with Node.js
Introduction to OAuth with Node.js: Twitter API OAuth 1.0, OAuth 2.0, OAuth Echo, Everyauth and OAuth 2.0 Server Examples

Let’s start with good old OAuth 1.0. The way it usually works is as follows:

  1. For the first time, when we authorize a user to use our app, we need to perform extra work and obtain access token and secret (three-legged).
  2. You store these values for each user in your application.
  3. Then, on subsequent requests, things become much simpler. We construct auth headers and make HTTP requests (one-legged).

Continue reading “Intro to OAuth with Node.js: OAuth 1.0 (One-Legged)”

Practical Node.js is Ready!

My latest book about Node.js is ready (Jul, 2014)!

Practical Node.js was designed to be a one-stop source for going from hello-world examples to building apps in a professional manner. The libraries covered in Practical Node.js greatly enhance the quality of code and make developers more productive.

You can get it on Amazon, B&N and Apress directly. Also, Apress has the ebooks in all formats.

The book’s website is at practicalnodebook.com. And the examples’ code is freely available at github.com/azat-co/practicalnode.

JavaScript and Node FUNdamentals is Finished

JavaScript and Node FUNdamentals: A Collection of Essential Basics is a short read to brush up and refresh JavaScript and Node.js topics including frameworks like CoffeeScript, Backbone.js and Express.js. The motto of the book is “If it’s not fun, it’s not JavaScript.

JavaScript and Node FUNdamentals: A Collection of Essential Basics
JavaScript and Node FUNdamentals: A Collection of Essential Basics

JavaScript and Node FUNdamentals has these chapters:

  1. JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web
  2. CoffeeScript FUNdamentals: The Better JavaScript
  3. Backbone.js FUNdamentals: The Cornerstone of JavaScript MV* Frameworks
  4. Node.js FUNdamentals: JavaScript on The Server
  5. Express.js FUNdamentals: The Most Popular Node.js Framework

The book is available on Amazon.com (Kindle) and LeanPub (MOBI, PDF, EPUB).

Continue reading “JavaScript and Node FUNdamentals is Finished”

Practical Node.js TOC

As the Apress team of technical reviewers and copy editors and I make progress on the Practical Node.js manuscript, the date of the publication approaches fast. Last time I checked it was June 2014.

Practical Node.js: Building Real-world Scalable Web Apps
Practical Node.js: Building Real-world Scalable Web Apps

Many people ask me: how is the process compared to self-publishing? Is it worth the hassle?

So far, I can say only good things about my editors and the process of traditional publishing itself. I’m impressed about so many things I’ve already learned about structuring and technical writing. I feel like it enormously improved my style. There is more on this in my new meta book&resource ProgWriter.

As a sneak peek, here’s the tentative Table of Contents for the Practical Node.js book:

  1. Setting up Node.js and Other Essentials
  2. Using Express.js to Create Node.js Web Apps
  3. TDD and BDD for Node.js with Mocha
  4. Template Engines: Jade and Handlebars
  5. Persistence with MongoDB and Mongoskin
  6. Using Sessions and OAuth to Authorize and Authenticate Users in Node.js Apps
  7. Boosting Your Node.js Data with the Mongoose ORM Library
  8. Building Node.js REST API Servers with Express.js and Hapi
  9. Real-time Apps with WebSockets, Socket.IO and DerbyJS
  10. Getting Node.js Apps Production Ready
  11. Deploying Node.js Apps
  12. Publishing Node.js Modules and Contributing to Open Source

The good thing is that people who want to get the book first don’t have to wait ’til the book is released. They can pre-order the book on Amazon, or even better get access to the alpha version at Apress!

The alpha version will be release chapter by chapter starting in the next few weeks!

Getting Published as a Programmer: The Practical Node.js Story

This is the story about how I got my first publishing deal, what this book is about, and what problems I encountered along the way.

TL;DR: This is the story about how I got my first publishing deal, what this book is about, and what problems I encountered along the way.

I spent last weekend sitting in an awesome new coffee shop in Oakland, typing up the last two chapters of my Practical Node.js manuscript. The book is scheduled for release by the UK-based technical publisher Apress in the late spring.

I started writing the manuscript in October 2013. I devoted my weekends and holidays to it (as so many entrepreneurs and writers do). The fact that I smartly had a few example apps and some drafts written — some of them for my blog, others for proposals to Pragmatic (declined!) — helped to speed things up. (Needless to say, in publishing rejection is a common thing and often an opportunity to get better.) However, the writing itself wasn’t the hardest part. Here’s the short story why.

Continue reading “Getting Published as a Programmer: The Practical Node.js Story”

Express.js Guide Goes to Apress

 

I’m extremely exited about my second book contract with Apress and also about using the product that I’m working on (the DocuSign web app) to wet this publishing deal. Pro Express.js is going to be the ultimate Express.js resource “thank you” to all my readers who contributed with suggestions!

Rare opportunity! Final sale!

Goodbye Express.js Guide Sale: 4 Books For Only $19.99 (reg. $84.97)