Visual Studio Solution

image

The solution is broken apart into six projects

HuscyRescue.Console

This project is mostly unused. It was created to provide functionality that we haven’t needed in some time:

  • Generate HTML page to list dogs
    • At one time we didn’t use PetFinder’s iFrame to show our dogs and we created a page for each dog as the came in. We could generate a table based HTML page that linked to each active dog by taking an extract of data from TrackABeast. This became too much work once we started taking in several dogs each week.
    • We used to have trouble with the PDFs people would fill out on our website where the information would be there but wasn’t visible unless a field had focus – meaning only the current field’s data was visible. So, a means to flatten the PDF was created using iTextSharp. We rarely have this problem now and most people use the online form instead of the fillable PDF.

HuscyRescue.Core

This contains core functionality to our application which could be ported to any client (if we ever created a WPF or some other client)

  • Data.Extensions
    • EntityFrameworkContextHelper
      • Unused helper class to automatically attach and update an object in the database. With EF5 this is no longer needed
    • HuskyRescueEntitiesHelper
      • Wrapper for the EntityFramework model. Used to contain some of the functionality that was being performed in multiple areas in the application in previous versions (not in version control now).
  • Email
    • AmazonEmailMessage
      • Provides integration into Amazon SES, Simple Email Service, which was used when we hosted with GoDaddy due to all SMTP traffic going through the GoDaddy SMTP servers and taking 6+ hours to actually send.
    • EmailMessage
      • Provides ability to send emails in various ways via System.Net.Mail
    • Pdf
      • Used to populate fillable PDF with data through iTextSharp.
    • PetFinder
      • Integration into the PetFinder API
      • Currently used get a random dog needing a foster home and displaying the information on our home page
      • Could be used to programmatically update our data in PetFinder when updating data in our own application
    • TrackABeast
      • Classes modeling TAB’s CSV (tab delimited) data for dogs
      • Used with Console project for creating HTML page with the CSV data
      • Should probably move this to the Model Projects

HuscyRescue.Model

Contains EDMX file for Entity Framework. This is used to create a context (connection) to the database instead of using SQL statements and/or stored procedures.

SqlScripts folder contains scripts to create the database used in this project. Run the scripts in order and then run the scripts in the DataInserts folder to populate necessary information into the database

HuscyRescue.Web

The ASP.NET MVC project.

  • App_Start
  • Areas
    • Contains SGAccount code
  • Content
    • Contains all CSS stylesheets, fonts, images
  • Controllers
    • Contains controllers for all of the Views
      • Account – not used, instead we use SGAccountController to manage users, login, logoff
      • Admin – contains Admin related actions
      • Adoption – all actions related to Adopting
      • Base – base controller that each of the other controllers extends
      • Blog – basic blog controller that needs to be fully extended into a full blog
      • Business – all actions related to businesses / organizations
      • Events – all actions for events, event sponsors, and registrations
      • Home – main page controller
      • Info – all actions here are for informational uses on our public pages
      • Log – actions for viewing logs stored in the database
      • Person – actions for managing people
      • PetFinder – actions for invoking PetFinder API and returning views containing that data
      • SGAccount – actions for sign-on/off, manager users and user roles
      • Store – actions for online store
      • Tests – test actions, not meant for anything used in production
  • Forms
    • contains PDF forms hosted on our site
  • Models
    • Mostly unused – this is where MVC sticks View Model classes by default
  • Scripts
    • Contains JavaScript files sorted by common scripts (Vendor) and ones specific to each controller’s actions
  • Views
    • Contains all of the Views which make up the webpages

HuscyRescue.Web.Core

Provides abstraction of some functionality from the Web folder that could be used in some unknown/unforeseen project

  • App_start
  • Data
    • Utility class, HuskyRescueEntitiesManager, provides access to the EF Context wrapper class in the Core project. Automapper translations are performed here. The Manager class is called from the Web project’s Controller classes.
  • FileUpload
    • FineUpload integration with MVC. Has associated JS files to provide file uploaded from clients
  • Google
    • Google API used to pull events from a Google calendar to display on our home page
  • Infrastructure
    • ActionFilters
      • Contains an action filter to compress responses to client
    • Attributes
      • DynamicJsonAttribute used with DynamicJsonBinder to provide a dynamic object which can be used to bass JSON in/out of an Action
      • RoleRequiredAttribute to make properties required in a ViewModel for specific roles
        • [RoleRequired(ErrorMessage = "Street Address Required.", IsRequiredForRoles = false)]
    • Binders
      • Custom binders. Currently only has DynamicJsonBinder used with DynamicJsonAttribute to provide a dynamic object which can be used to bass JSON in/out of an Action
    • Config
      • Custom config classes. Currently only the AutoMapper configuration is in here to avoid having it in the Web project. This allows us to only reference the ViewModel classes in the Web project.
    • Extensions
      • Extension classes. Most of this are extending HtmlString and MvcHtmlString.
      • These are used for much the same reason CSS exists and are the same as ASP.NET custom controls. Define the HTML for a custom control in these classes and reference them in your Views (cshtml)
    • SignalR
      • Contains classes for Hubs and Connections
        • The connection class will likely be removed in favor of only using Hubs
    • JsonNetResult.cs
      • Overloaded MVC ActionResult that returns any object as JSON via JSON.NET
  • ViewModel
    • Contains the classes used for the Views in the web project which are mapped to the classes in the Model project via AutoMapper

HuscyRescue.Web.Tests

Currently this isn’t being utilized, but it would be really nice to have tests for each of the projects.

Last edited May 31, 2013 at 6:58 AM by jamesbolton, version 1

Comments

No comments yet.