The 3D Train Studio is an easy-to-use application for planning your perfect model railway and it is built in Delphi. With 3D Train Studio, users can construct their own unique, detailed layouts on their PCs with thousands of tracks to choose from. They can create landscapes consisting of mountains and valleys, place houses and trees along streets and roads and construct their own miniature worlds, with realistic 3D graphics and in real time. Users can also board their virtual model trains and simulate complete rail operations, including animated barriers, signals and road vehicles, automatically or by specially defined events. “We never could have developed 3D Train Studio so efficiently and with such an elegant UI way without Delphi,” said Stefan Werner of 3D Train Studio. On technical side, 3D Train Studio utilizes a lot of different technologies, like a self-written 3D engine capable of rendering thousands of 3D objects in real-time with abstraction of the underlying graphics API (supporting Direct3D 9 and 11), sound processing with the help of the FMOD library, XML-RPC, multi-threading with custom written task manager, custom VCL components for a smooth image viewer, XML processing, multi-language support (currently English and German) and a clean separation of UI, logic and data (MVC). Website https://en.3d-modellbahn.de/ Screenshot Gallery
To this end, the sample uses the CliHandle and SharedCliHandle properties of the TFDConnection class. Location You can find the DLLSharing sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesComp LayerTFDConnectionDLL_Sharing Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. How to Use the Sample Navigate to the location given above and open Project1.dproj. Press F9 or choose Run > Run. Files File in Delphi Contains Project1.dprojProject1.dpr The project itself. Unit1.pasUnit1.fmx The main form. Project2.dprojProject2.dpr The DLL. Unit2.pasUnit2.fmx The DLL form. Implementation The sample uses FireDAC to implement a connection with a dynamic-link library. To this end, the sample implements three buttons named: Button1, Button2 and Button3. Each button handles a OnClick event to implement the following features: Load a DLL Show data Unload the DLL Load DLL To transfer a connection between an application and a DLL, the sample transfers the TFDCustomConnection.CliHandle property value to the DLL. The handle must be assigned to the TFDCustomConnection.SharedCliHandle property. After the TFDCustomConnection.SharedCliHandle is assigned, the DLL connection can be activated by setting the Connected property to True. Note that there is no need to set up a connection definition, including DriverID. // Application code: FhDll: THandle; // … procedure TForm1.Button1Click(Sender: TObject); begin FhDll := LoadLibrary(PChar(‘Project2.dll’)); @FpShowData := GetProcAddress(FhDll, PChar(‘ShowData’)); end // DLL code: class procedure TForm2.ShowData(ACliHandle: Pointer); var oForm: TForm2; begin oForm := TForm2.Create(Application); oForm.FDConnection1.SharedCliHandle := ACliHandle; oForm.FDConnection1.Connected := True; oForm.FDQuery1.Active := True; oForm.Show; end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // Application code: FhDll: THandle; // … procedure TForm1.Button1Click(Sender: TObject); begin FhDll := LoadLibrary(PChar(‘Project2.dll’)); @FpShowData := GetProcAddress(FhDll, PChar(‘ShowData’)); end // DLL code: class procedure TForm2.ShowData(ACliHandle: Pointer); var oForm: TForm2; begin oForm := TForm2.Create(Application); oForm.FDConnection1.SharedCliHandle := ACliHandle; oForm.FDConnection1.Connected := True; oForm.FDQuery1.Active := True; oForm.Show; end; Show data Then, the connection can be used as a normal database connection: TShowDataProc = procedure (ACliHandle: Pointer); stdcall; // … FpShowData: TShowDataProc; // … procedure TForm1.Button3Click(Sender: TObject); begin FpShowData(FDConnection1.CliHandle); end TShowDataProc = procedure (ACliHandle: Pointer); stdcall; // … FpShowData: TShowDataProc; // … procedure TForm1.Button3Click(Sender: TObject); begin FpShowData(FDConnection1.CliHandle); end Unload DLL To unload the dynimic-link library, the sample implements the following code: TShutdownProc = procedure; stdcall; // … FpShutdown: TShutdownProc; // … procedure TForm1.Button2Click(Sender: TObject); begin FpShutdown(); FreeLibrary(FhDll); end; TShutdownProc = procedure; stdcall; // … FpShutdown: TShutdownProc; // … procedure TForm1.Button2Click(Sender: TObject); begin FpShutdown(); FreeLibrary(FhDll); end; Head over and check out the full sample source code for DLL sharing with FireDAC in Delphi.
In this CodeRage session, you can find the most valuable information and best practices on building an application for iOS using Delphi FireMonkey. Easily learn how to build a real-world application using Delphi FireMonkey! Overview: Recipes app which fetches data from an open API Deploying to App Store After learning best practices, you can apply to your future projects easily As you walk through the session, you can find interesting approaches for refreshing the recipe list with the TTask. TTask means everything in the inside of the TTask, gonna be executed in the background. As you can see one of the best functionality of the TTask is to prevent the user interface from locking up if you want to start something in the background. And in this case, the response from an endpoint could get more time. Be sure to check out the whole session and learn how to deploy Delphi FireMonkey applications to the App Store! Learn more about using TTask in the parallel programming library. Learn more about deploying your Delphi apps to iOS. Find out more about using the REST debugger in RAD Studio to quickly connect to REST services.
This sample implements a multithreaded application, where each thread uses the IFDPhysConnection interface to establish a connection. The multiple connection establishments may lead to performance degradation across the whole system. To avoid this, you can enable the Pooled property to use the connection pooling. Location You can find the Pooling sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesPhys LayerIFDPhysConnectionPooling Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. How to Use the Sample Navigate to the location given above and open IFDPhys_Pooling.dproj. Press F9 or choose Run > Run. Interact with the sample: Select an option from the Use Connection Definition combo box. Click the Run button and see the execution time. Select the Run Pooled check box, click the Run button and see the execution time. Compare both execution times. Files File in Delphi Contains IFDPhys_Pooling.dprojIFDPhys_Pooling.dpr The project itself. fPooling.pasfPooling.fmx The main form. Implementation When you run the application, you can interact with the sample using the following objects: A TComboBox object labeled as Use Connection Definition.Click the Use Connection Definition combo box and select an option in order to define a connection to a database. The menu shows all the persistent connections defined on the file C:UsersPublicDocumentsEmbarcaderoStudioFireDACFDConnectionDefs.ini. Once you select a connection definition, the sample enables the Run button and the Run Pooled check box. A TButton object labeled as Run.If you click the Run button, the sample launches 10 threads. Each thread uses the CreateConnection method of IFDPhysManager to create a connection to the database. Moreover, each thread uses the CreateCommand method of IFDPhysConnection to create a command for each connection. Finally, each thread uses the Prepare method of IFDPhysCommand to execute 50 SQL queries. The executed SQL query is the following SELECT command: ‘select count(*) from {id Region}’. Therefore, in this case, each thread creates and uses a dedicated connection object working with the database. A TCheckBox object labeled as Run Pooled.If you select this check box, the Pooled property of the connection setting is set to True. The database connection pooling is a method used to keep database connections open so they can be reused by others. Therefore, if you select the option, the threads can reuse the current opened connection.Note: The connection pooling can be enabled only for a persistent or private connection definition. A TMemo object.The sample uses the memo object to display the type of connection. If you select the Pooled property, the memo displays the following message: ‘Run pooled…’. On the other hand, if you uncheck the Pooled property, the memo displays the following message: ‘Run non pooled…’. Through the link below you can visit the original post about this sample: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.IFDPhysConnection.Pooling_Sample
Sometimes developers need to log the output messages in Delphi for debugging purposes. You might aware this can be achieved by the windows API OutputDebugStringA . How about direct your python output messages to the Delphi Events Log Window? Yes, Python4Delphi has a flexible component PythonInputOutput to redirect your python output to the Delphi Events Log window with less code. You can also use Python4Delphi with C++Builder. Python4Delphi Demo23 Sample App shows how to create a Python script in Delphi Application which demonstrates creating thread and output the result in the Delphi Event log window. You can find the Demo23 source on GitHub. Prerequisites: Download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out this video Getting started with Python4Delphi. Components used in Python4Delphi Demo23 App: TPythonEngine: A collection of relatively low-level routines for communicating with Python, creating Python types in Delphi, etc. It’s a singleton class. TPythonInputOutput: Inherited from TPythonInputOutput (which works as a console for python outputs) Using this component event you can direct your Python Output to the Delphi Event log window. You can find the Python4Delphi Demo23 sample project from the extracted GitHub repository ..Python4DelphiDemosDemo23.dproj. Open this project in RAD Studio 10.4.1 and run the application. Implementation Details: PythonEngine1 provides the connection to Python or rather the Python API. This project uses Python3.9 which can be seen in TPythonEngine DllName property. It uses a Python Script file threading_test.py where the below list of modules was used. threading: This module constructs higher-level threading interfaces on top of the lower level _thread module. collections: This module implements specialized container datatypes providing alternatives to Python’s general-purpose built-in containers, dict, list, set, and tuple. In this sample, deque is used. time: This module provides various time-related functions. threading_test.py contains, ProducerThread, ConsumerThread, BoundedQueue class within the function _test. Memo1, used for providing the Python Script to execute. On Clicking Execute Button the below code executes the python script. procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; The script below is executed which will opens a window console, create threads put in a queue and execute one after other. import threading_test import sys # the following is needed to use the newly allocated console! sys.stdout = sys.stderr= open(‘CONOUT$’, ‘wt’) try: count = int(sys.argv[1]) except: count = 3 for i in range(count): print (“**** Pass”, i) threading_test._test() print (“**** Done.”) import threading_test import sys # the following is needed to use the newly allocated console! sys.stdout = sys.stderr= open(‘CONOUT$’, ‘wt’) try: count = int(sys.argv[1]) except: count = 3 for i in range(count): print (“**** Pass”, i) threading_test._test() print (“**** Done.”) PythonInputOutput1 provides a conduit for routing input and output between the Graphical User Interface (GUI) and the currentlyexecuting Python script. The OnSendData event helps to send the python output data to the Delphi Event log window using the below code. procedure TForm1.PythonInputOutput1SendData(Sender: TObject; const Data: AnsiString); begin {$IFDEF MSWINDOWS} OutputDebugStringA( PAnsiChar(Data) ); {$ENDIF} {$IFDEF LINUX} WriteLn( ErrOutput, Data ); {$ENDIF} end; procedure TForm1.PythonInputOutput1SendData(Sender: TObject; const Data: AnsiString); begin {$IFDEF MSWINDOWS} OutputDebugStringA( PAnsiChar(Data) ); {$ENDIF} {$IFDEF LINUX} WriteLn( ErrOutput, Data ); {$ENDIF} end; Python4Delphi Demo23 You can customize your Events Debug Output messages background and foreground colors easily to differentiate your output messages with Delphi IDE. Right-click in the Events Tab -> Properties->Event Log->Colors -> Output Debug String-> Select Foreground and Background.
Over the past three decades, Golden, Colorado-based RockWare, Inc. has established itself as a leader in the highly specialized geological mapping and modeling sector. Its flagship product, RockWorks, creates 3-dimensional geological models of the earth’s subsurface for customers in environmental (toxic cleanup, contamination audits), hydrogeology (surface and sub-surface water), and industrial minerals (e.g. gypsum, sand gravel) segments and it is built in Delphi. One of the key benefits of Delphi according to Jim Reed, Director R&D is that “It allows us to put in millions of lines of code and do it in an efficient way without maxing out memory. Because of that, we can have a monster program that does 50 zillion different things, but can be downloaded comfortably in a reasonable amount of time. Given that 65% of our business is outside of North America, executable files have to be small enough so that someone in Sudan can download data over a lousy connection.” He attributes this capability to the overlay features in Delphi, which allow for exceptional memory management. “Delphi allows you to easily load and unload things in memory so our software can run on any basic machine. In fact with a low-end PC you could have our application up and running in an hour. We couldn’t live without that.” Case Study https://www.embarcadero.com/case-study/rockware-inc-case-study Website https://www.rockware.com/ Screenshot Gallery
Delphi Parser has a new major release … Download Free The New & Powerful Delphi Parser Static Code Analyzer 2.4 & Get Your Delphi Code Analyzed in Minutes! This is an exciting year for Delphi programmers with one of the more significant new RAD Studio releases. With multiple new features and quality improvements, the time to upgrade your Delphi projects has never been better. Delphi Parser is the premier tool to support a wide range of Upgrade needs from simple projects to ones with millions of lines of code. We built it and improved it based on multiple projects. RAD Studio 10.4 allows developers to create amazing modern applications and Delphi Parser is the tool to get you there faster and cheaper. The Delphi Parser Analyzer 2.4 is the Newest Most Valuable Tool For Delphi Developers. It is built & aimed for dealing with huge legacy Delphi projects with hundreds of applications, thousands of unit files & libraries with millions of lines of code & decades of development & developers. It is a must-have tool in every development team through all the development life cycle. No Hard Work. You just need to provide the Delphi Parser Analyzer 2.4 the project source or code base folder you want to analyze, and the search path for the libraries & the Analyzer wizard will do the rest. The Delphi Parser’s Analyzer 2.4 is an automatic code analyzing wizard. It scans & analyzes an entire code base against all available Delphi’s system units, 3rd party components, libraries & even DCUs (using a special De-Compiler). Delphi Parser 2.4 – A Full Blown Independent Parser & Linker. The Analyzer 2.4 is built on the all new Delphi Parser 2.4 framework that has the ability to read millions of lines of code & parse the code into a unified run-time object mode. Multi Pass Parser – The Delphi Parser runs in several phases in order to remove all unnecessary compiler directives while stepping over syntax errors & bridging all Delphi versions differences, from Delphi 2 to 10.4 Sydney In order to build a unifying structured code in an object model in run-time memory. Built-in Linker & Semantic Objects Tree. As the New Delphi Parser v2.4 core technology reads all the code, it links between objects, find source declaration, links implementation code to objects & methods, checks for code dependencies, count references & usage, discover missing objects, and provides the developer an ability to review & drill down into the parsing & linking process in run-time like never been done before (as well as in any other language compilers). The Delphi Parser Analyzer 2.4 Wizard is available for all Delphi versions, as Express & Enterprise edition & also in an open-source edition based on the Delphi Parser 2.4 Developer’s Framework. The Delphi Parser Analyzer 2.4 helps your development team maintain a cleaned project’s codebase. Run it whenever you wish to release a new version update & removes unnecessary files & libraries from code before it is deployed. Take Control Over Your Code. Every software project contains many components that may become unnecessary or obsolete over the development process & stay there untouched, cause no one knows what to do with them & the fear of taking them out leaves them there for eternity. Today, with the Delphi Parser Analyzer 2.4 you can easily & quickly analyze your code on any given Delphi version, from the Legacy Borland to the Newest Embarcadero’s Delphi 10.4 Sydney – and get a true insight into what is going on in your code & […]
Many application developers are building a web version of their services to get more users. For instance, you do not always have the same phone or same laptop to utilize the application, if the application has a web version everything is done. In this webinar, you can see what is new with TMS Software and how you can use their full range of components to modernize your Windows 10 application and building web apps with Delphi. New challenges today: Development for multiple platforms Desktop Client Applications need to interact with servers. Less RAD, more OOP Loosely-coupled Software Building Blocks Front-End – TMS VCL, FMX, FNC UI Pack & TMS Web Core Business Logic – TMS Aurelius, FlexCel, ANalytics, and more Back-End – TMS RemoteDB, Sparkle, XData If you are interested in building backend services with Delphi and TMS, you can utilize TMS XData to write custom services. TMS XData has several major features which you should know: Can be autogenerated from an existing database Open for any desktop, web, or mobile app Standardized REST protocol using JSON for data transport Fully documented REST API with SwaggerUI Be sure to watch the session Q&A learn more about the specific information. Head over and check out all of the different components available from TMS Software!
The CloneCursor sample shows you how to clone a dataset. To this end, the sample uses the CloneCursor method of the TFDDataSet class. Moreover, the sample uses other methods to determine whether the current record is within a specified range. Location You can find the CloneCursor sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesComp LayerTFDMemTableCloneCursor Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. How to Use the Sample Navigate to the location given above and open CDS_CachedUpdates.dproj. Press F9 or choose Run > Run. Click on the Use Connection Definition combo box and select an option. Click on the CloneCursor button to clone the dataset. Modify the Start range (OrderID) and End range (OrderID) labels. Click on the CheckRange button. Files File in Delphi Contains CDS_CachedUpdates.dprojCDS_CachedUpdates.dpr The project itself. fCachedUpdates.pasfCachedUpdates.fmx The main form. Implementation This sample uses three main components: When you run the application, click on the Use Connection Definition combo box and select an option in order to define a connection. When you select an item of the combo box, the Active property of the cdsOrders table is set to True in order to open the dataset and read data from the database. Then, the sample displays a table using a TDBGrid component. Once the TDBGrid is filled, you can interact with the sample. Each of the following buttons implements an OnClick event to do what is described below: When you click on the CloneCursor button, the sample clones the cdsOrders table using the CloneCursor method and sets the Active property of the cdsClone table to True in order to populate the table with the cloned data. When you click on the CheckRange button, the sample uses the Start range (OrderID) and End range (OrderID) labels as the starting and ending values of the SetRange method. Then the sample applies the range to the cdsClone table using the GotoCurrent method. When you click on the CancelRange button, the sample uses the CancelRange to remove the current range. Please refer to the next links for the source code of this Sample: https://github.com/Embarcadero/RADStudio10.4Demos/tree/master/Object%20Pascal/Database/FireDAC/Samples/Comp%20Layer/TFDMemTable/CloneCursor
In this tutorial, you learn how to configure a Jenkins server to build and run a DUnitX test application using MSBuild, to be triggered by commit to a subversion repository, and to notify by email when the test fails. Brief Introduction to Version Control Version Control allows you to maintain multiple versions (revisions) of your source code on a remote server Version Control assists in the maintenance of source code with multiple authors What is Continuous Integration? Continuous Integration is a team problem. Continuous Integration is all about preventing the main branch from being broken so, your team is not stuck. That’s it. It is not about having all your tests green all the time and the main branch deployable to production at every commit. Continuous Integration is independent of any tool. You can verify manually that the merge of your branch and the main branch works locally. Be sure to watch the whole session to learn all the concepts related to Continuous Integration with Delphi
Invormațiile pe cale Dvs le introduceți în prezentul formular nu se păstrează online, dar se vor transmite direct la destinație. Mai multe informații găsiți în Politica Noastră de Confidentialitate
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.