Lection №5 Modern integrated development environment.
-
Upload
rosanna-mason -
Category
Documents
-
view
225 -
download
1
Transcript of Lection №5 Modern integrated development environment.
LectionLection № №55
Modern Modern integrated integrated development environmentdevelopment environment
Main QuestionsMain Questions
Software classification Using Delphi integrated
development environmentOOP fundamentalsTDMU CDSS FrameworkFreeware IDE
1.1.Software classificationSoftware classification System softwareSystem software helps run the computer
hardware and computer system. It includes operating systems, device drivers, programming toolsprogramming tools, servers, windowing systems, utilities and more.
Application software allows a user to accomplish one or more specific tasks. Typical applications include office suites, business software, educational software, databases and computer games. Most application software has a graphical user interface (GUI).
2. 2. Working with Delphi IDEWorking with Delphi IDE
What Is DelphiDelphi InterfaceComponent palettesDelphi projectVisual programmingCompiling
2.1.2.1.What Is Delphi?What Is Delphi?Delphi is Borland's best-selling rapid
application development (RAD) product for writing Windows applications.
You can create Win32 console applications or Win32 graphical user interface (GUI) programs.
You can create the user interface to a program (the user interface means the menus, dialog boxes, main window, and so on) using drag-and-drop techniques for true rapid application development.
Window titleMenu bar
Toolbars
Instance of the components
Code editor
2.2.2.2. Delphi interface Delphi interface
Form window
Componentpalette
Objectinspector
2.2.33..Component paletteComponent paletteThe CComponentomponent is a self-contained binary
piece of software that performs some specific predefined function, such as a text label, an edit control, or a list box and etc. Typically a component represent a class implementationclass implementation.
The Visual componentVisual component, as its name implies, is one that can be seen by the user at design time such as edit controls, buttons, list boxes, labels, and so on.
The Nonvisual componentsNonvisual components work behind the scenes to perform specific programming tasks. Examples include system timers, database components, and image lists.
2.2.33..Component paletteComponent palette
The Component palettesComponent palettes is used to select a component or other control in order to place that control on a form. This is a multipage window. Tabs are provided to enable you to navigate between pages.
2.2.44.. Delphi project Delphi projectThe ProjectProject is a collection of files that work together to create
a standalone executable file or dynamic link library (DLL). When you first start the program, Delphi automaticaly create the new project and add to it one empty unit and blank form, that represent as of the four files (assuming a typical Delphi GUI application):
The project source file (file extension: *.dpr) The main form unit (file extension: *.pas) The main form resource file (file extension: *.dfm) The project resource file (file extension: *.res)
The FormForm represents a window in your program. The form might be the program's main window, a dialog box, or any other type of window.
The Code EditorCode Editor is where you type code when writing your programs.
2.5.2.5.Visual programmingVisual programmingThe Visual programming software developing The Visual programming software developing
order in the Delphiorder in the Delphi: Creating new project; The independents abstract classesabstract classes creating (for
the data storing or calculation performing). Adding necessary count of the forms; Placing essential components on the each forms. Setting up components properties by the Object Object
InspectorInspector. The Event handlerEvent handler programming. The resource developing (icons, logos, etc.). The Compiling Compiling and BuildingBuilding. The DebuggingDebugging – errors finding and correcting.
2.5.1.2.5.1.Visual programming-1Visual programming-1The The New ProjectNew Project creating creating: You can create new project using the item New New
ApplationApplation in the FileFile menu; Firstly, you must save project – item Save Project Save Project
As…As… in the FileFile menu – choose (or create new) folder for saving;
Other way – using Other way – using Object Object Repository Repository :: The Object RepositoryObject Repository is the means by which you
can select predefined objects to use in your applications. The Object Repository is displayed automatically whenever you choose File File -- New New from the main menu .
The Object Repository has several pages, each of which contains different objects that you can incorporate into your applications.
2.5.1.2.5.1.Visual programming-1Visual programming-1
Object Repository
window
2.5.2.5.22..Visual programming-2Visual programming-2Adding the component to the formAdding the component to the form:
1. Search appropriate component on the Component Palette;
2. Select it by the left mouse button clicking.
3. Point mouse on form window and click left button.
Component modificationComponent modification::
1. Select component on form by left mouse button clicking on it.
For moving – hold LMB and drag component. For resizing – drag corner markers by mouse. For deleting – pres “Del” button on the keyboard.
2.2.55..3.Object Inspector3.Object InspectorObject InspectorObject Inspector enable you to modify a component's
design-time properties and events. The Properties Properties page displays all the design-time
properties for the currently selected control. It has two columns: The PropertyProperty column is on the left side of the Properties page and shows the property name; the ValueValue column is on the right side of the Properties page and is where you type or select the value for the property.
The Events Events page lists all the events that the component is designed to handle. Events occur as the user interacts with a component. For example, when a component is clicked, an event is generated that tells you that the component was clicked. You can write code that responds to these events, performing specific actions when an event occurs.
2.2.55..3.Object Inspector3.Object Inspector
Components of the Object Inspector Window
Active form components drop-down list
Page tabs
Simple property
Compound property
Property value
2.2.55..3.Object Inspector3.Object Inspector
Components of the Object Inspector Window
2.6.2.6.Program code editingProgram code editing You can use the Code EditorCode Editor window to edit
code of the application. Object PascalObject Pascal programing language knowledge it is need for this.
In order to create an event handlerevent handler for an event, you simply double-click on the Event tab of the Object Inspector window in the ValueValue column next to the event you want to handle. When you do it, Delphi creates an event-handling functionevent-handling function for you with all the parameters needed to handle that event. The Code Editor is displayed and the cursor is placed in the event handler. All you have to do is start typing code.
2.6.2.6.Program code editingProgram code editing
Code Editor window.
Codes for the form and event
handler for button
component are presented.
2.7. 2.7. CompilingCompilingYou can press F9 F9 or choose Run - RunRun - Run command from
the main menu or click special icons on the toolbar to compile and run you application. Each time you click the Run button, Delphi compiles and links your program. It compiles the project source, the main form unit, and any other units in the project.
Syntax Check Syntax Check – Delphi compile the project and report any errors and warnings;
CompileCompile – compiles any units that have changed since the last compile just as Syntax Check does, but it also links the entire project;
Build Build – compiles every unit in the project regardless of whether it has changed since the last build, the linking also performed.
When it's all over, you have a stand-alone stand-alone Windows Windows programprogram that can be run in the usual ways.
2.7. 2.7. Compiling – how it workCompiling – how it work
33. . An OOP FundametalsAn OOP Fundametals
Class overviewFrameworks understanding
33..11. . Class Class overviewoverviewA classclass is a collection of fields and methods (functions
and procedures) that work together to accomplish a specific programming task. In this way a class is said to encapsulate the task. Classes have the following features:
The capability to control access. Constructors - is a method that is used to create an
instance of a class Destructors - is a special method that is
automatically called just before the object is destroyed.
FieldsFields - data fields of a class are simply variables that are declared in the class declaration; they can be considered as variables that have class scope.
MethodsMethods - functions and procedures that belong to your class.
33..22. . Frameworks understandingFrameworks understandingA frameworkframework is a collection of classes that simplifies
programming in Windows by encapsulating often-used programming techniques. Frameworks are also called class librariesclass libraries. EncapsulationEncapsulation means taking a complex programming task and making it easier by providing a simplified interface.
Popular frameworks have classes that encapsulate windows, edit controls, list boxes, graphics operations, bitmaps, scrollbars, dialog boxes, and so on.
A good framework takes full advantage of OOP, and some do that better than others. Borland's Object Borland's Object Windows LibraryWindows Library and Visual Component LibraryVisual Component Library are excellent examples of object-oriented programming. They provide the proper abstraction needed for you to rise above the clutter and get down to the serious business of programming.
44. . TDMU CDSS TDMU CDSS FrameworkFramework
The TDMU CDSS database structure
DISEASES ID_DISEASE DISEASE DESCRIPTION P VOICE_DISEASE
SYMPTOMS ID_SYMPTOM SYMPTOM_QUESTION VOICE_SYM_QUEST
DISEASE_SYMPTOM ID_DISEASE ID_SYMPTOM PY PN RECORD_ID
1
1
44. . TDMU CDSS TDMU CDSS FrameworkFramework
TDMU CDSS core engine – a Bayesian theorem
44. . TDMU CDSS TDMU CDSS FrameworkFramework
The TDMU CDSS main screen
55. . Freeware IDE - LazarusFreeware IDE - Lazarus
www.lazarus.freepascal.org/
ConclusionConclusion
In this lecture was described next questions:
Software classification Using Delphi integrated
development environment
LiteratureLiterature
Kent Reisdorph. Teach Yourself Borland Delphi 8 in 21 Days. SAMS Publishing, 2008, 458p.
http://www.tdmu.edu.te.uahttp://www.tdmu.edu.te.ua