140 likes | 276 Views
Research Topics in Computational Science. Agenda. Mini Lecture (less than 30 min) MVC Database Basics Programming Diagrams Simple Database Creation (class example) Time for Homework Questions (10-15 min). Abstract Thinking. Break down the program into small pieces
E N D
Agenda • Mini Lecture (less than 30 min) • MVC • Database Basics • Programming Diagrams • Simple Database Creation (class example) • Time for Homework Questions (10-15 min)
Abstract Thinking • Break down the program into small pieces • Small things are easier to understand • Think about how “parts” are related • Objects are Great for Abstraction!
Model View Controller (MVC) • MVC is a philosophy • MVC helps thinking about User Interface (UI) • Breaks up workload among programmers • Design Pattern for Abstraction
Model • Information or Data • Where the Data Lives • The Controller asks the Model for data • The model can either generate OR create the data as needed
View • Is the User Interface • We edit the View to change user experiences • Stick with current practices
Controller • Handles User Actions • Interprets the View and feeds input to the Model, then updates the view based on the model output • Controllers have Input & Output
Databases • A database is a collection of tables • Like Excel Tables • Rows and Columns • Columns are categories • Rows are entries • MUST have a UID (Unique ID) Column
Tables Names Addresses Envelopes
Drawing a Diagram • Draw a picture of your program • Helps to see the relations between parts of your program • Draw pictures that work for you • Should be clear to others
Now To Code • Creating a Database • we will create a basic DB
Database Steps To Remember • Data -> add new data source • Show Database Explorer • Show Data Sources • Save your Project • (Cannot save to a network drive!) • Add data to the database
Adding to a Database • Data Grid View • Details • Can add to the database • Recompiling the program will change also update the database