论坛风格切换切换到宽版
  • 24653阅读
  • 0回复

开发javascript nodejs 必备工具包 [复制链接]

上一主题 下一主题
 

发帖
1077
只看楼主 倒序阅读 使用道具 楼主  发表于: 2012-05-08
— 本帖被 jinwyp 从 互联网技术与编程讨论区 移动到本区(2013-01-24) —
开发js和nodejs必备工具包

核心工具
  • node 0.4.12 Not using 0.5.x yet, not supported on heroku
  • npm Node Package Manager. Essential
  • CoffeeScript Lightabstraction over javascript making it slightly more like terselanguages like ruby or python, and makes it a pleasure to both read andwrite.
  • SugarJS Asanity-returning, time-saving library of helper methods. Particularlyuseful are the Date tools and Object type detection. I put SugarJS in mycore tools because I'm yet to find a project where it wasn't useful,it's that good.


数据库

  • MongoDB NoSQL data store. Powerful, fast, scalable, integrates seamlessly with javascript.
  • Redis A NoSQL 'data structure database'. You can use this for managing sessions, or caching in a similar way one might use MemCached. Redis provides a lot more flexibility than MemCached, and is apparently faster.


编译工具

  • Cake Basic build tool for built into CoffeeScript.  
  • npm scripts For configuring your application/module on install/uninstall/etc
  • Should probably look at Jake and even Make scripts


服务器框架



模型

  • Mongoose MongoDBORM, which makes modelling and persisting your data in MongoDB abreeze. Rails developers will find this similar to ActiveRecord. Alsokeeping a keen eye on JugglingDB which provides a unified ORM interface for MongoDB, Redis, Neo4j and MySQL, with more coming soon.  


视图

  • Jade Similar to HAML, except more friendly and terse.


控制器



时间工作流监控

  • Step Preventsthe ridiculous nesting that async programming often invokes, and allowsfor easy serial/parallel flow control. A nice feature is the ability tofire off multiple async requests in parallel, only moving to the next'step' once all the requests have completed.
  • Signals Alternativethinking to the events model found in javascript. Define event'channels' as object properties, then listen on a channel instead of forsome arbitrary string. Inspired by C# events and signals/slots in Qt.


CSS



前端JS框架

  • jquery Everyone's favourite JavaScript tool.
  • SugarJS Corrects some javascript cross-browser issues and add it's additional native object helper functions. Seriously, use SugarJS.
  • underscore Functional programming tools and handy utilities. How did I live without this?
  • oCanvas HTML5canvas drawing and manipulation library. Encapsulates canvas drawingtools in Objects. Flash developers will find this model more familiarthan using the bare canvas API.  
  • Handlebars. Client-side templating. Extends Moustache,with partials and helpers. Really simple, powerful and I definitelyfind the {{}} delimiters more pleasing than EJS style: <% %>.Petty, I know. This is the default tempting tool in SproutCore.
  • Backbone or…
  • Spine The jury is out on which one I prefer, Spine has nicer structure, but Backbone has a more active community.


日志监控



测试



实时主动推送

  • Socket.IO Socketsfor continuous, real-time communications. Excellent for client/servermessaging, and apparently also server/server through Hook.IO (though I'm yet to use Hook.IO in production).


验证工具

  • EveryAuth supportfor Authentication and authorisation for, OAuth, OAuth2 and LDAPprotocols. Twitter, Facebook, Github etc. An alternative is fresh offthe press, Passport.


部署和重启

  • nodemon Simply restarts your node process when files in your project change, handles crashes.


协作工具

  • Git I quite enjoy using git and I'm learning more about it's power all the time, though I would be interested in looking into Mercurial, since it's risk-free as you can use it transparently with Git.
  • GitHub I don't trust open source projects that aren't on GitHub, no other service I know makes it as easy to contribute to projects.
  • Codebase Similar to GitHub, but provides a much better pricing model for private repositories.


协作工具

  • GitX experimental fork GitXis an awesome alternative to the git command line tools. Spell-checkingyour commits, break commits up by line, easily visualisehistory/branches, etc. The 'experimental fork' makes significantimprovements to the UI.
  • filemerge Simplebuilt-in tool in OSX for comparing files. Surprising how manydevelopers manually resolve trivial merge conflicts. Filemerge isn't thebest mergetool, but it's free and it's usable. I'd prefer Meld, but I'm yet to be able to build it for OSX.


部署发布工具

  • heroku Basicserver for hosting your app. If your app doesn't get much traffic youcan host it here for free. Makes it really easy to deploy and scale upyour application.
  • Rackspace Easily create your own virtual servers. Inexpensive and good service.
  • EC2 Goodfor serious deployments, learning curve to setup a server is prettysteep and it's all just a bit of a hassle. I would only use this when Ineed serious firepower, but it is really powerful.


编辑器IDE

  • MacVim All the power of Vim with a GUI and mouse
  • Janus A vim 'distribution' that makes vim a powerful, modern editor. Includes a project drawer, cmd-T (ala TextMate/Sublime Edit, this feature is epic), tab-completion, syntax support for modern tools like HAML, SASS, MarkDown, etc, over 100 popular vim themes, plus a bunch more features I haven't even started to integrate into my workflow.
  • upAndDown vim plugin allowsyou to move single/or groups of lines up and down with Shift+Up/Down.Sounds trivial, but it's really handy. And while we're at it you shouldbe managing your plugins like this with one of Vundle or Pathogen.
  • Pathogen and Vundle makeadding plugins to vim a breeze. You may find one works better than theother depending on the plugin. There appears to be no harm in havingboth installed side-by-side. Unlike Pathogen, Vundle is not installedwith Janus.


其他

  • HomeBrew Preferred OSX package manager, but doesn't play well with (but has a prettier site than) both MacPorts or Fink
  • iTerm2 Excellenttabbed terminal, with ability to create and split windows, which isgreat when you want to look at code and watch log files at the sametime. Previously I used the OSX standard Terminal.app with Visor,so I had a Quake-style terminal available on a hotkey, but iTerm2 nowsupports hide/show via hotkey, which was the selling point for me.
  • Evernote Note-keeping.Every time I learn something I try to log it in Evernote for referencelater, which is great tool for keeping track of little snippets ofknowledge.


做事情规划工具

  • SproutCore I've seen some awesome SproutCore apps recently, most notable being Apple's iCloud. I like the idea of state charts, data binding and prebuilt components. I've had some experience with Sencha, wasn't impressed with it's performance, and I'm wondering how SproutCore's components will compare. I am enjoying these heated discussions of Sproutcore vs. The World.
  • Angular, mainly because it's written by Misko Hevery whose blog contains some definitive posts on testability and dependency injection that shaped my thinking on programming and application development.
  • Rosie A factory-girl clone, easily generates dynamic Javascript fixtures, mainly for use in testing.
  • Knockout is usually mentioned as BackboneJS competition, so I figure I should check it out.
  • batman.js First framework I've seen built from scratch with CoffeeScript as the preferred language from the outset.
  • RailwayJS Closely mimics Rails in JS, provides an ORM, code generators, and a decent backbone for a typical web application.  
  • Hook.IO I like the idea of being able to modularise a web application into multiple apps.

快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个