Programming in delphi 7 environment tutorial. Introduction to Delphi

The book is practical guide in programming in Embarcadero Delphi. It presents the technology of visual design and event programming, discusses in detail the process of creating VCL applications, shows the purpose of basic components, discusses issues of graphics programming, working with databases Microsoft Access. Attention is paid to the development of Multi-Device applications, including for Android platforms, using FireMonkey components, using FireDAC components to work with integrated databases SQLite data, 3D graphics, Float and Path animation, working with sensors.
For beginner programmers.

The main purpose of this book is to clearly demonstrate the techniques of creating programs in one of the most popular and accessible development environments, Delphi/C++Builder/RAD Studio. As teaching examples applications were selected that can be used in project-based learning.

The book is based on materials from lectures and practical classes, developed by the author, and combines theoretical basis and practical aspects of relational database development. The first part covers the concept of relational databases: relational model data, life cycle information system, conceptual and logical database modeling, normalization of relationships, ensuring multi-user access to data, database security issues, SQL and XML languages, etc. The second part describes the capabilities modern versions Delphi in Database Application Development: detailed description dbExpress, Interbase Express and ADO technologies, features of using data management components of the Delphi visual library, the mechanism for developing multi-level applications based on DataSnap technology, the procedure for creating reports for printing and much more.

The book is dedicated to one of the most advanced programming languages, Delphi XE5/XE6. It takes a closer look at the latest cross-platform FM library, which allows you to create full-featured software for Windows and OS X operating systems, as well as for smartphones and tablet computers working under Android control and iOS. Project examples from the book are posted on the publisher's website.

Description of the book Delphi in examples, games and programs:
Here is a collection of material not included in Delphi book in examples, games and programs: From simple applications, problem solving and programming mind games, which was published by St. Petersburg publishing house Science and technology in 2011. Unfortunately, there was no room for several chapters about programming games and puzzles.

The book describes in detail the entire process of developing such games and puzzles:

The Japanese crossword is the most popular puzzle for coloring squares.

Logos is a wonderful logic puzzle with dots.

Colored Lines, City, Molecular Constructor - a world-famous game of collecting balls, as well as its natural science author's variations.

Life is the world's most famous cellular automaton by John Conway. Play and multiply!

Flip Flop, XorGame, ShortGame are excellent werewolf games.

Glasses - a magic trick puzzle.

Hitori is one of the best modern Japanese puzzles, a worldwide hit!

Almost all projects are accompanied by exhaustive analysis of games and puzzles. Search for winning strategies and development efficient algorithms- this is the main content and advantage of the material presented here, since in most books on programming readers are immediately presented ready-made solution a problem from which it is impossible (or at least very difficult) to understand where his legs grow from and where the dog is buried.

It is much more useful to explain the process of preliminary research into a problem than to describe the implementation of the resulting solution in any programming language, since this is purely a matter of technology and usually does not cause difficulties even for novice programmers.

Source codes are included!

Description of the book Development client-server applications in Delphi:
Considered practical questions on developing client-server applications in Delphi 7 and Delphi 2005 using MS DBMS SQL Server 2000, InterBase and Firebird. Provides information about the theory of constructing relational databases and SQL language. The issues of operation and administration of the DBMS are covered. Much attention is paid to various report generators QReport, RaveReports and FastReport.

The use of the ERwin database design, development and support system is described. Considered additional components for developing client-server applications, as well as answers to frequently asked questions. The material is presented according to the principle “from simple to complex” and is accompanied by illustrations, practical examples and videos.

Description of the book Technologies Delphi 2006. New features:
The book examines new features of the Delphi 2006 programming system and presents innovations in the language, shell, editor, compiler and debugger. New technologies for working with databases and creating applications for the Internet are explained. Special attention devoted to means and technologies for increasing the efficiency of programmers: refactoring, design patterns, unified UML language and ECO modeling technologies.

