ValcomWeb

Enter a topic name to show or a new topic name to create; then press Enter

ValcomWeb Content Management Website

ValcomWeb is a web application to allow control over web content displayed and to keep the web site fresh with new content and images. This is a simple

content management system where all the data is contained in a database.There is an identity management system to ensure that content is only created by individuals with the appropriate authority. It also allows managers to enter actual position requirements for display to prospective employees or consultants. Finally it will accept applications for those positions with resumes included as part of an submission form.

System Architecture

The system uses ASP.Net version 5 and Model View Controller (MVC) 6 as the core framework for development. At the time of creation this is at beta 7 release. The database access uses Entity Framework (EF) version 7, which is also at a beta 7 release. System Authentication is managed by Microsoft Identity version 3, also in beta 7 version. Other architectural elements that are standard with ASP.Net are:

There are also a number of addon that are used as part of the architecture these are:

All of the tools used in the coding of this application are Open Source

Execution Architecture

There are 3 possible execution architectures. The first is Windows using IIS on a Windows Server with SQL Express or SQLite. The second possible architecture is using Windows but replacing IIS with Kestrel. The third architecture is either Linux or Mac OS X using Kestrel and SQLite.

ASP.Net 5

ASP.Net 5 has dual target environments. The first is a normal MS .Net Framework environment using version 4.5.1 or higher. The second environment is a Linux or Mac OS X environment using version 4.6.0 Core Framework. This second environment has about 95% of the the Microsoft Windows environment implemented at this time, with a target of 98%+ within a year. The main elements not yet implemented are network based elements, where the Linux and Mac use different capabilities than are available within Windows. The most important missing elements are the ability to send emails on the non-Windows environments, which means that a send mail implementation must be developed using lower-level calls than are normal in an ASP.Net application. The standard web server is a variant of IIS, either full IIS or IIS Express. But there are 2 alternate web servers available, one for Windows and one for Linux.

Documentation for this framework is at http://docs.asp.net This documentation is a work in progress with new topics being added daily now.

Model-View-Controller (MVC) 6

The separation of concerns into data model, web page display and an element that controls data access and data population of a view or data extraction from a view. This minimizes impact when one part of a program changes and ensures that the location for the changes to be implemented are clearly understood. The data model can be implemented in a database or by a file storage system. The data model may also be extended to have models that are only used in the views where there is a combination of data from persistent storage to temporary data views for display to the user on a web page. The creation of the actual web page for display to the user is the responsibility of the view. This will take the supplied data and format it for HTML5 output using a web server supported by ASP.Net 5. The business logic of the application is managed by the controller, where data is taken from the model and supplied to the view as need. Separate classes may be created for business logic that are then accessed by the controller. Also data classes may have data logic implemented as well.

The MVC framework relies heavily on a set of conventions for naming of Controllers and Actions within Controllers tied to Views and folders within Views where those folders match the name of the Controllers they work with and the names of the Views themselves match the name of the Actions in the Controllers.

Entity Framework 7

The Entity Framework is responsible for abstracting the management of a Database Management System away from the developer and is responsible for much of the programming efficiencies of ASP.Net over other development environments. Entity Framework automatically creates the program to create the data tables in a database. There is support for SQL and NoSQL databases in entity Framework, so you can pick whichever best suites your needs and environment. There is support in Entity Framework for writing queries in Structured Query Language ("SQL"), but it is not possible to write direct NoSQL queries. Normally all data access is done using Language Integrated Queries (LINQ), which is suitable for 99% of all data queries. EF 7 is a complete rewrite from the prior version, EF 6. As such, it does not have all the same capabilities of EF6 yet. EF 7 is only suitable for system where the need for complex transactions is not required.

Microsoft Identity 3.0

This is an OAuth based implementation of Identity Management. It is a non-Windows based implementation where User Ids and hashed passwords are stored in a database. The User Ids are email names rather than person names, which is necessary so that there is interoperability between all the possible OAuth providers. In addition to the local database provided identity management, this system works with Facebook, Google and Twitter where the login from any of those systems can be configured to work with the identity management for this application. However, this capability for external identity provider support is not required or used in this application at this time.

Code Repository

All code exists locally and in a cloud repository, using Visual Studio Online. The repository format is Git. The url for the repository is https://jwdavidson.visualstudio.com/defaultcollection/_git/ValcomWeb2New Git was chosen over Team Foundation Server as this is not an option in the open source Visual Studio Code, which is needed for Linu and Mac OS X development.

Code Structure

Visual Studio provides a template which pre-populates many of the files and folders to start building an ASP.Net 5 applicatioun using MVC 6. This same functionality is available in Linux and Mac OS X using the scaffolding tool, Yeoman

The sections below will be expanded in separate topics with links added as the topics are created.

Configuration Files

Configuration files in an MVC 6 application are contained in the file Startup.cs and in various *.json files and some other miscellaneous files, all of which are listed below:

Model Files

There are 2 kinds of data models: those that have data persisted in the database and those that convert persisted data to classes used by Views. Microsoft provides 2 files in an Identity using MVC application: the file IdentityModels is used to hold the dbContext and the definition of the data sets that are persisted; and the file AccountViewModels holds the definitions of data used for managing accounts, though all of this data is used by abstraction Managers.

Representative files are discussed in detail:

Migration Files

Migration files are all created by Entity Framework to manage the database and to show the individual changes in each iteration. The numbers at the start of migration class files represent the year, month, day, hour, minute and seconds when the file was created. There are 2 parts to each file: the class itself and the designer file.

The migration files are database provider specific. The files generated for SQL Server are different from those generated for SQLite.

Repository Files

Repositories are a means of abstracting data interactions of Entity Framework so that different implementations can be injected to allow testing of the model / controller interaction and to standardize calls to the database.

Controller Files

The controllers are responsible for getting data from the database, using the appropriate logic and making it ready for display in the required Views.

View Files

View files are what generate the actual html displayed by the website. These files are are a mix of html code and Razor code

Media Files

jQuey and Bootstrap files


Version: 17   Revised: 2015-10-02 12:21:23 Last Updated by: 2001:470:b0ad:1:e0d7:df7b:df40:3a15 Rename Show Links to Topic