You are previewing Pro PHP MVC.

Pro PHP MVC

Cover of Pro PHP MVC by Chris Pitt Published by Apress
  1. Titlepage
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
  9. Chapter 1: Introduction to MVC
    1. What Is MVC?
    2. Benefits of MVC
    3. Popular MVC Frameworks
    4. Design Patterns
    5. Creating Our Own Framework
    6. Goals
  10. Chapter 2: Foundation
    1. Goals
    2. Autoloading
    3. Exceptions
    4. Type Methods
    5. Metadata
    6. Questions
    7. Answers
    8. Exercises
  11. Chapter 3: Base Class
    1. Goals
    2. Getters and Setters
    3. Magic Methods
    4. Adding Introspection
    5. Transparent Getters/Setters
    6. Questions
    7. Answers
    8. Exercises
  12. Chapter 4: Configuration
    1. Goals
    2. Associative Arrays
    3. INI Files
    4. Questions
    5. Answers
    6. Exercises
  13. Chapter 5: Caching
    1. Goals
    2. Performance Bottlenecks
    3. The Code
    4. Questions
    5. Answers
    6. Exercises
  14. Chapter 6: Registry
    1. Goals
    2. Singleton
    3. Registry
    4. Questions
    5. Answers
    6. Exercises
  15. Chapter 7: Routing
    1. Goals
    2. Defining Routes
    3. Route Classes
    4. Router Class
    5. Questions
    6. Answers
    7. Exercises
  16. Chapter 8: Templates
    1. Goals
    2. Idea
    3. Alternatives
    4. Implementation
    5. Benefits
    6. Questions
    7. Answers
    8. Exercises
  17. Chapter 9: Databases
    1. Goals
    2. Implementation
    3. Connectors
    4. Queries
    5. Questions
    6. Answers
    7. Exercises
  18. Chapter 10: Models
    1. Goals
    2. Idea
    3. Implementation
    4. Building the SQL
    5. Modifying Records
    6. No Relation of Mine!
    7. Questions
    8. Answers
    9. Exercises
  19. Chapter 11: Testing
    1. Goals
    2. Unit Testing
    3. Test Class
    4. Cache
    5. Configuration
    6. Database
    7. Model
    8. Template
    9. Holy Code, Batman!
    10. Questions
    11. Answers
    12. Exercises
  20. Chapter 12: Structure
    1. Goals
    2. Database
    3. Folders
    4. Questions
    5. Answers
  21. Chapter 13: Bootstrapping
    1. Goals
    2. When a File Is Not a File…
    3. URL Rewriting
    4. Index.php
    5. Configuration
    6. Controller
    7. Questions
    8. Answers
    9. Exercises
  22. Chapter 14: Registration and Login
    1. Goals
    2. Shared Libraries
    3. User Model
    4. Registration
    5. Sessions
    6. Login
    7. Questions
    8. Answers
    9. Exercises
  23. Chapter 15: Search
    1. Goals
    2. Search
    3. Questions
    4. Answers
    5. Exercises
  24. Chapter 16: Settings
    1. Goals
    2. Validation
    3. Settings
    4. Questions
    5. Answers
    6. Exercises
  25. Chapter 17: Sharing
    1. Goals
    2. Error Pages
    3. Friends
    4. Sharing
    5. Questions
    6. Answers
    7. Exercises
  26. Chapter 18: Photos
    1. Goals
    2. How to Upload Files
    3. User Photos
    4. Showing Off, a Little
    5. Questions
    6. Answers
    7. Exercises
  27. Chapter 19: Extending
    1. Goals
    2. Imagine
    3. Observer
    4. Synchronicity
    5. Code
    6. Events
    7. Plugins
    8. Questions
    9. Answers
    10. Exercises
  28. Chapter 20: Administration
    1. Goals
    2. What Is a CMS?
    3. Administrators
    4. Login
    5. Users
    6. Photos
    7. Questions
    8. Answers
    9. Exercises
  29. Chapter 21: Testing
    1. Goals
    2. Questions
    3. Answers
    4. Exercises
  30. Chapter 22: CodeIgniter: Bootstrapping
    1. Goals
    2. Why CodeIgniter?
    3. Why Not CodeIgniter?
    4. URL Rewriting
    5. Routes
    6. Questions
    7. Answers
    8. Exercises
  31. Chapter 23: CodeIgniter: MVC
    1. Goals
    2. Differences
    3. Models
    4. Controllers
    5. Questions
    6. Answers
    7. Exercises
  32. Chapter 24: CodeIgniter: Extending
    1. Goals
    2. File Uploads
    3. Third-Party Libraries
    4. Extending the Core
    5. Questions
    6. Answers
    7. Exercises
  33. Chapter 25: CodeIgniter: Testing
    1. Goals
    2. Tools
    3. The Alternative
    4. Questions
    5. Answers
    6. Exercises
  34. Chapter 26: Zend Framework: Bootstrapping
    1. Goals
    2. Why Zend Framework?
    3. Why Not Zend Framework?
    4. Getting Set Up
    5. Routes
    6. Questions
    7. Answers
    8. Exercises
  35. Chapter 27: Zend Framework: MVC
    1. Goals
    2. The Differences
    3. Models
    4. Controllers
    5. Questions
    6. Answers
    7. Exercises
  36. Chapter 28: Zend Framework: Extending
    1. Goals
    2. File Uploads
    3. Third-Party Libraries
    4. Questions
    5. Answers
    6. Exercises
  37. Chapter 29: Zend Framework: Testing
    1. Goals
    2. Installing PEAR
    3. Installing PHPUnit
    4. Running the Tests
    5. Adding Tests
    6. Questions
    7. Answers
  38. Chapter 30: CakePHP: Bootstrapping
    1. Goals
    2. Why CakePHP?
    3. Why Not CakePHP?
    4. Getting Set Up
    5. Routes
    6. Questions
    7. Answers
    8. Exercises
  39. Chapter 31: CakePHP: MVC
    1. Goals
    2. What’s in a Model?
    3. Controllers
    4. Finishing Up
    5. Questions
    6. Answers
    7. Exercises
  40. Chapter 32: CakePHP: Extending
    1. Goals
    2. File Uploads
    3. Third-Party Libraries
    4. Questions
    5. Answers
    6. Exercises
  41. Chapter 33: CakePHP: Testing
    1. Goals
    2. Testing
    3. Questions
    4. Answers
    5. Exercises
  42. Appendix A: Setting Up a Web Server
    1. Goals
    2. Windows
    3. Linux
    4. MAC OS X
    5. You Passed, with Flying Colors!
  43. Index
O'Reilly logo

CHAPTER 17

images

Sharing

Relationships are at the heart of any social network. In the Chapter 16, we had a brief look at how to search for other social network users, and in this chapter we will make a way to befriend them! We will also explore the topic of status/link sharing, and integrate it all into an activity feed.

Goals

  • We will create user-friendly error pages that present exception stack traces when the application is in debugging mode.
  • We will create the models, actions, and views necessary to support adding/removing friends from our account.
  • We will create the models, actions, and views necessary to be able to share messages, and read messages ...

The best content for your career. Discover unlimited learning on demand for around $1/day.