Hacker Newsnew | comments | show | ask | jobs | submit login
Node.js Tools for Visual Studio (hanselman.com)
232 points by ambuj 520 days ago | 85 comments



Seeing things like this gives me hope that one day Windows will be a first class os for web development. Now if I could just maximize the command prompt window....

-----


ConEmu [1] has made CLI on Windows much more tolerable for me.

[1] http://code.google.com/p/conemu-maximus5/

-----


Conemu with powershell and PSReadline [1] has made things a lot nicer.

[1] https://github.com/lzybkr/PSReadLine

-----


ConEmu is great; never looked back!

-----


> Seeing things like this gives me hope that one day Windows will be a first class os for web development.

For many of us it already is.

-----


For Emacs users on Windows, I've found Eshell (M-x eshell)[0] to be much preferable to the normal command window for most tasks.

[0]: http://www.gnu.org/software/emacs/manual/html_mono/eshell.ht...

-----


You can't maximize it, but you can set its width and height. Right click in taskbar -> Properties -> Layout. There are settings for size, position and buffer size. I have mine the size of the whole window and with the biggest possible buffer, as well as a more readable font.

-----


windows is a first class os for web development. what is it lacking? i have coded in ruby, python, java and go for the web.

also used different web servers including apache and tomcat.

-----


For me the lack of many unix tools is a killer and cygwin doesn't cut it. Many build scripts assume a unixy environment and windows is flat-out not supported. Lack of a proper package manager also makes installing and configuring workstations a hassle.

-----


It depends on what build scripts you are talking about.

We use Ant, Maven, MSBuild, Powershell, all without UNIX assumptions.

You can configure workstations via Active Directory.

Microsoft is not to blame if developers still insist in having .exe installers instead of adopting .msi packages.

-----


I don't think the package manager matters to be honest.

In python I use pip.

In ruby I use rubygems.

In java I use maven for dependencies.

in node.js I use npm.

So really, even in ubuntu or macosx you will use theses tools.

-----


I've tried having all these installed, and having them all in my %PATH%, along with msys and the platform sdk and so on, but i found I just ended up with my PATH env var being truncated because I went over the environment block size limit. I've given up pretending windows is unixy and ditched it in favor of homebrew on osx

-----


There might limitations, definitely. But move to OSX just because the $PATH has limitations seems a bit overboard.

There are other ways around it.

-----


And you can install them all from chocolatey, if you need a package manager manager.

-----


I just fire up the powershell ISE. I'd love a quake style terminal that's just this things console in borderless mode.

-----


ConEmu (https://code.google.com/p/conemu-maximus5/) + Quake Mode = Awesome :)

-----


THIS. ConEmu + Scoop (http://scoop.sh) has made using Windows much much much more productive for me.

-----


http://chocolatey.org/

-----


I used to use something called puTTYcyg when I used cygwin on windows. It seems that it's no longer maintained, but it was a decent terminal for Windows without going whole-hog X11 in cygwin.

-----


This is a BIG step to make me switch to Windows. Debugging Node.js just like C# is really awesome (no brainer breakpoints and inspection: https://www.youtube.com/watch?v=W_1_UqUDx2s).

This plus a decent shell would definitely make me switch (I hate PowerShell).

-----


thanks talles. note that you can debug from VS to Linux with NTVS. here's the debugging video:

https://www.youtube.com/watch?v=-ir9ZB8lUg4

-----


I haven't tried but there's probably no reason this won't work with Ubuntu installed on a Vagrant VM. Which is exactly how I develop nowadays from a Windows machine. This is crazy!

-----


I'm a big fan of Python Tools for Visual Studio (https://pytools.codeplex.com/). Assuming Njs4VS lives up to it's predecessor, it could be a truly wonderful tool.

-----


exactly. Honestly, mixed mode debugging made me drool first time I used it.

-----


I like this. I smuggled Node into our company to suplant a very difficult to test/debug WCF process and it's slowly been creeping out into bigger use cases. I've tried using VS for managing my Node scripts but it just wasn't a very elegant fit given VS's concept of projects and solutions so I kept falling back to Sublime. I'm excited to see if I can finally maintain just a single editor for both my .NET and Node code.

-----


Why not Web API and SignalR?

-----


I like Web API a lot and would have no problems using it more. I've never messed around with SignalR, I had already started playing with Node at that point.

As I mentioned, but didn't elaborate on, in my first post I had an urgent need to fix a production problem as quickly as possible. But the service giving us the problems was opaque, and encumbered by these massive 100+ project .NET solutions that had grown unwieldy for rapid development.

Being able to kick VS+TFS and their ceremony to the curb and hack out a solution with Node and Sublime Text was liberating. But it wasn't really VS I had a problem with, it was paying the price for years of technical debt. That's why I'm excited, I still think VS is a great IDE for my .NET work.

One other final reason I wanted to use Node was because I felt for someone that considered himself to be a "web developer" I was abnormally shitty at javascript and wanted to know it better :)

-----


Sounds reasonable :). Although I dread imagining a JavaScript equivalent of a "100+ project .NET solutions" built in spirit of "rapid development".

