JavaScript Journal

Subscribe to JavaScript Journal: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get JavaScript Journal: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories

Node.js and io.js Monitoring Support By Stefan Thies Node.js and io.js are increasingly being used to run JavaScript on the server side for many types of applications, such as websites, real-time messaging and controllers for small devices with limited resources. For DevOps it is crucial to monitor the whole application stack and Node.js is rapidly becoming an important part of the stack in many organizations. Sematext has historically had a strong support for monitoring big data applications such as Elastic (aka Elasticsearch), Cassandra, Solr, Spark, Hadoop, and HBase, as well as more traditional databases, web servers like Nginx, Nginx Plus and Apache, Java applications, cache servers like Redis and Memcached, messaging middleware like everyone's darling Kafka, etc.  With such rapid adoption of Node.js and now io.js, we'd be remiss not to add performance monitor... (more)

Angular 2: Guarding Routes | @CloudExpo #API #Cloud #Angular2

In this blog I’ll show you how to guard routes in Angular 2 Router (currently at 3.0.0-beta.2). Let’s consider some scenarios that require a certain validation to be performed to decide if the user (or a program) is allowed to navigate to or leave the route: Allowed to open the route only if the user is authenticated and authorized to do so. Implement a multi-part form that consists of several components, and the user is allowed to navigate to the next form section only if the data entered in the current one is valid. Allow to navigate to a route only after a certain data structures have been populated. Remind the user about the unsaved changes if he or she tries to navigate from the route. The router has the hooks that give you more control over the navigation to/from a route, and you can use these hooks to implement the any of above scenarios to guard the routes. ... (more)

JavaScript: Beyond Just Web Apps | @ThingsExpo #IoT #M2M #API #ArtificialIntelligence

JavaScript: Beyond Just Web Apps By Omed Habib The age of computers is over. You are now living in the age of intelligent processing by just about everything else. Like vacuum tubes and tape drives, desktops and laptops are on their way to becoming odd relics of a distant age, if people remember them at all. That may sound a bit extreme, but the fact is that applications are not married to any technological substrate, not even the most advanced mobile devices. That is why smart developers have already turned their attention to using JavaScript for building out next-generation technology like drone controllers, big data management tools, and connectors for the Internet of Things (IoT). The World After Web Apps In Fabio Nelli’s “Beginning JavaScript Charts: With jqPlot, d3, and Highcharts,” he starts off by saying “JavaScript is experiencing a rebirth as a result of t... (more)

Google To Debut Its "Beacon" Internet Of Things Technology At @ThingsExpo

Google To Debut "Physical Web Beacon" at @ThingsExpo Silicon Valley In his session at Internet of @ThingsExpo, Google's Scott Jenson will discuss how the Physical Web incorporates beacons that can be put in any small retail store, for example, so that every store now has "an app" for its customers. The Physical Web is an open standard so any device can broadcast a URL wirelessly, so any phone/tablet/watch nearby can see and rank those devices. When the user taps on one, they just go to that web page. It's really that simple. It's about thinking small, enabling micro-information (what is in my prescription bottle) or micro interaction (can I buy a candy bar). Scott Jenson leads a project called The Physical Web within the Chrome team at Google. Project members are working to take the scalability and openness of the web and use it to talk to the exponentially explodi... (more)

Creating Angular 2 Clients | @CloudExpo #JavaScript #TypeScript #Angular2

Angular 2 is a complete re-write of the popular framework AngularJS. Programming in Angular 2 is greatly simplified - now it's a component-based well-performing framework. This immersive one-day workshop is being held on June 7, 2016, at 18th Cloud Expo. Led by Yakov Fain, a Java Champion and a co-founder of the IT consultancy Farata Systems and the product company SuranceBay, this workshop will provide you with everything you wanted to know about Angular 2. Register ▸ Here Workshop will discuss: Overview of the Angular 2 architecture Intro to Typescript Getting familiar with a sample Auction application Angular 2 project setup with npm Angular 2 data binding, dependency injection, and routing Reactive programming with Observables Data exchange using HTTP and WebSocket protocols Authenticating users via social networks with OAuth 2 Using a NoSQL cloud data store f... (more)

Angular 2: Exposing a Child Component’s API | @CloudExpo #Cloud

In Angular 2 a parent component can pass the data to its child via binding to the child’s input parameter marked with the annotation @Input(). I’ll blog about it later, but you can see how it can be done in my blog on implementing the Mediator design pattern. In this blog I’ll show you another scenario when the parent component simply needs to use the API exposed by the child. You’ll see how a parent component can use the child’s API from both the template and the TypeScript code. Let’s create a simple application where a child component has the method greet() that will be invoked by the parent. Our Child component will look like this: @Component({ selector: 'child', template: `

Child

` }) class Child { greet(name) { console.log(`Hello from ${name}.`); } } To illustrate different techniques of calling the child’s API, the parent will use two instances of the ... (more)

