Ember.js in Action – An ambitious overview, with glitches – #programming #bookreview

Ember.js in Action

Joachim Haagen Skeie

(Manning - paperback)

 

The Ember.js JavaScript framework has “a steep learning curve,” Joachim Haagen Skeie cautions readers repeatedly in his new book.

Indeed, Ember does. I’ve watched that learning curve confuse and frustrate several experienced JavaScript and Ruby on Rails developers. And I’ve banged my own (thick) skull against the Ember.js framework several times while (1) trying to learn it from an assortment of books and websites, including emberjs.com, and (2) building a few basic apps.

Skeie’s new book is an ambitious overview of software that bills itself as “a framework for creating ambitious web applications.” And Skeie ambitiously does not start out with a lame “Hello, World!” example. Right in Chapter 1, you dive into building a real-world application for creating, editing, posting and deleting notes. ” The source code for the Notes application weighs in at about 200 lines of code and 130 lines of CSS, including the templates and JavaScript source code,” Skeie points out. “You should be able to develop and run this application on any Windows-, Mac-, or Linux-based platform using only a text editor.”

I got  the Notes app to (mostly) run on a Windows machine and a Linux machine. But I can’t get it to save the contents of notes, even though I downloaded the book’s code samples, and my code seems to match what the author highlights in his book. (Still trying to sort out the problem. Perhaps something is wrong in my setups?)

I hate writing mixed reviews. It takes enormous effort and thought to create and finish a book. And I have been looking and hoping for a solid how-to text on Ember. For me, however, this book has two key downsides. First, the code examples are written for Ember.js 1.0.0, and as this review is being written, Ember.js 1.5.1 is the latest release (with 1.6 in beta). Second, the book’s opening chapter is very difficult for beginners to follow.

Some other reviewers also have noticed problems with the book’s example code –which, for me, forms the heart of a good how-to book. And they have taken issue with how the code is presented in the text.

Still, there is much to like here, especially if you are experienced in JavaScript and in model-view-controller (MVC) frameworks and have been curious about Ember.js.

I am fairly new to Ember, so some of the chapters most helpful to me have included using Handlebars js, testing Ember.js applications and creating custom Ember.js components–areas not given much notice in the other Ember books I have read.

If you are new to JavaScript and to frameworks, do not attempt to dive into Ember.js in Action as your first Ember exposure. Start with the Ember.js website and some simpler books first. Then, consider this book.

Hopefully, in the next edition, the all-important opening chapter will be reworked, and the code examples will be presented in a clearer and more complete fashion.

Si Dunn

 

Learning Dart – A solid guide to basic development using Google’s Dart #programming language – #bookreview

Learning Dart

Learn how to program applications with Dart 1.0, a language specifically designed to produce better-structured, high performance applications 

Ivo Balbaert and Dzenan Ridjanovic

(Packt - Kindle, paperback)

 

The programming language Dart was introduced in late 2011 by Google as a potential replacement for aging JavaScript. But JavaScript, of course, has continued to spread all over the Internet and planet since it first appeared in 1995.

Not surprisingly, Google found itself getting some pushback from software developers and others who have a lot of time, education, sweat and money invested into creating, supporting and modernizing files that have .js extensions.

Dart today is billed as “a new platform for scalable web app engineering.” It is a long way from replacing JavaScript. Indeed, it compiles to JavaScript.

At the same time,  Dart is a good and powerful Open Source language. And, while it is not yet seen on most lists of top languages to know, it is gaining momentum and followers in the software world.

“Dart looks instantly familiar to the majority of today’s programmers coming from a Java, C#, or JavaScript/ActionScript background; you will feel at ease with Dart,” write the authors of Learning Dart.

“However, this does not mean it [Dart] is only a copy of what already exists; it takes the best features of the statically typed ‘Java-C#’ world and combines these with features more commonly found in dynamic languages such as JavaScript, Python, and Ruby. On the nimble, dynamic side[,] Dart allows rapid prototyping, evolving into a more structured development familiar to business app developers when application requirements become more complex.”

In their recent book,  Balbaert and Ridjanovic note this about Dart: “Its main emphasis lies on building complex (if necessary), high-performance, and scalable-rich client apps for the modern web.”

