E-Book, Englisch, 352 Seiten
Dupont Practical Prototype and script.aculo.us
1. ed
ISBN: 978-1-4302-0502-9
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
E-Book, Englisch, 352 Seiten
ISBN: 978-1-4302-0502-9
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
In this book, Prototype Core development team member Andrew Dupont provides you with an essential guide to getting the most out of using Prototype and script.aculo.us. He will help you leverage these popular and well-supported JavaScript libraries to enhance your day-to-day work, speeding up mundane tasks and providing advanced UI effects in a way that is cross-browser compliant. The book examines the different time-saving functions and features Prototype provides and covers how it extends the basic JavaScript objects, including events, Ajax techniques, DOM elements, enumerables, and advanced OOP.
Andrew Dupont is a web designer and developer living and working in Austin, Texas. He is a member of Prototype Core, the team that collaborates on the Prototype JavaScript Framework.
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;4
2;Contents;5
3;About the Author;12
4;About the Technical Reviewer;13
5;Acknowledgments;14
6;Introduction;15
7;Prototype;16
7.1;What You Should Know About Prototype, JavaScript, and the DOM;17
7.1.1;About JavaScript;17
7.1.2;About the DOM;22
7.1.3;About This Book;23
7.1.4;About Prototype;24
7.1.5;Summary;30
7.2;Prototype Basics;31
7.2.1;Getting Started;31
7.2.2;The $ Function;32
7.2.3;Object. extend: Painless Object Merging;35
7.2.4;$ A: Coercing Collections into Arrays;38
7.2.5;$$: Complex Node Queries;40
7.2.6;Summary;43
7.3;Collections (Or, Never Write a for Loop Again);44
7.3.1;The Traditional for Loop;44
7.3.2;Functional Programming;45
7.3.3;Prototype’s Enumerable Object;47
7.3.4;Finding Needles in Haystacks: detect, select, reject, and partition;48
7.3.5;Sorting Collections: min, max, and sortBy;49
7.3.6;Advanced Enumeration: map, inject, invoke, and pluck;51
7.3.7;Other Collections That Use Enumerable;54
7.3.8;Summary;61
7.4;Ajax: Advanced Client/Server Communication;62
7.4.1;Ajax Rocks;62
7.4.2;Ajax Sucks;63
7.4.3;Prototype’s Ajax Object;63
7.4.4;Advanced Examples: Working with Dynamic Content;75
7.4.5;Summary;102
7.5;Events;103
7.5.1;State of the Browser ( Or, How We Got Here);103
7.5.2;Events: The Crash Course;106
7.5.3;Events and Forms;114
7.5.4;Custom Events;120
7.5.5;Summary;123
7.6;Working with the DOM;124
7.6.1;About the DOM API;124
7.6.2;Node Genealogy;124
7.6.3;Prototype’s DOM Extensions;126
7.6.4;Putting It Together;146
7.6.5;Summary;148
7.7;Advanced JavaScript: Functional Programming and Class- Based OOP;149
7.7.1;Object- Oriented JavaScript Programming with Prototype;149
7.7.2;Functional Programming;168
7.7.3;Summary;175
7.8;Other Helpful Things: Useful Methods on Built-Ins;176
7.8.1;Using String Methods;176
7.8.2;Using JSON;189
7.8.3;Using Object Methods;193
7.8.4;Using Array Methods;197
7.8.5;Summary;198
8;script.aculo.us;199
8.1;What You Should Know About DHTML and script. aculo. us;200
8.1.1;Introducing the CSS Box Model;200
8.1.2;Introducing script. aculo. us;215
8.1.3;Getting Started with script. aculo. us;216
8.1.4;Summary;220
8.2;Introduction to script.aculo.us Effects;221
8.2.1;What Are Effects?;221
8.2.2;Why Effects?;221
8.2.3;The Basics of Effects;223
8.2.4;script. aculo. us Effects;226
8.2.5;Putting It All Together;250
8.2.6;Summary;261
8.3;Enabling Draggables, Droppables, and Sortables;262
8.3.1;Exploring Draggables;262
8.3.2;Exploring Droppables;269
8.3.3;Exploring Sortables;275
8.3.4;Summary;280
8.4;Advanced Controls: Autocompleters, In- Place Editors, and Sliders;281
8.4.1;Adding Autocomplete Functionality;281
8.4.2;Adding In- Place Editing Functionality;291
8.4.3;Adding Sliders;297
8.4.4;Summary;300
8.5;Prototype As a Platform;301
8.5.1;Using Code Patterns;301
8.5.2;Solving Browser Compatibility Problems: To Sniff or Not to Sniff?;309
8.5.3;Making and Sharing a Library;314
8.5.4;Summary;318
9;Index;319




