Delphi

Build Modern Delphi/C++ Builder Web Applications Using IntraWeb Framework and IWBootStrap

Thinking to write a new web application or modernize your existing application into web framework for Delphi/C++ Builder Framework? AToZed Softwares provides an Amazing FullStack/ClientServer Focused Web Framework to build applications faster. Installs into IDE, Modeled on VCL, Visual Client Designer. The client built from the JS and HTML library. Delphi UI event handlers run on servers, extensible via typescript. Features: Development paradigm is very close to Desktop applications. IntraWeb 14 is free for 10.3 Rio users, however you can purchase a license and update to the latest IntraWeb 15 with HTTP.sys support and much more. Ultimate Edition available for more deployment and other options. Easy to Get Started with powerful components. Flexible to create as ISAPI dll, Windows Service or Standalone application. How to build a sample IntraWeb Application in Delphi. File->NewItems->IntraWebFolder->IntraWeb Application Wizard->Choose ApplicationType as Standalone Application. The Standalone Application Server is a web application that includes, an embedded web server, the IntraWeb core code and your code. When you are developing your application, simply running the SA Server and typing http://127.0.0.1:8888/$/start on your browser is enough for running your application. http://127.0.0.1 stands for the local host, 8888 is the port the embedded web server is listening to (check TIWServerControllerBase for learning about the Port property) and /$/start is the IntraWeb command that forces the start of a new user session. Create a Main Form Drag and Drop the IntraWeb components such as IWButton, IWList, IWEdit for Client Side implementations. Run the Application-> Standalone application dialog is open with multiple Browser options for debugging purpose. Open with Chrome or Firefox browser. Test the Main Form with some logic built in the Client side implementations. In the background the standalone server side application generates the HTML.CSS,JavaScript and shown in a browser for your Delphi IntraWeb Client App. To Deploy follow the steps here You can deploy the created application in IIS server or run as windows service or ISAPI application. You can grab your Free Bundled edition Key here To modernize your Intra Web Delphi Client App with more stunning styles and templates use IWBootstrapFramework. An open source Bootstrap wrapper framework for IntraWeb. The same way you use for create traditional Intraweb Aplications, you can use. With very little effort you can create a single applications that look awesome in mobile devices and desktop at the same time. It’s light and fast so it provides a great experience for the end user in any device. Check this below Video for the Demonstration for IntraWeb and IWBootstrapFramework. With Some Excellent Features a good Road Map is planned for the IntraWeb and its Coming Soon. Please check the what the updates are in the below Video. For other products and updates about IntraWeb check here

Read More

Learn About Executing Local SQL Queries Within Your Delphi Apps Using FireDAC

The FireDAC.TFDLocalSQL MegaFMX sample is divided in three tabs where each tab demonstrates single Local SQL usage case. Each tab has dedicated SQLite in-memory connection established using the TFDConnection with only single parameter DriverID=SQLite. When no Database parameter value is specified then FireDAC SQLite driver opens an in-memory connection. It will be used as a Local SQL engine. The TFDLocalSQL component for each page serves as a hub to Local SQL engine, allowing to register datasets with the Local SQL engine. Also there is a TMemo where the Local SQL query is defined before executing it using a TFDQuery component. The TFDLocalSQL.Connection and TFDQuery.Connection properties are set to the same SQLite in-memory TFDConnection. Visual components such as the TGrid and the TBindNavigator are bind to the TFDQuery using Live Bindings. Location You can find the MegaFMX sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDataBaseFireDACSamplesComp LayerTFDLocalSQLMegaFMX. 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: Press F9 or choose Run > Run. Move to the different tabs. Click Open to open the connection and see the content on the grid. Note: You can navigate through the records with the TDBNavigators. Implementation The sample is divided in tabs. The TFDMemTables are defined and filled with data by code. CSV DB (dyna) The first page represents the Comma-Separated Values (CSV) text file database with SQL query capabilities. The text files are stored in C:UsersPublicDocumentsEmbarcaderoStudio15.0SamplesObject PascalDatabaseFireDACDBData folder. The FDConnection1 provides SQLite in-memory connection. For that DriverName property is set to SQLite. The FDLocalSQL1.Connection and the FDQuery1.Connection are set to the FDConnection1. Clicking Open, inserts the lines of the Memo1 on the FDQuery1 and executes the Local SQL query: procedure TfrmMain.Button1Click(Sender: TObject); begin FDQuery1.Close; FDQuery1.SQL := Memo1.Lines; FDQuery1.Open; end; procedure TfrmMain.Button1Click(Sender: TObject); begin   FDQuery1.Close;   FDQuery1.SQL := Memo1.Lines;   FDQuery1.Open; end; Is shows the result on the Grid1 grid. Heterogeneous Query (dyna) The second page represents the ability to perform a heterogeneous SQL query, where several joined tables are prefixed by a schema name. There a schema name corresponds to a FireDAC connection definition name. The connection definitions are stored in the C:UsersPublicDocumentsEmbarcaderoStudioFireDACFDConnectionsDefs.ini file. So, the tables with different schema names will be obtained from the different (heterogeneous) database connections. The basic setup is similar to first page. Each schema name is handled by a dedicated TFDLocalSQL component. For that the property TFDLocalSQL.SchemaName is used: FDLocalSQL2 = SQLite_Demo FDLocalSQL3 = Access_Demo. The FDLocalSQL2 and FDLocalSQL3 OnGetDataSet event handlers are used to dynamically resolve a reference to an unknown table name and to provide a dataset with the data. For that event handler creates TFDQuery component and sets it ConnectionName to the schema name and SQL property to select * from table query: procedure TfrmMain.FDLocalSQL2GetDataSet(ASender: TObject; const ASchemaName, AName: String; var ADataSet: TDataSet; var AOwned: Boolean); var oQry: TFDQuery; begin oQry := TFDQuery.Create(nil); try oQry.Name := AName; oQry.ConnectionName := ASchemaName; oQry.SQL.Text := ‘select * from ‘ + AName; oQry.Open; except oQry.Free; raise; end; ADataSet := oQry; AOwned := True; end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 procedure TfrmMain.FDLocalSQL2GetDataSet(ASender: TObject; const ASchemaName,   AName: String; var ADataSet: TDataSet; var AOwned: Boolean); var   oQry: TFDQuery; begin   oQry := TFDQuery.Create(nil);   try     oQry.Name := AName;     oQry.ConnectionName := ASchemaName;     oQry.SQL.Text := ‘select * from ‘ + AName;     oQry.Open;   except     oQry.Free;     raise;   end;   ADataSet := oQry;   AOwned := True; end; Clicking Open, inserts the lines of the Memo2 on the FDQuery2 and executes […]