Likewise, they point out that  “Dart can also run independently on servers. Because Dart clients and servers can communicate through web sockets (a persistent connection that allows both parties to start sending data at any time), it is in fact an end-to-end solution. It is perfect on the frontend for developing web components with all the necessary application logic, nicely integrated with HTML5 and the browser document model (DOM).

“On the backend server side, it can be used to develop web services, for example, to access databases, or cloud solutions in Google App Engine or other cloud infrastructures. Moreover, it is ready to be used in the multicore world (remember, even your cell phone is multicore nowadays) because a Dart program can divide its work amongst any number of separate processes, called isolates, an actor-based concurrency model as in Erlang.”

Their well-written book, from Packt Publishing, delivers a structured and nicely paced overview of how to use the Dart programming language. The book is suited for inexperienced developers and experienced developers alike who are curious about, or ready to dig into, Dart .

The intended audience, the authors state, includes “…web application programmers, game developers, and other software engineers. Because of its dual focus (Dart and HTML5), the book can appeal to both web developers who want to learn a modern way of developing web applications, and to developers who seek guidance on how to use HTML5.”

Indeed, in the first chapter, you get more than the obligatory “Hello, World!” program. You also learn how to use the Eclipse-based Dart Editor to create some simple command-line and web applications.

From there, the 12-chapter work focuses on topics and software examples that range from variables, classes and libraries, to combining HTML forms with Dart, building games with HTML5 and Dart, developing business apps with Polymer web components, using Dart with MVC web and UI frameworks, working with local data and client-server communications, and creating data-driven web applications using Dart and MySQL or MongoDB.

I have tested some of the book’s code examples both on Linux and Windows machines and have enjoyed working with the Dart Editor. However, I did find a couple of code typos in the print version while hand-typing some of the shorter examples. The better choice is to download and use the book’s code examples found on the Packt website.

One other matter that some new Dartisans may encounter: Norton 360 antivirus software currently tends to throw dart.exe into quarantine on Windows machines–and that stops Dart cold. There is a fairly simple way to retrieve the file from quarantine and tell Norton 360 to let it run. However, check the Dart community page on Google+ for info on that and some other approaches to avoiding the problem.

Learning Dart was published soon after Dart 1.0 was released, and Dart has continued to evolve fairly quickly. (Its stable version was 1.4.3 at the time this was written.) So there will be some small differences in screen displays and other matters.

If you want to learn Dart and get up to speed for using it in application development, Learning Dart can be your handy and solid how-to guide.

Si Dunn

 ***

Ready to get Learning Dart? Click here: Kindlepaperback

Play for Java – Good intro to the Play 2 Java web framework – #programming #bookreview

Play for Java

Nicolas Leroux and Sietse de Kaper

(Manning, paperback)

 

“There are,” co-author Nicolas Leroux writes, ” many Java web frameworks, but most of them have a key flaw: they try to hide the web behind an abstraction layer, rather than embracing it. That is the most important difference between Play and most other Java web frameworks (Servlets, we’re looking at you!).”

His writing partner, Sietse de Kaper,  adds: “Play ‘gets it.’ For ‘it,’ in this case, a lot of things can be substituted. Play ‘gets’ HTTP and the web in general, how developing web application works, what makes a nice and clean API, and more. This was clear from the early Play 1 beta versions, and that’s why we’ve used it on many projects since 1.0 came out. It didn’t disappoint. Now, with Play 2, Play continues to improve web development for the Java platform.”

Their new book from Manning is nicely written, adequately illustrated and structured properly to help newcomers get started with Play and with basic web application development. Play for Java also can help experienced web app developers quickly get up to speed quickly with this powerful development platform.

You start by creating and modifying the ubiquitous “Hello world!” application. Then you spend the remaining chapters developing, expanding and enhancing a warehouse management application, one designed to meet specific requirements within a made-up company. “Enterprise applications usually live inside the IT department and are usually hosted within the organization,” Leroux and de Kaper explain. Indeed, businesses may have several or many enterprise applications serving specific purposes, and those apps often do not communicate with each other.

As both writers note: “Web developers are used to interacting with their applications through the browser. With Play, you can also use the console to interact with your web application’s development environment and build system. This is important for both quick experiments and automating things.”

