Programming

Programming Patterns. Module, Singleton, Factory

"Module" pattern is usually used to encapsulate some logic inside the component and return only the part that supposed to be public. It brings the encapsulation that’s natively not supported in JavaScript.

Category: Programming
0

Programming Patterns. SOLID principle

Let’s start from SOLID principles to get the basic understanding of this stuff. There are 5 principles: - Single responsibility; - Open-closed; - Liskov substitution; - Interface segregation; - Dependency inversion;

Category: Programming
0

Programming Patterns. Introduction

Patterns are the part of programming that needs to be studied regardless of the specific language, so that doesn’t matter what exactly you use: C, C++, C# or JavaScript, each of them uses some of the programming patterns, but there is the most interesting point how to implement the concept according to language specifics.

Category: Programming
0

3. Express.js Lessons. Templating with EJS: Layout, Block, Partials

In real life we generally have more than one template. Moreover, if we create a website with several pages, it usually happens that a number of them are of the same design. The template systems should consider this aspect. Unfortunately, ejs doesn’t deal very well with this task. That’s why we are going to install a different templating system named ejs-locals(let us add it to app.js):

Category: Programming
0

Express.js Lessons. Logger, Configuration, Templating with EJS. Part 2.

Favicon is the connect of Middleware that checks whether the url has a view of favicon.ico; if the answer is ‘yes’, it reads favicon and outputs, otherwise it transfers control further. The logger outputs a record what kind of a request we’ve received. For example, if we launch the app now, the logger will output something, when we follow:

Category: Programming
0

2. Express.js Lessons. Logger, Configuration, Templating with EJS. Part 1.

Hey all! To develop our app further, we need to do two more vital things – configuration and logging. We will use the nconf module for configuring:

Category: Programming
0

Full Node.js Course

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. Please welcome, our first series of article about Node.js!

Category: Programming
0

Express.js Lessons. Express: Basics and Middleware. Part 2.

Hey, guys! Let's continue our lesson about Express basics and Middleware. The result is (add to app.js):

Category: Programming
0

1. Express.js Lessons. Basics and Middleware. Part 1.

Hey all! This and next articles will be devoted to various themes on development within the context of one app that we will consequently improve. This app is a web chat.

Category: Programming
0

24. Node.js Lessons.Reading Parameters From the Command Line and Environment.

Hey all! The first topic of this article is transferring of parameters and the script for Node.js. To show you the principle, we will create a file with a simple code, so add it (server.js):

Category: Programming
0

Sign in

Forgot password?

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy

Password recovery

You can also try to

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy