Outils pour utilisateurs

Outils du site


issue97:c_c

Ceci est une ancienne révision du document !


Over the past year, I’ve written a number of C&C articles touching on web development (from JavaScript frameworks, to CSS preprocessors). Surprisingly, I have received a relatively large number of emails indicating an interest in this topic. Due to this interest, I wanted to spend this month covering Meteor, which is a relatively unique JavaScript platform, and has also been the focus of my own learning for the last 5 or so weeks. What is so unique about Meteor? Meteor is unique in the fact that it is both a JavaScript server (like NodeJS), but also ties into the client side, so the application you write exists on both the server and the client. This brings with it an array of performance enhancements, and some security concerns (which can generally be avoided by following Meteor’s best practices). It’s also deeply integrated with Cordova and Phonegap, meaning you can easily create native Android and iOS apps from the finished web app. The nature of the platform is to be reactive (changes are seen instantly, without a refresh - similar to AngularJS), and offers plenty of useful features. To find out more, check out their website (link in Further Reading).

Au cours de l'année écoulée, j'ai écrit de nombreux articles C&C au sujet du développement Web (des frameworks JavaScript, aux pré-processeurs CSS). J'ai été assez surpris de recevoir un assez grand nombre de mails manifestant un intérêt pour le sujet. Par conséquent, ce mois-ci je voulais traiter Meteor, une plateforme JavaScript assez unique, que j'apprends moir-même depuis environ cinq semaines.

What about the downsides?

As both the server-side and client-side are JavaScript, the page will render absolutely nothing if the browser has JavaScript disabled. You could output some sort of notice using a set of <noscript> tags in the html’s <head> tags, but if ostracizing anyone who has JavaScript disabled doesn’t work for you, Meteor will not be for you (at least, not without various hacks, if it’s even possible). That’s the benefit to something like Angular - depending on how you use it, visitors who don’t allow JavaScript will at least see the majority of the normal HTML, even if it’s not very pretty. In this day and age, the question is simply how many visitors will have disabled JavaScript. In the matter of SEO - Google definitely updated their bots for JavaScript pages, but I’m unsure of Yahoo or Bing. Checking this before developing might be useful.

That being said, there is a plugin called Spiderable that uses PhantomJS to create static HTML, and send it to spiders (search engine crawlers). Perhaps this approach could be adapted for visitors with javascript disabled, though it does not appear to have been attempted anywhere.

When should I use Meteor?

Technically, you can use Meteor at any time. However, most of the plugins and sites I’ve seen that use Meteor are geared at heavy interactive sites or complete web applications. If you’re planning on creating a small static or semi-static web page, you may want to carefully weigh the pros and cons. That being said, Meteor’s own page is naturally created in Meteor.

Depending also on what tools you’ve currently been using - Ruby on Rails, or Node.JS, switching to Meteor may be a welcome trade-off, as development with Meteor is extremely quick.

I’m intrigued - where can I learn more?

The Meteor homepage has a nice tutorial for getting started. There are also various tutorials on YouTube and the web. If you’re looking for books, I can recommend Discover Meteor (by Tom Coleman and Sacha Greif), whose authors are both active Meteor developers.

Hopefully this article will be helpful to some - especially those who love to tinker with new frameworks. If you have any questions, issues, or requests, please let me know at lswest34+fcm@gmail.com. As always, I’m also open to requests for future articles.

Further Reading

https://www.meteor.com/ - Meteor Homepage

http://www.telescopeapp.org/ - A social framework built in Meteor

issue97/c_c.1434178220.txt.gz · Dernière modification : 2015/06/13 08:50 de auntiee