Meteor Q&A (Fall 2020)

What’s the difference between .js and .jsx?
What is the difference between using .jsx and .js files in meteor?

See the Meteor 3 AMA.

What’s the difference between subscriptions/publications in Meteor vs. states in React?

States in React are used to save information that does not need to be persistent. For example, let’s say you visit a site on internships and you click a box indicating that you are only interested in internships in Hawaii. That could be saved as state in React so that when you go to another page, that preference is preserved. But it is not “persistent” information; if you come back to the site on another day, that box is not checked. In other words, React state saves temporary information regarding the user interface.

Now let’s say you go to that site, login, and go to a profile page and check a box saying you only want internships in Hawaii, and press “save”. That information is saved in a database, so whenever you visit that site again (and login), that preference will be retrieved from the database and used to influence what internships are shown to you. In Meteor, publications and subscriptions are the mechanism used to communicate information from the server database to the client browser. So, publications/subscriptions in Meteor, unlike React state, are used to save (and retrieve) persistent information.

In E43: Experience Simple Schema Task 4 - We define a schema for the people collection. first, last , and city all take the value of String but age takes the value of SimpleSchema.Integer is there a reason why it has to be ‘SimpleSchema.Integer’ instead of just Integer?

JavaScript only has Numbers, not integers. Consequently, SimpleSchema has to provide that more specific data type if you want to ensure that a field only stores integers.

We were wondering why we’re learning MongoDB over MySQL which seems to be used a lot in industry?

There are two popular forms of databases these days: “SQL” databases, like MySQL, which use “structured query language” to manipulate the database and require a table-based design, and “noSQL” databases, like MongoDB, which do not (generally) use SQL and do not require a table-based design. For students who have not taken a course in databases, noSQL databases like MongoDB are dramatically easier to learn to use. Don’t worry: you will learn a lot about SQL databases when you take ICS 321, so you will have that experience by the time you graduate. It’s beneficial for you to have experience with both types of databases.

It is also worth noting that Meteor has built-in support for MongoDB.

How would you link pages together?

Very carefully. This will become more apparent when you reach the Meteor 2 module; if you want a preview, see the screencasts for meteor-application-template-react.

When we implement Meteor, are we mainly going to focus on the use of React or will there be another type of ui we are going to learn?

We are going to use React. First, React is currently the most popular UI framework. Second, each UI framework takes time to learn, so it’s best to focus on one at a time.

Is Meteor’s specialty supposed to be replacing blocks of content with updated ones at intervals (Ex: Nvidia’s online page where they finally develop a new architecture and they swap out outdated info on the page with the new invention)?
How does meteor update the website in real time without a plug-in?

One of Meteor’s cool features is called “reactivity”, which means the ability to refresh a page automatically when the contents of the server-side database changes in a particular way. For example, in Discord, when someone posts a new message to a channel, everyone’s Discord channel contents gets updated with the new message. You don’t have to press a button to “refresh” the channel with the latest information. If you think about that for a second, that’s weird: how exactly does the app know that someone else somewhere has posted a message and it needs to redraw its screen? In many (if not most) web frameworks (Express, Django, Spring), implementing this “reactivity” is difficult. In Meteor, it is (I kid you not) trivial. This feature comes for free when you use the publication/subscription mechanism.

Why is Meteor broken up into components instead of being on one application like react or semantics?

See the Meteor 3 AMA.

Does Meteor support users/logging in, will we be implementing something like that?

Yes, though most of this functionality will be provided to you as part of the templates that you will use. Making a (good) user login system is actually quite difficult, so it is common to use a third-party dependency to handle user accounts.

What are some popular alternatives to meteor that are used in the work field?
How popular is meteor among software engineers?
How often is Meteor actually used for professional webhosting?
This tech stack is obviously useful and productive, but is this indicative of a typical web dev tech stack?

See:

Who is/are the brains behind meteor?

