John Papa | Evangelist on the loose

John Papa

Evangelist on the loose

AngularJS Patterns: Clean Code Released!

8 comments

I’m happy to announce that my newest course is now available at Pluralsight. AngularJS Patterns: Clean Code is a melding of patterns, tips and what I call “readable code” all rolled into one. I hope you enjoy it as much as I enjoyed making it! Description Once you learn the basics of AngularJS, you encounter decisions that not only affect how well your app will scale and perform, but also how easily it can be maintained. This course takes AngularJS developers beyond the fundamentals to address that next level of problems you encounter. You’ll see familiar patterns such as Separation […]

Why Does There Have to be Something Wrong with AngularJS?

36 comments

I’ve ridden deep into the trenches of JavaScript/HTML frameworks, libraries, and vanilla.js and came back out the other side. As many of you know, I have been doing a ton of AngularJS and I am enjoying it. What I have learned is that there are some great things we can do with AngularJS, and some not so great things. But I’ve yet to find a perfect solution and I suspect that there is no flawless approach. But that’s not where I focus. Instead, I choose to look at how productive me, my teams, and the community are, the thriving ecosystem, […]

What’s Coming in AngularJS 2.0

4 comments

Interested in hearing about the latest on what AngularJS 2.0 holds in store for you? This week’s episode of Adventures in Angular has Rob Eisenberg of the Angular team talking about what’s coming in Angular 2.0. Rob has tons of experience building frameworks being the noted author of Caliburn Micro and DurandalJS. He talks in depth in this episode about his work on the router, which sounds awesome in Angular 2! Adventures in Angular web page follow the show twitter listen to us on iTunes Every Thursday morning you can join me and our All-Star panel of co-hosts Joe Eames, […]

AngularJS Snippets for Sublime, Visual Studio and WebStorm

8 comments

It is nice to have some help to follow your own patterns. That is why I created some simple file templates and snippets that follow my AngularJS Style Guidelines. You can find a series of file templates and snippets for the various editors and IDEs that I use. These include Sublime, Visual Studio and WebStorm. (I may add others over time). Here are templates and/or snippets for some of the web development editors and IDEs. Sublime Text AngularJS snippets that follow these styles and guidelines. Download the Sublime Angular snippets Place it in your Packages folder Restart Sublime In a […]

Angular Function Declarations, Function Expressions, and Readable Code

10 comments

We spend more time reading our code than writing it. That’s why it makes sense to write code that is easier to read. The good news is that there are a lot of really simple things that can make your code much more readable. This post describes simple techniques to make AngularJS controllers and services/factories more readable. For more details on these and other Angular coding styles, please see my Angular Style Guide and my upcoming Pluralsight course “AngularJS Patterns: Clean Code” (Sep 2014). Quiz OK, first let’s take a step back and start with a quiz. See if you […]

Building Angular with Gulp and Grunt

3 comments

You’ve built your JavaScript application but how do you automate testing, code analysis, running it locally or deploying it? These monotonous tasks can consume valuable time and resources. Learn more about Grunt and Gulp in this week’s episode of Adventures in Angular. Adventures in Angular web page follow the show twitter listen to us on iTunes If you want to learn more about Gulp, keep an eye out for my upcoming course on JavaScript Build Automation with Gulp.js and Angular coming to Pluralsight in Q4 of 2014. Every Thursday morning you can join me and our All-Star panel of co-hosts […]

Adventures in Angular

5 comments

I love talking to developers about JavaScript, web development, and Angular in particular. That’s why I’m excited to announce that I have joined as a co-host on the new podcast for Adventures in Angular (aka AiA or ngAdventures), brought to you by the same folks who host the popular JavaScript Jabber show. You can check out our: Adventures in Angular web page follow the show twitter listen to us on iTunes Every week (Thursday mornings) you can join me and our All-Star panel of co-hosts Joe Eames, Aaron Frost, Charles Max Wood, Lukas Ruebbelke, Brian Ford, Misko Hevery, and Merrick […]

Angular Style Guide

29 comments

I just published the first draft of my opinionated style guide for syntax, conventions, and structuring AngularJS applications. You’ll find many of these and more explained in deeper detail in my Pluralsight course AngularJS: Clean Code (coming in August 2014). The styles contained here are based on on my experience with AngularJS, presentations, Pluralsight training courses and working in teams. I will keep this guide updated on github. Usage and Purpose I get asked a lot for style guides, how to get started once you learn the AngularJS basics, and what I recommend. This guide helps point in that direction […]

AngularJS’s Controller As and the vm Variable

33 comments

The great thing about coding is that we are able to mix coding style and personal/team preference together. This post is all about a preference of mine that has helped me stick to be principles of readable, efficient, and maintainable code with AngularJS. It’s no secret that I am a fan of the “Controller As” syntax that was revealed in AngularJS 1.2.0, in fact I wrote an entire post about the Controller As feature. I’m also a fan of readable code and keeping things consistent and simple. We tend to spend a lot of time reading code. In fact, I […]

Easy Fix to a Common Angular Module Error

14 comments

I love running my code right after making some new changes, so I can see them light up in the browser. But I don’t love when error messages are not straight forward. At least not to me. Recently I ran a project and was told ngLocale is not available! What? I’m not loading ngLocale, what does Angular want from me? After some digging in the console and Chrome debugger I uncovered more information about the issue. “[$injector:nomod] Module ‘ngLocale’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you […]