Spotlight – Recommend Node.js Projects For January

Posted on January 7, 2011 in: Web Development|Jump To Comments

Hey guys. Today I wanted to announce a new feature to the site called Spotlight – a regular roundup of recommended new Node, JavaScript & jQuery tools and resources for developers wishing to expand their utility belts further.

Because I regularly get to meet and interact with developers who are either working on are using quite powerful new tools and projects, this feature will hopefully give me a chance to share some of those recommendations with other developers in the community so they can assist as many as possible.

This Week’s Recommendations

This week, many of my recommendations include projects using Node.js. If you’ve begun using Node in your projects, you’ll already be aware of the potential fundamental impact it may have on the web application landscape. For anyone that isn’t yet familiar with what Node offers, here’s a very quick run-down of what it is and what it can do for you:

Catching Up With Node.js

Before we discuss Node, let’s talk about V8 – Google’s open-source JavaScript engine. V8 is an implementation of JavaScript which allows you to run standalone JavaScript applications. Node.js is simply a library written for V8 which provides evented I/O – think of this as something allowing you to fire an event when some IO task has been completed, rather than you waiting for it to finish before doing something else.

Node.js provides an easy way to build scalable network programs and is quite similar in design to and influenced by systems such Ruby’s Event Machine or Python’s Twisted.
It offers web development in a dynamic language (ie. JavaScript) on a VM (V8) that is faster than Ruby, Python or even Perl and so speed is most definitely at the fore-front of it’s offerings
Speaking of speed, Node is also quite efficient – it has the ability to handle thousands of concurrent connections with minimal overhead on a single process
A lot of developers will be able to pick it using it relatively quickly since JavaScript is arguably the most popular programming language at the moment.
The IO event loop inside node.js means that at any point in time, there is only one thing being done at most. This provides a number of performance gains because as there isn’t an overheard of thread switching, node is able to be fast without incurring some of the concurrency issues you may have experienced with something like Java.

I don’t want to spend too much of this post discussing how Node functions, but you may find Simon Willison’s original post on this topic quite good for further reading. A Gentle introduction to node may also be useful for beginners who are looking for a tutorial on getting setup.

Now that we’ve covered the basics, lets look at the recommended tools and projects for this week!.

Stack Testing With Zombie.js for Node: http://ajxn.it/f2LHxt

Zombie.js is a fast, simplified testing tool for Node.js which basically creates a ‘headless’ browser instance capable of requesting webpages and running customized tests against them. It’s written in CoffeeScript and offers full-stack testing out of the box.

I found simulating real user events with Zombie (think clicking buttons, filling forms etc) a breeze and it’s high level API means that even the most amateur of JavaScript developers can get started with it fairly quickly.

Zombie uses Sizzle.js (the same selector engine as jQuery does) as well as other tools you may already know so you’ll likely find aspects of using it quite a familiar experience.

If you’re interested in checking Zombie out, I strongly recommend reading this guide on it as it takes you through some useful examples of how it can be utilized in a short space of time.

You may also be interested in checking out Tobi: An alternative expressive server-side functional testing suite using jQuery that also allows you to test web apps in-browser https://github.com/LearnBoost/tobi

Working with MySQL On The Server-side With Node-MySQL from https://github.com/felixge/node-mysql

As you may know, Node.js has been going from strength to strength lately but one thing it’s been desperately missing is a stable, feature-complete MySQL driver.

Node-MySQL is a project that aims to solve this problem with providing a well-engineered non-blocking driver written in JavaScript compatible with mySQL >= 4.1. Once you’ve installed Node-MySQL, you’ll find using it quite straight-forward: it’s got a good parser that’s relatively stable, uses little memory and the project’s test-driven development approach is bound to keep issues with it to a minimum.

Unlike some smaller OSS projects, Node-MySQL actually has the benefit of sponsorship (via Joyent) at the moment meaning that updates to the project should be quite regular (excellent for any commercial sites wishing to utilize the project).

To download or fork the project see the GitHub link above.

Felix has also been involved in the related PostrgreSQL client for Node available at https://github.com/brianc/node-postgres

Routing Single Page Interface Apps With Faux.js And Backbone http://goo.gl/fb/aOcIU

If you write a lot of SPI (single app interface) apps and feel that MVC/MVP might be a little overboard for your needs, check out Faux. It’s a useful tool that uses Backbone’s library models, views and controllers and gives you a simple DSL for declaring views and wiring them up to a controller for client-side routes.

One of the things I like about Faux is that it gives you a solution that’s very route-centric and does tend to resemble traditional server-side apps a little more than some alternatives. For example, a server-side app might have a route such as ‘/books/javascript-the-good-parts’ whilst a faux-root would be ‘/#/books/javascript-the-good-parts’.

