چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Pro PHP and jQuery Description based on print version record.: Includes index

Lengstorf, Jason

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Lengstorf, Jason
سال انتشار
۲۰۱۰
فرمت
PDF
زبان
انگلیسی
حجم فایل
۱۱٫۴ مگابایت
شابک
9781430228479، 9781430228486، 9785845916938، 1430228474، 1430228482، 5845916933

دربارهٔ کتاب

This book is for intermediate programmers interested in building AJAX web applications using jQuery and PHP. Along with teaching some advanced PHP techniques, it will teach you how to take your dynamic applications to the next level by adding a JavaScript layer with jQuery. Learn to utilize built-in PHP functions to build calendar tools. Learn how jQuery can be used for AJAX, animation, client-side validation, and more. What you’ll learn Use PHP to build a calendar application that allows users to post, view, edit, and delete events. Use jQuery to allow the calendar app to be viewed and edited without requiring page refreshes using built-in AJAX functions. Learn the power and versatility of PHP's object-oriented programming style. Learn the various forms of security available and how to best apply them. Learn jQuery plug-in development patterns and create modular, reusable jQuery plug-ins. Learn the basics of jQuery effects, including fading elements, generating HTML markup on the fly, and creating modal windows. Who this book is for This book is intended for programmers who want to bridge the gap between front- and back-end programming. It does not cover HTML or CSS except where absolutely necessary, and it focuses on taking intermediate PHP developers to the next level while getting comfortable with AJAX and the power of jQuery. Cover 1 Contents at a Glance 6 Contents 7 About the Author 14 About the Technical Reviewer 15 Acknowledgments 16 Part 1: Getting Comfortable with jQuery 17 Introducing jQuery 19 Choosing jQuery over JavaScript 19 Understanding JavaScript Libraries 19 Understanding the Benefits of jQuery 20 Understanding the History of jQuery 20 Setting Up a Testing Environment 20 Installing Firefox 21 Installing Firebug 21 Including jQuery in Web Pages 23 Including a Downloaded Copy of the jQuery Library 23 Including a Remotely Hosted Copy of the jQuery Library 24 Using the Google AJAX Libraries API 24 Setting up a Test File 24 Introducing the jQuery Function ($) 25 Selecting DOM Elements Using CSS Syntax 26 Basic Selectors 27 Hierarchy Selectors 29 Basic Filters 31 Content Filters 33 Visibility Filters 35 Attribute Filters 35 Child Filters 36 Form Filters 37 Summary 39 Common jQuery Actions and Methods 41 Understanding the Basic Behavior of jQuery Scripts 41 Understanding jQuery Methods 41 Traversing DOM Elements 42 .eq() 42 .filter() and .not() 43 .first() and .last() 43 .has() 44 .is() 44 .slice() 44 .children() 45 .closest() 46 .find() 46 .next(), .nextAll(), and .nextUntil() 46 .prev(), .prevAll(), and .prevUntil() 48 .siblings() 48 .parent() 49 .parents() and .parentsUntil() 49 .add() 50 .andSelf() 51 .contents() 51 .end() 52 Creating and Inserting DOM Elements 52 Creating New DOM Elements 54 Inserting New Elements into the DOM 55 .remove() and .detach() 68 Accessing and Modifying CSS and Attributes 69 .attr() 69 .removeAttr() 70 .css() 71 .val() 73 .data() 74 .addClass(), .removeClass(), and .toggleClass() 75 .hasClass() 76 .height() and .width() 77 .innerHeight(), .innerWidth(), .outerHeight(), and .outerWidth() 78 Affecting Result Sets 78 .map() and .each() 79 Using Animation and Other Effects 81 .show() and .hide() 81 .fadeIn(), .fadeOut(), and .fadeTo() 82 .slideUp(), .slideDown(), and .slideToggle() 83 .animate() 83 .delay() 86 .stop() 86 Handling Events 87 Browser Events 87 Handling Document Loading Events 88 Handling Event Attachment 89 Shortcut Event Methods 93 Using AJAX Controls 94 $.ajax() 94 $.ajaxSetup() 96 Using Shorthand AJAX Methods 98 Summary 100 Part 2: Getting Into Advanced PHP Programming 101 Object-Oriented Programming 103 Understanding Object-Oriented Programming 103 Understanding Objects and Classes 103 Recognizing the Differences Between Objects and Classes 104 Structuring Classes 104 Defining Class Properties 105 Defining Class Methods 106 Using Constructors and Destructors 109 Converting to a String 112 Using Class Inheritance 115 Overwriting Inherited Properties and Methods 116 Preserving Original Method Functionality While Overwriting Methods 118 Assigning the Visibility of Properties and Methods 119 Public Properties and Methods 119 Protected Properties and Methods 120 Private Properties and Methods 123 Static Properties and Methods 124 Commenting with DocBlocks 126 Comparing Object-Oriented and Procedural Code 128 Ease of Implementation 129 The Procedural Approach 129 The OOP Approach 131 Better Organization 133 Easier Maintenance 133 Summary 134 Build an Events Calendar 135 Planning the Calendar 135 Defining the Database Structure 135 Creating the Class Map 135 Planning the Application’s Folder Structure 136 Public Files 136 Nonpublic Application Files 137 Modifying the Development Environment 138 Local Development 138 Remote Development 140 Building the Calendar 140 Creating the Database 140 Connecting to the Database with a Class 141 Creating the Class Wrapper 143 Adding Class Properties 143 Building the Constructor 145 Checking the Database Connection 146 Creating an Initialization File 148 Creating an Index File to Pull It All Together 149 Setting Basic Properties 150 Loading Events Data 152 Creating an Array of Event Objects for Use in the Calendar 155 Creating an Event Class 156 Creating the Method to Store Event Objects in an Array 158 Outputting HTML to Display the Calendar and Events 159 Modifying the Index File 161 Building the Calendar 162 Displaying Events in the Calendar 167 Making the Calendar Look Like a Calendar 170 Creating the Common Files—Header and Footer 174 Adding the Files to the Index 174 Outputing HTML to Display Full Event Descriptions 176 Creating a Method to Format Single Event Data 176 Creating a Method to Generate Markup 178 Creating a New File to Display Full Events 180 Summary 182 Add Controls to Create, Edit, and Delete Events 183 Generating a Form to Create or Edit Events 183 Adding a Token to the Form 185 Creating a File to Display the Form 187 Adding a New Stylesheet for Administrative Features 188 Saving New Events in the Database 192 Adding a Processing File to Call the Processing Method 195 Adding a Button to the Main View to Create New Events 197 Adding Edit Controls to the Full Event View 201 Modifying the Full Event Display Method to Show Admin Controls 203 Adding the Admin Stylesheet to the Full Event View Page 204 Deleting Events 206 Generating a Delete Button 207 Creating a Method to Require Confirmation 208 Creating a File to Display the Confirmation Form 211 Summary 214 Password Protecting Sensitive Actions and Areas 215 Building the Admin Table in the Database 215 Building a File to Display a Login Form 216 Creating the Admin Class 218 Defining the Class 218 Building a Method to Check the Login Credentials 219 Building a Method to Create Salted Hashes 223 Creating a Test Method for Salted Hashes 226 Creating a User to Test Administrative Access 228 Modifying the App to Handle the Login Form Submission 229 Allowing the User to Log Out 234 Adding a Log Out Button to the Calendar 234 Creating a Method to Process the Logout 236 Modifying the App to Handle the User Logout 237 Displaying Admin Tools Only to Administrators 239 Showing Admin Options to Administrators 239 Modifying the General Admin Options Method 240 Modifying the Event Options Method 242 Limiting Access to Administrative Pages 244 Disallowing Access to the Event Creation Form Without Login 244 Ensuring Only Logged In Users Can Delete Events 245 Summary 247 Part 3: Combining jQuery with PHP Applications 249 Enhancing the User Interface with jQuery 251 Adding Progressive Enhancements with jQuery 251 Setting Progressive Enhancement Goals 252 Include jQuery in the Calendar App 252 Create a JavaScript Initialization File 253 Include the Initialization File in the Application 253 Ensuring the Document Is Ready Before Script Execution 253 Creating a New Stylesheet for Elements Created by jQuery 253 Including the Stylesheet in the Index File 255 Creating a Modal Window for Event Data 256 Binding a Function to the Click Event of Title Links 256 Preventing the Default Action and Adding an Active Class 256 Extracting the Query String with Regular Expressions 257 Using the Lazy Approach: String-Based Replacement 257 Adopting a Better Solution: Regular Expressions 257 Incorporating a Regular Expression into a Script 258 Creating a Modal Window 259 Creating the Utility Function to Check for a Modal Window 259 Calling the Utility Function from the Event Handler 261 Retrieve and Display Event Information with AJAX 263 Creating a File to Handle AJAX Requests 264 Loading Event Data Using AJAX 266 Add a Close Button 269 Add Effects to the Creation and Destruction of the Modal Window 270 Fade Out the Modal Window 271 Adding an Overlay and Fade in the Modal Window 273 Summary 278 Part 4: Advancing jQuery and PHP 325 Performing Form Validation with Regular Expressions 327 Getting Comfortable with Regular Expressions 327 Understanding Basic Regular Expression Syntax 327 Setting up a Test File 328 Replacing Text with Regexes 329 Choosing Regexes vs. Regular String Replacement 330 Drilling Down on the Basics of Pattern Modifiers 332 Getting Fancy with Backreferences 334 Matching Character Classes 336 Matching Any Character Except... 338 Using Character Class Shorthand 339 Finding Word Boundaries 339 Using Repetition Operators 339 Detecting the Beginning or End of a String 340 Using Alternation 340 Using Optional Items 341 Putting It All Together 342 Adding Server-Side Date Validation 344 Defining the Regex Pattern to Validate Dates 344 Setting up Test Data 344 Matching the Date Format 346 Adding a Validation Method to the Calendar Class 349 Returning an Error if the Dates Don’t Validate 350 Adding Client-Side Date Validation 354 Creating a New JavaScript File to Validate the Date String 354 Including the New File in the Footer 355 Preventing the Form Submission if Validation Fails 355 Summary 359 Extending jQuery 361 Adding Functions to jQuery 361 Adding Your Date Validation Function to jQuery 361 Allowing Custom Aliases in jQuery Plugins 361 Attaching the Function to the jQuery Object 362 Allowing Configurable Options 362 Extending Default Options with User-Supplied Options 363 Performing Validation and Returning a Value 364 Conforming to jQuery Plugin File Naming Conventions 364 Modifying the Include Script 364 Modifying the Initialization Script 365 Adding Methods to jQuery 367 Building Your Plugin 367 Creating a Properly Named Plugin File 367 Providing Publicly Accessible Default Options 368 Maintaining Chainability 369 Creating a Publicly Accessible Helper Method 370 Modifying Each Matched Element 372 Implementing Your Plugin 373 Including the Plugin File 373 Initializing the Plugin on a Set of Elements 374 Summary 376 Index 377 Cover......Page 1 Contents at a Glance......Page 6 Contents......Page 7 About the Author......Page 14 About the Technical Reviewer......Page 15 Acknowledgments......Page 16 Part 1: Getting Comfortable with jQuery......Page 17 Understanding JavaScript Libraries......Page 19 Setting Up a Testing Environment......Page 20 Installing Firebug......Page 21 Including a Downloaded Copy of the jQuery Library......Page 23 Setting up a Test File......Page 24 Introducing the jQuery Function ($)......Page 25 Selecting DOM Elements Using CSS Syntax......Page 26 Basic Selectors......Page 27 Hierarchy Selectors......Page 29 Basic Filters......Page 31 Content Filters......Page 33 Attribute Filters......Page 35 Child Filters......Page 36 Form Filters......Page 37 Summary......Page 39 Understanding jQuery Methods......Page 41 .eq()......Page 42 .first() and .last()......Page 43 .slice()......Page 44 .children()......Page 45 .next(), .nextAll(), and .nextUntil()......Page 46 .siblings()......Page 48 .parents() and .parentsUntil()......Page 49 .add()......Page 50 .contents()......Page 51 Creating and Inserting DOM Elements......Page 52 Creating New DOM Elements......Page 54 Inserting New Elements into the DOM......Page 55 .remove() and .detach()......Page 68 .attr()......Page 69 .removeAttr()......Page 70 .css()......Page 71 .val()......Page 73 .data()......Page 74 .addClass(), .removeClass(), and .toggleClass()......Page 75 .hasClass()......Page 76 .height() and .width()......Page 77 Affecting Result Sets......Page 78 .map() and .each()......Page 79 .show() and .hide()......Page 81 .fadeIn(), .fadeOut(), and .fadeTo()......Page 82 .animate()......Page 83 .stop()......Page 86 Browser Events......Page 87 Handling Document Loading Events......Page 88 Handling Event Attachment......Page 89 Shortcut Event Methods......Page 93 $.ajax()......Page 94 $.ajaxSetup()......Page 96 Using Shorthand AJAX Methods......Page 98 Summary......Page 100 Part 2: Getting Into Advanced PHP Programming......Page 101 Understanding Objects and Classes......Page 103 Structuring Classes......Page 104 Defining Class Properties......Page 105 Defining Class Methods......Page 106 Using Constructors and Destructors......Page 109 Converting to a String......Page 112 Using Class Inheritance......Page 115 Overwriting Inherited Properties and Methods......Page 116 Preserving Original Method Functionality While Overwriting Methods......Page 118 Public Properties and Methods......Page 119 Protected Properties and Methods......Page 120 Private Properties and Methods......Page 123 Static Properties and Methods......Page 124 Commenting with DocBlocks......Page 126 Comparing Object-Oriented and Procedural Code......Page 128 The Procedural Approach......Page 129 The OOP Approach......Page 131 Easier Maintenance......Page 133 Summary......Page 134 Creating the Class Map......Page 135 Public Files......Page 136 Nonpublic Application Files......Page 137 Local Development......Page 138 Creating the Database......Page 140 Connecting to the Database with a Class......Page 141 Adding Class Properties......Page 143 Building the Constructor......Page 145 Checking the Database Connection......Page 146 Creating an Initialization File......Page 148 Creating an Index File to Pull It All Together......Page 149 Setting Basic Properties......Page 150 Loading Events Data......Page 152 Creating an Array of Event Objects for Use in the Calendar......Page 155 Creating an Event Class......Page 156 Creating the Method to Store Event Objects in an Array......Page 158 Outputting HTML to Display the Calendar and Events......Page 159 Modifying the Index File......Page 161 Building the Calendar......Page 162 Displaying Events in the Calendar......Page 167 Making the Calendar Look Like a Calendar......Page 170 Adding the Files to the Index......Page 174 Creating a Method to Format Single Event Data......Page 176 Creating a Method to Generate Markup......Page 178 Creating a New File to Display Full Events......Page 180 Summary......Page 182 Generating a Form to Create or Edit Events......Page 183 Adding a Token to the Form......Page 185 Creating a File to Display the Form......Page 187 Adding a New Stylesheet for Administrative Features......Page 188 Saving New Events in the Database......Page 192 Adding a Processing File to Call the Processing Method......Page 195 Adding a Button to the Main View to Create New Events......Page 197 Adding Edit Controls to the Full Event View......Page 201 Modifying the Full Event Display Method to Show Admin Controls......Page 203 Adding the Admin Stylesheet to the Full Event View Page......Page 204 Deleting Events......Page 206 Generating a Delete Button......Page 207 Creating a Method to Require Confirmation......Page 208 Creating a File to Display the Confirmation Form......Page 211 Summary......Page 214 Building the Admin Table in the Database......Page 215 Building a File to Display a Login Form......Page 216 Defining the Class......Page 218 Building a Method to Check the Login Credentials......Page 219 Building a Method to Create Salted Hashes......Page 223 Creating a Test Method for Salted Hashes......Page 226 Creating a User to Test Administrative Access......Page 228 Modifying the App to Handle the Login Form Submission......Page 229 Adding a Log Out Button to the Calendar......Page 234 Creating a Method to Process the Logout......Page 236 Modifying the App to Handle the User Logout......Page 237 Showing Admin Options to Administrators......Page 239 Modifying the General Admin Options Method......Page 240 Modifying the Event Options Method......Page 242 Disallowing Access to the Event Creation Form Without Login......Page 244 Ensuring Only Logged In Users Can Delete Events......Page 245 Summary......Page 247 Part 3: Combining jQuery with PHP Applications......Page 249 Adding Progressive Enhancements with jQuery......Page 251 Include jQuery in the Calendar App......Page 252 Creating a New Stylesheet for Elements Created by jQuery......Page 253 Including the Stylesheet in the Index File......Page 255 Preventing the Default Action and Adding an Active Class......Page 256 Adopting a Better Solution: Regular Expressions......Page 257 Incorporating a Regular Expression into a Script......Page 258 Creating the Utility Function to Check for a Modal Window......Page 259 Calling the Utility Function from the Event Handler......Page 261 Retrieve and Display Event Information with AJAX......Page 263 Creating a File to Handle AJAX Requests......Page 264 Loading Event Data Using AJAX......Page 266 Add a Close Button......Page 269 Add Effects to the Creation and Destruction of the Modal Window......Page 270 Fade Out the Modal Window......Page 271 Adding an Overlay and Fade in the Modal Window......Page 273 Summary......Page 278 Part 4: Advancing jQuery and PHP......Page 325 Understanding Basic Regular Expression Syntax......Page 327 Setting up a Test File......Page 328 Replacing Text with Regexes......Page 329 Choosing Regexes vs. Regular String Replacement......Page 330 Drilling Down on the Basics of Pattern Modifiers......Page 332 Getting Fancy with Backreferences......Page 334 Matching Character Classes......Page 336 Matching Any Character Except.........Page 338 Using Repetition Operators......Page 339 Using Alternation......Page 340 Using Optional Items......Page 341 Putting It All Together......Page 342 Setting up Test Data......Page 344 Matching the Date Format......Page 346 Adding a Validation Method to the Calendar Class......Page 349 Returning an Error if the Dates Don’t Validate......Page 350 Creating a New JavaScript File to Validate the Date String......Page 354 Preventing the Form Submission if Validation Fails......Page 355 Summary......Page 359 Allowing Custom Aliases in jQuery Plugins......Page 361 Allowing Configurable Options......Page 362 Extending Default Options with User-Supplied Options......Page 363 Modifying the Include Script......Page 364 Modifying the Initialization Script......Page 365 Creating a Properly Named Plugin File......Page 367 Providing Publicly Accessible Default Options......Page 368 Maintaining Chainability......Page 369 Creating a Publicly Accessible Helper Method......Page 370 Modifying Each Matched Element......Page 372 Including the Plugin File......Page 373 Initializing the Plugin on a Set of Elements......Page 374 Summary......Page 376 Index......Page 377

