I think so, I bought it with a 50% discount but I do regret. Better spend your money on something else. Make sure it covers Swift 2.0 and xcode 7
I'm using xcode 6.3.2 and -I think- the section about resources is not valid anymore (page 55).
I tried the Finders' show package contents option, but there is no resources folder there. Printing the mainBundle's resourcePath as suggested somewhere else is giving a /var/folders/n*Zipped*ontents/Resources" How can I access the resource Folder and display a NSImage as shown in https://developer.apple.com/swift/blog/?id=24

There are more xcode version issues like this addressed in this forum, will this book be updated to the latest xcode version?
Thanks also applies to me (xcode 6.3.2)
My question is almost perfectly questioned here: http://stackoverflow.com/questions/4805761/jpa2-hibernate-stop-lazy-loading

I'm having a problem where JPA is trying to lazily load my data when I don't want it to. Essentially what is happening is I'm using a Service to retrieve some data, and when I go to parse that data into JSON, the JSON library is triggering hibernate to try and lazily load the data. Is there any way to stop this? I've given an example below.

Unfortunately there is not really a clear answer yet. I was hoping that chapter 16 or 17 would offer a solution, but I haven't found any.
Is there a chance to share insights on how to accomplish this?

meap v6.
I noticed that the use of closures was already reported, but I'm still wondering why in listing 6.4 you need a redirect after the post has been added and why can't addPost just not simply return the outcome of timeline([id:params.id])?
What's the difference with forward and would it make a difference when using grails 2.0 methods?

see also this SO question and the comments on accepted answer:

Message was edited by: author
Ha I think I found it, I think I was looking for immediate functions as explained in listing 4.18 in secrets of js-ninja v9.
Well actually I meant it's there, but it is never mentioned in the examples (I guess I'm more of an example guy), and the way it is explained in the book did not make that much impression as the explanation on the jquery api site did.
Hi, I like the book a lot so far but I think I already mentioned that once. However yesterday I was struggling with bind functions and variables outside and inside the closure. Took me quite some time get it working with partial functions and in the end I unsuccessfully left that path, shortly after finding the eventData optional parameter, which solved all my problems.
Allthough the api tells this is lesser used parameter it solved all my problems, and I think that more people will benefit from it, I certainly would have.
It would be really great if you can also point out if my original thoughts for partial functions would also have worked.

Partial functions were explained by john in resig in.

And I hoped that I could use that to create bind functions with external parameters in the body of the function.
My use case is comparable to that described in http://www.packtpub.com/article/jquery-table-manipulation-part1 (search for .bind).


I'm still waiting for the remaining chapters, but as long as they haven't been published yet I've a voting right right?
I realize the release date is slated for may 2010 so I doubt my voice will be heard but.. for me personally I would appreciate it if the author would supply the ajax examples together with spring (mvc), not necessarily in the book but even in accompanying examples would be truly magic..

Not sure if this is the place, but thanks to this book and some examples on the internet I've been able to complete a picture viewer, with a slider and magnifier!
It's behaviour is not fully intuitive and needs some polishing, but it's a start.
anyway the link is http://www.dijkmeijer.com/pviewer
use the arrow(key)s on the page to scroll left or right, and click on the red bordered to load the magnifier. Move over the picture below to see the magnifier in action.

kind regards,
Not sure, after second look..
saw that chapter 9 & 10 are not released yet. And the questions about chapter 9 are not very serious.
Anyway my most recent version dates back to end of October.
is there a possibility to retrieve this edition?

Kind regards,
This chapter covers:
- Storing custom data on elements
- Storing and retrieving custom data on elements

First one seems redundant to me.

Not sure whether this is the place to complain about this forum, but..
I've also seen the early access program for scala, and there the accompanying forum could be addressed per page, So you can immediately see other comments on the same page. Which worked very well.

Having said that, it's the first comment on the book I find it very readable, and it has already a very high quality.

Thanks for the book and source code. Highly densed information and good to read. With git and mvn I had it up within a few minutes and mvn import into eclipse was even less of a problem.

Should the redirect for the ok page not be:

private static final String VN_REG_OK = "redirect:users/registration_ok.html";
instead of
private static final String VN_REG_OK = "redirect:registration_ok";

