Giter VIP home page Giter VIP logo

book's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

book's Issues

Enhancement idea

Just throwing it out there, feel free to ignore: When you are showing blocks of example code being run in browser, then in server console, perhaps the styling for each could match a typical browser console and terminal window respectively (light vs dark perhaps?). This would help the reader understand the context more easily without having to read/absorb the footer note -- less cognitive overhead

For example, the Collections section has a few of these: http://book.discovermeteor.com/chapter/collections/

Remarks for "Collections > Client-Server Communication"

In the First browser console where we insert a new entry on the client, the console on chrome returns the ID in double quotes, not single as on the page.
I have no idea whether other consoles would return ' or ". Just thought I'd mention.

Below that in the Mongo console where we de db.posts.find();
I get this:


> db.posts.find();
{ "_id" : ObjectId("51c0df802028e556265cc60f"), "title" : "A new post" }
{ "title" : "A second post", "_id" : "aRB8CTXjndcNMDNrC" }

It might be a good idea to explain here that the order of the attributes in the objects doesn't matter.
A short explanation (or a "we'll get back to this") on the difference between the _id in entries created through Mongo or the browser would also be nice (I for one am curious :)).

Resetting Database

In chapter about Collection, under the sub section Populating the database, there's this instruction: We'll use meteor reset, which does the same thing as meteor reset. Is this a typo? Both of it refers to meteor reset

Incorrect code highlighted in http://book.discovermeteor.com/chapter/creating-posts/

In the code sample under Adding a Link to the Header, these lines are highlighted:

        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>

Yet, these lines should be highlighted:

        <ul class="nav">
          <li><a href="{{postSubmitPath}}">New</a></li>
        </ul>
        <ul class="nav pull-right">
          <li>{{loginButtons}}</li>
        </ul>

Thanks! ๐Ÿ‘

Chapter 9 - Errors: Wording

After we add a new filter to the router to clear out the seen errors you state:

Things now mostly work like we want them to...

Except things don't, as there is not yet a mechanism in place to actually change the seen property.
Maybe

Things are now mostly set up like we want them to...

CentOS - http://book.discovermeteor.com/chapter/deploying/

Some of us also are stuck on servers that consist of cPanel and other interesting scenarios. Frequently in these cases CentOS is standard. Could you please insert a general installation process for Meteor and Meteorite for CentOS? From there we should be able to adapt to various scenarios such as cPanel, etc.

Presently, for example, I have compiled and inserted Phusion Passenger for Ruby apps, but I would also like to support users (and ourselves) who are starting to work with Meteor.

Minor glitch in chapter list icon

The icon on the upper left to show chapters doesn't hide them if I select a different chapter. If I select again another chapter it functions again hiding correctly the chapter list.
This on Chrome 27 OSX.

mrt add router hangs

Using MAC OS X, when I try to run the command mrt add router, it just hangs. I've tried uninstalling and reinstalling Meteor and Meteorite but the issue persists. Meteorite version 0.6.5, Meteor release: 0.6.4 Any help/advice would be gratefully received.
Thanks,
John

remark for creating posts/post_submit.js code block

When rewriting the submit form event handler to use the post Method, the passed variable changes from e to event and the relevant changed code is not highlighted like in the other code blocks.

before:

Template.postSubmit.events({
  'submit form': function(e) {
    e.preventDefault();

    var post = {
      url: $(e.target).find('[name=url]').val(),
      title: $(e.target).find('[name=title]').val(),
      message: $(e.target).find('[name=message]').val()
    }

    post._id = Posts.insert(post);
    Meteor.Router.to('postPage',post);
  }
});

after:

Template.postSubmit.events({
  'submit form': function(event) {
    event.preventDefault();

    var post = {
      url: $(event.target).find('[name=url]').val(),
      title: $(event.target).find('[name=title]').val(),
      message: $(event.target).find('[name=message]').val()
    }

    // this should be highlighted
    Meteor.call('post', post, function(error, id) {
      if (error)
        return alert(error.reason);

      Meteor.Router.to('postPage', id);
    });
    // end highlight
  }
});

This book being an introduction, I'd prefer the more verbose event.

Misleading screenshot?

In the chapter on latency compensation, the image under Commit 7-5-1 shows an "edit" option next to the "submitted by" information (see image below). Correct me if I'm wrong, but I don't believe we've added in that edit functionality yet. I've gone back through my code and skimmed previous chapters and don't see any reference to that. It may throw off beginners such as myself to have a screenshot displaying functionality not currently implemented thus far.
s5-1

Thanks!

Ambiguous wording in "Publications and Subscriptions > Autopublish"

How does this work? Suppose you have a collection called 'posts' on the server. Then autopublish will automatically send every post that it finds in the Mongo posts collection into a collection called 'posts' on the client (assuming there is one).

Could be read as "assuming there is a collection called 'posts' on the client".
I think you mean to say "assuming there is a client", because making sure the collection is available on the client is the point of autopublish.

Chapter 8: commit 8.2 update and remove failed: access denied

As has been mentioned in the comments of this chapter, commit 8.2 does not offer offer a functioning update or delete.
In the next part of the chapter you state:

This is the extent of our client-side code, and it works well.

But it doesn't, because at this point even a simulation will not complete due to an access denied.

Maybe add

Posts.allow({
  update: function(){return true},
  remove: function(){return true}
});

to posts.js and tell the reader you will get back to this part later?
Or just make it clear in the text it will not work :).

