Modern JavaScript Tutorial
github.com
github.com
I glanced through the section and I don't know how much it's going to help.
What helped me was to stop thinking that JS had inheritance at all. Inheritance implies some sort of copying and combining of object behavior. In a language with classical inheritance, a child class has all the methods of a parent class. A instance object of a class has all its methods plus all of its parent's methods directly on it.
JS doesn't do that. When you create an object that has a parent, you're creating two objects (the parent and the new child). When you call a method on the child that comes from the parent, the child doesn't hold that method, the parent does, so it delegates to the parent.
So, I think when people ask you in an interview whether JS has classical inheritance or prototypal inheritance, you should say neither--it has behavior delegation.
Please let me know if that makes sense.
Agreed that delegation is more clear though.
https://github.com/getify/You-Dont-Know-JS/blob/master/this%...
I started a JS project lately, I tried to write it as modernly as possible (using as many ES6 features[1] as I could), and yet I stumbled on difficulties that I blame to the lack of type system and polymorphism.
I'm considering writing my project in a typed language that compiles to JS, such as Scala or Haskell. But I would have to learn that language basically from the start.
Is it a good idea and if so which language would you recommend?
If you still want to try a language that compiles to JavaScript, I'd suggest taking a look at elm too. It has good documentation. It might lack some features from Haskell but in my opinion it is still a fun interesting language to learn.
What are they exactly?
I was completely disillusioned with with JS. Thinking that types were the solution I tried TypeScript and found that I wanted it to be something it was never meant to be and just went back to JS. So far I've successfully used OCaml+BuckleScript with Mithril for a few personal projects and it's been really fun. I felt able to predict my productivity after only about 20 hours of use. If you do have any JS libraries that you can't write BuckleScript bindings for, or you can't figure out how to write bindings for them, you can always write a small JS shim that you can easily write bindings for.
OCaml isn't as dogmatic about purity as Haskell and unlike Haskell you're not encouraged to write type signatures for most functions. There's also far less of OCaml to learn than Haskell or Scala. All round it's a really good general purpose language.
There are two incompatible attempts at better standard libraries (core and batteries) and each encourage you to write OCaml in a style that does not have the feel of OCaml. The OCaml standard library itself is a collection of datatypes and depending on what you're doing may well be good enough.
There's also Reason [1], an alternative syntax for OCaml. Reason is undergoing heavy development at the moment and it appears that syntax changes are coming.
[0]: https://github.com/google/closure-compiler/wiki/Types-in-the...
Neither are intended to be general purpose languages though.
Expressjs official guide (there are more guides after routing)
https://github.com/sahat/hackathon-starter/blob/master/READM...
git clone this and add a feature or convert it into a small prototype of an app. If you're out of ideas, switch out mongodb for postgre. Does the tests still work? If you can add something interesting, send a PR. Read the entire readme.
https://blog.feathersjs.com/a-real-time-chat-frontend-with-p...
Make a chat room with feathersjs.
https://stackoverflow.com/questions/2353818/how-do-i-get-sta...
More resources