You can read about the history of Meteor.

Advantages of using meteor over the other methods we learned about
What are the major advantages/disadvantages of using Meteor compared to other frameworks
Why would developers choose Meteor for app development, web, etc over something else? Ease of use?
What are the most common reasons why Meteor is used in the software engineering industry? What are its advantages/disadvantages?
How common is it to use meteor in the industry and how powerful/complicated is it compared to other tech-stacks?
What makes Meteor a better choice compared to other frameworks?
Why do developers use meteor over other tools, and how often do they use it

See the Meteor 3 AMA.

In what ways does Meteor differ from the other frameworks such as raw semantic or react? What sets it apart?
Why use meteor over semantic or react?
What makes Meteor more useful and pushes it above using React and previous things we have used?

Meteor is not a replacement for Semantic UI or React. Meteor provides functionality above and beyond Semantic ui and React. Just like Semantic UI/React provides a layer over the Semantic UI CSS framework to support writing UI components in Javascript, Meteor (when used through our template) provides a layer over Semantic/UI react to support the development of distributed client-server systems with a back-end database. (i.e. a web application).

In your experience, do Meteor and React have any notably unique synergies, or will React in conjunction with another widely-used framework similar to Meteor generally achieve the same result? (and I suppose “result” here includes ease of use / workflow as well as finished product)

See the Meteor 3 AMA.

What extra steps are needed to make a webpage that supports mobile devices?

Basically nothing. Semantic UI provides you with a responsive UI, so the layout will adjust based on the available screen size. You will recall that the screenshots from the Meteor React Tutorial in E45 showed what the site would look like on a phone, matching the output you saw on your computer.

What is Meteor best used for in the software engineering world? Web applications? Phone applications? Or is it good for everything?

It’s good for web applications, and for creating applications that can be used on a phone-based browser.

What further applications does Meteor have? Can we create more than just webpages?

A web application framework like Meteor is useful whenever you have a system that can provide a service to users via the “cloud” (i.e. Internet). So, Meteor can be useful if you are doing machine learning, or AI, or map-based location services, or car buying, or telemedicine, or anything else you can dream up.

How useful/important is Meteor in our professional career?

In my opinion, the ability to rapidly develop applications that can provide services to users via the “Cloud” is a hugely important skill if you intend to pursue high technology as a career. As noted above, lots and lots of domains (machine learning, AI, telemedicine, finance, space exploration, etc) require delivering services to users via the Internet. Learning Meteor gives you the fundamental knowledge of how to do this: how to develop a distributed client-server system… No matter what framework you learn now, in ten years you’ll probably be using a different one. But, if you learn one framework well now, then learning all the future ones will be dramatically easier and faster.

Why is Meteor so complicated?

Because distributed client-server systems are intrinsically complicated. Put another way: Why is Javascript complicated? Why is Java complicated? Why is C++ complicated? All of these things are complicated because the problems they are used to solve are themselves complicated.

I am always evaluating other web application frameworks for use in ICS 314. So far, I haven’t found another that is “less complicated” than Meteor at the end of the day.

Why does “meteor npm install” have such a varying runtime? (seconds to sometimes over 10 minutes)

The very first time you run that command, it will download a lot of libraries from the Internet. That can take a long time if you have a poor internet connection and a virus checker that is scanning every file from the Internet. However, when those libraries are downloaded, they are cached on your laptop, so subsequent calls to meteor npm install should take a minute or less.

If the second time you run meteor npm install takes more than a minute, it is extremely likely that you are running Windows and have a virus checker running. You absolutely need to disable that virus checker on your Meteor projects.

Why is Meteor so slow on Windows?

The system is called Meteor, so of course the runtimes would be astronomical.

It’s probably because you have the virus checker running. Disable it and Meteor will run fine.

Footnotes

0: Branden officially became a hipster in April when he burned his upper mouth drinking tea; he sipped his tea before it was cool.