TAILIEUCHUNG - Developing Large Web Applications- P13

Developing Large Web Applications- P13:This book presents a number of techniques for applying established practices of good software engineering to web development—that is, development primarily using the disparate technologies of HTML, CSS, JavaScript, and server-side scripting languages. Whereas there are many books on how to use languages, how to use libraries, and how to approach software engineering, this is the first book to codify many of the techniques it presents. These techniques will make the components of your own web applications more reusable, maintainable, and reliable | if Create placeholders for left and right buttons but only if there are more slides than can fit the width given for them. btnl img 0 0 null click this true . new Object function Because when we registered this event handler we specified that PictureSlider should be the execution context we have access here to everything encapsulated in the object using the this pointer. alert alert Event-Driven Applications A good way to achieve further modularity within the JavaScript of a large web application is to design your application to be more event-driven. This means using events instead of method calls directly to communicate between modules. Event-driven applications define custom events to describe what modules are doing and trigger the proper events at various points to communicate what has happened. Other parts of the application listen for those events and respond by doing whatever they need to do. Working with Events 101 The reason that event-driven applications tend to be more modular than applications tied together by method calls directly is that firing events and handling events are independent actions. That is you can fire a new event or add or remove a handler without directly affecting other parts of the system. In addition JavaScript and its libraries support for event handling presented earlier give you everything you need to abstract the tracking of custom events and their delivery to the correct recipients. You just have to define which events you need and write the code to trigger or handle the events at the right places. Suppose you wanted to use a custom event to indicate that there was a change of location . a postal code associated with a web page after it was loaded. This could occur after a visitor types a new

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.