Introducing AngularJS to Java Developers

If you want to develop Web applications, you’ll need to learn JavaScript. But writing code in JavaScript (at least in its ECMAScript 5 incarnation) is non-productive. You need to pick up a one of the JavaScript frameworks, because:

  • they make you more productive
  • will deal with cross-browser compatibility and make the application more structured
  • may include reusable components
  • lower the amount of manually written code.

JavaScript market offers multiple frameworks and libraries. While frameworks expect you to programs using well defined ruleswithin a certain code structure, libraries just offer reusable components a la cart.

In turn, frameworks can be categorized as feature complete (rigid app structure, intrusive, rich GUI components, tooling) and lightweight (MVC + Binding + Routing)

Ext JS, YUI, and Dojo represent feature-complete frameworks. AngularJS, Backbone.js, and Ember are examples of lightweight frameworks. After years of experimenting with different frameworks and libraries we decided to stick with hugely popular AngularJS by Google.

I work in a Java shop, and one of my responsibilities is to create an conduct trainings (both internal and external). Several years ago I started to work with our engineers on the curriculum introducing AngularJS to an enterprise Java developer.

The learning curve of AngularJS is not too steep for Java developers, who understand the concept of containers, dependency injections, callbacks. They must become proficient with JavaScript with its functions, closures and other good stuff.

But equally important is to be familiar with todays tooling of a productive Web developer. Here’s a short list of tools that JavaScript developers use today:

  • npm – node package manager used for installing and managing development tools
  • yeoman – a scaffolding tool used to generate the initial structure of an application
  • bower – package manager for application dependencies
  • grunt – a build automation tool
  • A JavaScript testing framework

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 techniques (old) or WebSocket protocol (new).

On the Java side we like to use such tried and true technologies as RESTful Web service and Java Messaging API.

When we hire a AngularJS/Java developer, we expect him to be familiar with at least 90% of all the above buzzwords. Finding such skilled software engineers may be difficult, so we’ve created a training program to prepare such a person.

By now, we’ve taught and fine-tuned this training class multiple times. The latest online version of this class consists of seven weekly training sessions (3.5 hours each) and seven consultations (from 30 to 60 min each). Programmers learn and gradually apply all of the above tools and techniques while working on the Online Auction application that has the following architecture:


We have a great feedback from people who have completed this training. But everyone says it’s challenging. And it should be. Back in the nineties a person who knew one of the programming languages plus SQL could relatively easy get a well paid job. Not anymore.

10 thoughts on “Introducing AngularJS to Java Developers

  1. Angular indeed makes an app light weight. But what if the client machine is very slow? Would it affect performance? E.g. if the app is running on dual core tablet.

    1. We used to have TypeScript in the curriculum, but then removed it as it’s too much to learn during this intensive training.

      1. I know. And to me that was the most interesting part of the course. Since it will be a part of next version of AngularJS, you can reintroduce it. 🙂
        Just my 2c.

  2. “If you want to develop Web applications, you’ll need to learn JavaScript” – I disagree that JavaScript is a required language for web development! It will never be fast because it is a dynamically typed language and for that reason it will eventually be replaced just like HTML will become obsolete. Right now I can use Dart, GWT or GWT derivatives. All require no knowledge what so ever of JavaScript. Of course at the moment these tool-kits compile code into JavaScript, for which I do not care. Whatever technology comes along and replaces JavaScript these tools will simply evolve to use and hide that fact too. In my opinion Vaadin is the best framework out there where I simply carry on coding in pure Java, no knowledge of JavaScript, HTML or CSS required and that’s the way I believe it should be.
    I’m not against learning more than one language – I’ve written applications in Assembly, C, C++, Fortran, Pascal, Delphi, Clarion, Visual Basic and Java. What I don’t like is having to use two languages for the one application when it is clear that only one is needed. Fair enough if you have to write some native code in C or C++ because there is no other way of achieving your goal but that’s not the case in writing web applications!

    1. “What I don’t like is having to use two languages for the one application when it is clear that only one is needed.”
      It’s like saying, “Why do I need to use phillips screwdriver if I can get by with a flat one?”

      It seems that you’re in denial.

      1. You’ve missed my point which is I DO NOT NEED TO LEARN JavaScript to develop web applications. I have built web applications using pure Java, no templates what so ever, no knowledge of XML, HTML, CSS or JavaScript required and yet the deployment of these applications used JavaScript. I’m not saying my applications don’t use JavaScript because it is still required by the browser at this point in time.

        When I said – “What I don’t like is having to use two languages for the one application when it is clear that only one is needed.” I am referring to the fact that most real world scalable web applications require development in Java, C# or some other language other than JavaScript. YES you can build pure JavaScript web applications but why would you choose to use JavaScript when it is an inferior language and when you can do everything in a better language. If you are going to argue that JavaScript is not inferior then you are the one that is in denial.

        1. I won’t argue. Java is definitely superior to JavaScript. That’s why I write in TypeScript, which has classes, interfaces, generics, etc. Then the code transpiles to JavaScript for deployment. But TypeScript is a superset of JavaScript, which means that any JS program is also a TypeScript program. Your approach is to use an unrelated language (Java or C#) and then some code generator (e.g. GWT) to create deployable JS, which you don’t know and don’t want to know. If it makes you happy it’s fine with me.Peace.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s