top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Overview About EJS?

0 votes
373 views

What is EJS?
EJS is a simple templating language that lets you generate HTML markup with plain JavaScript.
EJS combines data and a template to produce HTML. 

<%= EJS %>

EJS Stands for Effective JavaScript templating.

Like ERB, JavaScript between <% %> is executed. JavaScript between <%= %> adds HTML to the result.

Features:

  • Fast compilation and rendering
  • Simple template tags: <% %>
  • Custom delimiters (e.g., use <? ?> instead of <% %>)
  • Includes
  • Both server JS and browser support
  • Static caching of intermediate JavaScript
  • Static caching of templates
  • Complies with the Express view system

 

Install EJS with NPM

$ npm install ejs
Video for EJS
 
 
 
posted Sep 6, 2016 by Parampreet Kaur

  Promote This Article
Facebook Share Button Twitter Share Button LinkedIn Share Button


Related Articles

What is Jade?

Jade can be used just as a short hand for HTML

Jade is an elegant templating language focused on enabling quick HTML coding. No more XML situps and percent prefixes for tags.

Jade is whitespace sensitive, so there's no need to close your tags; Jade does that for you. You can also nest tags within other tags just by indenting them.

Jade Code Structure

pageTitle = "Jade Rocks!"
doctype 5
html(lang="en")
    head
        title= pageTitle 
        script
            console.log("hi");
    body
        p.greeting Hello, World!

Html Code Structure   


 <!DOCTYPE html>
<html lang="en">
  <head>
    <title>Jade Rocks!</title>
    <script>console.log("hi");
</script>
  </head>
  <body>
    <p class="greeting">Hello, World!</p>
  </body>
</html>

 Video about Jade

https://www.youtube.com/watch?v=xNoWTLsZbaU

READ MORE

What is Pug?

The general rendering process of Pug is simple. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “ locals ”) as an argument. Call that resultant function with your data, and voilà!, it will return a string of HTML rendered with your data.
Pug is a high performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers. For bug reports, feature requests and questions, open an issue. For discussion join the chat room.

Node Command

npm install pug

Pug also provides the pug.render() family of functions that combine compiling and rendering into one step. However, the template function will be re-compiled every time render is called, which might impact performance. Alternatively, you can use the cache option with render, which will automatically store the compiled function into an internal cache.

Example:

p #{name}'s Pug source code!

const pug = require('pug');

// Compile the source code
const compiledFunction = pug.compileFile('template.pug');

// Render a set of data
console.log(compiledFunction({
  name: 'Timothy'
}));
// "<p>Timothy's Pug source code!</p>"

// Render another set of data
console.log(compiledFunction({
  name: 'Forbes'
}));
// "<p>Forbes's Pug source code!</p>"

 

Video for Pug Getting Started

https://www.youtube.com/watch?v=leilVbK0xQc

 

READ MORE

What is Jest?

Jest is an open JavaScript testing library from Facebook. Its slogan is "Delightful JavaScript Testing". While Jest can be used to test any JavaScript library, it shines when it comes to React and React Native. 

Main Benefits

     1) Developer Ready

             Complete and ready to set-up JavaScript testing solution. Works out of the box for any React project.

      2) Instant Feedback 

                Fast interactive watch mode runs only test files related to changed files and is optimized to give signal quickly.

      3) Snapshot Testing

               Capture snapshots of React trees or other serializable values to simplify testing and to analyze how state changes over time.

Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated "zero-configuration" experience. 

NPM and Yarn Command for Installation.

npm install --save-dev jest

yarn add --dev jest

Video for JEST Library

https://www.youtube.com/watch?v=7r4xVDI2vho

READ MORE

What is DevExterme.Js?

A Feature-Complete HTML5 JavaScript Data Grid Widget. The blazing-fast DevExtreme HTML5 Data Grid is a feature-rich data shaping and editing client-side widget which allows your end users to easily manage information and display it on-screen as business requirements dictate.

DevExtreme can be used with different technologies and supports deep integration with client-side libraries. 

They are

JQuery
Angular
React
Asp.Net MVC
Knockout
Angular.Js

Getting Started
After installation, you can add a widget to your app. Here's a simple button example:

<div id="buttonContainer"></div>
var element = document.getElementById('buttonContainer');
var button = new DevExpress.ui.dxButton(element, { text: 'Hello World!' });

Video for DevExterme.JS?

https://www.youtube.com/watch?v=KJpS2Iwrrg8​

READ MORE

What is AmCharts?

amCharts is a company based in Vilnius, Lithuania. The beginning of amCharts and amMap was in 2004, when the first version of amMap was made. Antanas Marcelionis worked as a manager in a web development company and, being a fan of maps and traveling, wanted to have a tool which would work like a pin-map for him.

Easily add charting capabilities to your websites and applications. Compatible with all modern and most legacy browsers (yes even IE7), JavaScript Charts allows creating flexible Pie, Column, Line, and number of other chart types.


Features

  • Advanced serial charts
  • Superior time-based scales
  • Micro-charts and sparklines
  • Responsive
  • Mobile Friendly
  • Accessible

Video for amCharts 

https://www.youtube.com/watch?v=7RmwtoiEWkw

READ MORE

What is MemcacheDB ?

MemcacheDB is a distributed key-value storage system designed for persistent. It is NOT a cache solution, but a persistent storage engine for fast and reliable key-value based object storage and retrieval. It conforms to memcache protocol(not completed, see below), so any memcached client can have connectivity with it. MemcacheDB uses Berkeley DB as a storing backend, so lots of features including transaction and replication are supported.

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

MemcacheDB is compatible with memcache protocol, so any clients that support memcache protocol have connectivity with it.

MemcacheDB  Commands  supports:

  • get(also mutiple get)
  • set, add, replace
  • append/prepend
  • incr, decr
  • delete
  • stats

A version of MemcacheDB using Lightning Memory-Mapped Database (LMDB) is also available, offering greater performance. MemcacheDB is accessed through the same protocol as memcached, so applications may use any memcached API as a means of accessing a MemcacheDB database.

MemcacheQ is a MemcacheDB variant that provides a simple message queue service.

Video for Memcache DB

https://www.youtube.com/watch?v=1u3Y7qB9ACM​

READ MORE

What is Scylla?

Scylla is an open-source distributed NoSQL data store. It was designed to be compatible with Apache Cassandra while achieving significantly higher throughputs and lower latencies. It supports the same protocols as Cassandra (CQL and Thrift) and the same file formats (SSTable), but is a completely rewritten implementation, using the C++14 language replacing Cassandra's Java, and the Seastar asynchronous programming library replacing threads, shared memory, mapped files, and other classic Linux programming techniques.

Scylla uses a shared design on each node, meaning that each CPU core handles a different subset of data. Cores do not share data, but rather communicate explicitly when they need to. The Scylla authors claim that this design allows Scylla to achieve much better performance on modern NUMA SMP machines, and to scale very well with the number of cores. They have measured as much as 2 million requests per second on a single machine, and also claim that a Scylla cluster can serve as many requests as a Cassandra cluster 10 times its size - and do so with lower latencies.

Benefits

  • Low and Consistent Latency
  • Always-On Availability
  • 10x Higher Throughput
  • Highly Scalable
  • Easy to Use
  • Community Backed
  • Compaction, Streaming and Repair Solved
  • Optimum Total Cost of Ownership
  • Auto Tuning

Video for Scylla 

https://www.youtube.com/watch?v=URTyQIsXkJs

READ MORE
...