To my dream Anna
Modern software development techniques rely almost exclusively on object-oriented programming (OOP). This approach promotes a specific paradigm that sees fundamental design units (objects) as containers that encapsulate both data and logic (code) and, in many instances, indicates how specific data that stem from business logic should be mapped. This convoluted view contradicts with the other important pillar of information age: the databases.
Storing data and managing databases take developers to a world with different design principles and concepts. Table design, SQL query optimization, and joined table operations are only a few notions that indicate the existence and requirement of different skill sets. On top of this, if one considers the abundance of database engines available in the market and the technical specificity of each one of them, it is not hard to realize the challenges software developers may face given the fact that modern applications rely on the ability to store data in a persistent medium.
Object relational mapping (ORM) frameworks attempt to bring the two worlds of OOP and databases together and provide a toolbox which abstracts the specific requirements of each database. As a result, developers are free to focus on ways to raise business value of their software solutions rather than consuming resources in understanding how to make databases work. ORM promotes reusable coding, automation and standardization of data-related processes, separation of concerns as data access and layers are isolated, and abstraction of database engines; this means that coders who employ ORM libraries are free to switch between databases or even employ different databases without changing a single line of code.
TMS Aurelius is an ORM library developed by TMS Software and targets the Delphi development environment. It is a modern, robust, and efficient approach to the use of databases in an OOP fashion.
This book is dedicated to Aurelius and the Delphi developers who want to make the most out of the framework. It offers a guide in how to embed Aurelius in Delphi projects and how to implement basic and advanced queries, and it moves forward by showing how Aurelius can be used in mobile platforms and in cooperation with third-party providers of JSON-based data.
This book is the perfect companion to both newcomers to Aurelius and to more experienced developers with the framework. It assumes some knowledge of Delphi as it requires familiarity with the IDE and the features of the language. Nevertheless, Aurelius is also available for Lazarus and, therefore, this book appeals to Pascal developers who favor that environment as well.
Appreciate the different workflows related to the use of databases as seen from the coder’s side
Assess the different uses and features of TMS Aurelius
Design applications which use TMS Aurelius
Embarcadero Delphi 10 Rio Professional
Microsoft Windows 10 Professional
FireMonkey framework
TMS Aurelius 4.4
Android Nougat
Steema TeeChart v2018 Standard Evaluation Version
I use the Professional version of Delphi, but I do not use any features exclusive to this version. You can use whichever edition you have access to. I also prefer to develop multi-device applications but this is not a requirement; you can very easily use Aurelius in VCL applications as well. The only exception to this is the projects that show how Aurelius can be used in mobile platforms; these projects require FireMonkey.
Lastly, in Chapter 7 , where Aurelius consumes data from remote servers, I use TMS XData 4.5 Trial version and in Chapter 8 TMS Data Modeler 3.3 is required.
This book has eight chapters. It starts with basic theoretical concepts, then proceeds to the introduction of TMS Aurelius, and as chapters develop it gradually explores different features of the framework.
This chapter visits fundamental concepts of ORM frameworks and explores different workflows related to them. It also provides a short discussion of ORM terminology.
This chapter introduces TMS Aurelius. It starts by discussing different versions and installation options of the product and shows how the fundamental ideas in ORM that are presented in Chapter 1 are implemented by the framework. This is the first exposure of the reader to code related to Aurelius.
This chapter introduces the CallCentre application. This is an application that presents data from a call center and organizes it in different ways (by department, by agent, etc.). The data set provides some great opportunities to show how Aurelius features work.
In this chapter, we start with basic operations such as how to add, update, and remove entries from the database. We, also, deal with managing nullable and blob fields, and we see how Aurelius can execute large number of SQL statements.
The topic of this chapter is how to build and expand on more sophisticated queries that allow manipulation of data at database level. OOP would indicate that calculations and grouping of data occur in code, whereas database programming relies on the underlying database engine. In this chapter, we see how Aurelius can bring the two together.
This chapter looks at more advanced concepts in Aurelius (events, inheritance) and visits the TAureliusDataSet.
As mobile platforms and the Internet become essential part of application development, this chapter takes the task to move Aurelius to mobile platforms. The chapter shows what changes are required for this task and explores different options in this direction.
TMS Data Modeler is a stand-alone application by TMS Software that assists Aurelius users in many ways. This chapter explores the different features of the application and shows how it can contribute to productivity and efficiency.
Project Names Per Chapter
Chapter | FolderProject Name | Notes |
---|---|---|
Misc | This folder contains miscellaneous files that are used in different chapters (image files, data sets, SQL scripts, etc.) | |
2 | Chapter 2BasicFeatures | Demonstrates very basic features in a console application |
3 | Chapter 3CallCentre (Skeleton) | Provides a project that shows the GUI of the example application. All the subsequent projects are based on this one |
Chapter 3CallCentre (Without Database Session) | Demonstrates the use of entities, connections, and database manager | |
Chapter 3CallCentre (With Database Session) | Replaces TDatabaseManager with IDatabase Session | |
4 | Chapter 4CallCentre (Without Utilities) | Adds the ability to provide basic operations to entities |
Chapter 4CallCentre (With Utilities) | Adds basic utilities to handle blobs and exceptions | |
Chapter 4CallCentre (Import) | Demonstrates how to set the object manager in transactional state | |
5 | Chapter 5CallCentre (Listings) | Shows the call lists for agents and departments |
Chapter 5CallCentre (Queries) | Adds key calculations based on queries | |
Chapter 5CallCentre (Views) | Demonstrates the use of views | |
6 | Chapter 6CallCentre (Inheritance) | Demonstrates different inheritance strategies in Aurelius |
Chapter 6CallCentre (Events) | Demonstrates the use of events | |
Chapter 6CallCentre (TAureliusDataSet) | Demonstrates different ways to populate TAureliusDataSet | |
7 | Chapter 7CallCentre (Local) | Adapted project to run on Android |
Chapter 7User | A simple project to fetch JSON content from third-party providers | |
Chapter 7Client | Shows how to use Aurelius to consume data based on REST API from third-parties | |
Chapter 7XData | Demonstrates the use of Aurelius and XData server | |
8 | Chapter 8CallCentre.dgp | Data Modeler project |
started exploring computers when he was 16 and since then has followed all the way from Turbo Pascal to the latest Delphi versions as a hobby initially and as a profession for most of his adult life. He has developed a wide range of applications, from financial software to reverse engineering tools, including an application for professional gamblers. He is also the author of MVVM in Delphi (Apress, 2016).
holds a Bachelor of Science in Electronic Engineering and a Master of Science in Industrial Computing.
He has 24 years of experience with Delphi development and is the Manager of TMS Business product line at TMS Software, where he serves as Architect and core developer of products such as TMS Aurelius and TMS XData.
is a Software Development Manager at Gateway Ticketing Systems, a firm that provides ticketing and access control systems to the largest amusement parks, zoos, and museums around the world. Nick is a software developer at heart. He’s been a Pascal/Delphi developer for over 20 years and still thinks that Delphi is the best development tool out there. He loves to read programming books, attend conferences, and watch cool videos about new programming techniques. He generally tries to be an industry thought leader.
18.118.186.143