EDIT: allow update and remove must be a function

Typo in Data Contexts

"But we can also do it explicitely using ..."

No need for the second "e" in explicitly.

main.js inconsistency

In http://book.discovermeteor.com/chapter/collections/ there's an instruction to add a line to client/main.js, but we've never created that file. In the GitHub repo, it's created as part of DiscoverMeteor/Microscope@chapter2-3, but that's not covered in http://book.discovermeteor.com/chapter/getting-started/.

Related: in http://book.discovermeteor.com/chapter/getting-started/ we're told to delete microscope.html but not replace it with anything. This breaks the app in the browser until we create main.html in http://book.discovermeteor.com/chapter/templates/. In the repo, you create main.html as part of "rearranging the file structure," which might keep the app intact.

Live instance not in sync with book (Adding users)

The live instance lacks the a.btn-navbar fix for small windows.
http://meteor-book-chapter6-1.meteor.com/

It would be nice to also mention in the book that you're using a workaround here.
I have my browser open next to my code editor on my 1440x900 display. (I keep my external 20" just to throw you guys issues on GitHub)
Having to click twice to be able to login didn't feel right so I started looking around. One of my first stops was the live instance where I couldn't see a thing.

Also (related), once logged in on a small screen, you're unable to log out. Clicking the a.btn-navbar only briefly shows the dropdown.

(I was not exactly serious about the 20")

HCR runs router "The session > Hot code reload"

So if we are using session variables to keep track of exactly what the user is doing, the HCR should be almost transparent to the user, as it will preserve the value of all session variables.

Except for variables set by a router, apparently

typo in sample chapter

Just a small thing: "we're using Meteor's Template.myTemplate.helpers() function to define a template helper called posts that simply returns out postsData array." I think that should be "our postsData array."

Taking Care of CSS Section

Early in the book it says, "CSS automatically gets loaded and minified by Meteor, so unlike other static assets it goes into /client, not /public. Go ahead and create a client/stylesheets/ directory now, and put this style.css file inside..."

After completing this task and running mrt, my code is not minified. I clicked on launch instance to view your code, and yours is minified. Why the difference?

meteor reset twice

Hello, is it supposed to appear "meter reset" twice here? "We'll use meteor reset, which does the same thing as meteor reset".

It's on the collections -> populating database part.

Cheers

em dash and smart quotes

I can't believe I'm reporting this... but it was hammered in to me from working with copywriters and QA... I wasn't going to report it, but this is a book after all!

  1. Replace occurences of -- with &nbsp;โ€”&nbsp;
  2. Add a &nbsp; between the penultimate and last word of every paragraph to avoid orphans
  3. Replace quotes " with smart quotes: โ€œโ€ฆโ€
  4. Replace apostrophes ' with smart equivalent: โ€™

I haven't yet encountered the use of en dashes in your copy, but will let you know if I do. These would be used for ranges, such as 1โ€“5 documents.

In all these cases, this could be automated, where you continue to author using -- etc (I'm assuming copy is in Markdown or other such format?), but a filter takes care of the cleanup.

"next" link should go to top of page

When I get to the end of one chapter and click the link to the next, it loads new text, but (in Firefox 21) I'm scrolled to the end of the chapter or somewhere in the middle. It would be nice if the page automatically scrolled to the top so I could continue reading.

Chapter 7 post_submit.js Router.to should be outside of Method call

I had a ball with this one... :)

When following along with 7.5 where we use a future to stall the server side code, the timeout however seemed to make my entire app wait for 5 seconds.

Turns out that in post_submit.js, the call to Meteor.Router.to('postsList') was set inside the callback of the Method call, effectively waiting to refresh the page until the Method call completes completely and fires said callback.

Meteor.call('post', post, function(error, id) {
  if (error)
    return alert(error.reason);

  Meteor.Router.to('postPage', id);
});

Should be

Meteor.call('post', post, function(error, id) {
  if (error)
    return alert(error.reason);
});
Meteor.Router.to('postsList');

(the code in the live instance and your repository is correct)

Router Screencast

Hello,

Just wanted to comment on "The Router" screencast. I didn't see a place to comment directly on the screencast so I figured this was as good a place as any. It is almost impossible to see the code in the screencast even when viewing in HD. Is it possible to increase the quality of the video so the code can be followed? It's a very informative screencast just can't really see the code.

Thanks,

Rob

Typo in Animations Chapter in Meteor & the DOM

In the third paragraph of Meteor & the DOM,

"This does makes animation tricky ..."

should be either,

"This makes animation tricky ..." or, "This does make animation tricky ..."

or some alternate form.

Changed code not being highlighted properly

I may be missing something but on http://book.discovermeteor.com/chapter/errors/ there is a codeblock for 'client/views/posts/post_submit.js'. In this codeblock there is only a single line being highlighted but when compared to my version of 'client/views/posts/post_submit.js' there are many more changes.

I have not skipped any of the regular chapters though I have skipped every .5 chapter so maybe that's where the problem lies.

Below is my code up to this point.

Template.postSubmit.events({
    'submit form': function(event) {
        event.preventDefault();

        var post = {
            url: $(event.target).find('[name=url]').val(),
            title: $(event.target).find('[name=title]').val(),
            message: $(event.target).find('[name=message]').val()
        }

        Meteor.call('post', post, function(error, id) {
            if (error)
                return alert(error.reason);

            Meteor.Router.to('postPage', id);
        });
    }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.