Đang chuẩn bị liên kết để tải về tài liệu:
Phát triển Javascript - part 3

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'phát triển javascript - part 3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Preface xxi While working through some of JavaScript s finer points I ll use unit tests to show you how the language behaves and we ll take the opportunity to let tests drive us through the implementation of some helper utilities which we ll use throughout Part III. Part III Real-World Test-Driven Development in JavaScript In this part we ll tackle a series of small projects in varying environments. We ll see howto develop a small general purpose JavaScript API develop a DOM dependent widget abstract browser differences implement a server-side JavaScript application and more all using test-driven development. This part focuses on how test-driven development can help in building cleaner API s better modularized code and more robust software. Each project introduces new test-related concepts and shows them in practice by implementing a fully functional yet limited piece of code. Throughout this part we will among other things learn how to test code that depends on browser API s timers event handlers DOM manipulation and asynchronous server requests i.e. Ajax . We will also get to practice techniques such as stubbing refactoring and using design patterns to solve problems in elegant ways. Throughout each chapter in this part ideas on how to extend the functionality developed are offered giving you the ability to practice by improving the code on your own. Extended solutions are available from the book s website.1 I ve taken great care throughout these projects to produce runnable code that actually does things. The end result of the five chapters in Part III is a fully functional instant messaging chat client and server written exclusively using test-driven development in nothing but JavaScript. Part IV Testing Patterns The final part of the book reviews some of the techniques used throughout Part III from a wider angle. Test doubles such as mocks and stubs are investigated in closer detail along with different forms of test verification. Finally we review some .