Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lection №5 Modern integrated development environment.

Similar presentations


Presentation on theme: "Lection №5 Modern integrated development environment."— Presentation transcript:

1 Lection №5 Modern integrated development environment

2 Main Questions Software classification Using Delphi integrated development environment OOP fundamentals TDMU CDSS Framework Freeware IDE

3 1.Software classification System software programming tools System software helps run the computer hardware and computer system. It includes operating systems, device drivers, programming 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).

4 2. Working with Delphi IDE What Is Delphi Delphi Interface Component palettes Delphi project Visual programming Compiling

5 2.1.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.

6 Window title Menu bar Toolbars Instance of the components Code editor 2.2. Delphi interface Form window Component palette Object inspector

7 2.3.Component palette Component class implementation The Component 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 implementation. Visual component The Visual 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. Nonvisual components The Nonvisual components work behind the scenes to perform specific programming tasks. Examples include system timers, database components, and image lists.

8 2.3.Component palette Component palettes The Component 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.

9 2.4. Delphi project Project The Project 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) Form The Form represents a window in your program. The form might be the program's main window, a dialog box, or any other type of window. Code Editor The Code Editor is where you type code when writing your programs.

10 2.5.Visual programming The Visual programming software developing order in the Delphi The Visual programming software developing order in the Delphi: Creating new project; abstract classes The independents abstract classes creating (for the data storing or calculation performing). Adding necessary count of the forms; Placing essential components on the each forms. Object Inspector Setting up components properties by the Object Inspector. Event handler The Event handler programming. The resource developing (icons, logos, etc.). Compiling Building The Compiling and Building. Debugging The Debugging – errors finding and correcting.

11 2.5.1.Visual programming-1 The New Project creating The New Project creating: New ApplationFile You can create new project using the item New Applation in the File menu; Save Project As…File Firstly, you must save project – item Save Project As… in the File menu – choose (or create new) folder for saving; Other way – using Object Repository : Object Repository File - New The Object 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 - New from the main menu. The Object Repository has several pages, each of which contains different objects that you can incorporate into your applications.

12 2.5.1.Visual programming-1 Object Repository window

13 2.5.2.Visual programming-2 Adding the component to the form Adding 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 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.

14 2.5.3.Object Inspector Object Inspector Object Inspector enable you to modify a component's design-time properties and events. Properties Property Value The Properties page displays all the design-time properties for the currently selected control. It has two columns: The Property column is on the left side of the Properties page and shows the property name; the Value column is on the right side of the Properties page and is where you type or select the value for the property. Events The 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.

15 2.5.3.Object Inspector Components of the Object Inspector Window Active form components drop-down list Page tabs Simple propertyCompound property Property value

16 2.5.3.Object Inspector Components of the Object Inspector Window

17 2.6.Program code editing Code Editor Object Pascal You can use the Code Editor window to edit code of the application. Object Pascal programing language knowledge it is need for this. event handler Value event-handling function In order to create an event handler for an event, you simply double-click on the Event tab of the Object Inspector window in the Value column next to the event you want to handle. When you do it, Delphi creates an event-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.

18 2.6.Program code editing Code Editor window. Codes for the form and event handler for button component are presented.

19 2.7. Compiling F9Run - Run You can press F9 or choose Run - 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; Compile Compile – 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. stand-alone Windows program When it's all over, you have a stand-alone Windows program that can be run in the usual ways.

20 2.7. Compiling – how it work

21 3. An OOP Fundametals Class overview Frameworks understanding

22 3.1. Class overview class A class 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. Fields Fields - 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. Methods Methods - functions and procedures that belong to your class.

23 3.2. Frameworks understanding framework class librariesEncapsulation A framework is a collection of classes that simplifies programming in Windows by encapsulating often- used programming techniques. Frameworks are also called class libraries. Encapsulation 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. Borland's Object Windows LibraryVisual Component Library A good framework takes full advantage of OOP, and some do that better than others. Borland's Object Windows Library and Visual 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.

24 4. TDMU CDSS Framework The TDMU CDSS database structure

25 4. TDMU CDSS Framework TDMU CDSS core engine – a Bayesian theorem

26 4. TDMU CDSS Framework The TDMU CDSS main screen

27 5. Freeware IDE - Lazarus www.lazarus.freepascal.org/

28 Conclusion In this lecture was described next questions: Software classification Using Delphi integrated development environment

29 Literature Kent Reisdorph. Teach Yourself Borland Delphi 8 in 21 Days. SAMS Publishing, 2008, 458p. http://www.tdmu.edu.te.ua http://www.tdmu.edu.te.ua


Download ppt "Lection №5 Modern integrated development environment."

Similar presentations


Ads by Google