The web app framework Play is, indeed, fun to play with–and work with. For example, it is very good at showing you exactly (ona browser screen) where you have made a keystroke mistake or other blunder in your code. And the words  “Compilation error” on the screen display can’t be missed. Indeed, they can be read from across a room. (Fortunately, in my office, so no one sees them but me.)

If you decide to download Play and give it a try, be sure you (1) have Java installed correctly and (2) know how to set PATHs correctly on your Windows, Linux, or Mac machine. (I had a lingering Java glitch in one of my machines, and I nearly flung a Windows 7 PC into a wall in frustration. But I finally found the problem and fixed it, and Play immediately popped to life as shown in the book. Meanwhile, Play installed smoothly on a Windows 8.1 machine and an ex-XP PC now running Ubuntu.) 

The authors show how to use Play with three IDEs: Eclipse, NetBeans and IntelliJ. Or, if you prefer, you can stick with the Play console and a text editor such as Notepad++ (my current favorite). And they repeatedly emphasize that (1) you should not worry that their Java framework called Play actually is written in Scala and (2) you will encounter some bits of Scala while working with template files.

“Any template language has structures you need to know to build your templates, and Scala templates are no different,” they explain. “Once you know what you have to do to, for example, iterate over a collection or insert a variable value somewhere, you know all you have to know to use that feature. You don’t have to think of it as Scala if you don’t want to. Think of it as another template language.” (Actually, Scala is not scary at all once you’ve spent a little time with it or taken an online class.)

Play supports the optional use of some compiled assets, and “[o]ut of the box, Play 2 comes with support for LESS, CoffeeScript, and Google’s Closure compiler,” the co-authors note.

According to Playframework.org, Play is built on Akka and offers “a lightweight, stateless, web-friendly architecture.” It also offers built-in testing tools and speedy “hit refresh” workflow capabilities.

Whether you are an experienced web app developer, a newcomer, a student or a hobbyist programmer, it can be serious fun to work with–or play with–Play. And Nicolas Leroux’s and Sietse de Kaper’s Play for Java can be exactly the well-tuned guide you need to learn Play 2.

 — Si Dunn

 

 

 

 

 

 

Adobe Edge Animate – Rocky Nook’s elegant new software how-to guide – #webdesign #bookreview

adobe_edge_animate

Adobe Edge Animate

Using Web Standards to Create Interactive Websites

Simon Widjaja
(Rocky Nook – paperback, Kindle)

Simon Widjaja’s new book is both elegant and practical. It is elegantly structured and illustrated, and it is practical in its approach to showing how to use Adobe Edge Animate.

That software package, Widjaja says, “is a multimedia authoring tool based on open web standards….Compositions created with Edge Animate can be used in browser applications and apps on mobile devices, but also in digital publications created with Adobe Digital Publishing Suite or Apple iBooks Author.”

Widjaja is an experienced Edge developer, as well as programmer, author, IT trainer, and Flash developer.

Not only does his book show how to design and create animations. He also demonstrates “solutions that go beyond the application’s standard functions,” including “integration into external systems and extensibility with additional frameworks and custom components.”

The Edge Animate runtime, he notes, “is largely based on the popular jQuery JavaScript framework.” So external HTML and JavaScript components can be placed into Edge Animate compositions, and Edge Animate users can create their own components.

The 220-page book (translated from German by Susan Spies) is divided into seven chapters, with numbered subheadings and sub-subheadings. The chapters are:

Chapter 1: Introduction — Contains “basic information on the current status quo in web standards” and how they apply to understanding and using Edge Animate.

Chapter 2: Getting to know the authoring tool – Provides an overview of Edge Animate’s interface and its wide range of functions.

Chapter 3: Design – Shows how to use the functions for creating graphic elements, how to work with assets such as images and fonts, and how to “create more complex layouts.”

Chapter 4: Animation – Introduces the Timeline and the Pin and explains “how to animate  your compositions using keyframes.”

Chapter 5: Interaction – Focuses on Edge Animate’s API and “how to implement various actions.”

Chapter 6: Publication –Explores the “the various publishing options available…in Edge Animate and explains the necessary preparations…for publishing your composition on the web or within a digital publication. Also looks at “how your creative work can be integrated into a content management system.”

