Web Application Template (C#)

by kayub

RELEASED : v1.1, See Changelog below.

This template package is designed to allow you a quick start when creating new web applications. In fact, this package should save you at least 6 hours of development time, if not more. It is meant for web developers who want structure to their projects and reusability. It includes many useful features that will aid you in rapid application development.

Requirements

  • Visual Studio 2010
  • C#

Features

.NET 4.0 & 3.5 Support

This web app template package contains two client projects preconfigured for .NET 4 and 3.5. Both projects are identical and use the same libraries so you can just delete the one you don’t need!

Automatic Web.config Transformations

With Visual Studio 2010, it is easier than ever to setup custom web.config configurations for your different environments. This package is already setup to automatically change your database connection strings and security policies when you publish your application in Debug or Release modes. You can alternately setup your own build configurations (Dev, QA, Prod, etc.).

Error Logging and Reporting

This package is pre-configured to use ELMAH , an open source error logging and reporting module. ELMAH allows you to view all .NET errors that have occurred and can even email you whenever an error occurs or send a tweet via a Twitter account. The package also includes generic error pages that are shown so visitors don’t see any .NET exceptions.

Automatic Compression and Minification of CSS & JavaScript

This package is pre-configured to use the free YUI Compressor package to automatically minify and compress your CSS and JavaScript files. It does not combine them into one file, so you don’t have to worry about managing a list or sending visitors more data than they really need. The package will automatically cache files, which you can configure. When you are debugging your application, it will not cache any data to provide you easier development support.

Integration of Microsoft Anti-Cross Site Scripting

This package includes integration with Microsoft Anti-XSS module to provide helper methods that will safely sanitize inputs for use in your application.

Over 25 Helper & Extension Methods

This package includes over 25 useful extension and helper methods to assist you in your development. Helpers are organized into: string extensions, integer extensions, decimal extensions, date extensions, security extensions, boolean extensions, other extensions, data validation, and helper methods. These include:

  • String/Integer/Date.IsValid… – Validates integers, emails, credit card number formats, IP addresses, URLs, US phone numbers, and dates.
  • String.ToPlainText – Strip HTML tags from input
  • String.Slugify – Converts a string into a URL -friendly and SEO -friendly string (“slug”)
  • String.ToSafe… – Wrapper extensions for Anti-XSS methods that convert HTML , URLs, and attributes into safe strings
  • Date.Week – A date extension that returns the week a date falls on
  • Date.IsLastWeek/IsThisWeek – Will determine whether a date was last week or this week
  • Integer.ToOrdinal – Converts an integer into an ordinal string (1 becomes 1st, 102 becomes 102nd, etc.)
  • String.Summarize – Attempts to get the first paragraph of a string
  • String.LimitWords – Attempts to limit the words returned in a string
  • And many more…
Includes Common JavaScript Plugins

This package includes the latest jQuery release (1.4.2) along with the Datejs component. It also includes these common jQuery plugins:

  • ColorBox – a Lightbox viewer for images, inline content, AJAX content, and more
  • jQueryUI – the full package of jQuery UI extensions for tabs, menus, effects, and more
  • timeago – lets you show relative time to visitors (2 seconds ago, 3 days ago, etc.)
Base Style Sheets

This package sets up basic CSS styles such as reset styles, default styles, and font sizes. It also includes several helper classes.

Enhanced Debugging Support

This package comes with a component that will let you dispatch debugging messages to your debug window. It will report the date and time (down to the millisecond) that the message was sent, which object/class it was sent by, and what method the message appeared in. Example:

[3/16/2010 14:45.445] ASP _Default_OnLoad says: I am loading

LINQ to SQL Support & Debugging

The package is configured to use LINQ to SQL as your database provider. Included is a DataContext factory that will generate and cache your connections to provide faster, more efficient database connectivity. In addition, the package also includes a LINQ to SQL logger that will log all SQL queries to your debug window. This lets you tweak your queries for maximum performance.

Membership Quick Start

The package includes basic membership features such as login, logout, registration, and change password support. It is already connected to the test database for easy plug ‘n play.

Localization Ready

This package is setup to allow easy localization, including an application resource manager to manage resources and the current culture being used. All pages that inherit the PageBase class will automatically use the proper culture and resources. Included are two languages, en-US and en-GB to provide examples. You can easily set the default culture via a Web.config parameter.

Organized Folder & Solution Layout

This package uses an organized layout for its file system and solution. The base file structure looks like:

  • Art – manage your art assets
  • Docs – contains all documentation related to the project
  • License – contains all licensing documents for all components
  • Pub – where you publish your debug/release web sites for easy FTP upload
  • Src – where all source files are located for the code

This package also uses a basic tiered structure for the solution: Data, Business (Library), and Presentation (ASPX). This allows you to separate your programming logic from presentational elements and data.

Unit Testing

The package includes a unit test project for the Library to test your business logic and code. The package includes unit tests for all the helper methods provided with the project as examples. Because of the variety and preferences of individual developers, no mocking frameworks are included.

Documentation

This package includes extensive documentation in a help file and within the code itself. In addition, the package includes a pre-configured Sandcastle Help File Builder project to document your project.

Changelog

2010-04-01

  • Added .NET 3.5 compatibility (WebApp3.5) with same functionality
  • Added extra setup information for local IIS7 boxes
  • Added troubleshooting questions to doc
  • Added extra Elmah config setting to allowRemoteAccess on Debug/Release configuration
  • Added extra setup data for SQL server generation (schema versions) to fix bug with new DB generation and throwing exceptions about schema versions
  • Added new helpers and unit tests:
    • Pluralize
    • SendEmail (multiple variants)
    • ToSizeFormat
    • GetMonthName
    • GeneratePageTitle
  • Added new and improved minification module to minify any CSS /JS file served by the site
  • Organized solution into Solution Folders to show layers clearly
  • Fixed bug where element in transform configs would not actually publish
  • Incremented version to v1.1

2010-03-16

  • Initial release (v1.0)

$12

Prepaid customers
pay just $10 - how? Prepay Your Account With our deposit system not only will purchasing be much faster, but we’ll also take $2 off the price! Find Out More Price

You must sign in or sign up to purchase this item.

Purchase 22 purchases

File Types Included
Active Server Page ASPX C# CS CSS HTML JavaScript JS SQL
Item Attributes
Created 1 April 10
Compatible .NET versions 3.5, 4.0
Compatible Browsers Chrome 4, Chrome 5, FireFox 2, FireFox 3, IE6, IE7, IE8, Opera, Safari