This book is for intermediate programmers interested in building Ajax web applications using jQuery and PHP. Along with teaching some advanced PHP techniques, it willshow you how to take your dynamic applications to the next level by adding a JavaScript layer with jQuery.

  • Learn to utilize built-in PHP functions to build calendar tools.
  • Learn how jQuery can be used for Ajax, animation, client-side validation, and more.
What you’ll learn
  • How to use PHP to build a calendar application that allows users to post, view, edit, and delete events
  • How to use jQuery to allow the calendar app to be viewed and edited without requiring page refreshes using built-in Ajax functions
  • The power and versatility of PHP's object-oriented programming style
  • The various forms of security available and how to best apply them
  • jQuery plug-in development patternsto create modular, reusable jQuery plug-ins.
  • The basics of jQuery effects, including fading elements, generating HTML markup on the fly, and creating modal windows
Who this book is for

This book is intended for programmers who want to bridge the gap between front- and back-end programming. It does not cover HTML or CSS except where absolutely necessary, and it focuses on taking intermediate PHP developers to the next level while getting comfortable with Ajax and the power of jQuery.

Table of Contents

  1. Introducing jQuery
  2. Common jQuery Actions and Methods
  3. Object-Oriented Programming
  4. Build an Events Calendar
  5. Add Controls to Create, Edit, and Delete Events
  6. Password Protecting Sensitive Actions and Areas
  7. Enhancing the User Interface with jQuery
  8. Editing the Calendar with Ajax and jQuery
  9. Performing Form Validation with Regular Expressions
  10. Extending jQuery