Chapter 7: Advanced Tips – Covers “a range of extensions you will need to make your projects perform well on the web.”

Widjaja’s Adobe Edge Animate seems an excellent fit for Rocky Nook’s stated 2014 mission, which is “to publish books on cutting-edge developments in photography, imaging, and technology that really matter, and to focus on practical usage that will enhance capabilities. Our ultimate goal,” the company says, “is to foster image quality.”

With this book and Adobe Edge Animate, you definitely can learn how to boost the quality of images, using effective animated presentations on the web, in apps, and in other publications.

One e-book caution: This book “has complex layouts and has been optimized for reading on devices with larger screens.” In other words, do not try to read it on a phone or small tablet.

Si Dunn

Instant Handlebars.js – A short but effective how-to guide – #programming #bookreview

Instant Handlebars.js

Learn how to create and implement HTML templates into your projects using the Handlebars library
Gabriel Manricks
(Packt Publishing – e-book, paperback)

“Short, fast, and focused.” These are the three promises offered for Gabriel Manricks’ new book, Instant Handlebars.js, from Packt Publishing. And, at just 62 pages in print format, it lives up to those vows.

Manricks explains and demonstrates Handlebars using five well-structured sections. First, he introduces Handlebars.js and describes what a templating engine is and does. He notes that “[t]he purpose of using a templating engine such as Handlebars is to generate some kind of viewable content (usually HTML pages), dynamically.” He then shows how to download the Handlebars library and create a “Hello {{name}}” template and a simple helper.

His “Top 6 Features you need to know about” section goes to the heart of Handlebars.js and shows how you can organize large projects and pre-compile templates.

The Top 6 topics include: (1) Expressions—“the core of templates”; (2) Helpers—“[t]hese are where Handlebars gets its extendibility”; (3) Partials—“the building blocks of the template world” and important for modular design; (4) Structuring a Handlebars app—the pros and cons of various potential structures; (5) Pre-compilation—which can lead to “a more optimized and efficient site”; and (6) Logging and comments—“writing clear and debug-able templates and helpers, so you can easily test and maintain them in the future.”

In the book’s final section, “People and places you should get to know,” Manricks describes some individuals and websites you should follow so you can “stay up to date and dive deeper into the Handlebars community.”

Despite its small page count, the book contains numerous short code examples that show how to put Handlebars.js to work in HTML files.

You need at least some modest experience with JavaScript and HTML to get full benefit from this book. You also will make brief use of Node.js to install Handlebars.js.

If you have done any work with Ember.js, you already have picked up some Handlebars.js experience. However, even here, this short, handy guide can help you get a better understanding of how to use Handlebars, with or without Ember.

Instant Handlebars.js can be ordered in e-book or paperback format direct from Packt Publishing’s website. Or, the Kindle version and the paperback can be ordered via Amazon.

Si Dunn

The Modern Web: Multi-Device Web Development with HTML5, CSS3, and JavaScript – #bookreview

The Modern Web
Multi-Device Web Development with HTML5, CSS3, and JavaScript
Peter Gasston
(No Starch Press – Kindle, paperback)

After a quick first glance, you might look right past this book. You might assume its title, “The Modern Web,” simply introduces some kind of heavily footnoted, academic study of the Internet.

Not so, Web breath. In this case, it’s the subtitle that should grab your attention.

Whether you hope to go into web development, or you’re already there, Peter Gasston’s new book can help you get an improved grasp on three important, device-agnostic tools that will be essential to your work and career development. They are: HTML5, CSS3, and JavaScript, that not-so-simple programming language that many new web specialists often try to avoid learning. (That’s because, typically, it’s easier, more fun and a bit less cryptic to work with HTML5 and CSS3.)

Also, Gasston notes, there have been big explosions in the number of libraries and frameworks that use JavaScript, further clouding a developer’s ability to know which ones he or she should learn next. (The author limits his coverage to four: jQuery, YepNope, Modernizr, and Mustache.)

Gasston’s well-written book zeroes in on the three “web technologies that can be used anywhere, from open websites to device-specific web apps.” And on all sorts of devices, ranging from tiny phones to tablet computers to wall-covering HDTVs.