Faux prides itself on catering for apps that are easily bookmarkable and back-buttonable. Simpler apps may want to opt for Sammy.js whilst the converse for JMVC, however Faux really sits in the middle of these solutions, catering for an app that may need support for multiple ‘views/pages’ but has quite straight-forward interactions on each page. Check out the link above for Faux’s official GitHub page with examples and more.

Scraping Websites With Node.js, jQuery And Node-Scraper https://github.com/mape/node-scraper

Scraping websites for content is a common task server-side languages such as PHP, Ruby or ASP.net are regularly used to accomplish. If you’ve been following the surge of interest in Node.js over the past year, you may be interested in checking out Node-Scraper by Mathias Pettersson – a new project that makes web scraping fun, fast and simple using jQuery and Node.

Node-Scraper supports a number of different use modes and you’ll find that it’s great for both trivial tasks such as fetching single files to parse but also caters for more advanced needs such as fetching with specific user-agent headers or downloading pages in parallel. Let’s face it – we’ve all had to code up scrapers in a language at one point or another, but node-scraper genuinely makes this task quite trivial.

Another neat feature supported in throttle-limitation which helps avoid accidentally hammering a server you’re trying to scrape. Check out the repo for the project for complete usage examples.

High-Performance Server-side templating with Jade for Node: https://github.com/visionmedia/jade

Often described as robust and elegant, Jade is a high performance template engine for Node that’s quite heavily influenced by Haml. In addition to offering great readability, template compilation via the command line and memory caching it also supports Express JS (the compact server-side web development framework) right out of the box and even comes with its own TextMate bundle.

Jade’s public API supports rendering both files and strings, it’s syntax handlers cope well with a decent set of CSS selectors, attributes and doctypes and for those wishing to test it’s more advanced features, it also supports multiple classifications of executable code (eg. verbose iteration, escaped buffered code etc).

You’ll find a basic usage guide on the project repo’s readme but download the latest stable version to get access to a range of examples to help get you started.

Dropbox-Node: An OAuth-enabled node.js client for working with the Dropbox API https://github.com/evnm/dropbox-node

We all love Dropbox and luckily Evan Meagher recently wrote Dropbox-Node – a useful OAuth-enabled wrapper around the Dropbox API which covers all of the different Dropbox API methods in a clean, easy to use implementation for Node.js.

If you’re looking to learn how to easily authenticate with Dropbox and get access to features like direct uploading, file manipulation and so on, Dropbox-Node is of value to check out. It may have a few rooms for improvement but I certainly see the project lowering the barrier to a few new Dropbox apps being developed.

To wrap-up, Evan also wrote a simple Dropbox file browser to demonstrate usage of his wrapper and you can see the full example by browsing to his github repo above.

Asynchronous Client and Server-side object-relational Database Storage with Persistance.js https://github.com/zefhemel/persistencejs

Persistance.js is an asynchronous object-relational mapper that allows you to use SQLite or Gears (depending on support) in on the client-side and MySQL (through node-mysql) on the server-side for your data store needs.

