Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm diving into web development again (first time was an utter failure), and I have some pretty spectacular resources for learning both HTML5 and CSS3. What I want to begin studying next is JavaScript so I can have absolute control over my pages. But before I begin integrating JavaScript into my work, I'd like to use JavaScript solely as a programming language (with console I/O and basic programs) to familiarize myself first. What are the best tools for accomplishing this? Because thus far, I haven't found any browser/tool that approaches the simplicity of writing a source file, and clicking run like you might with a C++ program. Thanks.
Node.js is your best shot.
Node is used for:
Server-side applications (Sails, Express, Socket.io)
Various frontend-related scripting (Grunt, LESS)
You can try Node.js, that allows you to run Javascript programs from commandline. Other than that, Javascript runs in a browser.
I think JetBrains makes the best IDEs in the world. Their support of JavaScript, HTML5, and CSS3 is first-rate. I'd recommend looking at WebStorm as your IDE.
I would recommend jsfiddle.net which allows you to type and run code. I might also suggest codecademy.com which has a very good program to teach you javascript and many other languages as well. There is also a really simple part of there website called "codebits" where you can compile js, html, and css and play around. W3schools.com is also very helpful for reference.
If you are running windows, the Windows Scripting Host (WSH) can run both Visual Basic Scripting and JavaScript... with the JavaScript having full access to things.
Because Microsoft supprorted VB Script over JScript (their version of EMCAScript), it is difficult to find documentation, though it does exist. I have a fair number of admin tools written in JScript.
Because that's not how Javascript works. You can't read user input from console.
You can use any browser's development tools and write Javascript code line by line.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am ColdFusion developer working in ColdFusion since last 2 years. Recently before few weeks i have started learning cfclient API of ColdFusion Splendor as I am always interested in Mobile application development. But today after reading comments on the blog
http://blogs.coldfusion.com/post.cfm/coldfusion-mobile-features-are-not-just-about-cfclient-but-it-is-necessary#comment-08603915-B031-CC32-1C2DE6521C233F65
I am in big dilemma, Is it worth of spending time for learning cfclient. Some of conclusions that I found after reading the comments on the blog are.
Adobe never have a good track record on generating JS. They generate very ugly looking js.
cfform and cfgrid were introduced with some client side functionality.But now a days no one loves to use it because they have not been updated since long and we can get more flexibility using custom js library.The same may happen to cfclient.
It's a crappy decision from Adobe to focus on mobile application development instead of making the server side language more robust and fixing old bugs.
cfclient inspires the developers not to learn JavaScript.
Adobe is trying to solve a problem that does not exist.
I think you've answered your own question here, to be honest: don't waste your time.
Basically <cfclient> is, by Adobe's own admission, just a hook into the language to tell how the compiler should treat the code: translating it into JavaScript instead of compiling it to bytecode like with normal CFML. And it's a really crap way of achieving that.
The other reason is that they couldn't work out how to implement the hooks into ColdFusion Builder to make all its mobile-dev workflow work.
Another problem is that the Adobe guys are just... not any good at writing anything other than Java. This has been borne out by every single foray into anything other than Java that they write (this includes CFML, incidentally: they can't even write that).
So do you really want journeymen developers who aren't comfortable in the language writing wizards to write your JS for you? No.
Do yourself a favour, and just learn to do it properly. <cfclient> is just an example of Adobe having not learned their lessons over the years after all the <cfform>, AJAX-enabled layout widgets like <cfpod>, and Flash forms. They have never had the skillset to do this work properly, so don't put yourself at their mercy.
Oh, and I'm also voting to close the question as it's not one that can be answered objectively.
This is my take on it
Even if it were good approach today, it is not future proof. New browsers will come, new javascript features will come. I fear that this won't move ahead.
I could not agree more
And some of the existing bugs really need to be addressed.
<cfclient> asserts that client side development should be in cfml. IMHO, Coffeescript covers some of those concerns.
There is a demand for Mobile friendly websites. If I had to pick ONE thing to move ColdFusion forward in this arena it would be: Can we get the JSON functions to work right
There are many ways that Adobe could have moved forward on the mobile application front. If they promoted various community based solutions that would be useful. I know Bootstrap + FW/1 + ColdFusion. But I don't know PhoneGap/Cordova + ColdFusion. I would be good to see those work together.
True, But if you're using CFClient, you're not wanting to write JS anyway, so what do you care what it looks like on the client.
I believe Adobe has promised that we would be able to update the core underpinnings of CFClient (probably PhoneGap/Cordova) and other JS libraries.
Agreed.
I don't know about inspires.
I disagree here. I'd love for a way to quickly deploy to mobile.
PS> I'm sure since this question isn't code related, it will get downvoted / deleted; Might be a better topic for the CF-Talk mailing list or some ColdFusion forum somewhere.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have read this article (Uses of Javascript), while it is right I know there are other uses of javascript, modern javascript nowadays. I haven't read about node.js and how this one works but I have heard that this one makes js do server-side stuffs?
The question is, what are other uses of javascript, can this replace php and ruby? I know this might not be a good idea for enterprise applications but will work well with medium-size applications, am I right?
What are the other uses of javascript other than the one given in the article?
Javascript can very well be used server side. If you're on an IIS server, you can for example use JScript, nodejs, v8cgi (currently known as TeaJS), or a combination of these. On *nix servers nodejs is a popular framework. Nodejs can even be used to program your own webserver (e.g. using the expressjs framework).
Dive in the given links and see what's possible.
There is TESSEL and Espruino javascript inside microcontroller.
I use Node.js for web application for few years, few projects and really happy so far.
The Express.js + MongoDB makes a perfect match (exactly as PHP + MySQL, 5 years ago). You can find reference on MEAN stack.
It works good no only for small applications. We have medium-size app that could be easily scaled up.
Node.js is not to about substitute PHP or Ruby, but what's happening now is indeed, it's more and more used for web applications nowaday. The reason is simple, Node.js has "web-oriented" core, meaning it's originally created to aim highly productive tcp/http applications. With some progress beautiful web development frameworks appeared on top of Node.js that makes web application development even more easy and fun.
For me, programming Node.js on server makes a lot of sense, since JavaScript is main client-side language (almost without alternatives), so context-switching between client/server programming is less. With practice you get use to some initial JavaScript weirdness and things goes smooth and nice.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm working on a browser based game atm and already looking into options porting it to other platforms such as consoles or devices where playing in a web browser may not be suitable.
The game is pretty much all JavaScript with rendering done via a 2d canvas context.
What i was hoping for is that there is already a c++ library/api that will work in conjunction with maybe google's v8 engine to handle the canvas calls in JavaScript and render them with opengl or something similar
Does anyone know of a project out there that may be providing this functionality?
Otherwise how would you suppose I go about embedding my javascript in c++ with as little changes required to the javascript as possible as I don't really want to have to maintain too many differences between platforms?
Qt is a very nice C++ library compatible with LGPL licensing that among other things includes a webkit based widget with javascript support. Also as scripting language Qt uses javascript with a tight integration with C++ (it's easy to write a C++ class and and make it visible at the javascript level).
Qt is multi platform and comes with an highly sophisticated IDE.
Qt is not currently using V8 but the porting is in progress and they aim at providing a 100% backward compatible solution.
The only "problems" of Qt are IMO that:
It's huge
It's a framework, not a library. You cannot just "use" Qt easily, you should embrace the view (the documentation is however of excellent quality).
The long term prospects are a bit fuzzy (not as bad as a few months ago, tho)
I guess I'm a bit late here, but I'm searching for a similar solution. I found node-canvas and I do not know if it is feasible to hook that so it renders into something like an SDL or SFML-managed window or not.
But for my own purposes, I will port my code over to C++ and use Cairo directly with SFML and OpenGL.
Interesting idea - another possibility is using Adobe Air, and rendering the game via StageWebView and Flex 4. Here's some example code for using the thing if you're interested:
https://github.com/JustinBeckwith/frink/blob/master/frink-flex/src/controls/WebBrowser.as
An interesting Project that I have uses id FireBreath(firebreath.org). This is not exactly what you are looking for, but in some ways it would get you close. Firebreath allows the creation of browser plugins in C++. One of the features of Firebreath is it allows you to access and modify the DOM from the C++ in you browser plugin as well as create methods and properties in C++ that can be accessed from JavaScript on your page.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am proficient in C++, I dont know Java Script and want to learn JS, What should be the way/process for me? I know basic html, CSS.
Check out the one and only JavaScript Guide from MDC:
https://developer.mozilla.org/en/docs/Web/JavaScript/Guide
Besides that, forget everything you know about C++ it won't help you in any way. JavaScript is a completely different beast on its own.
It will take a lot of type to learn all the quirks of the language and the Browsers it runs in, if you want to do server side JavaScript check out Node.js, but be advised, learn a lot about JS before doing that.
An answer that takes things in a different angle: Have you heard of Emscripten?
Emscripten is basically a C/C++ to Javascript converter. It allows you to write code in C/C++, compile it, and then convert your compiled bitcode to Javascript.
Clearly, this isn't aimed at teaching a C++ programmer to write Javascript, so it isn't a direct answer to this question. But it does allow him to create Javascript code, in a round-about sort of way.
Of course, he could always try using it a learning tool, by writing some C++ code and studying the converted Javascript. It might be helpful in simple cases, although I suspect it wouldn't be ideal code to learn from.
Check out http://codeavengers.com to learn JavaScript, it's the best and easiest way.
Good browser + a debugger plugin (both firefox and opera will suffice). Plus for the start its good to start on top of some good JS library: jQuery or Mootols (my favourites).
The hardest issue for me were the differences in the implementation. C++ compilers tend to break the standard, or implement just some parts of it, but the differences between javascript implementations are just insane.
If you are OK with C++, you will be able to code pretty easily, the syntax is similar, but everything is a lot simpler and dynamic.
There is no relation between c++ and javascript anyway, so being proficient in C++ does not help you learn javascript, altough it gives you heads up in getting accustomed to the writing code in javascript easily.
you can start here - http://homepage.ntlworld.com/kayseycarvey/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Many languages have standard repositories where people donate useful libraries that they want others to have access to. For instance Perl has CPAN, PHP has PEAR, Ruby has RubyGems, and so on. What is the best option for JavaScript?
I ask because a few months ago I ported Statistics::Distributions from Perl to JavaScript. (When I say ported I mean, "Ran text substitutions, fixed a few things by hand." I did not rewrite it.) Since I've used this module a number of times in Perl, I figure that statistics-distributions.js is likely to be useful to someone. So I've put it under the same open source license as the original (your choice of the GPL or the Artistic License). But I have no idea where to put it so that people who might want it are likely to find it.
It doesn't fit into any sort of framework. It is just a standalone library that gives you the ability to calculate a number of useful statistics distributions to 5 digits of accuracy. In JavaScript.
JSAN (JavaScript Archive Network) sounds like the kind of thing you're looking for, but I've never personally used anything from it apart from Test.Builder.
As long as your JavaScript can be dropped in to people's projects without polluting the global namespace or doing things which are liable to cause breakage in other people's code (adding to Object.prototype, for example) I would just stick it somewhere like Google Code as already suggested.
There is no centralized repository for JavaScript. JS Libraries usually have their own plugin-repositories, but for stand-alone scripts, The best way to promote it is to send it to famous website such as ajaxian or mashable
AFAIK, there is no central JavaScript repository, but you might have success promoting it on Snipplr or as a project on Google Code.
You could start a project on SourceForge to contain useful snippets of code like this (or google for snippets to find one).
Perl, Ruby, PHP, etc all have distribution mechanisms built into the language to consume such libraries.
There's not such a thing built into JS.
There are tons of script archives out there - but no "central" JS repo.
Consider packaging it up as a plugin for one of the major Javascript libraries such as jQuery - see http://docs.jquery.com/Plugins/Authoring for more details. This way it can be included on their plugin page which will get it good exposure as they have a huge developer base and it'll be one of their first ports of call when a need arises for such functionality.
Whilst jQuery is one of the most popular frameworks (if not the most) out there, there are a host if other libraries you could consider using in addition to/instead of it.