Sep 25th 2014
Coding 101 36
C# Collections
Lists, arrays, dictionaries, and hashes.
The Code for today's show is available below:
Snubs Compiled
- Joe Maruschek's C# Regex
- Joe Maruschek's Image Downloader
- Darryl Medley's Abstract Space Calculator
Ivory Tower
Consider our Example Podcasting App:
In talking about the advantages of Object Oriented programming, we've often talked about the ability to cut big problems into their component parts, which can then be coded. The Podcasting App is a good example of breaking down problems into their component parts.
- Question: What needs to happen for this application to work?
- Answer: There are actually two parts of this application
- The part of the program that accesses an external data source and makes that data usable by some sort of user interface.
- The part of the program that presents that data to the User
Let's do that 2-Step process right with the "Model View ViewModel"
The "Model" is an object that contains all the data and information that we have to use.
The "View" is the UI: It's the later that the User interacts with. Some call it the "presentation". The View can take the data and information contained within the "Model" object and organize it in order to make it more presentable to the user.
The "ViewModel"
- This is the "interface" between the Model and the View
- This is the piece that introduces "Presentation Separation"
- It gets to decide which data from the model is place in the View
- It gets to decide which input from the view (from the user) is pushed back to the Model
- It can change and reorganize depending on the data that is in the "Model"
In our example:
- The "Model" is the object that interfaces with database of videos we've made available
- The "ViewModel" is the object that handles the RSS feed, choosing which data to pull from the "Model" and make available to the "View"
- The "View" is a XAML that takes the data made available by the "View Model"
Get in Touch With Us!
- Subscribe and get Coding 101 automatically at https://twit.tv/shows/coding-101
- Follow PadreSJ and Snubs on Twitter
Bandwidth for Coding 101 is provided by CacheFly.