Il piccolo libro di JavaScript
Il piccolo libro di JavaScript
Info sul libro
Studiare JavaScript non significa solo conoscere variabili, funzioni ed un pò di jQuery. JavaScript è infatti pieno di "cose strane". Lo sviluppatore JavaScript moderno deve padroneggiare queste particolarità del linguaggio ed essere in grado di sfruttarle quando serve.
Il Piccolo Libro di JavaScript è un manuale per le parti più strane e complicate del linguaggio che ti porterà da 0 a 100, alla scoperta di closures, event loop, prototype e molto altro.
Il piccolo libro di JavaScript è organizzato in tre parti. Nella prima parte vedremo il funzionamento dei motori JavaScript, che sono alla base dei moderni browser. La prima parte contiene i capitoli sugli aspetti più complicati del linguaggio come closures, prototype e this. Ogni capitolo è corredato anche da test di autovalutazione, utili per cementare i concetti.
La seconda parte invece è dedicata ad esercizi pratici con JavaScript ed il DOM, e molte pagine sono dedicate al refactoring ed all'organizzazione del codice. La terza e ultima parte contiene le soluzioni alle domande di ogni capitolo oltre a varie ed eventuali aggiunte future.
Il libro contiene anche molti esercizi da cui potrai attingere giorno per giorno per rinforzare le tue skills.
Bundles that include this book
Reader Testimonials

Roberto Mossetto
Project Manager & Jr Developer
Il libro e l'impostazione mi piacciono molto: avere dei riferimenti in italiano è sempre utile e il tuo testo mi sembra il più completo ed aggiornato tra quelli disponibili. Il libro si comporta molto bene anche rispetto a testi internazionali, come "Eloquent Javascript": la lettura è molto scorrevole (anche per un principiante) e nulla viene dato per scontato. Consigliatissimo!

Cristiano Bianchi
JavaScript developer
Ho apprezzato molto il libro di Valentino e non ho trovato qualcosa di simile in lingua italiana. E' scritto in maniera molto chiara, precisa e diretta. Mi è stato particolarmente utile il capitolo relativo ai motori JS. Mentre mi è piaciuta la parte di spiegazione dei prototipi ed è illuminante l'idea dello zaino. Libro super consigliato!

