Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Book Review: Enyo: Up and Running 46

Michael Ross writes "Upon hearing the name "Enyo," one may wonder if the speaker is referring to the Greek war goddess, or if it is the name of some Celtic New Age music with a Latin twist. In the world of front-end software development, Enyo is a cross-platform open-source JavaScript framework that can be used to build HTML5 web applications for the desktop and for mobile devices, including those powered by iOS and Android. The project website bills it as "an object-oriented JavaScript application framework emphasizing modularity and encapsulation." Any programmer interested in learning Enyo — or at least exploring what it is capable of — can consult the online documentation and the forums, but a more time-efficient approach might be to read a book focusing on the topic, such as Enyo: Up and Running, written by Roy Sutton, a contributor to the project." Read below for the rest of Michael's review.
Enyo: Up and Running
author Roy Sutton
pages 74 pages
publisher O'Reilly Media
rating 6/10
reviewer Michael J. Ross
ISBN 978-1449343125
summary A brief introduction to a mobile-inspired JavaScript framework.
The book was published by O'Reilly Media on 6 February 2013, under the ISBN 978-1449343125. (My thanks to O'Reilly for providing a review copy.) On the publisher's page, visitors can find limited information about the book and its author, some reader reviews, links to purchase the electronic and print versions, and a page for errata (of which there are none, as of this writing). At 74 pages in length, this title comprises seven chapters, plus an appendix explaining how to set up a local development environment for working with Enyo, with a few options to choose from. Thus, the appendix is where most readers should and likely will start. In the preface, the author notes that the book assumes "some familiarity with HTML, CSS, or JavaScript"; that "or" should be an "and," since all three technologies are foundational to Enyo.

The first chapter introduces Enyo by examining a fairly simple web app — one that displays a traffic light on the web page. Naturally, in a black-and-white book such as this, the red/yellow/green colors are all in grayscale. Much more importantly, of the seven jsFiddle-hosted code examples provided in the chapter, the first five do not work (as of this writing), apparently because in each case there exists in the code some sort of control character, displayed as a red dot. (In the third example, the dot character is in the JavaScript and not the HTML.) Readers should delete that character and click the "Run" button, to see the intended results. The last two examples work only because the dot character comes after the closing </script> tag. It is baffling how these flaws could have gone undetected by the production staff and technical reviewers.

The material seems to raise as many questions as it answers. Assuming that the code printed in the book works (no downloadable code archive is offered), readers will probably be left pondering questions such as: Is create: function() some sort of constructor? Why isn't a new color passed through the call this.colorChanged()? Why is oldValue apparently not used? Where is setColor() defined? While it is a good idea to entice the reader to try a new technology by showing its capabilities, if that reader is expected to understand the example code presented, then it should be fully explained; otherwise, it should not be presented. As an alternative, the author could have limited the discussion to what functionality Enyo provides to the programmer, without listing source code in print or on jsFiddle. This would have provided the reader with greater motivation to invest the time and effort in learning what can be a challenging subject.

As a result of these early problems, this first chapter does not get the book off to a promising start. The second chapter, "Core Concepts," is perhaps the one that should have begun the book, because it describes many of the core ideas critical to Enyo: kinds, encapsulation, published properties, events, signals, inheritance, constructors, and statics. However, the pace is too fast for beginners, and more examples are needed to explain the concepts, step-by-step. By the bottom of page 11, countless readers will likely be bewildered with the terse discussion of getter and setter functions, "changed" functions, construction, and passed values (which are properties or not). Also, readers will again encounter the aforesaid problem of the red dot character breaking the example code on jsFiddle. (Further instances in the book will not be documented here.) The third chapter continues the discussion, focusing on components, menu and form controls, and functions, as well as some components for animation and making web requests. All of the information looks correct. The only puzzling aspect is why break tags are used (on page 22) instead of a CSS display: block; declaration.

