|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/javascript-async/
课程评论:没有评论
Coursera 实用课程:JavaScript Promises 与 async/await 课程总结 本课程是一门侧重实践的 JavaScript 异步编程课程,旨在帮助学习者掌握处理异步操作的各种技术,并最终构建一个天气小部件。 **核心内容概览:** 课程围绕以下几个关键主题展开: * **回调函数 (Callback Functions):** 学习回调函数的概念、用途以及立即调用函数表达式 (IIFE)。 * **Promises:** 深入理解 Promise 的工作原理,以及 JavaScript 如何等待异步操作的响应。 * **错误处理 (Error Handling):** 学习如何妥善处理 Promise 可能出现的错误,确保代码的健壮性。 * **Promise 对象与并行请求 (Promise Object and parallel requests):** 学习如何通过并行请求来提高数据获取效率,以及如何等待所有并行请求完成后再继续执行。 * **Promise 链 (Promise Chaining):** 掌握如何将一系列串行和并行的请求组合成一个清晰、易于管理的 Promise 链。 **学习方法:** 课程将同时教授两种重要的异步处理语法: * **Promise 语法:** 例如 `axios.get(...).then(response)...` * **async/await 语法:** 例如 `const response = await axios.get(...);` **实践项目:** 课程的最终目标是运用所学知识,构建一个**天气小部件**。该小部件将能够获取真实的天气数据,并根据用户位置显示一周的天气预报。 **总而言之,本课程为学习者提供了一套完整的 JavaScript 异步编程解决方案,从基础概念到高级应用,并结合实际项目提升实战能力。**
Welcome to my Udemy course on Asynhcronous JavaScript!On this very practical course we will focus on results. How to request data from a serverHow to manipulate these dataWhen to request data in parallelHow to request data which depends on a previous responseHow to handle errors properlyUse the async/await syntaxAnd finally, armed with all these tools, we'll build a weather widget which fetches real data and shows the forecast for the week based on your location.===========The course is divided in five big sections:Callback Functions - We will learn what a callback function is and when it is used. We will also explain the concept of Immediately Invoked Function Expressions.Promises - What is a Promise, how does JavaScript wait for its response...Error Handling - Promises can fail, and for this reason we must know how to catch possible errors and handle them properly.Promise Object and parallel requests - We can speed up our request 40% or more by performing certain requests in parallel. We will wait until we have received both "responses" before continuing with our code.Promise Chaining - Handle a complex chain of parallel and series requests in one single object - for better readability and code practices.All of these major points we will learn both using the Promise syntax ( axios.get(...).then(response)...) and the async/await syntax (const response = await axios.get(...))And finallyWe will build a Weather Widget using all the knowledge from this course.