-----


I do like dynamic languages for quick prototypes, but my experience on the scale of enterprise projects and their code quality, just increased my preference for static typing for production code.

-----


Basically the important bit to remember when using dynamic languages in production is that you have to be extremely serious about writing (good) tests. It’s easy to get lazy when using a statically typed language as the compiler will do much of the work for you (especially if you take full advantage of the type system’s features). You can’t get away with that when writing e.g. JavaScript.

-----


That is exactly the main problem.

Enterprise developers don't write tests if their managers don't force them to, gets specially hairy when you have multiple consulting companies across multiple sites.

So you get JavaScript/Ruby/Python code with zero tests.

No sane people tries to refactor such code.

-----


TypeScript FTW.

https://nodejstools.codeplex.com/workitem/291

-----


Thanks for the info. Now if only we had customers asking for TypeScript.

I really like its design as a JavaScript superset.

-----


thanks ambuj for submitting. i work on the team & will be around for a couple of hours in case folks have any questions. would love to hear your feedback... cheers.

-----


This is the kind of thing that makes me want to switch back to Windows.

I like VS since I've been using it to develop a C# app these last two months. I miss a lot of things because I'm too deep in CLI usage (like git...help me...), but had I had it when I tried to play with Ruby on Windows 7 three years ago and discovered the pain of the windows CLI, maybe I would've stayed there.

These Node.js tools are especially great. I spend a lot of time on CLI running my app, installing a module, watching my dev logs,... I couldn't ever imagine anyone using node.js on windows. Now I can and it looks great.

-----


Let me guess, you used plain cmd instead of PowerShell.

-----


True. I had used cmd for about 15 years before that, so while using "cd" or "dir" and the classic lingo was okay, doing everything rails-related in CLI just felt..clunky: "why would you have such a bad interface? EasyPHP does everything just fine with a GUI!". Had I known CLI could be more intuitive (hello pipes!), I'd have looked up for a better alternative sooner =)

-----


RailsInstaller does a really good job now. Windows now feels second class but that's much better than 4th-5th-good luck getting anything to run. I see more people in the #RoR Irc channel admit to using windows so its gaining traction. I don't think it'll ever be 1:1 and I have a Linux host for a reason but it isn't a jarring experience anymore for sure.

-----


For Mac or Linux noders who would prefer an IDE to a simple editor + command line tools, IntelliJ with the Node plugin is pretty good. It has code assist and debugging built in, and IntelliJ is just generally a very good IDE.

Edit: WebStorm from the same company (JetBrains) is cheaper if you don't need all the java tools support.

-----


I'll admit I'm one of those who whined about nodeJS targeting Windows. Windows is starting to look more and more like a first-tier nodeJS platform with help from Microsoft! Can't wait to try this out.

How about a little golang love in Visual Studio?

-----


Very nice, will help Node break into the enterprise.

-----


Microsoft's definitely giving NodeJS some credibility to enterprise shops

-----


I hope they will understand when is the good case for using it. I wonder which kind of enterprise would need a high-load web site as opposed to a high-performance one?

-----


You don't have to use it for a website, it makes a great inter-service communication channel.

-----


I was going to almost reply with this exact comment. I'm not even convinced that everyone trying to build websites with Node/Express is onto something. I think of it more as a back-end SOA-thing.

