MEAN Stack: Build an App with Angular and the Angular CLI

For expert-led online Angular training courses, you can't go past Ultimate Angular by Todd Motto. Try his courses here, and use the code SITEPOINT to get 25% off and to help support SitePoint.

In this tutorial, we’re going to look at managing user authentication in the MEAN stack. We’ll use the most common MEAN architecture of having an Angular single-page app using a REST API built with Node, Express and MongoDB.

When thinking about user authentication, we need to tackle the following things:

let a user register
save user data, but never directly store passwords
let a returning user log in
keep a logged in user’s session alive between page visits
have some pages that can only been seen by logged in users
change output to the screen depending on logged in status (for example, a “login” button or a “my profile” button).
Before we dive into the code, let’s take a few minutes for a high-level look at how authentication is going to work in the MEAN stack.

The MEAN Stack Authentica..

Continue Reading

MEAN Stack: Build an App with Angular and the Angular CLI

For expert-led online Angular training courses, you can't go past Ultimate Angular by Todd Motto. Try his courses here, and use the code SITEPOINT to get 25% off and to help support SitePoint.

In this tutorial, we’re going to look at managing user authentication in the MEAN stack. We’ll use the most common MEAN architecture of having an Angular single-page app using a REST API built with Node, Express and MongoDB.

When thinking about user authentication, we need to tackle the following things:

let a user register
save user data, but never directly store passwords
let a returning user log in
keep a logged in user’s session alive between page visits
have some pages that can only been seen by logged in users
change output to the screen depending on logged in status (for example, a “login” button or a “my profile” button).
Before we dive into the code, let’s take a few minutes for a high-level look at how authentication is going to work in the MEAN stack.

The MEAN Stack Authentica..

Continue Reading

How Aaron Osteraas Made the Content to Code Career Transition

As Aaron Osteraas can tell you, the path between discovering what you want to do for a living and actually doing it is rarely linear.

Now a Software Engineer at Tigerspike, a digital services company headquartered in Sydney, Aaron’s journey toward becoming a developer began when he was in high school, yet it wasn’t until his early 30s that he obtained his first full-time development job. The years in between were filled with starts and stops, challenges and successes, and a whole lot of tinkering.

“I was always tinkering with the family computer, which was mostly, ‘oh god I've broken it how do I fix it before I get in trouble,’” Aaron said of his technical beginnings. He had an appetite for building and modifying hardware, which he attributes to the joy that comes from doing something with your hands. He’d collect spare hardware, buy and sell parts, and at times resort to scrounging and trading. “There were computer parts strewn everywhere,” he said.

But by the time he graduate..

Continue Reading

The Ultimate ADA Compliance Guide

This article was created in partnership with Inbound Junction. Thank you for supporting the partners who make SitePoint possible.

Based on web accessibility data, the ADA compliance-related lawsuits reached over 2,000 cases in 2019. ADA Compliance is Mandatory for Digital Agencies. The challenge, however, is knowing how to build and design ADA-compliant websites. That’s the problem we’ll help you address in this post.

In this ultimate ADA compliance guide, we’ve laid out the things your web design agency needs to know to make accessible websites.

The number of lawsuits will only keep growing if website owners, developers, and agencies continue to be non-compliant with the ADA.

If you don’t want to be a part of that statistic, you’ll need to ensure that your agency and client websites offer accessibility to persons with disabilities and adhere to ADA standards.

What is the ADA, anyway?
The Americans with Disabilities Act is a civil rights law that was enacted in 1990 to prohibit di..

Continue Reading

Build a Node.js CRUD App Using React and FeathersJS

Building a modern project requires splitting the logic into front-end and back-end code. The reason behind this move is to promote code re-usability. For example, we may need to build a native mobile application that accesses the back-end API. Or we may be developing a module that will be part of a large modular platform.

The popular way of building a server-side API is to use Node.js with a library like Express or Restify. These libraries make creating RESTful routes easy. The problem with these libraries is that we'll find ourselves writing a ton of repetitive code. We'll also need to write code for authorization and other middleware logic.

To escape this dilemma, we can use a framework like Feathers to help us generate an API in just a few commands.