Idiomatic ES6 | @CloudExpo #Cloud #JavaScript

Idiomatic ES6 by Darien Maillet Valentine There are a billion articles on ES6 at this point. What's one more? Here we discuss some emerging patterns and issues related to real world use of ES6 as well as how one can go about using it now via Babel. If you aren't yet familiar with the features and changes of ES6 itself, you'll probably want to check out the following links first: MDN is invaluable. It provides systematic coverage of all JS, including ES6. ②ality isn't organized like MDN, but it boasts the finest collection of deep articles covering specific features and edge cases. The online Babel REPL. This is fantastically useful to answer quick questions like ‘does this work?' and of course, ‘how?' The final draft. Dry reading, but sometimes it's the only way to get an authoritative answer. Edifying if you stare at it long enough. Table of Contents ES6 Where We... (more)

Angular 2: Passing Data to Routes By @YFain | @ThingsExpo #IoT

In the previous blog I did a high-level overview of Angular 2 router and wrote a basic routing application that demonstrated displaying different components in a predefined area of the window. We often need not only display a component, but also pass some data to it. For example, if we navigate from the Home to the Product Detail route we need to pass the product ID to the destination route. Angular offers a directive RouteParams so a route can receive data from the parent component. There is also a RouteData directive that can be used to pass additional data to a route from the @RouteConfig section. I’ll illustrate the use of both directives by modifying the app from the previous blog. Using RouteParams When the user navigates to the ProductDetail route, we need to pass the product ID to display details of the particular product. Let’s modify the code so the RootCo... (more)

Angular 2 and TypeScript | @ThingsExpo @YFain #IoT #JavaScript #TypeScript

Why Java Developers Will Embrace Angular 2 and TypeScript Most of the Java developers I know don’t like JavaScript. Initially. They would give you different reasons why, but the real one is simple: too much to learn to make it work. For many Java developers creating the front end of a Web application in JavaScript is a chore to write and a burden to maintain. Nevertheless JavaScript rules in Web development and the new version of JavaScript (ES6) will make it even more popular. ES6 offers classes, standardized module definition, arrow expressions (lambdas), predictable “this” and a lot more. Firefox and Chrome already support most of the ES6 syntax, and other browsers are getting there as well. But there is something better than ES6: the TypeScript language, which has most of what ES6 has to offer plus types, casting, interfaces, generics, and annotations. The TypeSc... (more)

Angular 2 Workshop at @ThingsExpo | #IoT #Angular2 #TypeScript #JavaScript

SYS-CON Events announced today the How to Create Angular 2 Clients for the Cloud Workshop, being held June 7, 2016, in conjunction with 18th Cloud Expo | @ThingsExpo, at the Javits Center in New York, NY. Register for 'Angular 2 Cloud Workshop' Here! Angular 2 is a complete re-write of the popular framework AngularJS. Programming in Angular 2 is greatly simplified. Now it's a component-based well-performing framework. The immersive one-day workshop led by Yakov Fain, a Java Champion and a co-founder of the IT consultancy Farata Systems and the product company SuranceBay, will provide you with everything you wanted to know about Angular 2. Workshop will include: Overview of the Angular 2 architecture Intro to Typescript Getting familiar with a sample Auction application. Angular 2 project setup with npm. Angular 2 data binding, dependency injection, and routing. Rea... (more)

WebRTC Summit Power Panel: The Future of WebRTC

WebRTC is the latest superhot topic emerging from Cloud Expo, and emerging from the worlds of open-source development and cloud computing worldwide. The WebRTC mission is deceptively simple: to enable rich, high-quality RTC applications delivered to browsers through JavaScript APIs and HTML5. It is already the result of a few years of dedicated effort by an enthusiastic developer community. In this WebRTC Power Panel being held Nov. 6 at 7:10 pm at the 1st WebRTC Summit, Nov. 6-7, at the Santa Clara Convention Center, Santa Clara, CA, a distinguished lineup of expert speakers will focus on such topics as: WebRTC for telcos - is there a real business opportunity? Is Skype a WebRTC Killer, or is WebRTC a Skype killer? Peer-to-peer use of WebRTC RTCPeerConnection Integrating WebRTC with Web Audio The Voice-Enabled Web P2P communication in the browser The monetization o... (more)