Friday, May 10, 2013
TMS Aurelius in your iPhone
We have just released TMS Aurelius 2.1 with XE4 support. This "small" release took a little longer, but with a good reason for that: thanks to the new iOS compiler provided in Delphi XE4, now TMS Aurelius supports iOS devices, in addition to the already supported Win32, Win64 and OS X platforms!
As you might already know, the new iOS compiler has some different concepts than the traditional Win32 compiler we are used to. Automatic reference counting for objects and zero-based strings are the main ones, and also the fact that pointers usage is discouraged now.
But for those considering using this new iOS compiler, there is good news. Personally, I was surprised, in a positive way, how backward compatible it is. Of course it depends on your code. If it has heavy pointer usage, lots of low-level hacks, etc., you might have a lot of work to do. But other than this, there is a good chance that you code will work smoothly on iOS. I can speak for Aurelius. It can be considered a very new TMS product (a little more than one year passed since 1.0 release in January, 2012) so it uses several new language features like generics, new RTTI, among other recent additions that helps the code to be very clean, well structured and with almost no pointer usage. Making most of it to compile to iOS required minimum changes, and it worked fairly well (of course, all our tests passed, in both iOS simulator and iOS device).
I said it was easy to compile "most of it" because the only exception was TAureliusDataset. Not that it was a nightmare, but without it, the other parts of TMS Aurelius would be compiling and running on iOS in a matter of minutes. But TAureliusDatset of course descends from TDataset which is a code that heavily uses pointers, internal buffers, etc.. So it required a some effort to convert.
All in all, you can have your TMS Aurelius code working on iOS, with all existing features, including TAureliusDataset and native SQLite support. And the best part is that you can use it the same way you do in Delphi: since TMS Aurelius already manages the memory in VCL/FMX applications (you usually don't have to worry about destroying objects retrieved from the database), you will have the same behavior in iOS.
| Bookmarks: |
Wagner Landgraf
This blog post has received 4 comments.
2. Sunday, May 12, 2013 at 8:37:36 AM
As far as I know Delphi will target new platforms by using LLVM.http://llvm.org/
iOS was first, Android will be next.
@Wagner: Thanks again for Aurelius.
Roland Kossow
3. Sunday, May 12, 2013 at 1:46:15 PM
Awesome! (there is really no need to say more :) )
Holger Flick
4. Saturday, May 18, 2013 at 9:40:02 AM
Something like this were never exists in delphi arena, a great design plus a good feedback from users, Aurelius is a wonderful product now for the ones like to use correct software engineering and DDD in their products.Ryan Samiee
Monday, April 08, 2013
Chrome-style application setting persistence/synchronisation with DropBox
Google Chrome has the very interesting feature to be able to store its settings via your Google account. This means that when you install Chrome on a different machine and associate it with your Google account, it will automatically "inherit" all settings of your other configs. Not only Google Chrome does this but increasingly Windows desktop applications and tools use online storage to offer the convenience of having identical configurations on multiple machines. Another excellent example is the Google Chrome extension Speed Dial 2 that can synchronize its settings among machines this way.Now, nothing prevents us from doing the same for a Delphi application and with the TMS Cloud Pack, it becomes very simple to use a cloud storage service such as DropBox to allow the user to persist his settings in a DropBox folder and have these settings synchronised between different machines this way.
We have created a very rudimentary example to demonstrate the concept. The settings from the sample application are simply the contents of a listbox where items can be added or removed via the application. We save the settings as a simple text file and load this at application startup time from a DropBox account and save it back to DropBox when the application closes.
All we need to do is drop an instance of TAdvDropBox from the TMS Cloud Pack on the form, set the DropBox application key and secret (that can be obtained for free after registering with DropBox) load the access tokens and when the access tokens do not yet exist, get an access token for DropBox via an authentication/authorization step and call one line of code to download the settings file.
When the application closes, we simply upload the settings again with one call.
When we save the access token (here for reasons of simplicity of the demo in an INI file), this one time authentication/authorization with the DropBox account by the user is sufficient (which is similar for Google Chrome settings synchronisation too by the way)
The code with information in comments for application startup becomes:
procedure TForm1.FormCreate(Sender: TObject);
var
acc: boolean;
begin
Dirty := false;
// set the DropBox application key & secret here that is provided by DropBox
// for free when registering via: https://www.dropbox.com/developers/apps
AdvDropBox1.App.Key := DropBoxAppkey;
AdvDropBox1.App.Secret := DropBoxAppSecret;
// Use simple INI file storage for the access token that DropBox will give
AdvDropBox1.PersistTokens.Location := plIniFile;
AdvDropBox1.PersistTokens.Key := '.\sync.ini';
AdvDropBox1.PersistTokens.Section := 'DropBox';
if AdvDropBox1.App.Key <> '' then
begin
// Try to load an access token if it was already retrieved earlier
AdvDropBox1.LoadTokens;
// Test if the token is working
acc := AdvDropBox1.TestTokens;
if not acc then
// If the token was not working try to refresh it
acc := AdvDropBox1.RefreshAccess;
if not acc then
// No token was found or existing token is not valid, so authenticate/authorize via DropBox
AdvDropBox1.DoAuth
else
// Download the settings from DropBox and apply
LoadSettings;
end;
end;
followed by the authorization screen:

When the access token is obtained the first time, the TAdvDropBox component triggers OnReceivedAccessToken from where the token is first saved and then the settings downloaded and applied:
procedure TForm1.AdvDropBox1ReceivedAccessToken(Sender: TObject); begin AdvDropBox1.SaveTokens; LoadSettings; end;
When the application closes, we can simply save the settings in the Form's OnClose event via:
procedure TForm4.FormClose(Sender: TObject; var Action: TCloseAction);
begin
listbox1.Items.SaveToFile(GetSettingsFileName);
if Dirty and AdvDropBox1.TestTokens then
AdvDropBox1.Upload(nil,GetSettingsFileName);
end;The full source of the sample can be download here. With the TMS Cloud Pack offering similar access also to Microsoft Skydrive and Google Drive, it becomes very easy to change to the cloud storage of your preference by swapping to the component TAdvGDrive or TAdvSkyDrive.
| Bookmarks: |
Bruno Fierens
This blog post has received 1 comment.
1. Thursday, May 16, 2013 at 4:08:31 PM
This sounds very usefull, but how do you solve issues when multiple instances of your application are synchronizing at (almost) the same time? Then the last one who synchonizes will ''win''.
Martijn van der Kooij
Friday, March 29, 2013
Feature request voting system on TMS website ... 9 months later
Since July 2012, the website offers feature request voting capabilities for registered TMS customers. New request can be added, requests can be filtered and you can vote on requests from other customers.Now 9 months later, we’ve made an evaluation of our feature request voting system. The results:115 requests
We’ve received 115 requests from our customers.
Components can be used in many different ways, so you are in the best position to determine which capabilities a control must have to be 100% functional in your application. Please keep on adding new requests, and help us to further extend our range of components offerings and enhance the feature set and quality of our components. All your suggestions are welcome to further improve our existing components. And of course suggestions for new components are also welcome.
Your opinion is highly appreciated and will be taken in account!
28 implemented requests
And now the good news, 28 requests have been implemented.
Several new capabilities and features were added to existing components but most importantly we've added 3 completely new components!
YOUR requests resulted in following new components:
- A new syntax highlighting memo control for FireMonkey: TTMSFMXMemo
- A new VCL mapping component to integrate, display & control OpenStreetMaps in VCL Windows applications : TMS WebOSMaps
- A new OpenGL 3D multi-serie chart component: TMS TAdvChartView3D
Overview new capabilities and features in existing components:
- New: TWebGMapsDirectionList control to show steps of direction info in TMS WebGMaps
- New: Support to show & interact with polylines on map in TMS WebGMaps
- New: Support to show & interact with polygons on map in TMS WebGMaps
- New: TWebGMapsReverseGeocoding component added in TMS WebGMaps
- New: Multiline tab capability added in TAdvOfficePager
- New: Extended design-time style gallery in TAdvStringGrid
- Improved: Using grid.Ints[] now returns the rounded value when the cell contains a float in TAdvStringGrid
- New: Full JSON support makes it easy to build distributed applications in TMS Aurelius
- New: Update Database Schema feature (TDatabaseManager.UpdateDatabase method) in TMS Aurelius
- New: Support for FIBPlus components in TMS Aurelius
- New: KeyBoard and Mouse Wheel handling support in TTMSFMXSpinner
- New: Support for TTMSFMXBitmap in TTMSFMXBarButton
- New: Added capability to define multiple separator characters in TAdvListEditor
- New: Spacing added for items in lookup dropdown in TAdvListEditor
- New: LookupPopup.ValueSeparator property added in TAdvListEditor
- New: Added property MaxItems in TAdvListEditor
- New: Font in lookup dropdown customizable in TAdvListEditor
- New: Event OnTabInsert added in TAdvOfficeTabSet
- New: CaptionMarginRight and CaptionWordWrap properties per item in TAdvSmoothListBox
- New: ShowLegend and ShowTotal properties to optionally show/hide the legend and total values in TAdvSmoothCapacityBar
- New: ButtonBorderColor in TAdvSmoothPopup
- Improved: AnnotationTopHeight and AnnotationBottomHeight to return the used space by the annotations in TAdvSmoothTimeline
- Improved: csAcceptControls flag added to allow adding controls inside the control in TAdvSmoothTimeLine
- New: Method GetVersionInfoOfApp() method added in TExeInfo
- New: TAdvToolBarPage BeginUpdate/EndUpdate methods added in TMS Advanced Toolbars & Menus
- New: Added capability to copy items in the design time editor in TMS Advanced Poly List
Not only new requests were added to our list, but you also voted on existing requests. This helps us to set the right priorities and goals.
If you want to have a look at the list with requests or you want to add a new request, the overview page can be found here: http://www.tmssoftware.com/site/fr.asp
We at TMS are always trying to improve our products and bring them to a new level. We plan to add several new features in upcoming releases, our team is already busy with implementing your requests!
| Bookmarks: |
Nancy Lescouhier
This blog post has not received any comments yet.
Monday, March 25, 2013
Preparation for TMS Day April 25 in full force
Preparation of the TMS Day scheduled for April 25 is in full force now. We’re working hard on every little detail, going from papers for the hand-outs, evaluation forms, training certificates, a gift attendees will receive to of course most importantly the content of the sessions itself. The tentative day scheme will be:Effectively using Flexcel for VCL & FireMonkey by Adrian Gallero, Flexcel architect
Adrian Gallero will give an allround overview of Flexcel and how the product can be used most effectively.
- Intro: Technical background why OLE Automation doesn't cut it and why to use Flexcel instead
- Details about the Flexcel API and using the APIMate tool to be more productive in using the Flexcel API and some information about what is not in APIMate.
- Using Flexcel based reports and how they can be used for much more than reports. Demo of an entire application created using Flexcel reports.
- Getting the most out of Flexcel rendering: exporting to HTML, PDF, printing, etc and how to make an Excel file so it prints fine.
- Getting the most performance out of Flexcel in particular using the virtual mode, a unique feature in FlexCel
- Using Flexcel with FireMonkey and using it in iOS applications with demo of Flexcel in the newest Delphi version and its new compiler for iOS.
Learning Aurelius by example with DataSnap REST Servers by Wagner Landgraf, Aurelius architect
A step by step presentation how the Delphi ORM Aurelius can be used to create an issue tracker from scratch.
- Aurelius basic mapping/connection between Delphi classes and database tables
- A look at the memory management concept of the object manager
- The TAureliusDataset concept to bind entities automatically to controls
- Overview of specific TAureliusDataset features: enumname, subproperties, lookup fields, entity fields, master-detail
- Using & implementing queries from Aurelius
- Switching between database servers, or how easy Aurelius makes it for you to switch database servers
- Creating REST server and using Aurelius JSON serializer/deserializer to send/receive entities
- Accessing Aurelius data from JavaScript
TMS VCL Components tips & tricks by Bruno Fierens, VCL component architect
Bruno Fierens will walk through several TMS VCL components showing advanced techniques.
- Understanding and using filtering in TAdvStringGrid: various automatic filtering techniques from the user interface, logical operations between filter conditions
- Using custom controls as inplace editors in the grid
- Creating a custom styler & custom autocompletion for TAdvMemo
- Using form-wide and application-wide styles for TMS VCL components
- Various scenarios and use cases for TWebUpdate, the automatic application updater
- Metro style UI’s with TMS Components
TMS FireMonkey components for business applications by Pieter Scheldeman, FireMonkey component architect
Pieter Scheldeman will unveil the architecture and features of the FireMonkey tableview and grid component.
- Architecture of the tableview component, features, how its items can be customized and important performance aspects
- Architecture of the grid component, design decisions, features
- Using LiveBinding with the grid component
- Customization of the grid via editing its style
- Creating and using custom cell classes for the grid
- TMS FireMonkey components for iOS, sneak peek at newest developments specifically for iOS with the new Delphi version
Connecting Delphi application to the cloud with the TMS Cloud Pack by Bruno Fierens, VCL component architect
Discover how your applications can benefit from consuming cloud services, getting data from the cloud, putting information in the cloud.
- Consuming cloud services from Delphi applications
- The OAuth challenge
- TMS Cloud Pack component architecture and component overview
- Connecting the VCL Planner components to the Google Calendar and Windows Live services
- Creating a custom cloud service access component using the TMS Cloud Pack framework
Other than the sessions, the entire TMS team will be available all day at your disposition to listen to your project specific questions and suggestions. For location, prices and reservation for the last 2 seats, see www.be-delphi.com
| Bookmarks: |
Bruno Fierens
This blog post has not received any comments yet.
Friday, March 22, 2013
Visual Data Binding using TAureliusDataset
When dealing with Aurelius and any ORM framework, one common task is to build a graphical user interface to edit/display the data. Delphi users are used to the TDataset component, which not only retrieves data from the database but also act as middle layer between the data and visual controls. When using Aurelius, you don't use any TDataset descendant to directly retrieve data - all business data are objects that are retrieved by Aurelius itself.
To bind your objects to visual controls, you could use the new Visual Live Bindings feature. But Aurelius also provides an additional way of doing that - you can use TAureliusDataset, a TDataset descendant which behaves as any other TDataset - the only difference is that entity objects are the "data" for this dataset.
Consider the following code:
var
Customers: TList<TCustomer>;
Dataset: TAureliusDataset;
{...}
Customers := Manager.Find<TCustomer>.List;
Dataset.SetSourceList(Customers);
Dataset.Open;
TAureliusDataset automatically maps each property to a field in dataset. So if your customer is declared like this:
type
TCustomer = class
{...}
property CustName: string read FCustName write FCustName;
CurrentName := Dataset.FieldByName('CustName').AsString;
Dataset.Edit;
Dataset.FieldByName('CustName').AsString := CurrentName + ' - sufix';
Dataset.Post;
SpecificCustomer := Manager.Find<TCustomer>(CustomerId); Dataset.SetSourceObject(SpecificCustomer); Dataset.Open;
1. You can use existing data-aware controls. Delphi is now 18 year-old. There are numerous existing controls that support TDataset, but not live bindings. Data-aware grids, planners, controls, etc.. All of those can be used and be bound to the objects.
2. TDataset provides a temporary cache/buffer. This means that until you effectively Post, objects are not changed. Remember this acts as a TDataset. While the dataset is being edited and field contents are updated, only the internal dataset buffer is updated. Data is effectively saved in the objects (the "data") only after Post. This gives you great flexibility when you need to build user interfaces where user can cancel changes, or only update data when clicking "Ok". If you use live bindings, you would have to do something else to achieve such behavior.
Not only that, TAureliusDataset is not just a property->field mapper. It's really powerful. Here is a list of many things TAureliusDataset can do and features it supports (I might write about these in a future post):
- Fetch-on-demand (will talk about this in a future post)
- Offline, paged fetch-on-demand (same as above)
- Sub-properties (properties of associated entities)
- Entity fields (fields representing an association)
- Dataset fields (master-detail)
- Supports inheritance/polymorphism (list of objects of different classes)
- Enumerated types
- Lookup fields
- Locate/Lookup methods
- Filtered data
- Calculated fields
- Design-time support

| Bookmarks: |
Wagner R. Landgraf
This blog post has not received any comments yet.
Previous | Next | Index





i see a great future for them if they do something like what lazarus is doing, of course, lazarus is not a complete project but i like it because one code can run everywhere.
Ryan Samiee