What makes Feathers amazing is its simplicity. The entire framework is modular and we only need to install the features we need. Feathers itself is a thin wrapper built on top of Express, where they've added new feature..

Continue Reading

How to Debug a Node.js Application: Tips, Tricks and Tools

Software development is complex and, at some point, your Node.js application will fail. If you’re lucky, your code will crash with an obvious error message. If you’re unlucky, your application will carry on regardless but not generate the results you expect. If you’re really unlucky, everything will work fine until the first user discovers a catastrophic disk-wiping bug.

What is Debugging?
Debugging is the black art of fixing software defects. Fixing a bug is often easy — a corrected character or additional line of code solves the problem. Finding that bug is another matter, and developers can spend many unhappy hours trying to locate the source of an issue. Fortunately, Node.js has some great tools to help trace errors.

Terminology
Debugging has its own selection of obscure jargon, including the following:

Term
Explanation
breakpoint
the point at which a debugger stops a program so its state can be inspected
debugger
a tool which offers debugging facilities such as running code lin..

Continue Reading

Make Working from Home Successful: Resources for Remote Teams

If you're a designer or developer, chances are you've made the shift to working from home in the past couple of weeks.

To help manage the change, we thought we'd share some of our best resources on working remotely — starting with some books …

The Art of Working Remotely
If you work from home, a co-working space, or coffee shop, this book is for you. Discover how to set up a quality workspace. Learn the behaviors and practices that contribute to remote worker success. You, too, can thrive in a distributed workplace.

Influencing Virtual Teams
Learn the psychological secrets of persuasion that influence your remote employees to do what you need them to do. In “Influencing Virtual Teams” you'll get step-by-step tactics that you can implement straightaway with your team to improve your team's engagement and commitment to doing their work.

The Project Book
Projects are the lifeblood of organizations, but many projects fall short of expectations because of poo..

Continue Reading

10 Projects to Get You to Your First Dev Job in 2020

For those of you looking to break into the world of web development with your first dev job, the amount of things you are expected to know can be overwhelming: HTML, CSS, JavaScript, version control, build tools, frameworks, the command line. The list goes on …

But never fear! In this post I'd like to offer you a little guidance by outlining ten skills that will help you land your first dev job in 2020. For each skill, I’ll suggest a hands-on project to get you started and point you to appropriate resources on SitePoint Premium for further reading.

Let's dive in.

1. Get to Know Your Code Editor
As a coder, you're going to be spending a lot of time in your editor of choice. That's why you should make the effort to learn what it can do and how to configure it properly. The subject of which editor to use can quickly become controversial, but if you’re just starting out, I would encourage you to check out VS Code (or VSCodium if you care about privacy).

VS Code ship..

Continue Reading

How to Build and Structure a Node.js MVC Application

In a non-trivial application, the architecture is as important as the quality of the code itself. We can have well-written pieces of code, but if we don’t have good organization, we’ll have a hard time as the complexity increases. There’s no need to wait until the project is half-way done to start thinking about the architecture; the best time is before starting, using our goals as beacons for our choices.

Node.js doesn’t have a de facto framework with strong opinions on architecture and code organization in the same way that Ruby has the Rails framework, for example. As such, it can be difficult to get started with building full web applications with Node.

In this tutorial, we’re going to build the basic functionality of a note-taking app using the MVC architecture. To accomplish this, we’re going to employ the Hapi.js framework for Node.js and SQLite as a database, using Sequelize.js, plus other small utilities, to speed up our development. We’re going to build the views using Pug,..

Continue Reading

Need to Edutain Your Kids While Distancing? Here Are Our Suggestions

We've found ourselves with more kids at home, and not enough productive and educational activities to do while schools ramp up their online learning capabilities. So we took to our library to see what we could dig up to keep them engaged with learning, and us able to focus on doing our own remote work.

Are you also looking for a way to educate and entertain your kids while they're stuck at home?

We've put together a list of fun books that'll keep your kids occupied and teach them valuable skills at the same time!

Starting with…

The post Need to Edutain Your Kids While Distancing? Here Are Our Suggestions appeared first on SitePoint.

Continue Reading