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.
I want to learn Node.js. I'm sure, I will need good experience in Javascript (OOP). Is there any other technology i should know about to learn it? And also how long will it take me to starting implementing node.js taking into account i have decent experience in Javascript?
Thank You
http://www.crockford.com/javascript/inheritance.html
JavaScript is a class-free, object-oriented language, and as such, it
uses prototypal inheritance instead of classical inheritance. This can
be puzzling to programmers trained in conventional object-oriented
languages like C++ and Java. JavaScript's prototypal inheritance has
more expressive power than classical inheritance, as we will see
presently.
Javascript and Java are two different beasts.
I have been writing JavaScript for 8 years now, and I have never once
found need to use an uber function. The super idea is fairly important
in the classical pattern, but it appears to be unnecessary in the
prototypal and functional patterns. I now see my early attempts to
support the classical model in JavaScript as a mistake.
Some things I think you should look into.
Testing your code thoroughly with framework like for example mocha is very important.
learn npm to publish your own modules and to search for other modules.
A database like for example mysql, mongodb or redis and how to use them in node.js. I pesonally really like redis client library for it's insane speed.
Git(hub) to put your code into a repository(SCM).
Except from all kind of JavaScript programming experiences (OOP is not required) and depending from your former programming skills it also helpful to have a basic knowledge of:
the Posix API (what are file descriptors? what are pipes?)
what is HTTP? How does HTTP work?
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 9 years ago.
Javascript seems to become popular as an implementation language for other programming languages.
The article
Lightweight compilation of (C)LP to JavaScript. ICLP 2012
drew my attention on this.
There are a lot of proof-of-concept prototypes for Prolog systems written in Javascript around on the Web.
What are current, actively maintained, preferably ISO conforming Prolog systems written in Javascript?
The only Prolog in JavaScript I know is YieldProlog, but I haven't tried it extensively, just the code available in QueryEditor.
I was hoping than using the yield construct it was lightweight (I used extensively such construct in C#, and I found it - paired to lambda - rather powerful).
But when I inspected (summarily) the source, I found it really complex, despite the assumptions.
edit
I've found recently these contributions, that seem really interesting:
proscript and proscript2.
edit
a new implementation available:
Tau Prolog, brought to my attention from Jan on SWI mailing list
edit
Something new, hhprolog, a pure Prolog engine, based on code and documentation provided by Paul Tarau, ported by me to Javascript. So, available in both browsers and NodeJS.
The project is still preliminary, mostly needed is to bootstrap to interpreter: right now (pre)compiling Prolog to the (novel) virtual machine must be accomplished with SWI-Prolog installed, properly configured (JPL needed).
To implement such bootstrapping, I would probably need to implement negation, to reuse Paul' interface, or - better - attempt to implement something staying in the pure paradigm. In particular, only unbounded integer arithmetic (again by Paul Tarau, there is some Python code available - I will try lazily to port to Javascript).
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.
I know programming in general but always been doing either Delphi, VB 6 or C#.net! Now I must do web-dev and must do it fast! I haven't written a hello world in JavaScript yet and must learn jQuery because there are some charts that I must show in my web-app and looks like I must know JavaScript and jQuery to do that.
So I am looking for a jQuery resource that during its course or maybe at the first chapter gives us also a jump start on minimum JavaScript knowledge too. Some book or resource that I can hopefully sit and read through it in one day like 12 hours and after then learn enough to be able to use it and embed those darn charts and graphs into my web-app.
What do you suggest ?
The basics of Javascript as a language are actually fairly straightforward, particularly if you've got a background in several other languages as you have. You'll find it immediately familiar with curly braces and other syntax that you'll recognise from elsewhere.
If you've worked with C#, you will hopefully have been exposed to lambda functions or closures. These are very important in Javascript, where they are key for the event-driven code that drives most websites, and in particular if you're using a library like jQuery, where they are used for virtually everything. You need to get a strong handle on how these functions work if you're going to make head or tail of jQuery.
The other thing to be aware of is that Javascript's object handling works a bit differently to the other languages you's used to. There are similarities, but if you try to write your classes and objects in the way you're used to, you will get some unexpected results. See What type of language is JavaScript for more info on this.
Beyond that, I don't think you'll have a problem with the syntax.
The other thing to worry about is the DOM -- ie the browser's API which is accessed via Javascript. The DOM is not technically part of the Javascript language, but it is inextricably linked to it, and is as much part of the learning challenge as the language itself. jQuery abstracts a fair amount of the DOM away from you, but it still helps to know it.
Hope that helps get you started.
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.
I was wondering if it is possible to use the WebSharper compiler to write Node.js applications in F#. Are there any resources available that could show me how to do this? Are there any good reasons not to try to do this?
[I would post this as a comment, but it got a bit too long...]
Here is another good reason not to do it - F# agents and asynchronous workflows provide a concurrent programming model that is in many aspects much better than what Node.js provides. For example:
it gives you both concurrency and also true parallelism so you can write code that does not block the system when it needs to do some work using the CPU
asynchronous workflows provide easy way to handle exceptions and handle resources
(you can use try .. with in asynchronous (or event-based) code)
the agent-based programming model gives you a great way to store state
If you can use F# to write your server-side application, then you can as well us the powerful abstractions it providers. See Server-Side Functional Programming for a brief introduction. I also did a talk F# on the server-side which has been recorded and discusses the same topic.
This is not necessarily a reason why not to try this. Trying this might be fun and if you like F# language, but want to use in Node.js environment, then it would be very useful to have this.
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 9 years ago.
I'm a programming "enthusiast", not a pro, and I'm looking for an easy graphical programming environment (for desktop, on the Mac and iOS) similar to RealBasic or RunRev Livecode.
However, because my available time is limited, I'd rather spend it into something that uses a more ubiquitous language like Javascript/Html5 (so I can transfer this knowledge into other areas like web programming) rather than an idiosyncratic language like the one used by Livecode or RealBasic (which cannot be used outside of that specific programming environment).
I've looked into Appcelerator Titanium (which uses Javascript/HTML/CSS), but it doesn't seem to have an easy GUI development interface.
Any suggestions ?
Thanks.
Wakanda is likely the closest I've seen as well.
My experience on a Mac is that it isn't terribly stable. Not sure if that is just my env or if it's because it's still relatively new. I like, and am very impressed with what they are doing, but just not sure I can trust it yet for production level stuff.
Realsoftware has an awful lot of perks. I'm still exploring it but looks like it maybe what I'll use. It would be an easy decision if it was JS/HTML5! It's all compiled and server side tho - as I understand it.
EDIT:
Have a good look at Wakanda's NoSQL data capabilities. They are nothing short of amazing and very well thought out. Four types, storage, calculated, relational and alias. There's a good overview YouTube vid at https://vimeo.com/31837379
Have a look to the new Javascript Stack : Wakanda
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.
I come from a C/Unix background, with a lot of experience in shell scripting, and some on Perl, elisp, etc. too. But now I'm getting into some work where I'll need to be developing interactive web-based interfaces, and I need to learn JavaScript. My problem is that all the resources I've found online for learning JavaScript seem to be targeted at an audience who's never programmed, and their authors don't seem much better. As soon as I see "validating user input to take the load off your server" as one of the great uses for JS, I want to scream and I feel like I can't trust anything else the author says. ;-)
Can anyone recommend good resources for an experienced programmer wanting to learn JS as a new language? Ideally I'd like to get started online, but dead tree recommendations would be welcome too, especially if I can preview them online.
A great JavaScript book for experienced programmers is Doug Crockford's JavaScript: The Good Parts. It's short, assumes you know what you're doing, is opinionated, and is not a tutorial.
My advice: Forget what you know about object oriented programming. Attempts to apply the inheritance paradigms from an OO language have repeatedly overcomplicated many, many chunks of JS code.
Prototyping is not Class construction. Object instantiation is not Class instantiation. "Classes" are not real.
There are ways to get what you want. You can even have something akin to privates - but they are not methods or members. They are merely locally scoped. Inheritance is often faked, but with mixed results, and universally at the expense of data hiding.
Javascript is prototyped. It is not object oriented. Keep that in mind every time you think something like, "Man, an interface here would be awesome..."
https://stackoverflow.com/questions/3655530/best-javascript-book-for-an-experienced-coder/3655693#3655693
https://stackoverflow.com/questions/1594159/best-book-to-learn-web-development-for-a-professional-developer
https://stackoverflow.com/questions/74884/good-javascript-books
but I will recommend these two fantastic books, which teach me a lot.
Take a look at Eloquent JavaScript. It doesn't cover everything, but it will move you towards idiomatic JavaScript programming -- things like functional programming, closures and prototypes. (The online version comes complete with a sandbox tutorial environment.) The rest, after all, is just knowing how to use references.
Javascript Guide from Mozilla Developer Network, a simple and yet informative guide, gives beginners a big picture of JS in a short time.
https://developer.mozilla.org/en/JavaScript/Guide
JavaScript: the definitive guide is one of my favorite programming books:
http://oreilly.com/catalog/9780596101992