![]()
ASP.NET 3.5 Social Networking
Table of Contents
ASP.NET 3.5 Social Networking
Credits
About the Author
About the Reviewer
Preface
What This Book Covers
What You Need for This Book
Who is This Book For
Conventions
Reader Feedback
Customer Support
Downloading the Example Code for the Book
Errata
Piracy
Questions
1. Social Networking
What makes this topic so important
Large communities
Niche communities
Once I have my own social network, then what?
Customer service
Content moderation
Growing infrastructure requirements
Our social network—Fisharoo
This book's approach
Problem
Design
Solution
Features of our social network
Accounts
Profiles
Friends
Messaging
Media galleries
Blogging
Message boards
Groups
Comments
Tags
Ratings
Framework
Scaling up
Summary
2. An Enterprise Approach to our Community Framework
A layered architecture versus a non-layered architecture
Layers
Domain-driven Design
Ubiquitous language
Entities
Value objects
Services
Modules
Aggregates
Factories
Repositories
Model View Presenter pattern
Model
View
Presenter
How it works
Factory pattern using StructureMap
Repository pattern and LINQ
Wrappers for everything!
Configuration
Cache
Session
Redirection
Email
Error handling and logging
Error handling
Logging
Summary
3. User Accounts
Problem
Design
Registration
Accounts
Password strength
Terms and conditions
CAPTCHA
Email confirmation and verification
Security
Permissions
Password encryption/decryption
Logging in
Password reminder
Manage account
Solution
Implementing the database
The Accounts table
The Permissions table
The AccountPermissions table
The Terms table
Creating the relationships
Implementing the data access layer
Setting up LINQ for the first time
A DataContext wrapper
Building repositories
Selecting accounts
Saving an account
Deleting an account
Adding permissions to an account
The other repositories
Permissions repository
Terms repository
Implementing the services/application layer
Extension methods
Implementing the business/domain layer
Implementing the presentation layer
Model view presenter
View
Presenter
Model
Registration page
Email verification
Password recovery
Edit account
Implementing security
SiteMap
SiteMap wrapper
All nodes
Navigation
Checking access
Security
Implementing navigation and security
Summary
4. User Profiles
Problem
Design
Profile
Manage profile
Avatar
Custom avatars
Gravatar
Public profile
Custom homepage
Privacy
News feed
Solution
Implementing the database
The Profiles table
Level of Experience
The Attributes table
The Privacy table
The Alerts table
Creating the relationships
Setting up the data access layer
Building repositories
Implementing the services/application layer
ProfileService
Account service
Privacy service
Alert service
Profile Attribute Service
Implementing the presentation layer
Privacy
Manage privacy
Manage profile
Avatar
Upload avatar
Image manipulation
Gravatar
Public profile
Custom homepage
News feed
Summary
5. Friends
Problem
Design
Friends
Finding Friends
Searching for a Friend
Inviting a Friend
Importing Friends from External Sources
Sending an Invitation
Adding Friend Alerts to The Filter
Interacting With Your Friends
Viewing Your Friends
Managing your friends
Following Your Friends
Providing Status Updates to Your Friends
Solution
Implementing the Database
The Friends Table
Friend Invitations
Status Updates
Creating the Relationships
Friends Constraints
FriendInvitations constraints
StatusUpdates constraints
Setting Up the Data Access Layer
Building Repositories
FriendRepository
FriendInvitationRepository
StatusUpdateRepository
AccountRepository
Implementing the Services/Application Layer
FriendService
AlertService
PrivacyService
Implementing the Presentation Layer
Searching for Friends
SiteMaster
Search
Invite Your Friends
Outlook CSV Importer
Importing Contacts
Selecting Contacts
Confirm Friendship
Login
Registration
Show Friends
Friends on Profile
Status Updates
Summary
6. Messaging
Problem
Design
Messages
Recipients
Solution
Implementing the database
Messages
MessageTypes
MessageRecipients
MessageRecipientTypes
MessageStatusTypes
MessageFolders
Creating the relationships
Setting up the data access layer
Building repositories
MessageRepository
MessageRecipientRepository
Implementing the services/application layer
MessageService
Email
AlertService
FriendService
Implementing the presentation layer
New message
Friends control
Default (or Inbox)
Folders
Read message
Summary
7. Media Galleries
Problem
Design
Files
Folders
File upload
File system management
Data management screens
Solution
Implementing the database
Files
File system folders
File types
Folders
Folder types
Account folders
Account files
Folder files
Creating the relationships
Setting up the data access layer
Building repositories
FileRepository
FolderRepository
Implementing the services/application layer
FolderService
Implementing the presentation layer
File upload
Receiving files
Testing our receiver
Multi-file upload
Photo albums
MyPhotos
ViewAlbum
Summary
8. Blogs
Problem
Design
Blogs
Solution
Implementing the database
Blogs
Creating the relationships
Setting up the data access layer
Building repositories
Implementing the services/application layer
AlertService
Implementing the presentation layer
Latest blog posts
My blog posts
Fancy URL support
View post
Create or edit post
Summary
9. Message Boards
Problem
Design
Categories
Forums
Threads and Posts
Friendly URLs
Alerts
Solution
Implementing the Database
Categories
Forums
Posts
Creating the Relationships
Setting Up the Data Access Layer
Building Repositories
BoardCategoryRepository
BoardForumRepository
BoardPostRepository
Implementing the Services/Application layer
BoardService
AlertService
Implementing the Presentation Layer
Default.aspx
Redirector
UrlRewrite
ViewForum.aspx
ViewPost.aspx
Post.aspx
Summary
10. Groups
Problem
Design
Groups
GroupMembers
GroupTypes
GroupForums
Schema
Solution
Implementing the database
Groups
GroupMembers
GroupTypes
GroupForums
Creating the relationships
Setting up the data access layer
Building repositories
GroupRepository
GetGroupByForumID
IsOwner
CheckIfGroupPageNameExists
DeleteGroup
GroupToGroupTypeRepository
SaveGroupTypesForGroup
GroupForumRepository
GroupMemberRepository
GetMemberAccountIDsByGroupID
DeleteGroupMembers
GroupTypeRepository
AccountRepository
GetApprovedAccountsByGroupID
GetAccountsToApproveByGroupID
Implementing the services/application layer
GroupService
IsOwnerOrAdministrator
SaveGroup
AlertService
Redirector
WebContext
Implementing the presentation layer
ManageGroup
WYSIWYG
Image upload
Members
Data pagination
CheckBoxLists without the CheckBoxList control
Default
UrlRewrite
ViewGroup
Private/Public
MyGroups...