This book is for intermediate programmers interested in building Ajax web applications using jQuery and PHP. Along with teaching some advanced PHP techniques, it will show you how to take your dynamic applications to the next level by adding a JavaScript layer with jQuery. Learn to utilize built-in PHP functions to build calendar tools. Learn how jQuery can be used for Ajax, animation, client-side validation, and more.

کتاب‌های مشابه

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

۴۹٬۰۰۰ تومان

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

۴۹٬۰۰۰ تومان

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

۴۹٬۰۰۰ تومان

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

۴۹٬۰۰۰ تومان

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

۴۹٬۰۰۰ تومان

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

jQuery cookbook Description based on print version record. - Includes index. - "Solutions & examples for jQuery developers"--Cover

۴۹٬۰۰۰ تومان

Statics for dummies Description based on print version record. - Includes index

Statics for dummies Description based on print version record. - Includes index

۴۹٬۰۰۰ تومان

PowerShell in practice Description based on print version record. - Includes index

PowerShell in practice Description based on print version record. - Includes index

۴۹٬۰۰۰ تومان

SQL for dummies : Description based on print version record. - Includes index

SQL for dummies : Description based on print version record. - Includes index

۴۹٬۰۰۰ تومان

Essential ZBrush Description based on print version record. - Includes index

Essential ZBrush Description based on print version record. - Includes index

۴۹٬۰۰۰ تومان

Podcasting for dummies Description based on print version record. - Includes index

Podcasting for dummies Description based on print version record. - Includes index

۴۹٬۰۰۰ تومان

YouTube for dummies : Description based on print version record. - Includes index

YouTube for dummies : Description based on print version record. - Includes index

۴۹٬۰۰۰ تومان

قیمت نهایی

۴۹٬۰۰۰ تومان