The publication is intended for programmers of all skill levels. Beginner developers will get acquainted with convenient means quick creation programs, programmers of average qualification will study modern approaches to development complex systems and new visual design tools, and professionals will be interested in the new capabilities of ECO III modeling technologies, UML 2.0 and design patterns.

Description of the book Bible Delphi:
The book is devoted to programming in Delphi from the very basics to construction examples specific applications. The execution logic of each piece of code is described in detail so that the reader can use this knowledge to solve their own problems. The book contains a large number of examples practical programming; Some of them are included as additional information on the accompanying CD. In the third edition, the material has been corrected and revised to take into account the new features of the package.

The CD contains source codes programs, additional reference information, as well as ready-made images and components.

Description of the book What Delphi books don't write about:
Little-covered programming issues in Delphi are considered. Methods for integrating VCL and API are described. The internal mechanisms of VCL are shown and examples of interference with these mechanisms are given. Considered the use of sockets in Delphi: various modes their work, features for TCP protocols and UDP, etc.

Much attention is paid to analyzing situations where errors occur and incorrect results are obtained in “simple and correct” code. The features of working with integer, real and string types data, and also provides examples of incorrect results associated with compiler errors, VCL, etc. For each of these situations, methods for solving the problem are proposed.

Very often books are aimed either at full kettles(how to throw components onto a form), or on cool pros. At the same time, the circle of those people who have already learned how to throw components onto a form, but want to develop further, remains completely unreached. This book just fills this vacuum. It is written about serious things, but in a fairly simple and understandable language.

Reviewed in detail parsing in Delphi using the example of arithmetic expressions. Numerous examples are compiled taking into account different versions: from Delphi 3 to Delphi 2007.

The included CD contains examples from the book.

Description of the book Creating components in the Delphi environment. Developer's Guide:
The book is devoted to the creation of components in the Object Pascal language, intended for use in Borland development environments. The features of the OOP implementation in Object Pascal and the VCL and CLX class libraries are described. Shows how to expand existing components and write your own components from scratch. Non-visual, graphical and window components, as well as components for working with a DBMS, are considered.

The process of creating editors for components and their properties, widely used in Delphi, is presented. Are given practical recommendations on distributing ready-made components and integrating them into the development environment, on writing help system for developed components, to expand the capabilities of IDE Delphi. Provides a detailed description of a little-documented feature of Object Pascal related to retrieving and using run-time information (RTTI). The presentation is accompanied by big amount examples of the most various types components. The included CD contains all the examples covered in the book.

Bakzhenova I.Yu. Delphi 7. Programmer's tutorial. 2003 448 pp. PDF. 23.9 MB.
Content:
Object Pascal. Access to relational databases data. Delphi component palette classes. BDE and InterBase. ODBC and OLE DB. Working with databases. Creating reports in Rave Reports. Development of SDI and MDI applications. COM and CORBA. Automation servers and containers. Publishing data on the Internet.
An excellent tutorial that allows you to simple examples feel free in the programming environment.

Download.

Illustrated tutorial on Delphi 7 for beginners. The book you are holding in your hands is not a description of the Delphi language or the Delphi 7 Studio development environment. This is a tutorial on programming in Delphi in the environment of the same name. It covers the entire chain, the entire process of creating a program: from developing a dialog box and event processing functions to creating a help system and an installation disk.
The purpose of this book can be formulated as follows: to teach programming in the Delphi environment, i.e. to create complete programs for various purposes: from simple single-window applications to completely professional programs working with databases.
You can learn to program only by programming, solving specific tasks. At the same time, the successes achieved in programming to a large extent depend on experience. Therefore, to get the most out of the book, you must work with it actively. Don't just read examples, implement them using your computer. Don't be afraid to experiment - make changes to the programs. The more you do on your own, the more you will learn!
Skompel. chm help. 5.1 MB

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Download.

Kandzyuba et al. Delphi 6/7. Databases and applications. 260 double pages djvu. 35.7 MB.
In the manual, pp. 15-146 are devoted to the Object Pascal programming language itself and the development of the simplest programs in console execution in the Delphi environment. Part 2 contains the basics of developing windowed applications in the environment using the most convenient visual and non-visual components.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Download