And his teaching aim is to show you “modern coding methods and techniques that you can use to build websites across multiple devices or that are tailored to the single device class you’re targeting.”

By the way, “websites” is simply a shorthand term the author uses “to avoid repetition. The features you’ll learn from this book are relevant to websites, web applications, [and] packaged HTML hybrid applications–in short, anything that can use HTML, CSS, and JavaScript.”

Gasston also wants you to learn that “fast” is the main thing that matters to those who will use your site. “Your site needs to be fast–and feel fast–regardless of the device it’s being displayed on,” he emphasizes. “And fast means not only technical performance (which is incredibly important) but also the responsiveness of the interface and how easily users can navigate the site and find what they need to complete the task that brought them to you in the first place.”

His 243-page book contains many short, useful code examples and illustrations, and is excellent for developers who have at least a little bit of experience with HTML5, CSS3, and JavaScript but aren’t sure where and how to focus their energies and attention for the rapidly changing career road ahead.

The Modern Web offers a well-organized introduction, plus 11 chapters:

  1. The Web Platform
  2. Structure and Semantics
  3. Device Responsive CSS
  4. New Approaches to CSS Layouts
  5. Modern JavaScript
  6. Device APIs
  7. Images and Graphics
  8. New Forms
  9. Multimedia
  10. Web Apps
  11. The Future

There also are two appendices: Browser Support as of March 2013 and Further Reading.

Peter Gasston has been a web developer for more than 12 years, and his previous book is The Book of CSS3.

He notes that “[t]he Web is constantly evolving, and book publishing means taking just a single snapshot of a moment. Some things will change; some will wither and be removed. I’ve tried to mitigate this by covering only technologies that are based on open standards rather than vendor-specific ones and that already have some level of implementation in browsers.”

He urges developers to stay alert to changing Web standards and to “be curious, be playful, keep on top of it all. He stresses: “There’s never been a more exciting time to work in web development, but you’ll need to put in an extra shift to really take advantage of it.”

Si Dunn

Killer UX Design – How to create compelling, user-centered interfaces – #bookreview

Killer UX Design
Jodie Moule
(SitePoint – paperback, Kindle)

The overused term “killer app” tends to kill my curiosity about books with “killer” in the title.

Still,  “killer” title aside, Killer UX Design deserves some attention, particularly if you are struggling to create a better user experience (UX) for products, websites, services, processes, or systems. The eight chapters in this 266-page book provide a well-written “introduction to user experience design.”

The focus, in UX design, is on “understanding the behavior of the eventual users of a product, service, or system. It then seeks to explore the optimal interaction of these elements, in order to design experiences that are memorable, enjoyable, and a little bit ‘wow’,” the author says.

She is a psychologist who co-founded and directs Symplicit, an “experience design consultancy” in Australia. “With the digital and physical worlds merging more than ever before,” she says, “it is vital to understand how technology can enhance the human experience, and not cause frustration or angst at every touchpoint.”

You won’t find JavaScript functions, HTML 5 code, or other programming examples in this book, even though software engineering increasingly is a key factor in UX design. Instead, the tools of choice during initial design phases are: Post-It Notes, index cards, sheets of paper, tape, glue, hand-drawn diagrams and sketches, plus clippings from newspapers, magazines and other materials.

And, you likely will spend time talking with other members of your UX design team, plus potential users of your product, service, or system.

Some of the chapters also deal with prototyping, testing, re-testing and tweaking, and how to modify a design based on what you learn after a product, service, or system has been launched.

A key strength of Killer UX Design is how it  illustrates and explains the real-life — and seldom simple — processes and steps necessary to design an app that is both useful and easy to use.

Si Dunn

Getting Started with Mule Cloud Connect – To help sort out the chaos of Internet services – #bookreview

Getting Started with Mule Cloud Connect
Ryan Carter
(O’Reilly – paperback, Kindle)

In a digital world increasingly cluttered with Software-as-a-Service (SaaS) platforms, Open APIs, and social networks, complexity quickly can get out of hand.

