Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Book Review: Enyo: Up and Running

samzenpus posted about a year and a half ago | from the read-all-about-it dept.

Books 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.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.

cancel ×

46 comments

Sorry! There are no comments related to the filter you selected.

Bring back Packt! (1)

Anonymous Coward | about a year and a half ago | (#42938453)

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!

Re:Bring back Packt! (0)

Anonymous Coward | about a year ago | (#42946881)

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!

We need some reviews that get a score other than 9/10, hence the non-Packt book reviews. Don't worry, I'm sure there's a new CMS out soon that will require a new Packt book! :D

WebOS? (4, Informative)

cxreg (44671) | about a year and a half ago | (#42938495)

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

Re:WebOS? (0)

Anonymous Coward | about a year and a half ago | (#42938845)

What relevance does it have to the book review? Are you another butthurt fanboi?

Re:WebOS? (1)

Anonymous Coward | about a year and a half ago | (#42939409)

About the Author: Roy Sutton is a member of the HP webOS Developer Relations team and a contributor to the Enyo project.

Re:WebOS? (1)

Desler (1608317) | about a year and a half ago | (#42939445)

Again, what relevance does that have to the review?

WebOS (4, Insightful)

Tester (591) | about a year and a half ago | (#42938503)

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

Re:WebOS (0)

Anonymous Coward | about a year and a half ago | (#42938645)

Why would it need to be mentioned? It was an abject failure and has little relevance to the review.

Re:WebOS (1)

iceaxe (18903) | about a year and a half ago | (#42938927)

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

Re:WebOS (0)

Anonymous Coward | about a year and a half ago | (#42939539)

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

Fixed that for you. Nothing like putting a Dart DF into a Dralthi to ruin some cat's day.

Re:WebOS (0)

Anonymous Coward | about a year and a half ago | (#42941747)

Ishkur > Enyo

Open source is dumb (-1)

Anonymous Coward | about a year and a half ago | (#42938525)

Neckbeards are dumb.

Re:Open source is dumb (0)

Anonymous Coward | about a year ago | (#42946221)

Anonymous Cowards are dumb. FTFY.

Wait...

SLS;DR (0)

Anonymous Coward | about a year and a half ago | (#42938549)

stupid lead sentence

captcha: "idiocy"

Another framework (1)

Anonymous Coward | about a year and a half ago | (#42938557)

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! (3, Interesting)

Anonymous Coward | about a year and a half ago | (#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!

Re:How unique! (-1)

Anonymous Coward | about a year and a half ago | (#42938809)

Because the average programmer these days is on the bottom end of the IQ curve. These mouth breathers require a framework that does all the work for them so they don't have to think because thinking is hard and stuff.

Re:How unique! (4, Informative)

HaZardman27 (1521119) | about a year and a half ago | (#42938961)

Grow up. The reality is that software is expected to do more than ever these days, which means programmers need to be able to spend more time on solving business problems rather than on moving bits and packets around.

Re:How unique! (1)

alexandre_ganso (1227152) | about a year and a half ago | (#42939045)

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

Re:How unique! (1)

Anonymous Coward | about a year and a half ago | (#42939137)

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?

Re:How unique! (0)

Anonymous Coward | about a year and a half ago | (#42939245)

C has these things called "libraries". And, no, they are not the same thing as a framework before you try to equate them. There is plenty one can criticize C for without these tired and lame examples that always pop up.

Re:How unique! (2)

El Royo (907295) | about a year and a half ago | (#42939621)

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 same codebase.
2) To me, an app is different from a web page in that it provides interactive content without the need for a page refresh/reload.
3) (Get off your lawn?) Frameworks (in any language) are important for getting work done. Yes, you can hand-code a CMS in PHP if you wanted to, but why would you? HTML (even in the latest incarnations) doesn't provide all the controls people expect from interactive applications. JavaScript has some warts and a framework can help. Mobile and desktop browsers have any number of bugs that must be worked around for high-performance and well behaved apps, Enyo helps with this.

If you don't need to create cross-platform apps then you don't need to check out Enyo. If you already know HTML/JavaScript/CSS and need to get into Apps, then Enyo just might be for you.

Re:How unique! (0)

Anonymous Coward | about a year and a half ago | (#42942611)

I totally agree. You might find that Flash, JavaFX and the dearly departed Silverlight were all better solutions to delivering applications via the browser.

Re:How unique! (0)

Anonymous Coward | about a year and a half ago | (#42942751)

application was the newspeak for what we called program,

Nope. Not all programs are applications. A compiler is a program, but it’s not an application. Same goes for drivers, daemons, etc.

I really liked this book (5, Interesting)

soapdog (773638) | about a year and a half ago | (#42938643)

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.

I don't know about Enyo and productivity ... (0)

fahrbot-bot (874524) | about a year and a half ago | (#42938855)

... her [wikipedia.org] music always makes me sleepy.

Crap intro: Enyo != Enya (0)

UnknownSoldier (67820) | about a year and a half ago | (#42938859)

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

Re:Crap intro: Enyo != Enya (4, Informative)

Desler (1608317) | about a year and a half ago | (#42938941)

It was a terrible attempt at a joke. He was not being serious. Take the stick out of your ass.

Re:Crap intro: Enyo != Enya (1)

Desler (1608317) | about a year and a half ago | (#42938991)

And also he was referring to new age music [wikipedia.org] not new age religion. And, tes, many refer to her music as being part of that genre.

Re:Crap intro: Enyo != Enya (1)

UnknownSoldier (67820) | about a year and a half ago | (#42955553)

Sadly, you've missed the points:

1. Yoga and Meditation have been around for _thousands_ of years. The music that goes along with them is not "New"; more like "Old Sage."

2. Overloading the same term for Music and Religion is idiotic and confusing.

The Future (3, Interesting)

fartrader (323244) | about a year and a half ago | (#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.

Re:The Future (2)

Desler (1608317) | about a year and a half ago | (#42939149)

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.

Re:The Future (0)

Anonymous Coward | about a year and a half ago | (#42942761)

and they all suck.

Re:The Future (1)

denmarkw00t (892627) | about a year and a half ago | (#42941987)

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 then again it was always on the iPhone that components could and should have been polished but weren't. And, I mean "polished" in a very light sense: action sheets that don't go off the screen; repeaters that work; simple JSON-P examples that return some kind of data. They're getting there, and I commend their effort, I just hope it turns out to be well-spent time working on this project instead of working on improving much more mature, already existing frameworks.

Good luck guys, my hope is seeing a decent competitor to Sencha - sorry jQ, I love you and all, but get with it. UI and Mobile are...neat, but even Twitter Bootstrap's subtle improvements and accessories to jQuery make it a tough sell.

Yet another framework (2, Interesting)

Anonymous Coward | about a year and a half ago | (#42939135)

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 (3, Informative)

El Royo (907295) | about a year and a half ago | (#42939501)

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.

Re:I am the Author (2)

AaronLawrence (600990) | about a year and a half ago | (#42941035)

Since it claims to produce desktop apps, it would be nice if the samples for Enyo actually included some desktop apps.

Re:I am the Author (3, Informative)

El Royo (907295) | about a year and a half ago | (#42941609)

For the PC, you could package any of those apps with the Intel AppUp Encapsulator. The focus is more on the desktop/mobile web and mobile apps. Desktop apps are more like a freebie, not really a focus.

Re:I am the Author (1)

AaronLawrence (600990) | about a year ago | (#42949061)

Hm. The very first paragraph on the home page says:

Use the same framework to develop apps for the web and for all major platforms, desktop and mobile

sounds like a focus to me!

Re:I am the Author (1)

El Royo (907295) | about a year and a half ago | (#42952805)

I'll point that out to the team that maintains the web site. I suspect the wording isn't as clear as it should be.

Re:I am the Author (0)

Anonymous Coward | about a year and a half ago | (#42941293)

Thanks! I purchased the book, had Enyo 1.0 experience, and found it to be a good appropriately titled read. I'm excited to start a number of new Enyo applications in both mobile and desktop environments.

Re:I am the Author (2)

El Royo (907295) | about a year and a half ago | (#42941615)

If you've done Enyo 1.0 then check the Enyo site for some notes on moving from 1.0 to 2.0. Some properties changed names and there are some other differences. Thanks for buying the book!

Re:I am the Author (1)

denmarkw00t (892627) | about a year and a half ago | (#42942023)

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?

Re:I am the Author (2)

El Royo (907295) | about a year and a half ago | (#42942093)

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 bindings based on Backbone are intended to address the more data-heavy requirements of enterprise apps. I hope to be able to do a talk about the way open source projects can leverage other open source projects someday.

Huh? (2)

implet (711802) | about a year ago | (#42943609)

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 possibly be the author's fault.

The one thing the author could do was fix the jsFiddle code samples the moment he found out they were broken, which he did.

So, why the vitriol against a new author who has written a highly-readable, highly-functional _starter guide_ to the Enyo framework?

Re:Huh? (-1)

Anonymous Coward | about a year ago | (#42945889)

Tits or GTFO.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>