Data Encapsulation vs. Immutability in Javascript

A while ago, I wrote a fairly long post attempting to shed some light on a few things you can do in your JavaScript classes to enforce the concept of data encapsulation – or data “hiding”. But as soon as I posted it, I got some flak from a friend who is a Clojure programmer. His first comment about the article was this.

Continue reading Data Encapsulation vs. Immutability in Javascript

Red Hat Logo

Architectural Cross-Cutting Concerns of Cloud Native Applications

Several organizations are wondering (and sometimes struggling on) how to port their current workloads to cloud environments.

Continue reading “Architectural Cross-Cutting Concerns of Cloud Native Applications”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 


For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.

Eclipse Vert.x Core Cheat Sheet

Eclipse Vert.x is a toolkit used to build reactive and distributed systems on the Java Virtual Machine. Vert.x supports a variety of languages letting you choose which one you’d prefer. The Vert.x Core cheat sheet covers the creation of a project using Apache Maven, Gradle or the Vert.x CLI, and references most common Vert.x Core APIs, in 3 different languages (Java, JavaScript, and Groovy). Forgot how to create an HTTP server, use the HTTP client, implement a request-response on the event bus?  Just check the cheat sheet. Together with the Red Hat Developer Team, I’ve put together this handy cheat sheet – hopefully, you’ll find it useful too!

Continue reading Eclipse Vert.x Core Cheat Sheet

Release of v3.15 of the Red Hat Mobile Application Platform

Red Hat Mobile Application Platform (RHMAP) lets teams extend their development capabilities to mobile by developing collaboratively, centralizing control of security and using back-end integration with a range of cloud deployments.

We have just completed the deployment of the RHMAP v3.15 to all our actively updated grids.

Please pay particular attention to notes on deprecations and upcoming removals.

Full release notes including a list of known issues, customer-facing bug-fixes and changes are available on the Customer Portal here.

Continue reading “Release of v3.15 of the Red Hat Mobile Application Platform”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Node Package Manager 4 — Changes to Prepublish (NPM)

NPM 4 was released recently, about 2 weeks ago, and with it came some major changes. Some breaking, some not, but there is an interesting deprecation that happened with regards to the prepublish script.

Currently, if you had a prepublish entry in your package.json:

{
  scripts: {
    prepublish: "nsp check"
  }
}

This would be run whenever you performed a npm publish. Which is probably what you would expect with a name like prepublish.

Another thing was also happening though. When you ran npm install with no arguments, the prepublish step would still be run — this is not what you would expect.

Continue reading “Node Package Manager 4 — Changes to Prepublish (NPM)”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Node 7 and Promise Rejections – Please Handle them

Node.js 7.0.0 was released just last week, and the announcement dropped a bombshell. I’m guessing the following announcement might freak some people out:

DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

While the UnhandledPromiseRejectionWarning has been in node since 6.6.0, this deprecation warning is new — basically, it means you’ve rejected a promise in your code, but you are not handling it, and eventually, future of releases of Node.js will make your currently usable code stop being useable.

Continue reading “Node 7 and Promise Rejections – Please Handle them”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Data-hiding in ES6 (JavaScript) from an Object Oriented perspective

For a long time during my early career, I was an OO — object oriented — developer. I genuflected regularly in front of the altar of data encapsulation, object hierarchies and static typing. And the syntax. Oh the syntax!

But I have changed, of course, and so much of the dogma and ceremony that I participated in during those times has come to seem a lot less important than it was 20 years ago. Languages, and developers evolve. But that doesn’t mean there aren’t some really good lessons to learn.

Take, for instance, data encapsulation.

When I first began to seriously look at JavaScript as a language, data encapsulation – or the lack of it – was one of the things that really stuck in my old OO craw. While I loved the simplicity of the {} data structure, I hated the fact that most properties I chose to add to it were typically just there – sticking out for everyone to see and perhaps corrupt. The language didn’t make it very easy to keep this data protected. How do we handle this?

Continue reading “Data-hiding in ES6 (JavaScript) from an Object Oriented perspective”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Improving user experience for mobile APIs using the cloud

For your end users, one of the most important aspects of your API is the perceived response time — if your mobile application takes an excessive amount of time to load data, users will get frustrated.  

In this series of blog posts, we’ll cover three ways to approach building a RESTful API that leads to better user experience by minimizing perceived response time. These strategies include: processing requests quickly, reducing payload sizes, and eliminating requests entirely, or only downloading data that has changed. And, we’ll show you how to do each by providing sample node.js code that can be deployed ‘as is’ on Red Hat Mobile Application Platform to build a better mobile API.  

But, before getting into each strategy, why are these important? The user interface (UI) and user experience (UX) are extremely important to the success of mobile applications.

Continue reading “Improving user experience for mobile APIs using the cloud”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Checking node.js dependencies with SZero – Never lose track again.

Node.js is a JavaScript runtime built on top of Chrome’s V8 JavaScript engine. It is highly event-driven, and leverages non-blocking I/O model that makes it lightweight, efficient, and incredibly productive to use. It’s that last bit, “productive”, that I want to focus on today.

One of the things that i feel makes Node(and NPM) so great is the ease in which you can add and use third-party modules. As most node.js developers know, to start using an external module, you first install it:

npm install cool-module --save

Then we require it:

const coolModule = require('cool-module');

Then we use it:

coolModule.doCoolStuff();

Yup, pretty easy.

However, as most node.js developers know, our dependency list in our pacakge.json can grow pretty quickly. And sometimes we lose track of where in our code we are using these dependencies. Sometimes, dare I say it, we have modules in our package.json that we don’t actually use. GASP!!!

Ok, so if you’ve made it this far, then you probably realize this next paragraph is going to talk about how Szero fits into what i wrote above. Productivity, package installation, and dependency management/location.

Continue reading “Checking node.js dependencies with SZero – Never lose track again.”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Announcing fully containerized Red Hat Mobile Application Platform 4.2

Last June, we announced the availability of version 4.0 of our product. This was the culmination of months of hard work and demonstrated our constantly expanding set of capabilities. I went on to recap the key technology choices made over five years ago, choices that proved to be visionary for our mobile platform’s architecture and functionality: Node.js and containers. We are very proud of our accomplishments with Red Hat Mobile Application Platform 4.0 and the new technologies we introduced to our  Mobile Backend-as-a-Service (MBaaS) component.

Well, now we are back again with another major announcement. Not only have we provided new underlying technologies for the important MBaaS component, but today, with version 4.2, we are launching our Core Mobile Application Platform running on the same foundation of Red Hat Enterprise Linux (RHEL) and Red Hat OpenShift Container Platform, leveraging docker formatted containers and Kubernetes orchestration for our entire product’s infrastructure. Starting today, we have a full Mobile Application Platform that can be installed on-premise, in private clouds or in public clouds and is fully supported from the ground up by our world-class Red Hat support team.

Our top-notch team of Engineers and Solution Architects is always happy to talk to you about our mobile platform architecture and technologies. We love to talk about all the goodness you get with Red Hat Mobile Application Platform (RHMAP): containers, security, microservices, JavaScript, Node.js, APIs, automation and, of course, mobile apps. However, first let me talk to you about the problems our product solves for you and your organization.

Continue reading “Announcing fully containerized Red Hat Mobile Application Platform 4.2”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!