-----


This looks really cool. Is there a way to have Node.js tools work with TypeScript?

-----


thanks! we're hoping to add TS for Beta.

-----


I wonder how this compares to the Visual Node[1] plugin by Redgate.

[1] http://www.visualnode.info/

-----


visualnode was a fork of http://pytools.codeplex.com and they've joined the NTVS project (which is also forked from the same source). Bart Read from red-gate did the npm GUI for NTVS in fact. they stated that they'll shut down visualnode.

-----


Just got the email.

---

Firstly, thanks for signing up for the beta of Visual Node, and trying out the tool. Your feedback has been incredibly helpful to us.

Today we have a very exciting announcement for you. Since the summer Red Gate has been working with Microsoft on a free, open source Node development environment for Visual Studio called Node Tools for Visual Studio (NTVS). We've just released the first public alpha of NTVS, which you can download from:

https://nodejstools.codeplex.com/

NTVS offers what we believe is a much richer development experience than Visual Node, including:

Various Node project types, IntelliSense and editing, Debugging, including remote debugging on Linux, Profiling, npm, Azure deployment, Support for both Visual Studio 2012 and 2013

In addition you can create NTVS projects based on existing code, making it easy to upgrade from Visual Node to NTVS. Please see https://www.simple-talk.com/blogs/2013/11/22/node-js-develop... for more information.

If you have any feedback we'd love to hear from you. You can report bugs or improvement requests at https://nodejstools.codeplex.com/workitem/list/basic, whilst support and general feedback/discussion is available at https://nodejstools.codeplex.com/discussions. Please do vote on the bugs/improvements you'd most like us to work on.

I'd like to take this opportunity to thank you again for participating in the Visual Node beta program. As I said, your feedback has been very helpful, and continues to influence the development of NTVS.

If you have any questions about anything in this email please do post to the discussion URL on Codeplex - we'd love to hear from you.

Kind regards,

Bart Read NTVS Contributor Red Gate Software https://nodejstools.codeplex.com/

-----


Have fun using npm with MAX_PATH.

-----


Seems like overkill. Part of why Node is great and so easy to get started with is that all you need is a browser, a text editor, and the terminal. I suppose for people that already use VS this is good, but maybe we should encourage them to write Node apps outside of that environment instead of shoving Node into a giant IDE.

-----


There's more to development than a text editor, though. Sometimes you do want debugging. And maybe you want syntax highlighting in your REPL. And, perhaps, you'd like some profiling to figure out how to make your Node app run faster.

-----


Yes, and most of those things are already available as modular open source tools that fit well in the Node ecosystem. Encouraging people to use one giant, closed, monolithic program for all of those purposes is not a good step forward for Node.

-----


I think you are failing to make the distinction that the Node community isn't encouraging devs to use Visual Studio; Visual Studio is helping its community to use Node.

-----


I'd disagree. It allows people to use the tools they're most comfortable with, instead of imposing a singular idea as far as what the blessed environment is. Obviously, some people don't like the string of tools together approach, or else this wouldn't have been developed.

-----


Well, they're not taking that away from you. You can still get started with the basics. But even node apps can get big.

It's the debugging story I'm really digging here. Being able to just set a breakpoint and hit f5 is real exciting as opposed to having to type "debugger" in your code and then sit around for ages. It's a shame I do all my node work on a Mac.

I'm guessing this won't be available for VS express?

-----


Just like Python tools for VS it probably won't work with VS express, but it probably will work with the freely available VS shell (that is just the bare Visual Studio IDE without any existing language support in it). So you can get the whole package for free, but obviously only this node.js plugin will be open source.

-----


Unfortunately, it won't work with Visual Studio Shell. The problem is that NTVS relies on the JavaScript language service that comes in the box in VS (for web projects and Win8 Store apps) for syntax highlighting and code completion, and that support is not present in Shell. That said, we're trying to come up with something here similar to the free PTVS package, so stay tuned!

Here's the work item that tracks this: https://nodejstools.codeplex.com/workitem/520

-----


jules, PTVS is actually available as a standalone PTVS+VS package. That's basically "Python Express" built using the VS Shells.