Irene Tomaini
Front-end developer
Ho letto il capitolo free disponibile per il download. Con la metafora dello zaino credo di aver impresso nella memoria cosa è prototype! Bravissimo! Molto buono tutto quello che ho letto!
Maurizio Zannoni
Front-end developer
Il libro è pieno di spunti utili non solo per chi si è avvicinato da poco a Javascript, ma anche per chi mastica la programmazione frontend da più tempo. Dall'esemplificazione di concetti assimilati passivamente alla demistificazione delle "best practices" in voga in questo periodo. I riassunti e le domande alla fine dei capitoli sono utili per scolpire su pietra i concetti principali. Manuale validissimo di cui attenderò con impazienza il seguito.
Indice
-
-
Intro. Qualche parola su questo libro
- Struttura del libro
- A chi è rivolto questo libro?
- Convenzioni tipografiche
- Come seguire gli esempi del libro?
- Errata e altro
- Qualche parola su di me
- Ringraziamenti
-
Intro. Qualche parola su questo libro
-
Parte 1 - Le parti “strane” di JavaScript
-
Capitolo 1. Per iniziare
- Cos’è JavaScript?
- A cosa serve JavaScript?
- Cosa posso costruire con JavaScript?
- Perché dovrei studiare JavaScript?
- Devo studiare anche jQuery?
- ECMAScript, ES5, ES6 e altri termini tecnici
-
Capitolo 2. Prologo: i fondamenti di JavaScript.
- Stringhe, numeri, array e variabili
- Le funzioni in JavaScript
- Metodi o funzioni?
- Uno sguardo veloce a ECMAScript 2015
-
Capitolo 3. Come funzionano i motori JavaScript?
- I motori JavaScript
- Global Memory nei motori JavaScript
- Global Execution Context e Call Stack
- JavaScript asincrono, Callback Queue ed Event Loop
- Callback hell e Promises
- Promises e microtask queue
- La gestione degli errori con le Promises
- Metodi statici e Promise combinators
- Import dinamici e code splitting
- Da Promise ad async/await
- Sommario del capitolo
-
Capitolo 4. Closures, variabili, e affini
- Le closures in JavaScript
- Variabili globali “accidentali” in JavaScript
- Cosa significa hoisting in JavaScript?
- Hoisting in JavaScript: let e const
- Variabili globali e hoisting
- Sommario del capitolo
-
Capitolo 5. Tutto è un oggetto (o quasi)
- JavaScript e l’illusione delle classi
- JavaScript e Object.prototype
- JavaScript e la keyword new
- Qualche parola su toString
- Sommario del capitolo
-
Capitolo 6. This in JavaScript
- JavaScript: alla scoperta di “this”
- Regola numero 1 per il this in JavaScript: default binding
- Regola numero 2 per il this in JavaScript: implicit binding
- Regola numero 3 per il this in JavaScript: explicit binding
- Regola numero 4 per il this in JavaScript: new binding
- Le arrow functions e this
- Sommario del capitolo
-
Capitolo 7. Tipi e conversione in JavaScript.
- Tipi e primitive
- Quando un numero diventa una stringa
- Non sono un numero!
- Uguale uguale oppure uguale uguale uguale?
- Primitive e oggetti
- Sommario del capitolo
-
Capitolo 1. Per iniziare
-
Parte 2 - Lavorare con JavaScript nel browser
-
Capitolo 8. Modellare l’HTML con JavaScript.
- Il Document Object Model e la manipolazione del DOM
- Generare tabelle HTML con JavaScript
- Sommario del capitolo
-
Capitolo 9. Refactoring ed organizzazione del codice
- Refactoring da ES5 ad ES6
- Refactoring da codice procedurale a modulo
- Stili diversi ma risultato uguale: da modulo a prototype
- Da prototype a classi
- Sommario del capitolo
-
Capitolo 10. Lavorare con JavaScript asincrono.
- REST API ed XMLHttpRequest
- Il DOM e gli eventi
- XMLHttpRequest in azione
- Generare liste di elementi HTML con JavaScript
- L’evoluzione di JavaScript asincrono: da XMLHttpRequest a Fetch
- La gestione degli errori con Fetch
- Fetch con Async/Await
- Sommario del capitolo
-
Capitolo 11. JavaScript e i form.
- Alla riscoperta dei form HTML
- I form HTML in azione
- Estrarre dati da un form HTML
- Event listeners e this
- Fetch e richieste POST
- Reset dei form HTML e async/await
- Sommario del capitolo
-
Capitolo 8. Modellare l’HTML con JavaScript.
-
Parte 3 - Appendici
-
Soluzioni alle domande
- Capitolo 3. Come funzionano i motori JavaScript?
- Capitolo 4. Closures, variabili, e affini
- Capitolo 5. JavaScript e i prototipi
- Capitolo 6. this in JavaScript
- Capitolo 7. La conversione dei tipi in JavaScript
- Capitolo 8. Lavorare con JavaScript nel browser
- Capitolo 9. Refactoring ed organizzazione del codice
- Capitolo 10. Lavorare con JavaScript asincrono
- Capitolo 11. JavaScript e i form
- Changelog
-
Soluzioni alle domande
Leanpub è garantito dalla formula soddisfatti o rimborsati. Nessun rischio, garanzia di Felicità al 100%
Entro 60 giorni dall'acquisto è possibile ottenere un rimborso completo del 100% del valore su qualsiasi acquisto Leanpub. Vedi completi.
Do Well. Do Good.
Authors have earned$11,817,855writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets, and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
Stratospheric
Tom Hombergs, Björn Wilmsmann, and Philip RiecksFrom Zero to Production with Spring Boot and AWS. All you need to know to get a Spring Boot application into production with AWS. No previous AWS knowledge required.
Go to stratospheric.dev for a tour of the contents.
C++20 - The Complete Guide
Nicolai M. JosuttisAll new language and library features of C++20 (for those who know previous C++ versions).
The book presents all new language and library features of C++20. Learn how this impacts day-to-day programming, to benefit in practice, to combine new features, and to avoid all new traps.
Buy early, pay less, free updates.
Other books:
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
node-opcua by example
Etienne RossignonGet the best out of node-opcua through a set of documented examples by the author himself that will allow you to create stunning OPCUA Servers or Clients.
Advanced Web Application Architecture
Matthias NobackThe missing manual for making your web applications future-proof
Jetpack Compose internals
Jorge CastilloJetpack Compose is the future of Android UI. Master how it works internally and become a more efficient developer with it. You'll also find it valuable if you are not an Android dev. This book provides all the details to understand how the Compose compiler & runtime work, and how to create a client library using them.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
Thinking with Types
Sandy MaguireThis book aims to be the comprehensive manual for type-level programming. It's about getting you from here to there---from a competent Haskell programmer to one who convinces the compiler to do their work for them.
Maîtriser Apache JMeter
Philippe Mouawad, Bruno Demion (Milamber), and Antonio Gomes RodriguesToute la puissance d'Apache JMeter expliquée par ses commiteurs et utilisateurs experts. De l'intégration continue en passant par le Cloud, vous découvrirez comment intégrer JMeter à vos processus "Agile" et Devops.
If you're looking for the newer english version of this book, go to Master JMeter : From load testing to DevOps
Top Bundles
- #1
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
Software Architecture
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #4
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible... - #5
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #10
Cloud Architect: Transform Technology and Organization
2 Books
Architects don't just recite product names and features. They understand the options, decisions, and trade-offs behind them. They earn credibility and maintain authenticity by connecting the penthouse with the engine room. Get two essential books that redefine the role of the software and IT architect at one low price:37 Things One Architect...