Day 3
This is the day 3 page for object oriented programming course 102, an introduction to object oriented programming. On day 3 we're going to explore creating a program using only objects without writing any code.Below are the topics and course materials we are learning today.
Creating a program using only objects
To highlight the power of object oriented programming we're going to create a complete application in a few minutes using only objects. This example program will be created purely by dropping objects on a design surface, setting properties, and connecting the objects to one another.Our example program
The image on the right is a what our completed application will look like. The goal of the program is to maintain a remote database that drive our personal blogging website.When we're done with the program we'll be able create, view, and edit personal blog entries. Those blog entries resize in a remote database and will be able to be read by our web site.
Download the example from here.
Recreating the example
These are the steps to follow to create our example.- Open Lazarus and create a new visual application called "weblog".
- Add the following components to the form
- 1 TMySQL57Connection
- 1 TSQLTransaction
- 3 TSQLQuery
- 3 TDataSource
- 2 TDBEdit
- 2 TDBMemo
- 2 TDBLookupComboBox
- 1 TDBDateEdit
- 1 TDBNavigator
- 1 TDBCheckBox
- 7 TLabel
- Set the options on all queries to: sqoKeepOpenOnCommit, sqoAutoApplyUpdates, sqoAutoCommit.
- Rename the controls and components.
- Arrange the controls to look like in our sample using the mouse.