NTVS Express is a great idea, and I've opened a ticket for it already in case anyone wants to upvote: https://nodejstools.codeplex.com/workitem/520

thx

-----


WebMatrix 3 makes a decent free Node/PHP IDE. It isn't as polished as this looks to be and nothing really beats VS proper as it were but it makes a pretty convincing run at being second place behind VS Express and at least supports a basic idea of plugins/extensions.

-----


you have a point. i dont think node in a fat IDE is for everyone / every scenario. i look at it as just another tool in the dev's toolbox. ideal (imho) is a decent web-based tool or light-weight editor plus a capable IDE for larger scale apps that need complex debugging, profiling, mutli-lingual project, etc. support.

for a lighter weight solution, check out: http://channel9.msdn.com/Series/Visual-Studio-Online-Monaco/...

-----


Ahhh... a browser, a text editor (emacs for me) and a terminal. That's my ideal dev environment. I've never been able to figure out IDEs.

-----


You are free to keep on doing UNIX System V style of work.

-----


> I suppose for people that already use VS this is good

Yeah, instead of introduction Node this way, they should have specified this was an introducing to node.js Tools for Visual Studio.

-----


This is great, I've been playing around with node and express recently and just using notepad++, I'll be integrating it into my VS environment when I get home

-----


Great, I wonder when will they release the standalone version!

-----


great idea - just created a request for it. please upvote!

https://nodejstools.codeplex.com/workitem/520

-----


Here's a nickel, kid. Get yourself a real OS.

-----


This seems useful for the profiling alone.

-----


The profiling will only get better. Right now it profiles everything, but it could potentially be scoped down to "just my code." Plus, it's a sampling profiler as it is so you will need to push some real traffic to work hot spots (as opposed to just browse and click around) in order to get results.

What's cool about it, IMHO (I wrote the post above) is that it takes the V8 profiling stuff and feeds it into the VS visualizer...as it should.

-----


Wow, for an alpha release that's pretty impressive. Node seems to be really taking off at MS...parts of Azure are built with it...some really large parts of Azure.

It's awesome that they didn't screw with Node either to make it run on Chakra...

-----


Do you have a reference for Azure internals being written in node.js? I'd love to read about it.

-----


i'll try to find out. top my head i know the azure node sdk is all node (obviously...), all the cross-plat commands/utils are node, skype, yammer, bing (?), ... all use node to various extents.

some info: http://www.windowsazure.com/en-us/develop/nodejs/ https://github.com/WindowsAzure/azure-sdk-for-node https://github.com/WindowsAzure/azure-sdk-tools-xplat

-----


Also Azure Mobile Services server scripts:

http://www.windowsazure.com/en-us/develop/mobile/how-to-guid...

-----


TypeScript also uses node.

-----


TypeScript uses npm as a package manager yes, but there is unfortunately no support for using Node within TypeScript yet on Visual Studio. There are definitions for node/express/etc, just cannot compile them directly in Visual Studio and also have debugging (unless the linked package in the OP has changed that).

-----


TypeScript support is not there yet, but we have it on the radar: https://nodejstools.codeplex.com/workitem/291

-----


I should have been a bit more specific, Microsoft could have used any language to build the TypeScript compiler.

They took however the best solution by bootstraping it in JavaScript and using node for the process.

Just correct me if I am wrong.

-----


Looks correct to me and makes the most sense to build the tools in the language TypeScript compiles to. On another note, it would appear they will be adding TypeScript support in the beta[1], which makes me very happy.

[1] https://news.ycombinator.com/item?id=6777360

-----


A colleague reverse engineered Azure Mobile services, written in Node, to find out how it works. He blogged about it here: http://weblogs.asp.net/soever/archive/2013/07/26/azure-mobil...

-----


Amazing. How he reverse engineered a service? Thanks.

-----


I'm similarly surprised mozilla hasn't come out with an SM-powered node

-----


It's actually been done[1], to more or less success, but hasn't been kept up, and the differences in embedding SpiderMonkey vs V8 were cumbersome iirc. Not to mention compatibility with compiled modules. I was interested as E4X support would have been nicer earlier on, but it's surprising how quickly json has taken over.

[1] https://github.com/zpao/spidernode

-----


nooooooooo

(downvote me)

-----




Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: