Monday, June 30, 2014

Interfaces: Better Design, How & When to Use

An interface contains only the signatures of methods, properties, events or indexers = like a list of WHAT needs to be done by everything that implements (claims) the interface. The interface itself is only allowed to list them! Not use, define, or implement them on its own! A class or struct that implements the interface must implement the members...

Thursday, June 26, 2014

Cross-Site Request Forgery (CSRF) and ASP.NET MVC Prevention

There are two main types of easily destructive holes in a web/software design to be aware of currently. There is Cross-site scripting (XSS) which is found in applications across the web where a malicious attack can inject client-side script into Web pages. About 4/5 of the security vulnerabilities in 2007 were caused by XSS according to Symantec....

ASP.NET MVC connection to a database

Specifically, I am connecting a SQLExpress (free!) database to a MVC program. You can connect any local database in this way. Start by creating a local database. You can refer to my SQL 4 part blog post on how to use...

Tuesday, June 24, 2014

SQL: SELECT Joins (and their usage) [Part IV]

This is part IV (last one) of a set of SQL notes I wanted to post about my current fitness website project. These are the links for each part to navigate: Part I | Part II | Part III | Part IV When using SELECT,...

SQL: Data Manipulation Language (DML) [Part II]

This is part II of a set of SQL notes I wanted to post about my current fitness website project. These are the links for each part to navigate: Part I | Part II | Part III | Part IV Data Manipulation Language (DML)...

SQL: Data Definition Language (DDL) [Part I]

This is part I of a set of SQL notes I wanted to post about my current fitness website project. These are the links for each part to navigate: Part I | Part II | Part III | Part IV I am working on a fitness website...

Saturday, June 21, 2014

Fun with Nuances (C# Attributes vs. Properties)!

An attribute is a way to link up data that and a target element of code (class, interface, methods, properties, or others..). A property is a type of method (accessor) that are used like a public data member.. but they give you a way to read/write/evaluate some private field. This = safety + flexibility in your code. Properties usually edit the...

Wednesday, June 4, 2014

Variables and Data Types

Variables in C# (and other object oriented languages) need to be defined and then initialized (brought to life / created!). The general format for the action of defining a variable is the following: ; NOTE the semi-colon (;) at the end of these statements! This semi-colon is known as a line terminator, and its purpose is to tell the compiler...