Posts

Showing posts with the label javascript

How to stream data over HTTP using Node and Fetch API

The power of 'js generators' revamped

Typescript on JVM passing by Nashorn

Image
The last trend, from Java to Javascript I’ve developed a lot with Java (until java 8) but lately i’m progressively, for several reasons, moving to other programming languages with a prevalence of JavaScript. Yes, this means that I’m becoming a full stack developer using, mainly, ionic/angular for front-end development and nodejs for back-end development. Use Typescript as an enhanced Javascript Really, more than works with JavaScript, I use Typescript that I consider a must-to-use for developing on javascript-aware environment/runtime. A deep dive in Typescript is not the objective of this article, for now consider typescript an enhanced JavaScript that transpile itself in pure javascript so when we’ll use the Typescript word will imply that being the scene there is javascript The Enterprise dilemma - Javascript on back-end However in my opinion Javascript / angular / nodejs is a great technology stack but, working as consultant in Enterprise projects, there is a re...

NodeJS - Event Loop unveiled

Image
NodeJS : An asynchronous single threaded environment 😮 When started to work with nodeJS i was surprised that it was advertised as " asynchronous single threaded " environment. So I've tried to understand how it worked and then, at the end, I have dealt with famous and notorious event loop. Moreover, during studying, I've also figured out that its operation was the same either when Javascript run in NodeJS than in the whatever Internet Browser. The Event Loop In the image below has shown the basic event loop schema that make clear the architectural choices behind  the callback model (and as consequence the callback hell). In fact such model allows to decouple the event loop thread, where the main application runs, from all the resource consuming operations. Basic Event Loop Schema Event Loop in NodeJS The image below adds more details to the previous one in particular, concerning event loop, we find out event queue and worker threads that give us a ...

WEB COMPONENTIZATION - WebComponent and Polymer

Web Front End Development On Web Front-End's development seems focusing the greater part of developers' attention. After the wave "web as platform" now, another one is coming out, it is "browser as platform". The new web applications are built as "single page application" following the new principles of Service Oriented Front End Architecture (1) that extends the SOA ones. As consequence the number of the frameworks concerning it are continuously growing and choosing the right one are beginning a complex task to accomplish Such frameworks could be split in two main domains : the STRUCTURAL Framework (2) and the UIKIT (3) . Concerning the STRUCTURAL Framework seems that the most popular,until now, is AngularJS that has introduced into web development a lot of concepts once owned exclusively by BACK END Frameworks (like for example Inversion of Control ) and gave us an easier way to manage, arrange & modularize our Front-E...

DynJS Addon: Develop a JBoss Forge Addon using Javascript

As java developer I continuously searching tools that make easier my daily work. While ago i've started to use JBoss Forge and, for my job, seems the right tool in the right moment. The tight maven integration, the lot of available wizards has immediately got my attention, but the "best of" for me was the possibility to extend it developing Addon in easy way and sharing them as maven artifacts. Lately i'm approaching to other programming languages (i'm became a polyglot believer) and in particular i love Javascript, because it could be considered a full-stack language covering either the client-side and server-side programming.  So i've thought to bring on javascript on JBoss Forge to allow developing an Addon using such programming language more than java, giving the possibility to developers to build, test & share an Addon in quick & easy way without need to compilation and jar packaging For that purpose I've sta...

JAVASCRIPT REBORN: Node.js, Nashorn, JavaScriptCore

JavaScript: A language for HTML into Browser (?) JavaScript language has been considered for long time, strictly joined both with HTML and Internet Browsers. First with DHTML then with AJAX and finally with HTML5  javascript has rapidly became wide used into web programming land. But, as said, JavaScript was less famous as programming language for business or concerning whatever stuff outside the browser.  Concerning my experience, i remember that i used JavaScript, out of Browser, for develop web app in Microsoft Active Server Page (long time ago) using JScript  (Microsoft's implementation of ECMAScript ) and other small projects using   Mozilla Rhino  2012, JavaScript reborn Now seems that JavaScript is reborn as a "common purpose" programming language, breaking definitely the browser's borders.  Throughout 2012, JavaScript seems to be solving problems across the industry, causing some justifiable hype across a number of libraries and f...