Read More

Learn How To Build Responsive Apps Faster Using Delphi Parallel Programming Library

Building Responsive Apps becomes the most essential need for all Modern Desktop, Mobile and Web applications in all platforms to meet the customer needs. Do you want to wow your customers with greater experience for your Delphi/C++ Builder Applications ? Don’t know how to create responsive apps with Parallel Programming Library ? Don’t Worry! This post will guide you to learn about PPL. Task: A Task is like a parallel procedure. A Task runs parallel to the main thread. Tasks do no start right away, they are held in a queue and it is managed by a Master thread which allocates thread from a thread pool. It works like Master-Worker pattern with a Thread pool. Thread Pool has a number of threads. Based on CPU the threads are avialable and start when CPU time is available.Tasks run best without serializing dependencies. Check the tutorial for Task here Future: Future is like a parallel function. A future is actually a task with return result you wait for it (unless the Future gets completed) . The future method returns an instance of IFuture into the variable defined of type T. Check the tutorial for Future here. Tasks Chaining: Task can be chained together, e.g) Tasks can wait for results from other tasks. This uses TTask.Wait like how TFuture does. WaitForAll task in a list, or WaitForAnyone to complete. Parallel For : A Parallel.For Splits a for loop into pieces that run in parallel. It runs through data in parallel( data parallelism) and waits for completion. Use task if you don’t want to wait in thread. Parallel.For uses Task. Tutorial for Paralle.For here Create Responsive Apps : A Responsive Application never blocks the user interface while processing the data in background and it never waits. Immediate feedback and responsive gives user the great experience. Perceived speed is not equals to actual speed get data and run operations in parallel. Check this Video for the Delphi Parallel Programming Library to create responsive Apps: Get to know about the PPL which Delphi/C++ Builder offers. Want to know more about Task Monitoring, Locking, Pools, Patterns and more? See below video.

Read More

Learn How To Create A Custom List View Adapter With A Python Server In This Sample For Delphi

Location You can find the CustomAdapter sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and navigate to: Object PascalMulti-Device SamplesUser InterfaceListViewCustomAdapter Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. Description The CustomAdapter sample shows how to create a custom list view adapter. This specific implementation of a custom adapter obtains image files from a remote server. How to Run the Sample Run the server: Install Python 2 to run the server script. On the project folder, open server.py using a text editor, and update the values of the HOST and PORT variables. Notes: The default values should let you test this sample application on your development PC. To run this sample application on a mobile device, you must update HOST so that it contains the IP address where your mobile devices can reach your development PC. If the default post is busy in your development PC, you must change the value of PORT. Run server.py. Run the sample application: Open the sample application project file. Open the main form of the sample application in the Code Editor and update the value of the Host constant, so that the host and port match those that you configured on the server script. Run the sample application. How It Works After you start this sample application, it displays the following form: Click the Load Pictured button to load 30 list view items from the custom list view adapter. Please follow the link below for more information to the original post: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FMX.ListViewCustomAdapter

Read More