User interface is addressed in the next two chapters, the first of which presents layout components commonly needed for Enyo apps — scrollers, repeaters, fittables, lists, and panels. The second one explores CSS styling of an Enyo app, performance considerations of apps on handheld devices, debugging, common mistakes, jsFiddle, internationalization, and localization. With these chapters, the narrative in the book becomes noticeably more comprehensible.

The penultimate chapter — essentially comprising two pages — delineates some options that the Enyo developer has for deploying a newly-built app to any one of the supported platforms. This chapter, like all the earlier ones, ends with a summary that is so brief, and applicable to so few pages, that each one seems pointless. Why do publishers feel obligated to include these useless chapter summaries in almost every technical book? The final chapter is a one-page conclusion, in which the author encourages readers to learn more and become involved in the Enyo community.

This book is more of an introduction, although no reason is provided as to why it was not instead made a more extensive treatment of the subject. Upon completing the book, the average reader will probably conclude that she did not absorb enough knowledge of the Enyo core to begin immediately developing apps using this framework, and the best course of action might be to start over again on page 1, or perhaps seek out a second source, before optionally returning to this one for a second run-through. The material could have been structured so all information is presented sequentially — so the reader does not encounter concepts yet unseen — with more step-by-step explanations.

Rather than presenting the reader with code snippets that have no relation to one another, it would have been much more interesting and motivating if the author had devised and explained code that incrementally builds into a nontrivial app. Furthermore, the example source code should have been made available on the publisher's website, so readers could avoid typing it from the text or extracting it from jsFiddle if they wished to try it in their local development environments.

In terms of typography, the font size of this book is a bit too small, especially for extended reading, and for people with subpar vision. This is even more true for the code snippets, which are in an even smaller font. In many of the lines of prose, the words are too close to one another — a problem exhibited in a few other recent O'Reilly titles. Did the production team feel it necessary to further compress a 74-page book?! In fact, proper names, such as those of components, are oftentimes broken between two lines in the text — sometimes nonsensically, e.g., "FittableR" followed by "owsLayout" (page 32). The book contains several errata: "This is [not] to say" (page viii), "such as [a] local installation" (viii), "url" (27), "we might modify add" (34), "woud" (35), "one [of] the most" (35), and "allow you [to] easily debug" (56). For such a slender volume, the production quality seems to have received less attention than it deserved.

Overall, this offering does not reach O'Reilly's usual high standards. It's a shame, because it seems like such a promising topic — one that could be more thoroughly explored in a larger volume. Perhaps this feedback, and that of other readers, could be folded into a second edition. This is a real possibility, given that the author notes in his conclusion that he considers the book an active project, and intends to keep it up-to-date with the changes to Enyo itself. In the meantime, this is a promising start that can give readers a taste of Enyo's potential for building modern web apps for desktop and mobile platforms.

Michael Ross is a freelance web developer and writer.

You can purchase Enyo: Up and Running from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.


This discussion has been archived. No new comments can be posted.

Book Review: Enyo: Up and Running