Kornyakov. Programming MS Office documents and applications in Delphi. 2005 year. The book is devoted to creating applications in the Delphi environment for working with text, tables, objects, diagrams, macros, page parameter settings, etc. in MS Word and Excel documents. Much attention is paid object models MS Office documents. The programming of controls for MS Word and Excel editors, as well as the creation dynamic libraries, which can be used in macros in MS Office documents. Options given software implementation typical problems and answers to typical questions, with whom developers meet. 34.0 MB. 500 pp. PDF.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Download.

Malinin, editor electronic version teaching aid. DELPHI - Lessons for beginners. HTML in RAR archive. 393 KB.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Download.

Ozerov V. Delphi 7. Tips for Delphi. compel certificate in archive 176 Kb.
Delphi Tips - a collection of answers to non-traditional Delphi programming questions, non-standard solutions, tricks and interesting ideas. For practical benefit the cases are given specific examples code that allows you to convey an idea or fully answer a question.
When compiling the “Tips,” the goal was not to include ALL materials; only the most interesting ones were selected. The source of the “Sovets” was numerous Western sources (FAQ), painstakingly selected and translated into Russian. All of the code provided is formatted so that you can copy it directly from the page into your application.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Download.

Flenov M. E. Delphi jokingly and seriously; what hackers can do. 2006 271 pp. djvu. 7.8 MB.
A book about professional programming techniques in Delphi. In an easy and accessible form, using a large number of original examples, the issues of correct code writing, program optimization, working with the system environment, and creating network applications are discussed. The book is intended primarily for beginner programmers with little programming experience, but will also be useful for professionals.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Download

4. Shuprut. Delphi 2005 learning to program. Self-instruction manual. All the basic questions about working in Borland Delphi 2005. A large number of examples. Recommendations for beginning programmers. Does not require initial training. 38.8 MB. 345 pp. PDF.

Computers are unreliable, but people are even more unreliable.

Where to begin?

Delphi, which is based on Pascal language, great for starting to learn to code. Pascal itself is gradually becoming a thing of the past and less and less attention is paid to it. This is understandable - applications for MS-DOS are written on it, and this single-tasking operating system everyone is trying to forget like a bad dream. To be more precise, the Delphi language is Pascal not in the form in which it is used to write MS-DOS applications, but in another modification - Object Pascal. In this language, programming is, as it were, “tied” to certain objects- both visual and non-visual, simply located in memory. Programming simple applications with an interface command line(i.e. when lines of text are displayed sequentially on the screen and the user enters some data) it is also recommended to start with Pascal. Also, many people start with QBasic, but this language is one of the most “ancient” and it has few capabilities. However, for understanding general principles It is also suitable for programming. The fact is that these languages ​​do not have any clever constructions or character sets - the written code is easy to read and understand. This cannot be said, for example, about C++. There are jokes on this topic - “what a programmer wrote in C++ at night, he will not be able to read in the morning.” Of course, this is not true, but the syntax of the C++ language is quite complex. We will start learning Delphi almost from scratch. Pascal will be learned along the way.

Why Delphi?

Delphi is something different than Pascal; it is a completely different qualitative stage of the programming environment. Applications for the Windows operating system are created using Delphi, but in addition to this, using additional funds You can write, for example, programs for Linux. Delphi environment is easily extendable by installation additional modules. User interface also highly customizable - everyone organizes working space in a way that is convenient for him.

Brief information about Delphi

Delphi is the result of the development of the Turbo Pascal language, which, in turn, developed from the Pascal language. Delphi had a huge influence in creating the concept of the C# language for the .NET platform. Many of its elements and conceptual solutions were included in C#. One of the reasons is the transfer of Anders Hejlsberg, one of the leading Delphi developers, from Borland Ltd. at Microsoft Corp.
Version 1 was intended for development for the 16-bit Win16 platform;
Versions from the second compile programs for the 32-bit Win32 platform;
Together with the 6th version of Delphi, the Kylix environment, compatible with it in language and libraries, was released, designed for compiling programs for the operating system Linux system;
Version 8 is capable of generating bytecode exclusively for the .NET platform. This is the first environment focused on the development of multilingual applications (only for the .NET platform);
Subsequent versions (indicated by release years rather than serial numbers, as was previously the case) can produce both Win32 applications and bytecode for the .NET platform;

