Whats the best way to develop javascript? - javascript

Im keen on learning javascript and ui design. Im using visual studio 2005 but find it difficult to debug code, I use firebug also. Is there a javascript editor with intellisense out there that I can get for free im have a hard time using the syntax and some of the helper mthods like parseint etc.
Any advice much appreciated.
Cheers
Pq

Visual Studio 2008 has better Javascript support. You can debug it like normal C# code, although it's still buggy sometimes (it doesn't seem to like to set a break point in the first line of a function for example, nested functions give it also a hard time).
Also there is Intellisense support now but it works so-so. It depends a lot on how which JS framework you're going to use.
All in all, VS is surely not the best dev environment for JS around, but maybe the best compromise if you're already familiar with it and developing for .NET anyhow.

I'd say Aptana should work for you. You can install it alone or as an Eclipse plugin.
It features :
HTML, CSS, and JavaScript Code Assist
Ajax Libraries
JavaScript Debugging
DOM Outline View
... so it seems like a good fit for your needs.

IntelliJ is a great editor and they now have an open source version.

As well as Aptana (which is great) as suggested by marcgg you might want to try Komodo Edit or Netbeans both of which are also excellent and multi purpose.

Just to add in what will NOT work is your VS2005, see this answer on that.

I prefer any (dev oriented) simple text editor (my choice is TextMate) and FireBug. Or any other browser developer tools (IE8 has it to). Why not use VS/Eclipse/etc? Its too heavy for JavaScript i think.
EDIT: And something like JSBin can help you with little expirinents!

Eclipse for web developers. (see http://www.eclipse.org/)

Related

A feature rich JavaScript IDE environment?

I'm currently using Visual Studio 2008 to edit .js files with, and it has decent support but I want more...
I like the VS syntax highlighting and auto-indentation features but additionally would like advanced features like: contextual info and help, collapsible JavaScript blocks, implicit symbol understanding for searching, refactoring and that kind of thing; also warnings and errors for the js code.
Suggestions?
Edit: ooops... for the Windows platform. I see some Eclipse answers already and that's fine as I'll install Eclipse on Windows.
Purpose: I want the tool to be feature rich to aid my understanding of what's happening because JavaScript can get quite obtuse when jQuery is being used. Actually, it can be quite obtuse to understand regardless. Plus the additional (non-jQuery) branching for different browsers and tweaks. It can take a long time to wade through.
I use Komodo Edit (link) or Aptana.
Ever try Aptana?
http://www.aptana.org/
ActiveState Komodo Edit works here too. See my answer just posted here.
JetBrains is working on a promising Web/Javascript IDE called WebStorm. They currently have a public preview out:
http://www.jetbrains.com/webide/index.html
It has some interesting features:
Javascript refactoring
DOM-Based, Browser-Specific Completion
Code Navigation and Usages Search
Code Inspections and Quick-Fixes
JavaScript Debugger Based on Mozilla
Frameworks Support (jQuery, Prototype, ...)
My choice is NetBeanse (as IDE).
But more more often i prefer emacs
IntelliJ IDEA by jetbrains is pretty good for javascript:
http://www.jetbrains.com/idea/features/ajax.html

Is there a good javascript plugin for visual studio?

I think that Visual Studio's biggest let down is the Javascript editor. I have been told to use Aptana as an editor for my javascript files, but I would prefer to stick with visual studio if possible.
I have read other similar plugin posts, but none focus specifically on Javascript.
VS2010 may offer some improvements, but will they be up to Apatana standards? I have briefly tested the beta, but I'm not overly impressed.
Is there anything out there that will bring Javascript closer to c# development? Considering the wide spread use of Javascript I think there must be something....... I hope! :)
Many thanks in advance... this is something that has always bugged me!
There's a couple recent plugins that may be helpful :
From Microsoft :
JScript Editor Extensions
Brace Matching
Outlining / Cold-folding
Current Word Highlighting
IntelliSense Doc-Comments Support
JSEnhancements
Outlining and matching braces highlighting
(I wouldn't think installing both of these is a good idea - and the Microsoft plugin has more features so try that one first)
VS is a pretty good IDE (especially when coupled with Resharper) but not so hot with Javascript. The debugger is good and there's the JSLint plugin but other than that I'm not sure. Aptana (based on Eclipse) is an excellent javascript IDE but it doesn't like it much when the javascript is embedded in aspx files (unless they updated the support recently). So far I'm not sure there's an ideal .net platform IDE for both client and server side stuff just yet.
Update: Resharper 6 added pretty good JavaScript support - so now I'd recommend that combination if you're doing a lot of debugging across client and server at the same time. If you're focussing on pure client code then I find WebStorm to be an excellent JavaScript/HTML IDE - even better than Aptana.
I'd really like to recommend Webstorm. It does not! treat your JS as text files.
Its a full blown JS editor and has become my favourite JS editor working in parallel with VS to handle my server side stuff.
WS has actual object intellisense across JS files. That means when I press . (dot) it shows me the functions on that objects, even if its located physically in another file.
It will recognize my objects (or their type if you will) created in other JS files referred to in the file I'm working on.
I have 'Find usages' on JS functions
I have 'find all references' on JS object / function / class / variable or whatever you want to search on. In the end its all objects but Webstorm knows this.
If I change the short/cut to F12, I can press F12 on my function call and it will jump to the implementation of that JS functon. Even if its located in another file.
Ofc. you have code folding and colouring, extract method and other neat code re factoring, overview creating tools.
Oh. And by the way.
I'd like to kill off a rumour going around in the cloud on forums I come across from time to time, looking for better ways to handle JS.
reSharper DO NOT SUPPORT JAVASCRIPT! A little piece of me dies every time I read some guy repeating what he saw on the reSharper site. It may have a some poor intellisense and some low level syntax check, but that has nothing to do with support.
Notepad++ supports JS better than VS in my opinion.
Münster
Don't forget to grab Chirpy to handle minifying your scripts in VS.
If you use Visual Studio, add the
/// <reference path="myOtherJsFile.js" />
directive at top of your js files and install Web Essentials you get pretty decent (but not perfect) intellisense, go to definition by using F12 and find all references (sort of..) by using SHIFT+F12

What tools should I have as my core set for developing javascript?

I have been developing ASP.Net applications for quite a few years, and I have always avoided learning JavaScript. Now I have been diving in and trying to learn as much as possible.
As a .Net developer I rely on Visual Studio heavily. What I am wondering is what tools, as a JavaScript developer, do you guys rely on heavily to develop JavaScript? I have just discovered FireBug which is awesome. What other tools out there am I missing that are a must have?
Thanks!
Yes, Firebug is awesome. Be sure that you are aware of the profiling capabilities in there. Also, there is a new testing framework called FireUnit that works with Firebug as well.
I like Textmate for Javascript editing on my Mac. Aptana Studio (stand-alone or as an Eclipse plug-in) is really good too.
I've been meaning to try test-driven-development in Javascript with the YUI test library. It promises to be like NUnit/JUnit for Javascript, which would be great.
Check out JS lint.
If you're interested in Aspect-oriented Programming, look at AOP in Javascript from Dojo.
Lastly, for some good information about the current state of Javascript engines (cool stuff like TraceMonkey) and future directions, check out this episode of HanselMinutes.
Enjoy!
Firebug is pretty much the best. You'll need some solutions for IE too.
See this link: Debugging JavaScript in IE7
Visual Studio 2008 - has JavaScript
intellisense and integrated Js
debugging capability
FireBug - a
must have for any web developer
FireBug Lite - "The solution is
Firebug Lite, a JavaScript file you
can insert into your pages to
simulate some Firebug features in
browsers that are not named
"Firefox"."
JsLint - gotta make
sure what you're writing is of
decent quality, and JsLint will help
you do that
Other useful tools:
packer really good JavaScript compressor.
Web Developer extension for Firefox
JsUnit unit testing framework.
SeleniumIDE feature, user interface and acceptance testing.
Lately, Visual Studio itself has improved considerably in its JavaScript support. For example, IntelliSense is now available for JavaScript in VS2008, including for third-party libraries such as jQuery.
Why not continue to use the Visual Studio for convenience and download jQuery with intellisense support.
Scott Guthrie has a post on how to do it
http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx
http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx

Palm Pre and Visual Studio. Possible?

The development experience for the Palm Pre sucks, to say the least. At best you are working on JavaScript in Eclipse with the Aptana plugin. The intellisense you get is really, really dismal. You have to be looking at the documentation every 5 seconds.
I was thinking, Visual Studio really excels at JavaScript and intellisense. Has anyone succeeded at writing Palm Pre code in VS2008 with intellisense, which would require hooking in Palm's Mojo Library?
Is there a known way to hook in 3rd party non-source libraries to JavaScript in Vs2008?
I've been looking for alternatives to Eclipse, too, but so far it does not appear that anyone has done it. For myself it felt like too much work, so I just switched to working with several terminal windows open and a browser window to the documentation.
I'm a long time eclipse user but was disappointed in the eclipse environment for Pre - especially after using the Android SDK which hooks nicely into eclipse (then again the dev environment is Java there).
Have you tried Komodo? I switched over to it and the autocompletion is nice and the webos addon does a decent job. I don't have the professional version so I can't comment on the debugging capability which I'd love to have.
If you can tell VS08 you want to load the Mojo.js stuff, then it should work. I think you should be able to configure any custom tools you need for building etc. as well.
Personally I'd recommend you check out JetBrains' IntelliJ IDEA. They have really good JavaScript support and I've used it with some Pre-stuff as well.

What would be a good browser-independent JavaScript programming environment?

My team's current project involves re-writing retrieval libraries in JavaScript. We are basically looking for a setup which enables us to apply test-driven development methods.
So far we plan to use Vim to write the code, no fancy IDE. For generating output we would use Spidermonkey's shell environment. JSLint could serve as a moderate syntax checking tool.
The essential question remains: How do you develop JavaScript (browser-independent) programs?
If we are already on the right track, then maybe you can supply us with a few tips and tricks.
You can test your code in Spidermonkey or Rhino (an older JS interpreter in Java), but you won't really know which browsers it works in until you test your scripts in them!
I agree with the earlier poster, using a browser-independent library like jQuery is probably a good idea.
I have not used Spidermonkey, but I know Rhino has a good debugging GUI, allowing the usual: setting breakpoints, watches, and stepping through code.
Only testing you'll make your JavaScript code browser-independent.
If you have the chance to rewrite it all, you might consider jQuery.
It's essentially browser agnostic. Or at least it requires much less object sniffing than plain javascript.
Yes,I'm using the same environment to develop standalone JS apps (vim + SpiderMonkey). I only would add up, that I've made small in-browser IDE for reading/writing/launching JS scripts on the server-side. Sometimes it's very helpful. Also, I'm looking for using WXJavascript project, which seems to be very promising.

Categories

Resources