Comments Filter:
  • by Anonymous Coward

    Where did all the shill Packt reviews go? Did they shut down or did their checks to Slashdot and Michael Ross start bouncing?

    Bring back Packt!

  • WebOS? (Score:5, Informative)

    by cxreg ( 44671 ) on Monday February 18, 2013 @04:30PM (#42938495) Homepage Journal

    I have to wonder about the obviously deliberate non-mention of either Palm or WebOS. Trying to ignore the past?

  • WebOS (Score:5, Insightful)

    by Tester ( 591 ) <olivier...crete@@@ocrete...ca> on Monday February 18, 2013 @04:31PM (#42938503) Homepage

    Interesting that you can write an entire review of Enyo without mentioning that it comes from WebOS...

    • by iceaxe ( 18903 )

      Interestingly enough, the review is of a book about enyo, rather than enyo itself. Perhaps the book mentions this historical tidbit.

  • by Anonymous Coward

    Cool, this means the sorry excuse for mobile dev's who did the Slashdot mobile site can move on to another framework and make it even worse!

  • How unique! (Score:3, Interesting)

    by Anonymous Coward on Monday February 18, 2013 @04:42PM (#42938603)

    Given that HTML application frameworks are so rare, this is a groundbreaking, earthshattering news!
    My questions are:
    1) Why don't we use a portable, yet standard and better optimized platform for building "applications", like Java, C#, or even better, C/C++? What exactly is the benefit of using an interpreter based script language, combined enourmous memory needs and run it on the top of an already virtualized toolchain?
    2) What exactly is an application anyway? I mean, I used to understand these words, for I'm a programmer and application was the newspeak for what we called program, but today, application is pretty much everything, like HTML is NOT a program but a just a bloody content file format with a highly unsafe script language forced in to it.
    3) If HTML and Javascript is the way to go, surely there's no need of any "application" framework anymore since these are running on the top of the base service the OS (GUI, events, network communication, files, all that stuff). But if they aren't capable of doing these things properly, that would mean that there's no benefit of using this bloated, insecure heap of dead code.

    Stop re-inventing the wheel!

    • Yeah, because using C and having to write your own string, data structures and memory management routines is hardly reinventing the wheel at all.

      • by Anonymous Coward

        Why would you have to write your own string class? Or your own data structures? Or memory management routines?

        Have you ever used C before?

    • by El Royo ( 907295 )
      1) There is no more ubiquitous platform for distributing apps than the browser these days. You can't deploy C,C++,C# into the browser cross-platform today. And even if you could, you'd still need a framework to handle the UI. Java, given the security problems lately, isn't even a good bet for distributing apps cross-platform and doesn't exist on many mobile devices (e.g. iOS). JavaScript performance is quite good these days. Using Enyo you can target desktop web, mobile web and mobile apps with the sa
  • by soapdog ( 773638 ) on Monday February 18, 2013 @04:47PM (#42938643) Homepage

    I disagree with the reviewer, I thought this book was great. I was participating on a week long mobile app hackathon in Brazil and this book helped me understand Enyo a lot better. The title says it all, it is a book to get you up and running and thats how I was after reading it all in a single day. My application ended up wining the third place in this contest against 22 teams (and I worked alone) and I was only able to finish it in time because of some base knowledge I got from this book. Yes there are topics that I wished the author had talked more about such as g11n module but in the end of the book I knew enough Enyo to dig the API reference at the site and discover things by myself.

    I don't think the reviewer understood the main idea about the book, this is not a bible book or a complete library reference, this is the minimum amount of pages and knowledge to get you started building your own stuff.

    In the end I had a great experience reading this and it helped me won a big prize on that contest so it was more than worth every penny. I think this is the best introduction to Enyo 2 available right now.

  • ... her [wikipedia.org] music always makes me sleepy.
  • Conflating Irish Enya's Celtic inspired World music with New Age religion is extremely sloppy journalism.

    Oh wait, this is /. Silly me, here I thought the editors might give a dam about being professional.

    Only cowards use censorship

  • The Future (Score:4, Interesting)

    by fartrader ( 323244 ) on Monday February 18, 2013 @05:37PM (#42939071)

    Frameworks like this are definitely the way forward - Enyo, Monotouch even Unity for the gaming community. While the particular flavor of language isn't my thing multi-target environments where developers can leverage their existing skill sets are always welcome. I applaud the effort - and will probably read the book. Thanks for the review.

    • by Desler ( 1608317 )

      How is this the future? It's just yet another multi-platform framework. There are plenty of others that can give the same desktop/mobile coverage. They are a dime a dozen and have been for years.

    • Frameworks like...jQuery? ExtJS? Vanilla JS? (I know I know). But really, Enyo has taken many baby steps to get to where it is, but it feels like it's coming in late. I've spent years learning jQuery and a couple more learning ExtJS, I have no desire to continue to give Enyo a try when it's been since the TouchPad launch that I've been going back to it, time and time again, in hopes that it matures to a good stable point. It's getting there now, judging that the Showcase doesn't barf on desktop Chrome, but

  • by Anonymous Coward

    I was just thinking that I needed to learn yet another framework! And then this comes along. I think framework-itis has gotten to the point of a terminal illness in the computer industry. There are just too may frameworks. I long for the days when you knew C and SQL and could use any database or operating system with minimal retraining. Now everything has two or more frameworks that do the same thing, and when something is mature and established people start migrating to another one.

  • I am the Author (Score:4, Informative)

    by El Royo ( 907295 ) on Monday February 18, 2013 @06:41PM (#42939501) Homepage
    It's worthwhile noting that all the jsFiddle samples have been fixed. I can assure you they did work at the time the book was published.

    I do intend for the book to continue to grow as Enyo does (there will be a chapter soon on the forthcoming Enyo MVC addition, for example) and I will definitely fix the (very few) typos so the electronic versions are updated.

    Now, having dispensed with those, I need to point out that Enyo: Up and Running was intended as an introductory text, not a reference book. The Enyo Web site (which is very good) should always serve as the reference. This book, I think, does exactly what it was intended to: Introduce the key features of Enyo and explain how the fit into the broader context of the framework. The first chapter of the book is intended to give the reader a flavor for the development process with Enyo and how certain concepts are applied. I think moving it later into the book would diminish the value in it.

    Finally, some responses to specific comments: Regarding the unused parameter, this is an interesting question I struggled with a bit. JavaScript doesn't care if you provide the appropriate number of parameters and it doesn't care if you use them or not. As a teaching text, the book shows all possible parameters whether used or not so that the reader knows they are available. I could easily have left them out of the samples, but at the risk of hiding their availability. Regarding the uses of CSS, I decided to save styling using CSS until the chapter on styling so as to not confuse the issue. Break tags fit within the flow of the sample and show off how to use the 'tag' property. I don't see that they are 'wrong' in any way.

    Enyo is a relatively new framework (in its open source form) but has a strong legacy from the webOS days, as others point out. I find it very useful and I think it neatly addresses the many shortcomings of producing cross-platform apps. JavaScript is ubiquitous and the deployment options mean you're not beholden to Apple, Google or any other provider. I urge you to check out Enyo [enyojs.com], even if you're not interested in the book. There's a lot to like there.
    • Since it claims to produce desktop apps, it would be nice if the samples for Enyo actually included some desktop apps.

    • As an avid EnyoJS developer, what can you say to the folks over at Sencha? I'm not baiting, but I've always heard mixed opinions about them while never having any trouble from them myself (except that the mods are generally really irritated). Has Enyo benefitted from some of the ideas in ExtJS (dataviews, stores, readers/proxies/etc)? Does there seem to be animosity towards them from the free community?

      • by El Royo ( 907295 )
        I'm sure there'll be some cross-pollination between ExtJS/Sencha and Enyo. We always say that Enyo was 'mobile first' instead of something that came from a desktop browser world and moved down. I'm not sure there's any animosity between Enyo and those guys. Right now, Enyo has taken a more lightweight approach and doesn't have the dataviews, stores and readers/proxies you mention (though I'm not familiar with ExtJS enough to know those features well enough to know if there are analogues). Our new MVC bi
  • by implet ( 711802 )
    First, in the interests of full disclosure, I'm the author's wife. Now that that's out of the way . . .

    he reviewer seems to have several problems: 1) He doesn't like O'Reilly's starter guide series. 2) He doesn't like starter guides in general. 3) He couldn't be bothered to be polite enough to inform the author that the code samples had become broken sometime between publication and review. 4) The typography. 5) He needed to zing someone.

    None of these are in the author's control so they can't possib

One good suit is worth a thousand resumes.