Microsoft Adds Node.js Support To Visual Studio 197
shutdown -p now writes "Coming from the team that had previously brought you Python Tools for Visual Studio, Microsoft has announced Node.js Tools for Visual Studio, with the release of the first public alpha. NTVS is the official extension for Visual Studio that adds support for Node.js, including editing with Intellisense, debugging, profiling, and the ability to deploy Node.js websites to Windows Azure. An overview video showcases the features, and Scott Hanselman has a detailed walkthrough. The project is open source under Apache License 2.0. While the extension is published by Microsoft, it is a collaborative effort involving Microsoft, Red Gate (which previously had a private beta version of similar product called Visual Node), and individual contributors from the Node.js community."
Visual Studio... (Score:4, Funny)
Won't purchase without.
Re: (Score:2)
Not yet, but you can file a feature request [codeplex.com].
Re:Visual Studio... (Score:5, Funny)
Still no feature request. I'm disappointed.
If there is one in the tracker and it gets over 100 votes, I'll personally implement it. It's going to appear once you open a project and ask, "It looks like you're trying to do some work. Would you like to be distracted?". If you say yes, it'll open Slashdot in a Visual Studio tab. ~
Just what the nodejs (Score:5, Funny)
Re: (Score:2)
If I had the mod points.....
This describes my friend perfectly. I will say though, he's a way better programmer than I am.
Re: (Score:3)
Apparently there are some groups at Microsoft who have gone all the way and are now using Javascript everywhere.
Re: (Score:3)
It depends on what you mean by "asp.net".
Over the last 3 years asp.net has evolved from "gui controls you compose on a page with TONS of overhead" to "a lightweight framework that looks a LOT like spring". What most people who have used asp.net in the last 10-12 years think of as asp.net is basically dead.
http://www.asp.net/web-api [asp.net] for example. Many people us this and knockoutjs for dotnet based web projects.
Re: (Score:3)
Column mode like when you do alt+shift+up/down?
Re:Just what the nodejs (Score:4, Informative)
Or Visual Studio's holding down ALT while selecting a block, or textpad's block mode?
Re: (Score:2)
Note that AC specifically said, "that nothing else does quite as well," which is not quite the same as "that nothing else does." Personally I'm not aware of any bothersome differences in implementation, but I'd be interested to hear them. I want to say that one editor I've used will plop a bunch of whitespace at the end of a line if you copy and paste the uneven ends of lines, but I just tried the three at my disposal at the moment (VS, Notepad++, gVim) and none of them did that.
Here [stackoverflow.com] is how to do it in a
Re: (Score:2)
Re: (Score:2)
...also create selections with middle mouse+drag.
I like Sublime. I find that for my workflow, it's light-weight helps it stay out of my way. I used to hang onto Notepad++, but found that Sublime is easier to use.
I've tried and been disappointed from so many IDEs that I basically just gave up. They all have great features, but it's tough finding one that has the correct mix of features I'm looking for. Sublime is cross-platform and not built with Java. That's a big one. S/FTP integrated is essential (so ma
node.js.Extend.too ? (Score:2, Insightful)
Does anybody have dollars to bet against my donuts that they will require the use of proprietary keywords and extensions?
Doing anything else would be so bizarre for Microsoft.
Re: (Score:2)
If it was compiling down to .NET, there would probably be some completely optional extensions to make use of the .NET framework (mostly, adding interoperability with other .NET languages). As is, I don't even know about that. I have no particular use for Node.JS myself, but I do like having more languages and frameworks supported in VS.
Re: (Score:2)
There is no proprietary keywords and extensions involved here. It works with the standard V8-based Node.js implementation from http://nodejs.org./ [nodejs.org.] In fact, that doesn't even come in the box, so you have to download and install it separately.
Re: (Score:2)
That's the 'embrace' part. They have been a little better about standards lately though, so you never know.
Re:node.js.Extend.too ? (Score:5, Informative)
(disclosure: I am a developer on PTVS and NTVS team)
I would hope that the track record of our particular team with Python Tools would speak for itself here - it's been out there for two years now, with 2.0 released last month, and it was and remains all about standard Python. While it does support IronPython, for example (but also Jython, PyPy, and other third party implementations), CPython remains the primary target because that's what the community uses, and our goal is to attract developers from said community to VS, Azure, and other Microsoft platforms and products, not to hijack their language/framework of choice.
The story with NTVS is similar: it's all about making VS a compelling choice for Node.js developers without forcing a Microsoft-top-to-bottom stack on them (which no-one would accept, and rightly so). In that sense, it is in line with Azure offering Linux VMs, or the ability to write Node.js-based Azure push notification services for Windows and Windows Phone.
Re: (Score:2)
Yes, your team has a great track record, but unfortunately Microsoft has the worst in the business, or at least very close to it. You've got to expect some suspicion.
Re:node.js.Extend.too ? (Score:5, Interesting)
Sure, karma is a bitch. In fact, part of what we're trying to do as a team is to turn it around, both the external perception as well as internal company understanding on openness - not just open source, though that as well, but generally working together on common things, and purging the NIH and the "we must be in charge" syndrome.
It's not just us, too - it has been a growing thing in the developer division, in general, with a lot more stuff being open sourced, and a broad change of attitude from a single monolithic take-it-or-leave-it stack, to going where the people already are and supporting what they already do. You might have noticed some other glimpses of that if you've been following the general news on MS dev story, e.g. with a renewed effort on C++ standard conformance, or a lot more attention to JS and HTML5.
Re:node.js.Extend.too ? (Score:4, Insightful)
The developers may want to have a word with the legal/patent department if they're looking for goodwill from the developer community at large. What Microsoft is doing with the Android patents is up there with SCO. They also teamed up with Appple as 'Rockstar' for some of the worst patent abuse around, and lobbied against the current patent reforms. It's going to be a big job.
Re: (Score:2)
Not nearly as bad as what Google/Motorola have been doing with theirs, namely h.264 crap.
Re: (Score:2)
I think it was just Motorola when that started, but regardless; even if they're insisting on some ridiculous value to their patents or something, at least they're not making people sign an NDA to have a look at what they're being threatened with. I'm still amazed that that sort of thing is legal.
My understanding is that it's just a court decision on the F part of FRAND, but I haven't followed it closely.
Re:node.js.Extend.too ? (Score:5, Interesting)
My own personal take on software patents (which is obviously my own only, does not represent the opinion of my employer in any way, blah blah etc) is that they can play a useful role, but they should be significantly scaled down in terms of what you can patent. Complicated algorithms, like, say, MP3 or H.264 or other compression stuff - probably yes, since that takes real time and effort to develop. But I'd love to see the "one click" patents die a fiery death. Some laws that would require non-discriminatory licensing for useful patents for interoperability and standards compliance purposes would also be great.
So EFF gets part of my paycheck every year. Ironically enough, it qualifies for MS donation match program, so they match it dollar for dollar. ~
Re: (Score:2)
If you are concerned not about the product but the actions of those associated - but not directly involved with - the team who made the product even when those actions have nothing to do with the product then which company provides products you do use? It can't be Microsoft or Apple or Google or Canonical or Amazon or pretty much any company.
I buy the argument that you don't want to support the actions of companies engaging in the sort of behavior you find reprehensible and that is valid but really the appr
Re: (Score:2)
We have good reason to be wary. Typescript (as of v. 0.9) expects an IE-only behavior from a String built-in function. (I can't remember exactly *what* the behavior is, but is *is* present.) Every other browser's JS implementation has a the same String implementation.
This sounds very surprising to me because 1) TypeScript compiler is itself written in TypeScript, and 2) it runs on Node.js (as a console app). So if there's something IE-specific there, they'd be the first victim to that, which implies that it is not intentional.
Can you clarify? TS itself doesn't add any new semantics to JS, it's strictly about syntactic sugar (like classes) and compile-time type checking based on type annotation (which is type-erased, so at runtime there's no difference whether there are
Re: (Score:2)
Can you do PHP next? Thanks.
Re: (Score:2)
DevSense are the PHP-in-VS guys. Have you seen their product [microsoft.com]? They do, in fact, share a lot of code with PTVS, and contribute back improvements.
Stop with JavaScript (Score:2, Interesting)
Re:Stop with JavaScript (Score:4, Insightful)
When you get all browser makers to agree on a new language to use we can stop with JavaScript.
Re: (Score:3)
Oh yeah, good idea. Let's just be rid of this whole Internet thing, and all the crap people put on it.
Re:Stop with JavaScript (Score:5, Insightful)
Oh yeah, good idea. Let's just be rid of this whole Internet thing, and all the crap people put on it.
WWW != Internet
Re: (Score:2)
Yes, okay, we can worry about that couple percentage of traffic some other time.
Re: (Score:2)
no problem! i'll send you some binaries you can run to access my site. It's safe, TRUST ME.
Re:Stop with JavaScript (Score:5, Funny)
Well, duh, the point is not having to port/compile native apps for all platforms. With Javascript you just write one web app that is 100% compatible on all platforms, OSes, and browsers! Man... I thought I could keep a straight face while typing that but I give up.
Re: (Score:3)
That would have been really funny 10 years ago.
Re: (Score:2)
Re: (Score:2)
Or, for a cynical twist on your post:
yeah! when i want to fill in a form i want to download a script that my browser will execute in a virtual machine rather than piddle around with this html crap! hell the internet should just be replaced with untrusted executable code!
Oh wait. That already happened. Fuck you and the executable webpage you rode in on.
Re: (Score:3, Interesting)
Re: (Score:2)
Re: (Score:2)
What you really want is PNaCl [chromium.org]. LLVM bitcode running sandboxed in the browser at native speed is the pinnacle of client-side scripting - you are not limited in your choice of languages and frameworks at all; if you want to script in C, you're welcome to do so, and if you prefer some high-level dynamic language like JS or Python, then you just run the corresponding VM in the sandbox.
Re: (Score:2)
I agree. When I set out to replace all of my XUL code I eventually came to the realization that I should start with everything new. Everything I've used Java for has had to be recoded several times because of changes, and vulnerabilities, in the JVM. Using pure javascript and XML/SVG was close and with the exception of javascript is where I would like to be. However, there are some things that need heavy lifting. LLVM provides a way to work like you to in the world of compiled software, eg write ASM mo
JavaScript, its better than a kick in the head. (Score:5, Insightful)
nothing? Yeah, I thought so....
Re: (Score:3, Informative)
Not really sure what that has to do with Node.js applications deployed to something like Azure. How many browsers are going to be running that?
I know I can think of things I'd rather do than inflict Javascript on myself in more places than I have to.
Re: (Score:2)
ActionScript! ;)
Re:JavaScript, its better than a kick in the head. (Score:4, Insightful)
If the W3C would make a byte code standard to access the DOM then nobody would use JavaScript and rather port any other language to use the byte code. Much like for the JavaVM there are numerous languages available (about 25 languages), for example C, Python, Ruby, and new languages like Scala, Groovy, (and about 30 other languages). The JavaScript code is compiled and re-arranged for faster execution to a byte code language that is run under a Virtual Machine anyway.
The question of whether I know a better client side web language is moot because there ain't no choice. Other then of course plug-ins or add-ons to the browser. It's like asking is there any better gaming operation system then Windows... (at least I can install Linux and run some Linux games that are better then Windows games).
W3C isn't reliable (Score:2)
I'm not saying they're worthless, far from it, but the W3C has shown themselves incapable of making a proper standard.
The HTML5 debacle and the WHATWG formation sort of made it official. The W3C buys into the abstraction layer nonsense and perpetuates it to the detriment of our industry. Remember: Web 2.0 was fully embraced by W3C.
HTML5 & CSS3 transforms & canvas elements are still not being fully utilized. There are many simple HTML5/CSS3
Re: (Score:2)
There was a day when web servers were expected to do the heavy lifting instead of offloading everything to client browsers. And somehow, they were able to afford this kind of outrageous web server horsepower without inundating visitors with advertising.
We've come a long way.
Re: (Score:3)
The cost of round trips between client and server are still way too high for a lot of stuff, especially when you want smooth UI. Remember those horrible forms which reloaded the page (to show a different set of controls) when you changed selection in some combobox?
Re: (Score:2)
... Webforms... blech. "Just wrap it in an update panel!"
Re: (Score:2)
Who said anything about client-side? Nod.js is server side JS, which IMHO is pretty dumb unless you're doing it for user front facing DSL's (which its awesome for).
Re: (Score:2)
"please don't make me learn how to use Javascript properly"
Re: (Score:2)
Yeah, that C-to-JS compiler is a pain to work with, please don't make me.
Re: (Score:2)
Re:Stop with JavaScript (Score:4, Informative)
it's so great that it'll allow you to just decide to use some member variable somewhere without declaring it
Undeclared variables are implicitly global. A code inspector will warn you about mistakes like that!
there's no way to know the type of a variable
It should be clear from the way it's used or by the documentation (if it exists). This is true of not only Javascript, but every dynamic language. If that's not good enough, use one of the readily-available and straightforward debuggers. Another quick approach is to just console.log(var)
Re: (Score:2)
Work arounds to flaws in the language do not make it a better language.
It should be clear from the way it's used
Except when it isn't.
or by the documentation (if it exists)
You know it won't.
This is true of not only Javascript, but every dynamic language.
JavaScript is worse than others. In part because its used by some of the lowest common denenominator programmers. "script kids who copy-pasta shit together".
You don't give people with the least discipline or skill at programming a language that has the least
Re: (Score:2)
I have to note that there is a fairly big difference between the broad JS community, and the much narrower and more elitist Node.js community.
Re: (Score:2)
it's a terrible language
Yeah? It has many of the language features of a first class dynamic language. There are better languages, but what is it about JavaScript as a language (I don't care what you think about how it's used on specific websites) that you find objectional.
Re: (Score:2)
Re: (Score:2)
1. Being dynamic
LOL.
Re: (Score:2)
I love this kind of slashdot comment. If someone on slashdot hates it, it must be good.
How to revert the uppercase menus (Score:2)
Ok, here's a cool little tip that many will enjoy. A couple of days ago I discovered that there is actually a registry setting [msdn.com] to turn off the silly uppercase menus. Enjoy.
While we are at it, can we also have a SuppressDamnSlowStartupAndSluggishUserInterface flag? The other day a teacher of mine intended to open a C file which was part of MicroC/OS-II, into Notepad++. However VS owned the filetype association and the guy was like "aarrrgghhh...how can I make this stop??" when VS fired up and was running tha
Re: (Score:2)
That's like taking a harrier jet to your mailbox and complaining the engines take forever to warm up.
If you want to peek the contents of a text file, open it in a text editor. It'll be a while when using xcode^H^H^H^Heclipse^H^H^H^H^H^Hvisual studio.
Also, SSD.
Re: (Score:2)
VS loads very slow the first time you run it after installing (because it runs first-time initialization code for all packages), and also after installing a new package. But, once primed, it should be pretty fast. Not as fast as Notepad++ or something similarly lightweight, but no more than a few seconds, and certainly no eternal progress bars.
Not for everyone (Score:2)
Re: (Score:2)
That is correct. Please vote [codeplex.com] for the feature request to provide a version that would run on some free VS edition (Express or Shell). We already have such a thing for Python Tools, but it would require some more effort with NTVS, and it would help a great deal if we can show numbers proving strong community demand for such a thing.
VS doesn't have Intellisense (Score:2)
It has retard sense unless you use resharper.
LOL, WUT? (Score:2)
OK, I might get fried for this, but I'm a daily VS2012 V#/MVC 4 Mobile web programmer and I have no clue what Node.js is all about or why they are excited about it.
I looked at the Nodejs.org site and have not a clue WTF it's supposed to do. Anyone got a translation of what in the hell their buzzspeak means?
"Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and effi
Re: (Score:2)
V# should have been C#
Re: (Score:3)
jQuery is about JavaScript running on the server side - in the browser. Node.js is about JavaScript running on the server - instead of C#/ASP.NET. The "event-driven, non-blocking I/O model" basically means that all APIs that are normally blocking are instead done asynchronously, with you having to provide a completion callback every time you call one - so threads are never blocked waiting for I/O. For a C# developer, this is basically very similar to all the new stuff about System.Threading.Tasks and async/
Re: (Score:2)
Uh, why would one want to run JavaScript on the server? Makes perfect sense in the browser for cross-browser compatibility, but on the server? Why would anyone but JavaScript purists want to do that?
In the .NET world it is C# on the server, JavaScript on the client, AJAX tying the two together - asynchronously.
This is as dumb as using the code-first model for Entity Framework - Just a crutch for people who don't want to learn what they need to learn.
Re: (Score:2)
Not all people live in a .NET world.
And, well, why not?
Re: (Score:2)
jQuery is a shitty Javascript library that, on the client side, slows down websites, increases development time, and generally makes cross-browser scripting impossible. It's worse than useless.
Node.js is essentially Javascript without the browser, plus a few extras. There are various [github.com] uses [sitepoint.com] for it. It can be handy, but it's far from the panacea it's made out to be by its proponents.
They're quite different. The only similarity I can come up with is that both are over-hyped.
Re: (Score:2)
Nonsense. jQuery even introduces cross-browser issues!
The unstable API virtually guarantees you'll have maintenance issues in the future -- with the library itself offering solutions to help you mix multiple versions! Yeah, even if I believed that you save any amount of development time using jQuery, which I do not, you'll quickly loose it all in maintenance costs.
Oh, yes, and it's written by a group of completely incompetent people. Having looked at the code, I'm not convinced Resig understand the basic
Re: (Score:2)
But Node.js is the trendy new thing!
Re: (Score:2)
Visual Studio is a huge organization, and only a subset of people work on the C compiler.
The people behind VS C89 work and Node.js are entirely different people, with different funding and business justifications.
I work on VS LightSwitch. I never talk to the C compiler team about anything.
Re: (Score:2)
Re: (Score:2)
http://blogs.msdn.com/b/vcblog/ [msdn.com]
Re: (Score:2)
Re: (Score:2)
Can you give an example of something in C99 that is not in VS 2013, and that would take a week or so to implement?
The only things that aren't there that I can think of off the top of my head are VLAs and "restricted", and both are fairly major features (well, unless you are okay with a no-op "restricted", but you can have that already by #defining it to expand to a blank string).
Re: (Score:2)
Also, array sizes defined at runtime is theoretically easy, but depending on their codebase (ie, if they are crappy compiler writers that depended on things they shouldn't have), I could see it being hard.
Re: (Score:3)
Also, array sizes defined at runtime is theoretically easy
Dynamically stack-allocating arrays is indeed easy, which is why this feature is also being standardized in C++14. The problem with C99 VLAs is that they are far more than that - you also have things like VLA typedefs (which should remember the size at the point of the typedef, even if the expression that defined it changes later), or parameter arrays where their size is specified by another parameter. Also, the abomination that is dynamic sizeof.
but depending on their codebase (ie, if they are crappy compiler writers that depended on things they shouldn't have), I could see it being hard.
The compiler itself is really ancient. Consider this: gcc 1.0
Re: (Score:2)
The compiler itself is really ancient. Consider this: gcc 1.0 was released in 1987; Microsoft C was released in 1983, and that was built on top of an even older third-party codebase that was purchased back then. It probably changed a lot since then, like gcc did, but all legacy codebases of that size acquire a lot of legacy cruft (hence why Apple decided to stop mucking around with gcc and just do Clang from scratch). I don't know much about current VC code, but one piece of information that the team has shared publicly is that the front-end doesn't actually operate on an AST, but is rather a multipass process-as-you-parse thing, which makes a great many modern C++ features like constexpr very costly to implement.
ok, that's pretty interesting actually.
Re: (Score:3)
Note that GP asked about missing C99 feature that "would take a week or so to implement". Having said that:
Do they have stdint.h now?
It has been there since VS 2010.
How about conforming to C89's strict aliasing rules?
A compiler doesn't need to do anything special to conform to those rules, so this has always been the case. Conformant programs have to be written carefully so as not to trip up an optimizer that relies on strict aliasing, though. I have to admit that I don't know whether VC++ optimizer does use the opportunities presented by strict aliasing, like g++.
Restricted pointers? They have that under __restrict, but again, you have to #define if you want to use restrict with MSVC code.
There's no support
Re: (Score:3)
Designated initializers?
They're there [microsoft.com] in VS 2013 already.
Compound literals?
Also in VS 2013.
_Bool / stdbool.h as well, and most C99 standard headers [msdn.com] except for tgmath.h are there as well.
Re: (Score:2)
Ironically enough, it was the desire to ease porting of some popular open source libraries that have gotten to rely on C99 features. I don't know the full list, but the one that was specifically named on VC blog (and that should now compile with no modifications) is ffmpeg.
Re: (Score:2)
C89 doesn't web scale.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Yeah, but the callback model is incredibly ugly. In Lua I can do precisely what Node.js does--juggle thousands of simultaneous connections--but at least be able use a normal flow of control via the use of coroutines.
In C#, this was solved with async/await [microsoft.com], which, like Lua coroutines and Python yield, let you basically write the code as sequential, sprinkling "await" in points where you want asynchrony. Since then, a similar thing [meetingcpp.com] has been proposed for the inclusion in C++17, and there is another proposal [wordpress.com] for EcmaScript 6 - support for which has already been added to Node.js.
Re: (Score:2)
There are many teams in Microsoft. The one that does Node.js (which is also the one that did Python) is different from the one that does Visual C++.
That said, so far as I know, Visual C++ is C89-conformant. Did you mean C99? If so, they're working on it - in fact, VS 2013 includes most of C99 standard library, as well as _Bool, compound literals and designated initializers.
Re: (Score:2)
Re: (Score:2)
C90 is the same thing as C89 (it was originally ANSI C89, later adopted as ISO C90).
Re: (Score:2)
Re: (Score:2)
It is undefined behavior in all conformant C89 compilers, including VC. Undefined behavior, by defnition, is any kind of behavior, including "it works as I expected it to".
Re: (Score:2)
You realize that "undefined" doesn't mean "it crashes the app" or even "it doesn't do what the author expected"?
It just means undefined. That's anything from, "it works exactly like the author intended" to "it causes the soft soap dispenser in the ISS to squirt soap on the spacesuits." It's undefined; it could do literally anything or nothing at all.
Re: (Score:3)
How 'bout C89 support?
For that matter, how about C64 support? And small enough to fit on floppy disks...
Re: (Score:2)
And small enough to fit on floppy disks...
I believe that was implemented somewhere around Visual C++ 1.0, but has somehow regressed since then. Probably because they didn't have any unit tests back then.
Re:What about Powershell ? (Score:5, Informative)
Why can't Microsoft put out a Visual Studio plugin for Powershell with full intellisense, breakpointing, inspections, etc. ?
We don't need to - someone else already did that [microsoft.com].
Keep in mind that we're a relatively small group - 6 developers/testers (we all do both) and 1 project manager, covering two projects already (PTVS and NTVS). We can only do so much. Then again, that's precisely why the code for both products is open source - so that people can take it and use it as a foundation for similar products for other languages. Here [microsoft.com] is one more for PHP, for example.
Re: (Score:2)
I think you are confused. Have you ever taken a powershell script, right click it, and select edit. A full blown IDE comes up. Breakpoints, step tracing, call stack, interactive commands, etc. Yes, it could use a watch window, but there are other tools if you really really want to write some complex powershell scripts that integrates into Visual Studio.