Welcome!

From the Trenches of the Enterprise Software

Yakov Fain

Subscribe to Yakov Fain: eMailAlertsEmail Alerts
Get Yakov Fain via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Latest Blogs from Yakov Fain
The current version of Angular is Release Candidate 1. This version changed the way how the framework is distributed – it comes as a set of scoped npm packages now. Any imports of the Angular classes will be done from @angular instead of angular2, for example: import {bootstrap} from ...
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 yo...
In any component-based framework you’ll need to implement component communications. The main principle is that components should be loosely coupled hence reusable hence testable. The mediator design pattern allows you to arrange component communications via “the man in the middle” so a...
If you haven’t heard the story, here’s the gist of it. A guy named Azer Koçulu published 250(!) open source packages in the popular repository npmjs.org, which is a central repo for all JavaScript developers (it’s… More
In the first half of 2016 I’ll speaking at conferences and teaching various Angular-2 classes. Here’s the list of public talks and trainings I got so far: 1. The conference DevNexus, Atlanta, GA, Feb 17… More
I decide to write this blog after reading this post of a frustrated developer (he goes by the nick pistacchio) who couldn’t create a simple single-page application (SPA) in JavaScript in several days. Typically frustration is a result of unmet expectations and this is the case here as ...
Over the last couple of years the AngularJS became the most popular framework for development of the front end of Web applications. The recent survey of Pluralsight, the best online training resource shows that Angular is leading the skills that developers want to acquire in 2016. This...
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 bu...
During the last several years Oracle was working on their cloud solution, and several internal teams were creating JavaScript-based Web interfaces for the cloud. At some point Oracle decided to standardize on the set of JavaScript libraries used internally, and they also developed a se...
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 w...
By default Angular 2 doesn’t use a two-way data binding. It uses a unidirectional binding but if offers you a simple syntax for a two-way data binding if need be. In this blog I’ll show you an example of such syntax. One-way binding from the UI an Angular component is arran...
Currently I’m working on the book chapter explaining how Angular 2 communicates with the servers. An easy approach would be to use for the data feed a public RESTful API of one of servers (Youtube or something), but I wanted to have my own locally installed server. Using one of t...
This is a sequel to my blog “Getting Familiar with Angular 2 DI“. This time we’ll create a simple application that will use a ProductComponent to render product details and ProductService to supply the data about the product. In this blog I use Angular 2 Beta.0 releas...
Over the last years we’ve been teaching AngularJS for various audiences. Besides the traditional live instructor-led class for private clients, we teach 3-4 public trainings online. Typically we run these trainings on weekends allowing developers from around the world sharpen the...
My Angular 2 blogging series continues and today’s I’ll present you a high level overview of Dependency Injection (DI) in Angular 2. Any Angular 2 application is a collection of components, directives, and classes that may depend on each other. While each component can expl...
Angular 2 framework offers a simple to use client-side navigation for Single-Page Applications (SPA). The new component router allows you to configure routes, map them to the corresponding components and arrange user’s navigation in a declarative way. While working on a routing c...
New York City residents often say “It’s going to be a nice city when all the constructions will be finished”. The same applies to Angular 2 framework, which remains in Alpha (the latest build is 40 at the time of this writing). It has a potential to become a great fra...
I was experimenting with Java HashSet, which is a pretty expensive collection to create, but it has a benefit of the O(1) performance on the retrieval of elements from this collection. Based on my experiments performance of HashSet is improved over the last year. I’ve written a small ...
I’ve received an email from an enterprise Flex developer who’s looking to converting a number of applications to JavaScript. He asked a number of questions, and I decided to write a brief blog with the answers. His email stared like this: “We have a bunch of existing ...
Say you need to hire a Web developer experienced with Angular. What would you expect the developer to know? Well, he or she needs to know how to create Angular components, what’s data binding, dependency injection, routing et al. But this is just the tip of the iceberg. Below is ...
TypeScript includes the keywords public and private to control access to the members of a class such as properties or methods. But being a superset of JavaScript, which doesn’t support the private keyword, using private members in TypeScript is not what you may expect. Let’...
So you’re an expert programmer and decided to write a technical book? Think twice. Why do you want to write it? These are possible answers: 1. All these years I’ve been using the IT knowledge so generously shared by other people, and it’s time to give back to the comm...
ECMAScript 6 standardizes the syntax of modules. A module is simply a Javascript file that you can load either on the application startup or lazily on the as-needed basis. ES6 modules give you complete control on what code to export to the external scripts and what to keep private to t...
Over the past three years my colleagues and I prepared and delivered multiple trainings “Modern Web Development with AngularJS and Java“.  We felt pretty comfortable with the framework, and the training  was structured around building a sample Online Auction app with Angula...
These days people are accustomed to logging in to various Web sites using third-party authorization services. Do you want to login using your Facebook or Twitter account? In technical terms, this means that you are being offered to delegate the process of authorization to a third-party...
I was preparing code samples for my ECMAScript 6 (ES6) workshop. ES6 has tons of new language features and programming in the next version of JavaScript is a lot of fun. In particular, ES6 supports block-level functions, so the following code should produce the error “doSomething...
The second edition of my Java tutorial went on sale. While this is not my first book, it’s special, because it’s a second edition. When you see a second edition of any book, it means that the first one was successful (i.e. was profitable for the publisher). I don’t re...
Recently I wrote a blog showing how to use the WebSocket protocol to push the data from a Java server to a JavaScript client. This time I’ll keep the same code on the server, but the client will be written in Dart. For this example I was using GlassFish 4.1 server, and IntelliJ IDEA 14...
Then I’ve received an LinkedIn email from this woman stating that she had a business proposition for me, and if I was interested, she was ready to explain. She also provided her email that ended in outlook.com. I checked her LinkedIn profile again. Looked legit. She even had a Twitter ...
I’m wondering if these developers do this on purpose or they are just random people in our profession? I was trying to sign up at this Web site. Had to enter my email and pick a password, which I did. Nobody warned me that the password had to be 8 characters until I pressed the [...
This morning I got the following email from a Java developer: “It seems you are doing less Java and more web development every year.” This got me thinking, and I decided to write this blog. Am I still a Java developer after 17 years of using this language? I certainly am. But in today...
I ran into an interesting problems with JavaFX. When the GUI is done in FXML it seems that if a scene has only shapes (e.g., Rectangle, Circle, etc.) the handler method doesn’t receive keyboard events. And the problem seems to be that there is no way (at least I don’t see it) to give a...
The next decision to make is how to communicate with the Java backend. Forget about JSP, servlets, and JSFs. Preparing HTML in your Java code is out of fashion. A Java server exchanges the JSON-formatted data with a single-page HTML/JavaScript front end, which use either AJAX technique...
This year I’m planning to run a one day workshop at a couple of software development conferences and privately for IT shops. The goal is to introduce JavaScript and related technologies to developers that are accustomed to developing in classical object-oriented languages like Java, C+...
On the server side we always use Java and have no plans to switch to any other technology. After spending many years developing the front end with Adobe Flex framework and ActionScript programming language we got spoiled by this super-productive environment. After the mankind led by Ap...
Finished writing the WebSocket chapter for the second edition of my Java 24 Hour Trainer. In this blog I’ll show you one of the code samples from lesson 28. Pretty often you need to write a program that publishes the same message to all connected clients. For example, multiple cl...
Finished writing the JavaFX chapters for the second edition of my Java 24 Hour Trainer. It included a sample code of the Tic-Tac-Toe game. The front end is done in FXML and the application logic is written in Java. Using FXML allows to substantially minimize the amount of Java code. Th...
Attention span is getting shorter and shorter. At least mine. I can’t do the same thing for 50 minutes straight, can you? Books became thinner. In the past getting a 1500-page book on programming for $40 would be considered a good deal. Now people don’t want to buy books th...
Not sure how IT book publishers can survive these days. People are intoxicated with free content. During American Civil War soldiers were bringing liquor to the camps by hiding it in their boots (a.k.a. boot-legging). But this is the ancient history of America. With soft media, there i...
Here’s  is a quote from the About page  of the Web site ehow.com: “eHow is your one-stop online resource for life’s challenges. Professionals in every field come together to offer expert advice, backed by the additional support of a can-do eHow community.“ Exper...