Maintaining the Discover Meteor book

If you’ve read Discover Meteor in the past, you might’ve noticed that the book itself (http://book.discovermeteor.com/) was a Meteor app.

Sadly our database provider (Compose) has discontinued support for the MongoDB version that the book was using, and we don’t have the time to figure out how to upgrade the app to work with a more recent version of Meteor and/or Mongo.

So we’ve put up a link to the PDF for now, and also made the Meteor repo public: https://github.com/DiscoverMeteor/DiscoverMeteorBook

Sadly it doesn’t seem to run currently for whatever reason, but maybe someone here will be interested in maintaining it and getting it to run again.

Anyway I wish we could’ve kept up the book in its former state forever, if only as a way to remember the good old days!

18 Likes

I was just on the Discover Meteor site today :grinning: (I was telling my Meteor story) and I remember when you guys launched that, it kind of was part of my reason for 1st hearing about Meteor and being pretty excited that 1 person could build a full-stack app.

If you don’t mind, we could try to turn this into a community project to support it.

Or maybe some of us could help you update it. We could migrate your database from Compose to Atlas.

And it should not be much trouble to get you on the latest versions of everything.

For sure I think we can help keep it up :+1: I’ll post this on the community Slack to see if anyone in there wants to help too.

Thanks for creating the book by the way! I don’t think I ever thanked you. I got your newsletter and even started using Hipmunk for travel back in the day. :grinning:

1 Like

Hey @sacha. Thank you for leaving the book online. I have the first version of this!

1 Like

@sacha this was the first Meteor book I read and I was really impressed by the simplicity and elegance of the technology specially coming from Java frameworks. Furthermore, the book was extremely well written and very engaging.

So I’m very grateful for sharing your knowledge with us! and many thanks for keeping it open.

1 Like

Maybe we can convert pdf version to markdown or rst and publish it on readthedocs, what do you think?

The source is already in Markdown: https://github.com/DiscoverMeteor/DiscoverMeteor_En

There is also a Middleman app that can be used to publish the book but it’s not currently on GitHub for some reason. I also haven’t ran a Ruby app in decades (feels like it…) so I’m not sure how well it would work.

Thank you for maintaining it for so long. It’s been and still is an amazing resource. I’m sure the community will pick it up and carry it further

1 Like

I think it’ll be a good idea to start a github book maintained by the community and port the content to it.

In addition to classical meteor, the book can touch on important topics such as:

  • Scaling/performance
  • Security best practices
  • Meteor history, strength and how does it compare to other frameworks
  • Advanced Meteor methods, Async/Await, Fibers and DDP protocol
  • Meteor internals diagrams and contribution
  • Advanced architecture concepts
  • PWA & React Native
  • Community packages and communication channels
  • Awesome Meteor List :wink:
  • And much more

So we’ll have the tutorial, guide, and the community book, perhaps we can call the book discover meteor to keep the tradition, you can think about as a community maintained Meteor wikipedia.

I think we’ve enough brain power in the community to pull it off.

6 Likes

I opened a draft PR here: https://github.com/DiscoverMeteor/DiscoverMeteorBook/pull/2

I fixed the the release and package versions and got the server running but I am not the React pro, so it would be good to have one or two other help me with the PR and get the app running at 1.10.2

Who is in?

1 Like

Great job @jkuester, thanks for starting the work!! I’ve not been using React, but I’m in to help out where I can :+1: Any other React users who want to pick up a bit of work with @jkuester?

Nice to-do list! 4 of 7 done :white_check_mark:

I think updating React should just be npm & atmosphere package updates too.

So for anyone else taking a look at this, here is my update for the day. I started with @jkuester’s PR and was able to resolve all server errors, and most client errors.

I’m still working on an issue of properly importing a new required npm library due to React 15.5 deprecating React.createClass . There are 47 .jsx files in the project that use this deprecated command. I did a quick search & replace to replace them with createReactClass via the React migration guide.

Because this project uses Meteor Default file load order it is loading files on the client on it’s own, without explicit import and export commands. The load order starts to go like this:

  main.html
  client/lib/react.js
  .
  .
  .
  client/main.js

I put the new createReactClass import in the client/lib/react.js file because that is also where the app is importing the React package.

import React from 'react';
import createReactClass from 'create-react-class';

The import works, because I console logged it. However errors are still generated when the .jsx files try to use the new createReactClass. If I import the createReactClass into every individual .jsx file, it works, and I can clear the error 1 by 1, but there are 47 imports that I would have to specify.

So I’m wondering if anyone could take a look or would know how to import without all the manual imports. Also I could just bite the bullet and and do them manually.

If anyone finds this as a common or easy project style, or knows someone here in the community who uses this approach, let me know :+1:

createReactClass is outdated for now, that’s why it cannot find it. We should use functional components with react-meteor-data
Can handle it only on weekends.

I was able to clear all the errors, I just bit the bullet and added import statements wherever needed.

import createReactClass from 'create-react-class';

also the React.PropTypes had been deprecated so I did the same thing there per the React 15.5 migration guide.

import PropTypes from 'prop-types';

Maybe 100 extra import statements and now the app load on server & console with no console errors.

Keep track of progress if you are interested over here: https://github.com/DiscoverMeteor/DiscoverMeteorBook/pull/2

4 Likes
import React, { Component } from 'react'
export default class ComponentName extends Component {
    render () {
      return (
         <div></div>
      )
   }
}

and import this component where needed. For stateless components just use a function that returns JSX. The problem with the present React implementation is that absolutely everything is in the global scope and there is no security on the collections access. This is understandable given the fact that these guys were pioneering React in Meteor at that time.
I checked the repo and a fix is … useless. I estimate at least 50% re-write of the code. I am somewhere at … 25-30% now.

2 Likes

@paulishca good thoughts! We got everything “patched” with the createReactClass approach which I think is good enough for now since this project is kind of becoming an open source community gift :gift: from @sacha . Maybe over time, it could be a fun project for people to fork and learn from. It shows the evolution of React quite well :sunglasses:

Getting the project updated, stable and running should be goal 1, and then maybe someone might enjoy a bigger refactoring down the road :+1:

Great work everybody and especially @mullojo!

5 Likes