Avoid making bad smells is very important in writing exception handling code for dealing with unexpected runtime errors. The task however is challenging and demands proficient programming skills and experience. This i...
详细信息
Avoid making bad smells is very important in writing exception handling code for dealing with unexpected runtime errors. The task however is challenging and demands proficient programming skills and experience. This is particularly true in developing javascript applications because javascript is very rich in features as being dynamic, interpreted and object-oriented with first-class functions. What further complicates the situation is the use of event-driven and non-blocking I/O model in ***, which is a runtime environment written in serverside javascript. Extended from our previous work on exception handling code smells in Java, this study aims at identifying exception handling code smells that can occur in a javascript application at either the client side or the server side. The impact to software quality that each smell has is demonstrated with examples. Refactorings corresponding to the identified smells are proposed;their effects to the application, including the robustness level achieved and other benefits gained, are illustrated. The work is intended to serve as a guide in helping javascript developers avoid or discover exception handling code smells.
When students in programming courses are taught event-driven programming (EDP) for the first time, they face new terminology and concepts that they should internalize. Moreover, they learn a fully new approach for rea...
详细信息
ISBN:
(纸本)9781450384889
When students in programming courses are taught event-driven programming (EDP) for the first time, they face new terminology and concepts that they should internalize. Moreover, they learn a fully new approach for reasoning about program logic and execution order. However, there is a lack of research in students' understanding of these concepts. In this paper, we describe a study, in which we asked web development students to explain their conception of EDP: what are the main concepts involved and how they interact. Moreover, we asked them to explain the execution of a short piece of javascript code that focuses on basic usage of events and event listeners. The answers, which we requested as concept maps and text, were analyzed using inductive content analysis. Our results clearly demonstrate shortcomings in the students' learning and illustrate various misunderstandings that they may have regarding EDP. Based on the findings, we give suggestions for improving the teaching of EDP.
Background: Sequence feature annotations (e.g., protein domain boundaries, binding sites, and secondary structure predictions) are an essential part of biological research. Annotations are widely used by scientists du...
详细信息
javascript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, javascript is a flexible, complex language...
详细信息
ISBN:
(纸本)1593275846;9781593275846
javascript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, javascript is a flexible, complex language that you can use to build full-scale *** javascript, 2nd Edition dives deep into the javascript language to show you how to write beautiful, effective code. Author Marijn Haverbeke immerses you in example code from the start, while exercises and full-chapter projects give you hands-on experience with writing your own programs. As you build projects such as an artificial life simulation, a simple programming language, and a paint program, you'll learn:The essential elements of programming, including syntax, control, and dataHow to organize and clarify your code with object-oriented and functional programming techniquesHow to script the browser and make basic web applicationsHow to use the DOM effectively to interact with browsersHow to harness *** to build servers and utilitiesThis edition is thoroughly revised and modernized to reflect the current state of javascript and web browsers, with brand-new material, such as a chapter on code performance in javascript, and expanded coverage of recursion and closures. All source code is available online in an interactive sandbox, where you can edit the code, run it, and see its output ***'t it time you became fluent in the language of the Web?
Containerized applications, and in particular Docker images, are becoming a common solution in cloud environments to meet ever-increasing demands in terms of portability, reliability and fast deployment. A Docker imag...
详细信息
ISBN:
(纸本)9781728105918
Containerized applications, and in particular Docker images, are becoming a common solution in cloud environments to meet ever-increasing demands in terms of portability, reliability and fast deployment. A Docker image includes all environmental dependencies required to run it, such as specific versions of system and third-party packages. Leveraging on its modularity, an image can be easily embedded in other images, thus simplifying the way of sharing dependencies and building new software. However, the dependencies included in an image may be out of date due to backward compatibility requirements, endangering the environments where the image has been deployed with known vulnerabilities. While previous research efforts have focused on studying the impact of bugs and vulnerabilities of system packages within Docker images, no attention has been given to third-party packages. This paper empirically studies the impact of npm javascript package vulnerabilities in Docker images. We based our analysis on 961 images from three official repositories that use ***, and 1,099 security reports of packages available on npm, the most popular javascript package manager. Our results reveal that the presence of outdated npm packages in Docker images increases the risk of potential security vulnerabilities, suggesting that Docker maintainers should keep their installed javascript packages up to date.
Previous algorithms for feedback-directed unit test generation iteratively create sequences of API calls by executing partial tests and by adding new API calls at the end of the test. These algorithms are challenged b...
详细信息
ISBN:
(纸本)9781450392211
Previous algorithms for feedback-directed unit test generation iteratively create sequences of API calls by executing partial tests and by adding new API calls at the end of the test. These algorithms are challenged by a popular class of APIs: higher-order functions that receive callback arguments, which often are invoked asynchronously. Existing test generators cannot effectively test such APIs because they only sequence API calls, but do not nest one call into the callback function of another. This paper presents Nessie, the first feedback-directed unit test generator that supports nesting of API calls and that tests asynchronous callbacks. Nesting API calls enables a test to use values produced by an API that are available only once a callback has been invoked, and is often necessary to ensure that methods are invoked in a specific order. The core contributions of our approach are a tree-based representation of unit tests with callbacks and a novel algorithm to iteratively generate such tests in a feedback-directed manner. We evaluate our approach on ten popular javascript libraries with both asynchronous and synchronous callbacks. The results show that, in a comparison with LambdaTester, a state of the art test generation technique that only considers sequencing of method calls, Nessie finds more behavioral differences and achieves slightly higher coverage. Notably, Nessie needs to generate significantly fewer tests to achieve and exceed the coverage achieved by the state of the art.
If you're like most developers, you rely heavily on javascript to build interactive and quick-responding web applications. The problem is that all of those lines of javascript code can slow down your apps. This bo...
详细信息
ISBN:
(纸本)9780596802790
If you're like most developers, you rely heavily on javascript to build interactive and quick-responding web applications. The problem is that all of those lines of javascript code can slow down your apps. This book reveals techniques and strategies to help you eliminate performance bottlenecks during development. You'll learn how to improve execution time, downloading, interaction with the DOM, page life cycle, and more. Yahoo! frontend engineer Nicholas C. Zakas and five other javascript experts -- Ross Harmes, Julien Lecomte, Steven Levithan, Stoyan Stefanov, and Matt Sweeney -- demonstrate optimal ways to load code onto a page, and offer programming tips to help your javascript run as efficiently and quickly as possible. You'll learn the best practices to build and deploy your files to a production environment, and tools that can help you find problems once your site goes live. Identify problem code and use faster alternatives to accomplish the same task Improve scripts by learning how javascript stores and accesses data Implement javascript code so that it doesn't slow down interaction with the DOM Use optimization techniques to improve runtime performance Learn ways to ensure the UI is responsive at all times Achieve faster client-server communication Use a build system to minify files, and HTTP compression to deliver them to the browser
The bestselling javascript guide, updated with current features and best practices Beginning javascript 5th Edition shows you how to work effectively with javascript frameworks, functions, and modern browsers, and tea...
详细信息
ISBN:
(纸本)9781118903339
The bestselling javascript guide, updated with current features and best practices Beginning javascript 5th Edition shows you how to work effectively with javascript frameworks, functions, and modern browsers, and teaches more effective coding practices using HTML5. This new edition has been extensively updated to reflect the way javascript is most commonly used today, introducing you to the latest tools and techniques available to javascript developers. Coverage includes modern coding practices using HTML5 markup, the JSON data format, DOM APIs, the jQuery framework, and more. Exercises with solutions provide plenty of opportunity to practice, and the companion website offers downloadable code for all examples given in the book. * Learn javascript using the most up to date coding style * Understand JSON, functions, events, and feature detection * Utilize the new HTML5 elements and the related API * Explore new features including geolocation, local storage, and more javascript has shaped the Web from a passive medium into one that is rich, dynamic, and interactive. No matter the technology on the server side, it's javascript that makes it come alive in the browser. To learn javascript the way it's used today, Beginning javascript, 5th Edition is your concise guide.
Pro javascript Techniques is the ultimate javascript book for today's web developer. It provides everything you need to know about modern javascript, and teaches you what javascript can do for your web sites. This...
详细信息
ISBN:
(数字)9781430263920
ISBN:
(纸本)9781430263913;9781430263920
Pro javascript Techniques is the ultimate javascript book for today's web developer. It provides everything you need to know about modern javascript, and teaches you what javascript can do for your web sites. This book doesn't waste any time looking at things you already know, but instead concentrates on fundamental, vital topicswhat modern javascripting is (and isn't), and pitfalls to be wary of. You will learn about the 'this' keyword, as well as new object tools. You will be able to create reusable code with encapsulation, overloading and inheritance. The most recent techniques for debugging and testing are covered comprehensively, with information on Chrome developer tools, Jasmine, PhantomJS and Protractor. This update finishes with chapters on constructing single-page web applications that dominate the modern web. The book is filled with real-world examples and case studies, as well as numerous reusable functions and classes to save you time in your development. You will learn the practical skills needed to build professional, dynamic web applications. Pro javascript Techniques is an indispensable reference for any professional javascript web developerenhance your javascript development today. What youll learn Real-world techniques for the modern javascript developer How to enhance your development skills and be a better developer Efficient techniques for object-oriented javascript, including the 'this' keyword The most up-to-date tools for testing and debugging, including browser development tools How to effectively use events, forms and Ajax An overview of the Angular JS framework, Unit testing and End to End testing Who this book is for This book is for the developer who wants to get the most out of their javascript. They may have purchased the first edition of this book and now want to get up-to-date with the latest developments, or this may be the first time they have come across the title. They could be a working developer or using javascript in their sp
暂无评论