Recently, promises were added to ECMAScript 6, the javascript standard, in order to provide better support for the asynchrony that arises in user interfaces, network communication, and non-blocking I/O. Using promises...
详细信息
Recently, promises were added to ECMAScript 6, the javascript standard, in order to provide better support for the asynchrony that arises in user interfaces, network communication, and non-blocking I/O. Using promises, programmers can avoid common pitfalls of event-driven programming such as event races and the deeply nested counterintuitive control flow referred to as "callback hell". Unfortunately, promises have complex semantics and the intricate control- and data-flow present in promise-based code hinders program comprehension and can easily lead to bugs. The promise graph was proposed as a graphical aid for understanding and debugging promise-based code. However, it did not cover all promise-related features in ECMAScript 6, and did not present or evaluate any technique for constructing the promise graphs. In this paper, we extend the notion of promise graphs to include all promise-related features in ECMAScript 6, including default reactions, exceptions, and the synchronization operations race and all. Furthermore, we report on the construction and evaluation of PROMISEKEEPER, which performs a dynamic analysis to create promise graphs and infer common promise anti-patterns. We evaluate PROMISEKEEPER by applying it to 12 open source promise-based *** applications. Our results suggest that the promise graphs constructed by PROMISEKEEPER can provide developers with valuable information about occurrences of common anti-patterns in their promise-based code, and that promise graphs can be constructed with acceptable run-time overhead.
采用美国Esri公司地理信息系统二次开发工具包ArcGIS API for javascript,加载ArcGIS Serve地图服务时,常出现浏览器端不能显示地图的问题,针对该问题,本文从浏览器控制台调试信息入手,采用敏感信息关联法,结合客户端、服务器端和浏览...
详细信息
采用美国Esri公司地理信息系统二次开发工具包ArcGIS API for javascript,加载ArcGIS Serve地图服务时,常出现浏览器端不能显示地图的问题,针对该问题,本文从浏览器控制台调试信息入手,采用敏感信息关联法,结合客户端、服务器端和浏览器端各自特点进行了深入分析和研究,得出当使用HTTPS协议访问服务器时,自签名证书不能通过浏览器安全验证是导致问题的主要原因,基于该分析通过采用HTTP协议和禁止浏览器警告的方法解决了问题,并针对三款主流浏览器给出了具体的方法和步骤。
Use JSON for building web applications with technologies like HTML, javascript, Angular, ***, ***, Kafka, ***, MongoDB, ***, and ***, and others formats like GEOJSON, JSON-LD, MessagePack, and BSON. Key Features Use J...
详细信息
ISBN:
(数字)9781788628761
ISBN:
(纸本)9781788624701
Use JSON for building web applications with technologies like HTML, javascript, Angular, ***, ***, Kafka, ***, MongoDB, ***, and ***, and others formats like GEOJSON, JSON-LD, MessagePack, and BSON. Key Features Use JSON with trending technologies like Angular, ***, MongoDB, Kafka, and *** Debug, validate, and format JSON using developer toolkits, JSONLint, and JSON Editor Online Explore other JSON formats like GeoJSON, JSON-LD, BSON, and MessagePack Book Description JSON is an established and standard format used to exchange data. This book shows how JSON plays different roles in full web development through examples. By the end of this book, you'll have a new perspective on providing solutions for your applications and handling their complexities. After establishing a strong basic foundation with JSON, you'll learn to build frontend apps by creating a carousel. Next, you'll learn to implement JSON with Angular 5, ***, template embedding, and *** in PHP. This book will also help you implement *** (known for its JSON-configurable architecture) for server-side scripting. You'll learn to implement JSON for real-time apps using Kafka, as well as how to implement JSON for a task runner, and for MongoDB BSON storage. The book ends with some case studies on JSON formats to help you sharpen your creativity by exploring futuristic JSON implementations. By the end of the book, you'll be up and running with all the essential features of JSON and javascript and able to build fast, scalable, and efficient web applications. What you will learn Use JSON to store metadata for dependency managers, package managers, configuration managers, and metadata stores Handle asynchronous behavior in applications using callbacks, promises, generators, and async-await functions Use JSON for Angular 5, ***, ***, and *** Implement JSON as BSON in MongoDB Make use of JSON in developing automation scripts Implement JSON for realtim
暂无评论