Marco Bellinaso's Blog

 Tuesday, January 10, 2006

Yes, I know, it was 20 days ago that I said I would have published the link to the sample site developed for my "ASP.NET Website Programming - Problem Design Solution" book in a couple of days...but you know, there was Christmas, the New Year's Eve etc. etc. Anyway, here it comes: http://www.dotnet2themax.com/TheBeerHouse/

The following list outlines the current features, chapter by chapter:

  1. Chapter 1: Introduction
  2. Chapter 2: Design and implementation of the site's master page, multiple themes switchable by the user at runtime (see the Themes drop-down list at the top-right corner of any page), sitemap & menu system.
  3. Chapter 3: Discussions about a lot of stuff that goes under the name of "Site Foundations", such as choosing the data store, designing a configurable DAL based on the Provider Model design patter, using System.Transactions or Serverices Without Components for managing distributed transactions, caching strategies, health monitoring & exception handling, and more. Implementation of a number of base helper classes, and configuration classes to map custom sections in web.config.
  4. Chapter 4: Design and implementation of a full-featured membership and profiling system, and role-based security. A complete administration console is also built to allow administrators to see and modify the profile of any user, including blocking or deleting it, adding or removing roles to it, and more.
  5. Chapter 5: Design and implementation of a feature-rich module for publishing articles and dynamic content. It's like a mini-CMS, that allows you define categories and articles with support of rich formatting (through a WYSIWYG editor), generates site-wide RSS feeds or feeds for individual categories (a generic RSS reader is also provided), allows users to browse through paginated articles, post comments and rate the article. A complete administration console was built to completely manage the content from the browser, including moderating comments, protecting articles against anonymous users, setting the article's visibility date range and much more.
  6. Chapter 6: Design and implementation of a module for creating and managing opinion polls. There's the ability to create multiple polls and setting one as the current one displayed on the site's common layout, archiving past polls and deciding whether the archive is accessible to anonymous users or not, choosing whether the system checks for multiple votes by the user user by using cookies and/or IP, and more.
  7. Chapter 7: Design and implementation of a module for sending out newsletters and managing the archive, which can be public or not. The great thing here is that the module uses a multi-threaded procedure to send newsletters, and takes advantage of AJAX technology to provide real-time feedback of the completion status without refreshing the whole page.
  8. Chapter 8: Design and implementation of a forums system with support for multiple sub-forums that can optionally be moderated (by users with a tailor-made role), paginated thread list with different sorting options (by date, number of replies, number of views), configurable poster level, support for avatars, signatures and much more.
  9. Chapter 9: Design and implementation of an e-commerce store. TODO!!!
  10. Chapter 10: Integration of the Web Part Framework into the site, so that authenticated users can personalize the homepage (and a few more pages) by dynamically adding, removing, editing and moving around content boxes such a poll box, the feed of latest articles, latest forum discussions, most active threads, external RSS feeds, and more. Editors and administrators can edit a shared view, to change what the homepage contains - and how it displays the content - without actuallyediting the physical .aspx file and re-uploading it.
  11. Chapter 11: Complete localization of the site's common layout, the homepage, and the Web Part controls that can be placed on the personalizable pages. The supported languages are English and Italian, and the user can choose her language at registration time, or later from the Edit Profile page.
  12. Chapter 12: full pre-compilation of the site, and deployment on the remote server, with a SQL Server 2005 DB (instead of the Express DB using during development). An installer for distributable packages was also created.

As you see, the only thing left is just the e-commerce part, which I'll be developing in the next days. When complete, I think this will be one of the most complete ASP.NET 2.0 sites around, with really a lot of features and details that you don't usually find in "sample projects". Actually, I stopped calling this just a sample quite some time ago, as I consider it a real-world site. Implementing all this stuff gave me the opportunity to describe all new controls and features of ASP.NET 2.0 within a real context, and I believe this is more useful than simple one-page examples that show new features one-by-one without integrating them into a larger project.

If you're interested in the book and the site developed, please give a look at the site online and have a tour of it...and if you have any feedback please don't be shy, your comments will be seriouly considered!

1/10/2006 3:33:26 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Tuesday, December 20, 2005

In the last couple of days I've been experimenting a lot with deploying the ASP.NET 2.0 sample website I'm building fom my next Wrox book. I mean deployment in the real world, to a real hosting space. I used aspnet_compiler.exe to precompile the site so that it's faster to load on first request, and especially to protect my code (at least a little bit) from prying eyes. Then I executed aspnet_merge.exe to merge all generated assemblies into a single file that's easier to deploy. The documentation I found most useful was the two DOC files that you can download from this page, which cover the aspnet_compiler.exe and aspnet_merge.exe command-line tools, plus the Visual Studio 2005 Web Deployment Projects add-in. This addin provides an intuitive and easy-to-use UI for the aforementioned tools. For example, you can choose the compile all source files and even the markup of the .aspx, .ascx and the other ASP.NET files into a single assembly by ticking a couple of checkboxes and building the project.