“It all starts,” Ryan Carter writes in his new book, “with a simple API that publishes somebody’s status to Facebook, sends a Tweet, or updates a contact in Salesforce. As you start to integrate more and more of these external services with your applications, trying to identify the tasks that one might want to perform when you’re surrounded by SOAP, REST, JSON, XML, GETs, PUTs, POSTs, and DELETEs, can be a real challenge.”

Indeed. But never fear, Mule ESB can ride to your rescue and connect you quickly and easily to the cloud. At least, that’s the marketing claim.

Some truly big-name users, it should be noted, are adding credibility to Mule’s claimed capabilities and usefulness as an Open Source integration platform. They include Adobe, eBay, Hewlett-Packard, J.P. Morgan, T-Mobile, Ericsson, Southwest Airlines, and Nestle, to mention just a few.

Meanwhile, riding Mule to the cloud is the central focus of this compact (105 pages), well-written get-started guide. Its author, Ryan Carter, is both a specialist in integration and APIs and “an appointed Mule champion” who contributes regularly to the MuleSoft community.

“Mule,” Carter points out, “is an integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data regardless of the different technologies that the applications use. It is also at the core of CloudHub, an Integration Platform as a Service(IPaas). CloudHub allows you to integrate cross-cloud services, create new APIs on top of existing data sources, and integrate on-premise applications with cloud services.”

The book is structured so you start off by building a simple Mule application that will serve “as the base of our examples and introduce some core concepts for those unfamiliar with Mule.” Then Carter shows and illustrates how to “start taking advantage of Mule Cloud Connectors.” He includes numerous code examples, plus some screenshots and diagrams.

The book’s six chapters are:

  1. Getting Started
  2. Cloud Connectors
  3. OAuth Connectivity
  4. Configuration Management
  5. Real-Time Connectivity
  6. Custom Connectivity

Carter emphasizes: “Mule Cloud Connect offers a more maintainable way to work with APIs. Built on top of the Mule and CloudHub integration platforms, Cloud Connectors are service-specific clients that abstract away the complexities of transports and protocols. Many complex but common processes such as authorization and session management work without you having to write a single line of code. Although service-specific, Cloud Connectors all share a common and consistent interface to configure typical API tasks such as OAuth, WebHooks, and connection management. They remove the pain from working with multiple, individual client libraries.”

If Mule does not have a connector for a resource that you need, the book shows you how to create your own.

Getting Started with Mule Cloud Connect can get you started on a beneficial ride of  discovery, and it can take you onto the trail that leads to solutions.

– Si Dunn

HTML5 and JavaScript Web Apps – With emphasis on the Mobile Web – #programming #bookreview

HTML5 and JavaScript Web Apps
Wesley Hales
(O’Reilly,
paperbackKindle)

Increasingly, the world of Web development is taking on a “mobile first” attitude. And for good reason. Sales of desktop and laptop computers are shrinking, while sales of mobile devices seem to be swelling into a flood.

“Consumers are on track to buy one billion HTML5-capable mobile devices in 2013,” Wesley Hales writes in his new book. “Today, half of US adults own smartphones. This comprises 150 million people, and 28% of those consider mobile their primary way of accessing the Web. The ground swell of support for HTML5 applications over native ones is here, and today’s developers are flipping their priorities to put mobile development first.”

Hales’ HTML5 and JavaScript Web Apps focuses on using HTML5, JavaScript, and the latest W3C specifications to create mobile and desktop web apps that can work on a wide range of browsers and devices.

Indeed, deciding what to support is a key point in this useful, well-focused how-to guide. Hales notes: “Unfortunately the Mobile Web isn’t write-once-run-anywhere yet. As specifications become final and features are implemented, interoperability will be achieved. In today’s world of mobile browsers, however, we don’t have a largely consistent implementation across all browsers. Even though new tablets and phones are constantly being released to achieve a consistent level of HTML5 implementation, we all know that we’re [also] stuck with supporting the older, fragmented devices for a set amount of time.”

The 156-page book straddles “the gap between the Web and the Mobile Web” but puts a lot of emphasis on developing mobile applications. Here are its nine chapters:

  1. Client-Side Architecture
  2. The Mobile Web
  3. Building for the Mobile Web
  4. The Desktop Web
  5. WebSockets
  6. Optimizing with Web Storage
  7. Geolocation
  8. Device Orientation API
  9. Web Workers