Delphi for .NET is a Delphi development environment, as well as the Delphi language (Object Pascal), aimed at developing applications for .NET.

What do we need...

It is assumed that you are familiar with general rules work in Windows system and worked in some applications at least at a primitive level like Notepad or Calculator. From software we need the Delphi environment itself. The installation process will not be described, as it is quite standard. You will not find Delphi distribution kits on the website - any version has a volume of at least 200-300 MB, and storing such files on the website is simply unprofitable. Also, Delphi is not officially free product. Therefore, if you do not have a distribution kit yet, try to find it as quickly as possible. You can buy it in a store, or borrow it from someone you know. From free analogues Delphi can be noted as Lazarus, but in these articles we will talk specifically about Delphi.

Which version of Delphi should I install?

This is one of the most frequently asked questions. By by and large, they are all very similar and in most cases the programs will work the same regardless of the version of Delphi in which they were created. However, I will still give some advice. Do not install versions below Delphi 5- they are very old and have significant differences with newer ones. The Delphi 5 environment contains all the basic features, but it lacks some of the conveniences that were introduced in next versions. Most best option - Delphi 6 or Delphi 7. These versions are most popular among the "population". Delphi 6 is considered the most stable. Delphi 7 is not much different from Delphi 6, except that it is more compatible with Windows XP (meaning the compatibility of written applications). This does NOT mean that programs written in Delphi 6 will not work correctly in WinXP. Everything will be great. But Delphi 7 is still less stable than Delphi 6. Further versions - Delphi 8, Delphi 9 I don't recommend installing it at all. These are the most unfortunate of all. Attempts were made to integrate tools for writing applications on .NET technology, but in response the environments themselves turned out to be rather unsuccessful (“buggy”). Next it is worth mentioning Delphi 2005 Enterprise Edition. This version also did not become particularly widespread and most programmers simply “stepped over” it. Next in line - Borland Developer Studio 2006. Yes, it's already a whole software package, which includes, in addition to Delphi, other development tools. The environment is convenient, but very resource-intensive. On older computers with capacity random access memory less than 1 GB I do not recommend using it. Borland stopped there and further production began to be carried out on behalf of CodeGear(and further - Embarcadero). Delphi 2007, included in RAD Studio 2007, is not much different in capabilities from BDS 2006, but it is very well optimized and suitable for use on low-power machines, unlike its predecessor. Delphi 2009- this is a new big step in the development of Delphi. In this version appeared full support Unicode (everyone was waiting for this and it happened). Of course, along with new opportunities for activity, this also revealed new problems: some old programs, components and modules stopped working correctly. However, in most cases, all conflicts can be resolved by editing a few lines. Don't be afraid of this. If you are just starting your “journey”, then there is no difference for you and therefore it is better to install more new version. All examples that will be given in these lessons work correctly in both old and new Delphi versions. And finally, the most latest version - Delphi 2010. I can't say much about her yet. Whether to install it or not is up to you. Perhaps it makes sense to get used to the more proven versions for now.

To summarize, I advise you to choose from three options: Delphi 7, Delphi 2007 or Delphi 2009. Many people still work on the 7th version, claiming that there is nothing better than it in the world. But it is worth remembering that sooner or later everything old becomes obsolete to such an extent that it becomes unusable. Delphi 2007 is closer to modern times. Well, Delphi 2009 - if you don’t want to lag behind the rest of the world. It's up to you to decide, but I would choose the last option.

Conclusion

In this article, we talked about the origin of Delphi and its features. Next, we will begin studying the environment itself and the programming language.