While using these tools to compile and deploy the site I ran into a problem (and its solution) that I thought would be good to report here. When you create web pages in VS2005, it doesn't create the code-beside class into a default namespace, like VS.NET2003 did. So, unless you add it manually, all your pages' code-beside classes will be defined within the default ASP namespace. Now you may wonder: what happens if I have multiple pages called default.aspx, with a _default code-beside class? This is actually my situation, as I have a default.aspx under the site's root folder, another one under /admin, and some others. This wasn't a problem while testing the site with the standard in-place precompilation, because these pages' classes get dynamically compiled into separate assemblies, and therefore there isn't any duplicate type name. Everything was fine until I tried to compile all site into a single assembly (if done manually from the command line, this corresponds to the -o switch of the aspnet_merge.exe tool, in case you're wondering); guess what, in that case the built fails, because aspnet_merge tries to merge into the same assembly multiple ASP._default types! Once the problem became clear, the solution was simple: add an explicit namespace to the pages (in both the .cs/.vb class file, and the .aspx file referencing it through the inherits attribute) that is different for different folders, so that there could be two Default.aspx pages compiled into SampleSite._Default and SampleSite.Admin._Default.

The bottom line is: always use explicit namespaces for all your pages and controls, even if it bothers you to add it manually! In the following couple of days I'll be posting more details about the sample site, and will actually provide a link to explore it online (including the admin section!). Stay tuned.

12/20/2005 8:48:49 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Wednesday, November 30, 2005

Hello everybody, and welcome to my blog! My name is Marco Bellinaso, and some of you may recognize me as one of the authors for a number of Wrox Press books, among which is ASP.NET Website Programming. I've written some articles on online and print programming magazine such as MSDN Magazine, MSDN Online, Visual Studio Magazine and ASP Today. Besides teaching how to write code, I do actually write some real code, and you find some examples in the commercial tools and products listed here on the site: Form Maximizer, CodeBox, VBMaximizer and MB ActiveX Gallery. My main area of expertise is web programming with ASP.NET and related technologies (including SharePoint 2003 (WSS and Portal), SQL Server, Enterprise Services, scripting and more), but I don't snob Windows Forms programming...when strictly required :-). I've also written most of the engine that runs the .Net2TheMax site...so while Francesco takes care of most of the content updates, I'm the one to blame if you get unexpected errors or other problems with the site (ehm...I really hope that's not the case :-D). Community-related works apart, I'm a senior developer, consultant and teacher for Code Architects Srl, an Italian firm founded by Francesco Balena and Giuseppe Dimauro, the two Microsoft RDs for Italy.

Currently, my principal occupation is finishing my new book, i.e. Wrox's ASP.NET Website Programming version 2.0. This time the book is a solo project, and I'm rewriting it completely from scratch. The general approach (Problem - Design - Solution) is quite the same, but 100% of the code is pure .NET 2.0. The solution is now much more integrated, functional and feature-rich than the first edition, and the sample site being built is actually a real-world site that you may sell to customers nearly as-is. A big difference from the previous book is that I'll set apart much more pages for introducing new ASP.NET 2.0 features such as master pages, themes, membership, navigation controls, new binding controls, web parts, localization etc. Right now I'm finishing the code for the Forums module, and very complete modules for managing users, articles, photo galleries, polls and newsletters are already there. In the next days I'll start to post more details about the sample site, and some significant screenshots. In my plan the site will be released publicly, and I will continue to support it after the book is published. I hope it will make a great example for web developers (new and not-so-new)...but I'll leave it to you to judge the code and the book. :-)

Besides keeping you updated about the book's progress status, I want to post tips & tricks I discover during the development, bugs & problems with the framework (a very very rare circumstance, hopefully), and opinions about the developer-world in general. From time to time I also plan to use this space to ask for your opinions and suggestions about the design, implementation and usefulness of ideas and projects I work on. What? This will make it an egoistic blog? Well, I'll try to keep it balanced. :-)

11/30/2005 3:24:52 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 
Get RSS/Atom Feed
RSS 2.0 | Atom 1.0
Search in the blog
Archive
<January 2006>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234
Categories

Powered by: newtelligence dasBlog 1.8.5223.1