It also has no dependencies on third-party JavaScript frameworks, meaning you can use it with Vanilla JS or jQuery/Dojo if you prefer. Whilst the project doesn’t support IE out of the box (something like http://code.google.com/p/dom-storage-query-language/ may help here), it does offer a wealth of features for those wishing to use an OOP approach to data storage.

Because persistence.js is asynchronous in nature, operations that can take time are provided with a callback that is invoked when the operation has completed. The project’s code is quite well commented and you get a number of decent usage examples on their repo. Check it out!.

The following are also worth taking a look at (but don’t all focus on Node specifically)

Node-validator: node-validator is a library of string validation, filtering and sanitization methods. https://github.com/chriso/node-validator

Sinon.js – Standalone and test framework agnostic JavaScript test spies, stubs and mocks compatible with everything from IE 6.0 upwards. https://github.com/cjohansen/Sinon.JS

ConsoleDummy.js – Super lightweight solution that lets you leave console statements in your JS without consequence. It does nothing for console methods that already exists. https://github.com/andyet/ConsoleDummy.js

jQuery UI Text Animation Effects: Highly configurable ports of the Dojo text effect animations over to jQuery by Sean Koole http://dev.seankoole.com/jquery/ui-effect/text.html

jQuery Inview: A compact event that is fired as soon as an element appears in the user’s viewport https://github.com/protonet/jquery.inview

and that’s it for this first Spotlight!. If there are JavaScript projects you’re involved with or using on Git that you feel would be useful to share with others, feel free to leave a comment with a link to it so we can all check it out.

Thanks and until next time, good luck with all your projects!

- Addy

Spotlight – Recommend Node.js Projects For January相关推荐

  1. Node.js到底是什么?为什么要使用它?

    by Dariya Kursova 通过达里娅·库尔索娃(Dariya Kursova) Node.js到底是什么?为什么要使用它? (What exactly is Node.js and why ...

  2. 有没有办法为Node.js项目自动构建package.json文件

    本文翻译自:Is there a way to automatically build the package.json file for Node.js projects Is package.js ...

  3. node.js使用手册_权威的Node.js手册

    node.js使用手册 Note: you can get a PDF, ePub, or Mobi version of this handbook for easier reference, or ...

  4. Understanding node.js

    来源:http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb Node.js ha ...

  5. node.js书籍_2020年11部最佳Node Js书籍

    node.js书籍 When we talk about any programming language, it's very easy to find any video course on Ud ...

  6. aws mongodb_使用Node.js,AWS Lambda和MongoDB Atlas进行无服务器开发

    aws mongodb This article was originally published on mongoDB. Thank you for supporting the partners ...

  7. node.js+校内废品回收管理 毕业设计-附源码140933

    基于Vue+Node的校内闲置物品回收管理系统 摘 要 随着循环经济的发展,国家对绿色环保进一步推动环保政策,一批批绿色回收项目将进入校园,探索"互联网+回收"的回收模式与路径,从 ...

  8. js ftpclient linux server,Node.JS用Socket实现FTP Server服务器和Client客户端

    通信过程 FTP协议其实就是主机和服务通过Socket进行固定格式的通信过程,当某客户端连接到FTP 服务器后,客户端发送指令: [参数] 服务会按以下格式返回: [参数或说明] 例如以下是FileZ ...

  9. Node.js入门(含NVM、NPM、NVM的安装)

    本文最初发表于博客园,并在GitHub上持续更新前端的系列文章.欢迎在GitHub上关注我,一起入门和进阶前端. 以下是正文. Node.js的介绍 引擎 引擎的特性: JS的内核即引擎.因为引擎有以 ...

  10. node/js 漏洞_6个可用于检查Node.js中漏洞的工具

    node/js 漏洞 Vulnerabilities can exist in all products. The larger your software grows, the greater th ...

最新文章

  1. java inner class,C# Inner Class vs. java 的inner class比较-JSP教程,Java技巧及代码
  2. JavaScript DOM 高级程序设计读书笔记二
  3. 固态器件理论(5)PN结
  4. springboot websocket_SpringBoot 集成 WebSocket 实现前后端消息互传
  5. mysql5.6使用profile工具分析sql
  6. threadlocal使用_多方位点评ThreadLocal,细看各大开源软件实现
  7. java_IO流之 NIO
  8. 经典假设检验理论记录一二
  9. xctf php序列化,xctf一道反序列化题
  10. 【转】VB动态拖曳ListBox Item位置
  11. 国科大学习资料--矩阵分析与应用(李保滨)--2016年期末考试试卷
  12. 全国2009年1月电子商务与电子政务试题
  13. 明天过节,给将来的程序员们一个神奇的名单。兄弟们看准了(不说他们好坏,只求别去了才知道是传说中的外包)
  14. 惠普重新定义IT基础设施
  15. 基于领域模型的微服务划分--实战案例解析
  16. 马上跨年了,用Python带你看一场跨年烟花秀
  17. 苹果4如何添加时间插件_Pr快速批量制作和添加字幕,节省时间还不用插件的做法...
  18. 抖音直播运营 | 疫情时代下如何用直播驱动品牌业务增长
  19. 可升级鸿蒙的设备,华为鸿蒙即将到来,华为终于“出手”了!哪些机型可升级? - 王石头...
  20. 城乡规划设和计算机应用,城乡规划行业未来展望

热门文章

  1. linux鼠标移动消失,debian6升级后鼠标指针消失
  2. 广义平稳随机过程定义_广义平稳随机过程介绍.ppt
  3. gin -get请求的小示例1-Handle处理GET请求
  4. python-gui-pyqt5的使用方法-5--为类增加信号
  5. 前端笔记—第4篇CSS基础知识2
  6. [Flutter] 一些面试可能会问基础知识
  7. 【图文】远程桌面链接:这可能是由于credssp加密oracle修正
  8. 关于 Ubuntu Server 18.04 的网络(dchp/dns/route/PPPoE)
  9. nagios 监控slave(check_mysql_health插件)
  10. 敏捷开发一千零一问:怎样处理重要但不明白的任务?