ASP.NET 3.5 Social Networking
Product Description
In Detail
Social Networking is all about developing connections or ties between friends and associates. While people have always networked with one another the Internet has allowed us to network with people all over the world easily. Any interest or cause can support its own social network, where fans and followers can meet, chat, and share their views. But building a social networking site from scratch involves some complex logic, and some serious coding.
This book shows how to build a scalable, enterprise-ready social network using ASP.NET. The book uses the latest features of ASP.NET to provide a platform that is efficient, easy to maintain, and extensible. Whether you want to build your own social network, are developing a social site for a customer or employer, or just want a practical guide to developing complex ASP.NET applications then this book is ideal for you.
The book starts by planning the essential features of our social network, and then building a ‘community framework’ that will give our site a solid foundation and enable us to add all our social networking features. We then go on to create user accounts, profile pages, messaging systems, ‘friend’ relationships between members, media galleries, blogs, message boards, groups, and more. Along the way you will see LINQ, MVC, AJAX, and other features of ASP.NET 3.5 put to practical and interesting uses.
What you will learn from this book?
- Make key decisions about architecture and the tools to use
- Build a solid ‘community framework’ to give your site a strong foundation; the principles explored this framework will apply to any large-scale web application
- Create user accounts, set up a permissions system, and handle password encryption
- Work with user profiles, and establish ‘friend’ relationships between different users
- Let users customize their profile and communicate with one another
- Understand core concepts of LINQ to SQL and work with it in a layered environment
- Moderate the site, ensuring safety, dealing with cross-site scripting (XSS), privacy, and decency
- Utilize the Model View Presenter pattern with ASP.NET 3.5 to enable Test Driven Development
- Add an internal search engine using SQL Server and Lucene.NET
- Work with appropriate design patters to create a scalable long-lasting enterprise framework
Approach
Each chapter starts by showing the user experience we are going to create in the chapter. It then has a section discussing the major design decisions we face in building these features, and finally presents the ’solution’ – including the overall architecture and highlighting the most important code elements.
The book presents a lot of real-world code, with comprehensive explanation and discussion. The full social network application is available for download from the Packt website, for you to examine, study, and modify.
Who this book is written for?
This book is written for ASP.NET and C# developers who want to build an enterprise-grade Social Network, either for their own business purposes or as a contract job for another company.
The book assumes you have prior experience of developing web applications using ASP.NET 3.5, C# 3.0, SQL Server 2005/2008, and Visual Studio .NET 2008; it focuses on topics that will be of interest to existing developers – not on providing step-by-step examples for each detail.