This is not a book for JavaScript, HTML, or CSS beginners. But if you have at least some basic experience with Web application development, Hales can help you get on track toward becoming a Mobile Web guru. Meanwhile, if you are already well-versed in the ways of the Web app world, you may still learn some new and useful things from HTML5 and JavaScript Web Apps.

Si Dunn

JavaScript as Compilation Target: ClojureScript and Dart – #programming #bookreview

Despite its widespread success, JavaScript has a reputation for being a computer language with many flaws. Still, it is now everywhere on the planet, so it is here to stay, very likely for a long, long time.

Not surprisingly, several new languages have emerged that jump over some of JavaScript’s hurdles, offer improved capabilities, and also compile to optimized JavaScript code.

Two of these languages are the focus of noteworthy new “Up and Running” books from O’Reilly: ClojureScript: Up and Running and Dart: Up and Running.

Here are short reviews of each book:

ClojureScript: Up and Running
Stuart Sierra and Luke VanderHart
(O’Reilly, paperback, Kindle)

ClojureScript, the authors contend, “provides developers with a language that is more powerful than JavaScript, which can reach all the same places JavaScript can, with fewer of JavaScript’s shortcomings.”

The primary targets of ClojureScript are “web browser applications, but it is also applicable to any environment where JavaScript is the only programmable technology available,” they add.

“ClojureScript is more than Clojure syntax layered on top of JavaScript: it supports the full semantics of the Clojure language, including immutable data structures, lazy sequences, first-class functions, and macros,” they emphasize.

Their 100-page book focuses on how to use ClojureScript’s features, starting at the “Hello world” level and gradually advancing to “Development Process and Workflow” and “Integrating with Clojure.” (ClojureScript is designed for building client-side applications, but it can be merged with Clojure on the JVM to create client-server applications.)

Early in the book, they also describe how to compile a ClojureScript file to JavaScript and emit code “that is fully compatible with the Advanced Optimizations mode of the Google Closure Compiler.”

The two writers are Clojure/ClojureScript developers with a previous book to their credit.

ClojureScript: Up and Running is written well and appropriately illustrated with code samples, flow charts, and other diagrams. The authors recommend using the Leiningen build system for Clojure, plus the lein-cljsbuild plug-in for ClojureScript.

Their book is a smooth introduction to ClojureScript that requires no prior knowledge of Clojure. But you do need a basic working knowledge of JavaScript, HTML, CSS, and the Document Object Model (DOM).

#

Dart: Up and Running
Kathy Walrath and Seth Ladd
(O’Reilly, paperback, Kindle)

Google created Dart to be “an open-source, batteries-included developer platform for building structured HTML5 web apps,” the two authors note.

Dart provides not only a new language, but libraries, an editor, a virtual machine (VM), a browser that can run Dart apps natively, and a compiler to JavaScript.”

Indeed, Dart looks very similar to JavaScript and is “easy to learn,” the two writers state. “A wide range of developers can learn Dart quickly. It’s an object-oriented language with classes, single inheritance, lexical scope, top-level functions, and a familiar syntax. Most developers are up and running with Dart in just a few hours.”

The authors work at Google and note that some of the software engineers who helped develop the V8 JavaScript engine that is “responsible for much of Chrome’s speed” are now “working on the Dart project.”

Dart has been designed to scale from simple scripts all the way up to complex apps, and it can run on both the client and the server.

Those who choose to code with Dart are urged to download the open-source Dart Editor tool, because it also comes with a “Dart-to-JavaScript compiler and a version of Chromium (nicknamed Dartium) that includes the Dart VM.”

Since Dart is new, the writers also urge readers to keep an eye periodically on the Dart website and on their book’s GitHub site, where code can be downloaded and errors and corrections noted.

Dart: Up and Running is a well-structured, well-written how-to book, nicely fortified with short code examples and other illustrations. While the book appears very approachable and simple, it is not for complete beginners. You should have a basic working knowledge of JavaScript, HTML, CSS, and the Document Object Model (DOM).

If you are looking for a web development language that matches JavaScript’s dynamic nature but also addresses JavaScript’s sometimes-aggravating shortcomings, consider trying Dart—with this book in hand.

Si Dunn