Skip to content

.NET Core sample app for renting digital movies

License

Notifications You must be signed in to change notification settings

LeviHassel/.net-flicks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NetFlicks (.NET Core 2.2 Sample App)

.NetFlicks is a .NET Core sample app for renting digital movies and viewing details such as cast and crew. It contains custom-built data tables for efficient paging, searching, sorting and editing of thousands of items. Its main focus is to showcase best practices for multitier system architecture, database design and intuitive, mobile-friendly UI. This project has been a great learning experience for me and I hope it can help other developers looking for a solid template to build on.

.NetFlicks Preview

Demo

.NetFlicks Demo

Stack

Database Design

The database for this solution uses Entity Framework and ASP.NET Identity. I chose not to use Identity Roles, instead allowing all users to see both the Client and Administrator UI at once for simplicity. The database, called DotNetFlicksDb, is automatically seeded with data for 40 movies, provided by TMDB. .NetFlicks Database

System Architecture

This solution is divided into four layers based on IDesign methodology:

Layer Description Able to Call Model
Clients An entry-point to the system, such as an MVC site or REST API Managers ViewModel
Managers Manages the workflow of a call chain, handles business logic Engines, Accessors DTO
Engines Encapsulates algorithms and business logic (optional layer) Accessors DTO
Accessors Accesses data from resources like databases and APIs None Entity

IDesign is a closed architecture that focuses on encapsulating volatility, minimizing coupling and separation of concerns. The official IDesign documentation is sparse, so I'd recommend reading Software architecture and project design, a mechanized approach for a quick intro to the method.

Here's my implementation of IDesign for this solution: .NetFlicks Architecture

Setup

Getting Started

  1. Install the following:
  2. Download this repository
  3. Open the solution in Visual Studio and run the Web project (this may take some time, as it will create and seed the database)
  4. Log into the default administrator account (email: [email protected], password: p@ssWORD471) or create your own account to start using the site

Tips

  • Access/manage database
    • Inside Visual Studio, open the SQL Server Object Explorer window by going to View->SQL Server Object Explorer
    • Expand (localdb)\MSSQLLocalDB and the Databases folder to find DotNetFlicksDb (exists only after you first run the project)
  • Catch emails in development
    • Install Papercut, a fake SMTP server that you can use to catch outgoing emails in development
  • View logs and exceptions

Troubleshooting

  • Can't find a LocalDB instance in SQL Server Object Explorer
    • Open Visual Studio Installer
    • Modify your Visual Studio Installation
    • Go to the Individual Components tab
    • Scroll down to the Cloud, database and server section
    • Ensure that SQL Server 2016 Express LocalDB is checked and click Modify
  • Admin Settings pages are slow or unresponsive
    • LocalDB requires a certain amount of free memory to efficiently run large database queries
    • Try closing processes until your memory usage drops and then reload the page