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).
As you probably know, I work for the italian embarcadero representative (www.bittime.it), so last week, I’ve been in Milan (Italy) with the Delphi Product Manager Marco Cantù, to show the new Delphi XE5 for Android (and iOS…).
Users (old and new) were enthusiastics. The Delphi-WAY combined with the Android openness and flexibility, is really a good way to develop mobile apps for the business customers.
So, after the initial demos some users were interested in sending Android Intents from their Delphi app.
I’ve builded some demos about Intents, so I showed those demos to them (in the next weeks there will be many Delphi for Android training in Italy, so I’ve build those demo in advance)
In Delphi XE5 you can call java classes from the Google SDK. So I started investigating hot to do this.
There are a lot of possibilities, and I’m still doing research, but this is a simple Intent send demos.
This is the code under the first button.
procedure THeaderFooterForm.Button1Click(Sender: TObject);
// JAVA SDK ANDROID HELP SAYS...
// String url = "http://www.example.com";
// Intent i = new Intent(Intent.ACTION_VIEW);
Intent := TJIntent.Create;
Simple, isn’t it?
With this piece of code, you cann open your device browser to a web site (my blog in the snippet).
Click on the first button and you will be redirected to this blog.
Intents are REALLY powerfull
With the next snippet, you can send piece of data (e.g. text) to other apps. You dont have to know the apps in advance, Android will do the match with the Implicit Intent. (It is similat to the TShowShareSheet action).