Alternatively the
<mvc:view-controller path="/users/registration_ok.html" view-name="users/registrationOk" />

can be adapted?

And if we would like display the entered user name like 'thanks xyz for registering' could we use a flash message for this, of wait till we finished spring flow?

Message was edited by:
Thanks for the elaboration in v9 on immediate function and Library Wrapping, for me it would help if you would elaborate a bit more on this subject, not only how to expose global variables but also how to use it inside the immediate function. How do constructors, prototypes member parameters work and how do you use your framework, whether its useful when building your webpage opposed to Library.

Sometimes I find it still a bit mind bending, and the framework examples out there are often to large and complex to get an easy grasp.
I do second the Jasmine suggestion. Also a quick search on stackoverflow (fwiw [the testframeworkinfocus] [javascript]) shows Jasmine as top compared to qunit, jsunit and yuitest).
I put quite some effort in my unittests, I'd hate to see my efforts in the 48% of Don't tests, mentioned in figure 2.5 smilie
I'm really learning something about Javascript with this almost academic book while trying to apply all its knowledge to my own project.
As a Java developer I'm very much interested in Javascripts' inheritance and hence my close study of chapter 5. The possibility to mimic inheritance with properties as explained in 5.4 is quite compelling. But to my great surprise I also found out that:

Ninja.prototype = new Person();

does not only make Ninja inherit person's prototyped functions but also person's properties:

function Person(){ this.danced = 0;};
Person.prototype.dance = function(){ this.danced++;};
function Ninja(){}
Ninja.prototype = new Person();
var ninja = new Ninja();
assert(ninja.danced == 1);

I think that this feature is too nice not to mention, unless I'm missing some very obvious nasty side effects.
apparently this works when properties are simple javascript types.
see http://stackoverflow.com/q/8724427/288190
in section 2.1 we read about assert:
assert(a == 1, "Disaster! A is not 1!");
If the value of variable a is not equal to one, the assertion fails and the somewhat overlydramatic)message is raised.

Isn't this a incompatible with how assert is used in the rest of the book?
(from listing 5.5 for example: assert(ninja.constructor == Ninja, #3
"The ninja object was created by the Ninja function.");

Maybe it would also be more readable if assert methods like 'assertTrue' , 'assertFalse' or 'assertUndefined' were used.
The assert in section 5.2 and 5.4 are not inline. In 5.2 a true value is asserted, and in 5.4 a false value is asserted, while the message is the same.
Furthermore on page 92 (95 of pdf) the text
Our test (#3) shows that, even when the prototyped method is added after the instance
method has been added, that the instance method takes precedence.

Should read (I think).
Our test (#3) shows that, even when the prototyped method is added after the object has been instantiated, the instance method takes precedence.
The function is merely an example of a testing routine for asynchronous tests. Lot of it is explained later in the book (right the first line starts with an immediate function explained in section 4.6, or as timers in chapter 6).
I do second your opinion though that the reader might find comfort in a line telling him that much of the code is explained in the next chapters and that this code is only illustrative.
Hi I just downloaded the example source code, although I've quite some eclipse experience, I'm stuck at this moment after 1.5 hours investigating and browsing internet and fora.

I successfully imported the project into eclipse by symlinking the projects/ch03 directory to stages/chapter-02/open18. Works well, everything imports fine, apart from an error on explode.launch which is said to be unavailable but I've seen this file with my own eyes in the very root of the project. I choose to ignore this message.

Now the whole process is ant driven so I opened the ant view, I'm used to mouse click my targets from there to execute the ant script, however this is not working for me. Apparently everytime I touch a file, the file is added as the default launch configuration to the ant build of the external tools dialog, making the execution of my desired ant target choke with the message: The file does not exist for the external tool named [last file touched], removing this configuration from the ant build in the external tool dialog makes it run again.
Any suggestions what I'm missing? As I've seen no other people on the thread have experienced same behavior I'm pretty sure I've overlooked something in the readme, or book but for now Its driving me nuts...


ant 1.7.0
eclipse 3.3
mac os x 10.4.9
java 1.5.0_13

Message was edited by: