As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I really like using CoffeeScript (1.1.1) for small projects and it worked out great so far. However before using it in a more broad environment I would like to hear second opinions on using it in production.
So my questions are:
How stable is the language itself?
Do I need to watch for upcoming changes which will break my code?
If the answer is yes to the question above: how well are older versions supported?
Is there a stable (bug-fix only) and a separate development branch?
If you already did use CoffeeScript in your product/website/etc please describe the scope in which it was used and your overall experience.
Thanks!
Note: I've already heard that "CoffeeScript support will be included in Ruby on Rails version 3.1." (Wikipedia) which is great because of the additional backing from the Rails community.
The language has been stable for the last six months (1.1.1 is basically just 1.0 with bugfixes). That's no guarantee of future stability, but I don't expect my book to be totally obsolete any time soon.
I'd say the best practices for avoiding version issues are
Make sure you document the version of CoffeeScript that your project was written for, and
Compile to JS under that version and keep the JS stored somewhere
Have good test coverage (in the words of Samuel Adams: Always a good decision!)
That way, when a new version of CoffeeScript is released, you have a JS backup to use in case your CoffeeScript code is broken. Breaking changes are a pain, but they're a pain common to nearly all languages except JavaScript—just ask a Rubyist who recently made the transition from 1.8 to 1.9, or a Pythonista who's still migrating their Python 2 code to Python 3.
The advice I can give for preventing your code from breaking under CoffeeScript version changes is to avoid syntactic edge cases. For example, func a:b, c used to mean func {a:b, c:c}, and now it means func {a:b}, c. That's an improvement (the old behavior was considered a bug), but some folks were caught off-guard by it. So use explicit punctuation whenever there's a hint of ambiguity; it makes for more readable code anyway.
Jeremy will have to comment on the stable/master distinction, since both branches exist but stable hasn't been updated since April (pre-1.1.0).
Check this: Has anyone used Coffeescript for a production application?
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
The reason for using an IDE is the comprehensive facilities it provides.
Therefore, I assume there is a Javascript editor for Eclipse that provides basic outliner-based IDE facilities such as:
Outliner with Object Literal support (which apparently is rare)
Intelligent Code Completion using Outliner data
Intelligent Code Highlighting using Outliner data, not just similar words
Inter-file scoping (#include "otherfile.js")
However, for Javascript, these features seem scattered across multiple editors:
Amateras Javascript Editor
+ Inter-file scoping (uses external files automatically from certain code constructs)
- No code highlighting
- No object literal outlining
Javascript Editor (Eclipse WDT JSDT)
+ Intelligent code highlighting for reads and writes
- No inter-file scoping
- No object literal outlining
Javascript Source Editor (Aptana plugin)
+ Object Literal is outlined fully
- Fake (similar word) code highlighting
- No inter-file scoping
Spket Javascript Editor
~ Object Literal is outlined partially
- Fake (similar word different vars) code highlighting
- No inter-file scoping
VJET Ebay Open Source Javascript Editor
- I can't get it to work, but it's supposed to be one of the better projects.
Javascript is a very popular language, and more and more frameworks such as ExtJS rely solely on JSON-like Object Notation.
Are there any Javascript editors for Eclipse that provide full Outliner-support? How else do these developers (e.g. for ExtJS) facilitate their Javascript development for modern frameworks?
Although lacking specifics, this is a good and popular question in general that is yet to be answered to satisfaction:
Javascript Editor '08
Javascript Editor '10
Note that devs depend on an IDE by preference and dependence on other Eclipse plugins such as the Chome Developer Tools and the V8 Debugger. Therefore, the scope of this question is Eclipse plugins only.
If you want the best JavaScript editor (not free) then go with PhpStrom from JetBrains
You can use one month trial and this will fulfill all your requirements.
If you want to go with open source then I would recommend you to go with Aptana.
Hope this solve your problem :)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Recently, I discovered that Internet Explorer flat-out doesn't support certain selectors in jQuery (see Why can't Internet Explorer run this simple jQuery?). My question is: how can I know that my code will actually work while I'm writing it? Since I'm on Linux, my options are really just Chrome and Firefox. Is there a tool which emulates the functionality of major browsers for testing compatibility for a given site? My entire script mentioned in the above post failed for a few reasons but largely because the selector didn't get anything.
I initially thought that jQuery was cross-browser compliant, but it seems that selectors vary from browser to browser. Is there a way of testing for this?
Being a Linux user doesn't mean that you cannot use Internet Explorer. Create and start a Virtual Machine, such as VirtualBox, and simulate Windows + Internet Explorer.
The indexOf function has nothing to do with jQuery. It's an array function. The selectors work just fine, it's just that the code you're using to process the results is not cross-browser compatible.
Yea, cross-browser testing is simply a PITA. There's no real good way around it. As was mentioned, setting up virtual machines with various OS configurations is a good approach. However, there are several "cloud" services online that allow you to "rent" boxes you can TS into and debug. One such example I found with a quick Google search was: http://www.cloudtesting.com/
Though jQuery is a cross-platform library, it doesn't mean there doesn't exist bugs on certain browsers or certain versions of different browsers. jQuery is an open-source project, and if you find bugs in their platform you're welcome to fix them or at least report them so that they can be addressed.
For specific IE bugs, there are usually some work-arounds. For example, if Array doesn't support indexOf, you can always implement it yourself by modifying the Array.prototype
Good luck!
You can use browsershots to get a screenshot in a LOT of browers.
Sometimes you have to wait a long time before you get the screenshot, and the code has to accessible to any computer. But it's not like you are publishing it to everyone.
I know that sometimes, a screenshot wont cut it. But it is better than nothing.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What kind of a tool would you recommend for JavaScript compression and/or obfuscation? A google search comes back with a lot of online tools, but I am not sure how to gauge their effectiveness/usefulness.
Is there a tool that you would recommend for this?
Thanks,
There are many tools that transform Javascript in something different. I currently classify these tools in the following objectives:
Minify: make the code smaller by removing comments, renaming variables...
Compress: Compress using non destructive compression of javascript
Optimize: Make the code run faster (ex: Closure)
Obfuscate: Protect the code
My order has some meaning behind it. Because generally the higher level includes all be features below.
So a good Javascript Obfuscator is able to minify, compress, optimize...
Many tools do some of these levels well individually. They can be combined making them more effective but my experience has shown that combining several such tools make it a nightmare to try and pin point a problem.
My suggestion for a good overall Javascript obfuscator would be to use jscrambler.com
For optimization and minification google closure (has sugested by aepheus) is a excellent solution.
Closure Complier: http://code.google.com/closure/compiler/
YUI Compressor: http://developer.yahoo.com/yui/compressor/
Come to mind. You'll want to take them for a spin with your own code, as a lot of factors come into play with minifying. Basically, see which one makes the smallest file (and verify that your code works as it should).
UglifyJS: https://github.com/mishoo/UglifyJS
The page contains a comparison with other minifiers if you scroll down a bit. One of the most notable parts is this:
UglifyJS is the fastest to run. On my laptop UglifyJS takes 1.35s for
DynarchLIB, while YUI takes 2.7s and GCL takes 6.5s.
It written in JavaScript, so no need for separate runtimes etc. It plays nicely with both node.js and npm.
you can also try http://openwaf-js-mini.appspot.com ,slightly better than YUI Compressor
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is a decent IDE for developing JavaScript, I'll be writing both client side stuff and writing for Rhino. Ideally It needs to run on Mac OSX, although something that runs on Windows too would be nice.
ADDITIONAL:
Having had a play with both js2 and Aptana, I think I'll be continuing to use Aptana. Mainly because I find emacs a bit hard to get my head round, although I did think that the error hi-lighting in js2 was better than that in Aptana.
I'm still looking for a way to visually debug my js code that is running atop Rhino...
Aptana IDE, absolutely. Stable, great syntax support for all the major javascript libraries, very good css and html editors. Also good support for php, air, ruby on rails and iPhone app development (I never tested this one).
Aptana can also connect to remote site via ftp (sftp in the pro edition) and to svn and cvs repositories.
It's based on Eclipse, so it's not exactly a lightweight application. But it's really, really good. You can also use it as an Eclipse plugin if you develop java wab app, but when I tested it in this version, about 1 year ago, it was not stable. Much better to use the standalone version.
If you're familiar with Emacs Steve Yegge's js2-mode could be worth a look.
Aptana Studio, both standalone and Eclipse plugin versions were quite ok last time I used them.
I have found the Spket Eclipse plugin very useful.
Take a look at WebStorm HTML/JavaScript Editor. It's lightweight and runs on MacOS. It supports debugging and running your code right from IDE and has very smart autocompletion capabilities for JavaScript both DOM-based and browser-based.
Komodo Edit/IDE is definitely the best IDE/editor (that I have used) for developing JavaScript.
Notable features include live error reporting, JavaScript macros and syntax auto-complete for ALL major frameworks!
If you have a very big application written in Javascript, there's only IntelliJ Idea. It parses multiple Javascript files and highlights not only syntax errors but undeclared variables and functions, allows to jump from function call to function definition, and more.
I've tried Emacs (because that's my favorite editor) and Komodo, and they don't come close. I guess it's the same for Eclipse.
Personally, I think that superior parsing and navigation abilties of Idea are only required when you're working with crappy undocumented code, otherwise I'd happily write the code in Emacs using js2-mode, but I'm working with huge poorly documented and buggy framework and it really helps to be able to jump to the source of the function or superclass to check how they work.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Are there any good recommendations anyone can provide for a good Javascript editor on Windows?
I currently use combinations of FireBug and TextPad but would hate to miss out on the party if there are better options out there.
Thanks.
I know jsight already mentioned this, but Aptana Studio really is a great, free editor for JavaScript if you find yourself doing a lot of work with it - it has great support for most of the well-known libraries. If it were not for the fact that I work with C# in addition to JavaScript, I would use Aptana for all of my work.
I use NotePad++ and am happy (of course, that is when I am not using Visual Studio).
NotePad++ contains support for intellisense type feature as well.
(This is a cross-answer post)
Netbeans
I've tried out all of the above and my vote goes for Netbeans, which has been mentioned. However the answer didn't really sell you on the features which you can find here.
It has:
Intellisense including jQuery built in
Extended (Eclipse-style) documentation for functions
Function and field outlining
Code folding
Refactoring
It makes Visual Studio 2010's Javascript support look very primitive.
The Zeus editor has support for Java Script.
It has the stock standard set of features like code folding and syntax highlighting features etc, but more importantly Zeus is fully scriptable and Zeus scripts can be written in Java Script.
In case you're a .Net programmer: VS 2008 has pretty great JS support including intellisense on dynamically added methods/properties and comfortable debugging.
The best that I've ever used is Netbeans, although its kind of heavyweight for some tasks due to being a fullblown multi-language IDE (not just Javascript). I've also had pretty good experiences with Aptana IDE, though, and I hear that IntelliJ is good if you don't mind paying the price.
WebStorm. If you have used any Jetbrains products you'll love it. It has Autocomplete and all the other javascript goodies. Even node.js support is provided. Check it out
If you are using eclipse, then I would recomend JSEclipse
I'm still a huge fan of HomeSite, even though Adobe discontinued development in May 2009: http://www.adobe.com/products/homesite/.
Both NetBeans and Eclipse have JavaScript editing support. The latest version of NetBeans actually does a really good job. They are both free and you can use them for other languages as well, this way you have a chance to get to know the IDE and the shortcuts as well.
Komodo Ide or Komodo Edit of course.
Editra may be worth a look, the code colouring isn't bad, and I believe it has plugins to enable script execution.. Although I have not used this myself.
GVim is still awesome - not only for JavaScript for for almost all languages.