In the 2nd episode of DelphiPodcastIT (Delphi podcast in italian language by Marco Breveglieri) there is a my interview about the past, the present and the future of DelphiMVCFramework with a lot of technical contents. The interview itself is quite long, just like a micro training on DelphiMVCFramework.
P.S. bit Time Professionals offers specific training, consultancy and development about DelphiMVCFramework (besides to Delphi, web development, mobile development, Android, C++ Builder, PHP, Lua, nodejs, Python and embedded)
Almost an year ago I started to write a book about Delphi for Packt Publishing. Today that book has been published.
This book is a cookbook! That’s it, in 328 pages you will find useful (I hope) “recipes” for your day-by-day Delphi job.
Topics of the book
Create visually stunning applications using FireMonkey
Effectively use LiveBindings with the right OOP approach
Create server-side programs to serve RESTful web services and provide data to your mobile apps
Develop mobile apps for Android and iOS using well-defined GUI design patterns for a great user experience
Build efficient mobile apps that read data from a remote server
Call the platform-native API on Android and iOS even for an unpublished API
Use extended RTTI to better manage the software customization for your customer
Leverage the most popular design patterns for a better design without wasting too much time debugging
It is not an introductory book, you will not find any “Introduction to the Object Pascal language”, however the majority of the chapters are not too complex and can be grasped also by the new Delphi programmers.
The book is available for sale on the editor website and on Amazon.
The Parallel Programming Library introduced in XE7 is one of the most awaited built-in library for the Delphi and C++Builder RTL, at least for me. I’ve still a nice list waiting for the next versions, but this is another story
Marco Cantù wrote about dynamic arrays some days ago, another nice feature introduced in Delphi XE7. In the post he talk about an integration between Parallel Programinng Library and dynamic arrays which I shown to the audience in the Milan and Rome XE7 world tour.
I planned to write about Parallel Programming Library in this blog, so why don’t start with that simple example?
Here’s the code.
procedure TFormThreading.Button1Click(Sender: TObject);
tasks: array of ITask;
value := 0;
tasks := [
sleep(1000); // 1 seconds
sleep(3000); // 3 seconds
sleep(5000); // 5 seconds
ShowMessage('All done: ' + value.ToString);
This code configure and start 3 parallel tasks and wait for their completitions. Then show the result using a ShowMessage.
This code takes 5 second to be executed because the 1st second there are 3 tasks running, from 2nd second to the 3rd second there are 2 tasks running while the last 2 seconds only one task is running. All the internal threads are managed by a thread pool. Hey! This means parallelize!
As you probably know, I did some reviews on PACKT Publishing technical books. Now I did a review on a new book about Gideros Mobile. At bit Time Software we used to create mobile games too and in the last months some of them have been built with Gideros Mobile (we do also training on the Gideros Mobile framework. If you are interested, check the contact me section ad write me an email).
The last game released by bit Time Software, is written with Gideros Mobile and is available for Android and iOS devices. It is called Math Brain HD and it’s free. Here’s the game icon.
Is’s really simple to read, also for non native english people, and the contents are very well organized. When you finish to read the book, you are able to create a good level game, not a trivial one. All the topics related to the complete Gideros Mobile software stack are covered.
During the book, the author incrementally starts to use the most popular plugin for the Gideros Mobile, so you are getting familiar with the “fantastic plugin world” from the start.
IMHO it’s a good book.
However, if you want to find some cons, sometimes seems that it goes into too much details getting too trivial (e.g. zindex).
In the last months DMVCFramework has been used in many projects. Some fixes and some new features has been added.
Tomorrow will start the 4th training from the Jan 1st 2014 on DMVCFramework… WOW!
The best selling training is “Developing Web Client applications using AngularJS and DelphiMVCFramework” (a slightly modified version of this classic training http://www.bittime.it/sviluppare_applicazioni_web_usando_angularjs_con_delphi_back_end).
Tomorrow the training will be in italian, however is very popular also the english version.
However, back to the project, there is a first attempt to add some documentations on the project.
So far there are a lot of samples and all the unit tests, however there was a lack on the “classic” documentations. So, I’m happy to say that in the SVN trunk you can find my presentation held at the last ITDevCon2013 in Verona, IT.
If you are using DMVC framework I’ll be glad to have 2 lines of description about your project (numbers not functionalities insights) to put a success case page on the project website.
This time I want to play a video deployed with my APK using an external player.
Some informations are available on the Internet, but to correctly know how to play the video I’ve to inspect my Nexus 5 with the LogCat while using the default file manager to start the default video player.
The app main form is shown below
I’ve added an mp4 video file using the deployment manager.
This is the code under the button click event
procedure TForm1.Button1Click(Sender: TObject);
FileName, DestFileName: string;
VIDEO_FILENAME = 'videoviewdemo.mp4';
FileName := System.IOUtils.TPath.GetDocumentsPath + PathDelim + VIDEO_FILENAME;
DestFileName := TPath.GetSharedDownloadsPath + PathDelim + VIDEO_FILENAME;
// Copy the file into a public path (you can use any public path)
TFile.Copy(FileName, DestFileName, true);
Data := TJnet_Uri.JavaClass.parse(StringToJString('file://' + DestFileName));
Intent := TJIntent.Create;
if CheckBox1.IsChecked then
CompName := TJComponentName.JavaClass.init(StringToJString('android'),
on E: Exception do
Label1.Text := E.Message;
Using the checkbox you can force the OS to show the ResolverActivity.
LuaBinding (integrate Lua script into Delphi native code)
LuaTextFilter (convert eLua into plain Lua executable script just like JSP)
Currently DMVCFramework use Embarcadero WebBroker framework, but is not tied to it. I’m working on a version that use IOCP (that is 10 times faster than plain WebBroker) and other web libraries for Delphi.
Code is enough stable and is already used in big production system.
There are a couple of bugs that affect WebBroker and so, DMVCFramework.
In our system, I’ve applied some patches to solve these problems. If you need those patches, ask me (I cannot publish the full code because it is Embarcadero licensed code).