This book fills a much needed gap in web development, specifically building a social networking website. It is interesting that there are not very many open source social networking platforms based on .net, most are in PHP, or Python, and run on the LAMP stack, this gives some much needed competition.
The core design of the system is pretty well decouples, and adhears to Separations of Concerns, and Single Responsability Principal, not much duplicate code either, however i think the choice of Linq To Sql was unfortunate since it is clear Microsoft will be abandoning it and should have used EF or other alternatives like NHibernate or the many other Repositories. The good news is that the code is designed well enough it isn’t too hard to swap out the persistance providers.
I was also Surprised they didn’t use the “Visual Studio for Database Professionals” for the database since it would be a lot easier then the nant and scripting goodness they jumped through to get it to work right. (I understand VS database edition costs some serious money or did, and it isn’t as open as the ALT.NET tooling)
The features are lacking for the shipped source code, and tests are pretty slim, but it is a good starting point, just surprised it shipped without complete and functional source code.
I tried to get the admin-site working and can’t find anywhere in the book or source code readme’s on how to get a login with access (adding permissions in db doesn’t appear to be enough) but i will forgive all these shortcomings for the fact this is the first offering of its kind in our space and welcome the contributions this book provides.
I hope the code gets cleaned up or an open source social platform gets released based on the code, it is pretty neat what is possible with the latest coming out of redmond.
Rating: 3 / 5
I’m happy with the purchase of this book. I’m in the process of building a website with some social networking aspects so i was hoping this book would eliminate some of the grunt work, and it does.
The author does a good job of explaining his architecture methodologies and decisions. It probably helps if you are familiar with some principles of enterprise architecture to begin with so that you aren’t locked strictly into the authors design patterns. I’ve taken some of andrews ideas and mixed them with my own, and i’m happy with the results.
The best part, as i alluded to before, is that the author has written all of the database schemas, business and data layers, and wrapper and service classes needed to get you started with a social networking site. Even though you probably won’t use everything he did, you can still use a lot of it and it saves a lot of typing and thinking if you’re starting from scratch. He also has a lot of good ideas and uses many open source technologies that are available. (Even though personally i’m sticking with enterprise library for some things like DI.) As one reviewer alluded to the author does used Linq to Sql as opposed to entity framework, but i had no problem with this. If you want to use entity framework you can just swap out your domain model, no big deal.
Make sure you download the sample site from codeplex so you don’t have to type everything from scratch. The appendices are online too. It will be a while before my site is ready to go live but i think this book will be a great asset in getting it code complete.
Rating: 4 / 5
This book is important if you’re “into” social networking.
There are problems with the book – it has an “open source” feeling to it, where you’re expected to be able to make things work. I didn’t like this. I like things polished. However:
1. The book is written with humor.
2. The author knows what he’s talking about.
[...]
4. I’m learning lots and lots of stuff from the book.
5 stars.
Rating: 5 / 5
I picked up this book to reinforce some ASP.NET concepts as my day job consists of maintaining legacy code and I don’t have the opportunity to keep my .NET skills current. The author is very knowledgeable of the subject matter and does explain a lot about what goes in to an “enterprise” application.
One thing I didn’t like, however, is that he repeatedly says how he’s going to use Test Driven Development (TDD) but unless I missed something he dives right in and says how to go about creating the code without starting from the tests first like TDD says; just from skimming the first few chapters I didn’t see much if anything in regards to the tests, it’s all actual business code which TDD states should *never* exist without a corresponding test. I’ve only started reading the book, however, so it might show up later down the road, or perhaps writing the tests is left as an exercise to the reader.
I’m still finding this to be a really great book and would highly recommend it to someone who knows .NET (He says you should know ASP.NET 3.5 already but I’m coming with knowledge of 2.0), has gone through the tutorials on the ASP.NET site, and now wants something meatier to learn how to develop a “real” application using real world practices.
Rating: 4 / 5
I am a Consultant who started to look into Domain Drive Design, Test Driven Design, and Model View Presenter when thrown into a recent gig. It’s been very challenging on my own time with my daily work duties to get caught up on these improved methods for developing highly scalable, enterprise ready solutions. I was so thankful this book came along. I am only on chapter 3 + having read the two appendixes (they are around 100 pages together) I have started to understand everything at an amazing pace. Not only is the subject matter fun (who doesn’t have a Myspace or Facebook page and wonder, how would i do that if i wrote it?) it also features a plethora of open source tools and tips. Not to mention the author gets amazing kudos for even mentioning ReSharper *my favorite 3rd party tool* he also includes tips and tricks throughout the book on better ways to use it. If you are college grad looking to see how a real development team would build a enterprise product or even a veteran developer looking to sharpen his skill sets in this new age of collaboration and technology (yes world we are already on .net 3.5, not to mention 2.0 has existed for some time!) this is the book for you to get.
*Another thing off topic but might be interesting to some.*
Most of my work is done in SharePoint and I feel that as a bonus to learning these new methodologies I am also getting some cool ideas to help me extend SharePoint in a more collaborative way. Even though this book has nothing to do with SharePoint. DDD and MVP lend itself well to SharePoint development.
If you are still unsure go to the publishers website download appendix A and B and get what I feel are huge bonuses to an amazing book. Appendix B is a great quick start guide to test driven design.
Rating: 5 / 5