Phoenix Inside Out (series of books/booklets) (self-published)

I’m going through the first book right now (“Mastering Phoenix Framework”) and I find the structure to be well paced for my taste. It skips the unnecessary details and goes into explaining general concepts very well.

I’m a bit turned off by the abundance of typos and code inconsistencies though.

Code snippets seem to be a mix of Phoenix 1.2 and 1.3 and some fragments make no sense.

For example, on chapter 4, it talks about adding categories to products and then, out of nowhere product.image shows up in the code snippet.

Of course, if you’ve been writing some Phoenix code before, these are easy to ignore and not as important. But they do add up and lower the overall quality of the book in my view.

2 Likes

@chalmagean thank you for your comments on the book. I agree with the issues on typos, grammatical issues and code inconsistencies. This is already being addressed in the upcoming release.

2 Likes

When shall we expect said upcoming release?

1 Like

@bdarla The book as it is now published is already covering Phoenix 1.3 RC2 and there isn’t any big change from what is covered in the book and Phoenix 1.3 release. There are about 4 minor changes including change in folder structure. These changes are communicated when the book is purchased by an automated email.

Changes for Phoenix 1.3RC2 - 1.3 being minimal, I have incorporated these changes in my next draft. As a non-native English speaker writing my first book series, some of the very helpful readers have been kind enough to notify me of the language errors, especially on the grammatical side. I am waiting for the language proofreading to be complete before making the next release which I am hopefully expecting will be ready on or before 18th August. Fingers crossed :wink:

4 Likes

Hi Shankardevy,

I just picked up your books today and I wanted to thank you. I’ve only been reading for a couple of hours, but I’ve learned at least 5 things I didn’t know about Phoenix before. Well done!

3 Likes

Your homepage is without valid certification since today.

Ah, and you mean Deutsch hier:

Where can i translate it further? :wink:

thanks @clinton for sharing this. I am glad to know that my book is fulfilling its purpose :smile:

@ShalokShalom thanks for notifying about the SSL issue. It has been fixed on the website.
You are right. It should be ‘Deutsch’ on the menu.

Where can i translate it further? :wink:

Can you explain more on what you want to do?

I read only some pages from the first book and skim through the other books, and I can bet it’s a great resource for learning Phoenix framework, and it will teach you the framework inside out (as the name says).

@shankardevy I would love to take a look at your books, and was just wondering if the typos and code errors mentioned above have been fixed? I am completely new to phoenix so I’m worried about coming across these errors. Thanks!

@ronaldcurtis the errors so far identified with the book were mostly stemming from the module name and directory structure change in Phoenix 1.3 between RC1 and final release. These errors have been notified by some of the readers who have run through the code line by line and have been fixed.

2 Likes

This book is probably the best book on phoenix right now. I learned a few new things, like embedded schemas.

1 Like

@shankardevy I’m working through your section on language translation and while I can see the phrase Seasonal Products change if I change the default_locale in config.exs, I can’t get the language to change via the ?locale param or the dropdown menu selection. Any suggestions for finding the reason why it won’t work?

1 Like

@d_sc do you have the router pipeline such as this? https://github.com/shankardevy/mango/blob/master/lib/mango_web/router.ex#L15

and the plug module such as this:

Both of them are needed to change the locale by URL params.

1 Like

That seems weird… Why not change locale by just changing the header that the browser sends, that is the way the HTTP spec works with locale. For testing I use the ‘Change Accept-Language header’ extension and just type whatever language code I want. That way it works with accessibility engines properly, will properly choose based on what the user of the browser has set rather than an arbitrary link, etc… :slight_smile:

1 Like

Thank you very much for the code snippet.

The issue was on line: Gettext.put_locale(MangoWeb.Gettext, locale)

Your book has the correct line, but I had copied the code in your gist that you linked to on page 274 of your book. The gist is here: https://gist.github.com/shankardevy/5019aa5a0a6ddc9458bcfca40485e67f

In the gist the line reads: Gettext.put_locale(Mango.Web.Gettext, locale), which won’t work.

Once again, thank you very much for the quick response and help. Really enjoying your book.

d.

1 Like

@d_sc thank you for reporting the issue with the Gist. The same has been corrected.

Thanks @OvermindDL1 for sharing the best practices. I value your answer.

The answer I have written is specifically to address the issue the user was facing in the ecommerce portal developed in my book: http://github.com/shankardevy/mango

In the Mango project, I have an user interface for choosing the language using a dropdown which uses URL params. I also explain setting up default locale in the book but not using your approach. I will take a note of your answer and add it to my book in the next minor release.

@shankardevy Will you update the booklets once Phoenix 1.4 comes out? I ask myself whether I should wait.

Looking at the current changelog, it doesn’t feel like there is much to change in the book series. IMHO the Phoenix Inside Book series can be read as it’s now and still 99% of it will apply for 1.4. I will update the book series sometime after 1.4 is officially released, though.

2 Likes