Tagged: JavaScript

Node.js / Express app generator: with ES.next, API validation, documentation, logging, and more

[Take me to the app generator] I’m at work on a new project. My team and I are building a highly scalable service platform and have elected to build it using the microservices architecture pattern. The platform consists of many microservices, each of which is typically owned by a collaborating team. Teams are empowered to make decisions and choose technologies that best fit the need. This means that services may...

Create a baseball-themed app powered by Weather Company Data for IBM Bluemix and DBpedia

Last summer, I wrote an article on developerWorks describing how to use the IBM Bluemix Weather Data service in combination with DbPedia to render a variety of information about Major League Baseball parks. The article takes you through the process of building a baseball-theme application on IBM Bluemix using the IBM Weather Data service, DbPedia, SPARQL, React.js, and Node.js. Check it out here and let me know your thoughts You...

Create a custom React Native module that exports Constants (with Swift)

In this post, we will create a simple React Native module using Swift. The module will return information about the current device and expose it to JavaScript. First, we create our Swift class, RNDevice.swift. This class will is responsible for returning information that describes the current device. This information is obtain using the UIDevice class. [code language=”Java”] import UIKit @objc(RNDevice) class RNDevice: NSObject { @objc func constantsToExport() -> NSObject {...

Adapt jQuery.getJSON to an Rx.Observable with RxJs

Rx provides an incredible and fluent API to help untangle your asynchronous JavaScript code. Here we’ll see how to adapt jQuery’s getJSON method to an Rx Observable with only a small bit of code. [code language=”JavaScript”] function getJSON(url, data) { return Rx.Observable.create(observer => { var canceled = false; if (!canceled) { jQuery.getJSON(url, data). done(data => { observer.onNext(data); observer.onCompleted(); }). fail(err => observer.onError(err)); } return () => canceled = true; });...

Modular AngularJS + RequireJS Seed Project

For the impatient: Skip reading this post and jump directly to the AngularJS + RequreJS seed project. To help folks get started with AngularJS, the Angular community has put together a number of nice seed projects. Some of these seed projects make use of RequireJS to manage script loading and modularization, others do not. Most however do not attempt to present a clean modular layout, instead they remain fairly monolithic and leave much...