From my experience many times customers asked me to install new environment for myself, help newbies to set the same environment. Another case was to upgrade software packages, e.g. Postgres 5.4 to 5.5. These tasks are not the complexity of ‘rocket science’ but if you are front-end developer it can take much of your time. The best is to give DevOps work to DevOps engineers.
Programming Patterns. Strategy, Observer, Iterator
Use when you want to select between different algorithms in the process of task resolving. So basically all that you need to realize this pattern are strategies (each of them in the separated component/class, but with the same interface) and strategy selector (decides what strategy is more effective at the moment and uses it).
Programming Patterns. Facade, Adapter, Decorator
The main idea is a creation of simplified interface to application functionality. Basically, when you create components of your application the interfaces of these ones can be really complicated for outside usage. So to resolve this problem and provide easy-to-go solution, you can use Façade.
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.
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;
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.
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):
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:
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:
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!