tag:blogger.com,1999:blog-40160167061829571282019-09-02T10:51:06.113+02:00Spinettaro's BlogA blog about WOW programming...Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-4016016706182957128.post-37322053983045320692019-01-08T15:27:00.001+01:002019-01-08T15:27:40.572+01:00Delphi Flux application architecture
A good application architecture
Finding a good application architecture is not easy, but defining an architecture for your application is important: like it or not, every application is going to have an architecture.
There is no such thing as the Best Architecture, but there is the Best Architecture for your current application! (finish the project on time, with quality, less bugs as possible -Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-15828950492356908882018-08-06T21:28:00.000+02:002018-08-08T11:25:31.339+02:00Delphi Cookbook - Third Edition
This book is the 3rd edition of the Delphi Cookbook serie: Delphi Cookbook is a best sellers for PacktPub (the editor) in its category, so the editor decided to ask me a 3rd edition in co-authorimg with Daniele Teti (author of the 2 previous versions). So here it is!
What's new
In this third edition we wanted to add content to keep the book updated with emerging technologies and new featuresSpinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-56151768663076178442017-11-06T21:33:00.001+01:002017-11-06T21:38:09.522+01:00CodeRage XII: How to develop a simple recommender system
Tomorrow November 7th will see the 12th edition of Embarcadero's yearly online conference, called "CodeRage".
The conference, as always, respects the high quality standards:
52 Sessions in the Delphi Track
23 Sessions in the C++ Track
20 Sessions in the Best Practices Track
14 Sessions in the Cloud Track
13 Sessions in the Platform and Technologies Track
9 Sessions in the InterBase & Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-52888924462367129162017-09-03T14:27:00.000+02:002017-09-05T10:21:58.432+02:00Delphi Entities ValidatorsHow many of you use business objects in your applications?
How many of you use an ORM ?
In this case... how do you validate entities in your applications ?
In a not very elegant way
The classic is IsValid() method on BO
Something else?
Validation inside or outside entities?
How about different context?
Entity validation can be a tricky beast! From bit Time Professionals Lab... Delphi EntitiesSpinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com5tag:blogger.com,1999:blog-4016016706182957128.post-18736656400262095502017-08-27T14:47:00.000+02:002017-08-27T14:47:25.187+02:00Delphi Event Bus and MVVMIn last ITDevCon, I held a speech on how to build modern applications with Delphi. In the speech I showed what are the good programming techniques and how to reach them in Delphi. The path was completed by presenting the MVVM pattern as solution. For more info about this pattern I suggest you these books:
John Kouraklis, MVVM in Delphi
Syromiatnikov, A., A Journey Through the Land of Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-63371138631702069512017-06-25T23:26:00.001+02:002017-06-25T23:29:01.162+02:00Simple retry mechanism in DelphiHi all,
I want to share with you a nice unit that provide a retry pattern. How many times you want to execute some code and, if that method throws an exception, you want to retry executing it several times? For example when you try to connect to a service or network resource or a database. The operation was something that failed frequently enough that it was necessary sometimes to retry until it Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-82173740409991200562017-04-11T22:32:00.000+02:002017-04-12T00:12:15.887+02:00Delphi and Firebase: Remote configurationHi all,
as you know Firebase is a backend service that include a data storage service. One of common example of this kind of service is Remote Configuration, that allows you to change the behavior or appearance of your app (ex. change the welcome message of your app) without changing the app source code.
I've just updated the Firebase4Delphi repository with a new demo : RemoteConfigDemo.
In this Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com1tag:blogger.com,1999:blog-4016016706182957128.post-87327903330559498702017-03-24T22:41:00.000+01:002017-03-24T22:41:53.854+01:00One codebase to rule them all - RAD Studio 10.2 Tokyo is here!Finally, it's arrived!! The penguin invasion has started! RAD Studio 10.2 Tokyo is here bringing with it support for Linux!
Delphi for Linux is now available delivering support for Linux 64bit server-side and standalone applications for Ubuntu and RedHat Enterprise. Guys, I'm very enthusiastic about this new support! This is a very greats news for Delphi developers and not, everywhere!
By nowSpinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-70338513182006923072017-03-02T10:08:00.000+01:002017-06-26T14:29:10.854+02:00Intercept KeyEvent on Android with DelphiSome days ago, I had the needed to intercept the KeyDown Event on Android. In particullary the App have to respond to FormKeyDown Event. After some work I found out that there is an opened issue about this topic (https://quality.embarcadero.com/browse/RSP-10111 - vote it if you need its resolution). So I set to work to find a solution/workaround to solve my need. I studied Android SDK and Delphi Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com1tag:blogger.com,1999:blog-4016016706182957128.post-27128732069447529472017-02-19T16:48:00.000+01:002017-06-26T14:30:18.727+02:00How-To implement 2 finger pan gesture in Delphi FiremonkeyIn Firemonkey, as you know, there is a great support for gestures: standard and interactive. The most important interactive gestures as Zoom, Pan, Rotate, DoubleTap (with an amazing description in dockwiki ), etc... are provided by the framework. See here for a full documentation. In a recent project I had the need to implement 2 finger pan gesture, that is not present in the provided gestures. Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-26328262149841739152016-09-28T17:47:00.000+02:002017-06-26T14:30:10.100+02:00ITDevCon 2016 - Next WeekHi all,
next week there will be ITDevCon2016 and I'm looking forward to it every time I read the agenda!
Here some info that I hope you appreciate as much as I did:
Speakers
15 speakers from all over the world (from Brazil to Slovenia, from Germany to Italy)
Almost all the speakers are Embarcadero MVP
Topics
Last Delphi features
Spring4D
DelphiMVC framework
IoT
Delphi and Arduino Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-39196189284132793832016-06-18T10:31:00.000+02:002017-06-26T14:30:25.495+02:00Simple chat messaging system with Delphi and Firebase Hi all,
some time ago I posted about my open source project: Firebase4Delphi. Well, Firebase was acquired by Google and in Google I/O 2016 was showed very interesting news and new features (more info here ). My project provide a REST facade to consume FIREBASE RealTime Database API.
The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com33tag:blogger.com,1999:blog-4016016706182957128.post-21989821832778569202016-02-29T20:10:00.000+01:002017-06-26T14:31:07.977+02:00DEB an Event Bus framework for DelphiHi all,
I have just started a new open source project: Delphi Event Bus a.k.a. DEB. As the title suggest DEB is an event bus framework based on publish/subscribe mechanism. It was inspired by EventBus framework for the Android platform.
How it works
DEB is designed to decouple different parts/layers of your application while still allowing them to communicate efficiently. The really exciting Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com1tag:blogger.com,1999:blog-4016016706182957128.post-84026489371916582072016-01-10T19:24:00.001+01:002017-06-26T14:31:18.507+02:00New Delphi Demos repositoryHi all,
I have created a new repository on GitHub to keep all interesting Delphi demo that I have figured out. Here the link to repository. This is also a way to share the code with you, so it can be improved. The first project pushed is LocationSensorPatch, relative to previous post. I will put all my demo ASAP.Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-54058998344769716932016-01-02T21:37:00.001+01:002017-06-26T14:31:45.873+02:00Using LocationSensor on Android Service in Delphi SeattleHi all,
this is a very great news!
Me and my CEO (Daniele Teti, bit Time Professionals) have figured out how to implement and use the LocationSensor on Android Service.
Some months ago, I found out that there is a malfunction in Delphi: If you put LocationSensor component on Android Service DM, the service crashes. So I opened an issue on the quality portal, which was recognized and classified Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com29tag:blogger.com,1999:blog-4016016706182957128.post-43684062377124701642015-06-01T15:25:00.000+02:002017-06-26T14:32:11.446+02:00Firebase4Delphi - A new open source projectHi all,
I have just started a new open source project on github: Firebase4Delphi. For those that don't know Firebase, it's a backend service: including data storage, user authentication, static hosting, and more. Go here for more info https://www.firebase.com/ . The purpose of this project is provide a REST wrapper (facade) to consume FIREBASE REST API. For now there is a client for basically Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com4tag:blogger.com,1999:blog-4016016706182957128.post-10095830797378909622015-04-20T10:13:00.000+02:002017-06-26T14:32:22.302+02:00How-To use AdMob Interstitial Ads with Delphi XE7-XE8Hi guys,
as you know by using the Delphi Android JNI you can access to Native features provided by Android SDK. The RAD Studio installation includes also Google Mobile ADS library (Androidapi.JNI.AdMob unit), as built-in java library for Android.
So by using this unit we can use the new Interstitials Ads provided by AdMob.
First of all rember to set to true the AdMob Service ( Project -> Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com34tag:blogger.com,1999:blog-4016016706182957128.post-90570329744390733042015-01-19T15:35:00.000+01:002017-06-26T14:32:31.873+02:00RESTAdapter: a new amazing feature in Delphi MVC FrameworkRESTAdapter is a new amazing feature of the famous Delphi MVCFramework (DMVCFramework for short). DMVCFramework (as you know) is a powerful framework for web solution in Delphi that respect the MVC pattern and reach RMM Level 3! Above there is a link to the site project (if you want more info about this wonderful framework). Ok, let's go ahead. What is RESTAdapter? RESTAdapter turn a Delphi Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-28776976982208310772014-10-09T22:52:00.000+02:002017-06-26T14:32:39.362+02:00Automate Save State Feature in FiremonkeyHi!
One of the many exciting new features of Delphi XE7 is the Save State in Firemonkey.
The FireMonkey Save State feature allows you to save data describing the state of the application before it closes. The Save State data can be used to recover the state after the application is restarted.
This is a very cool feature but the way in which you save and restore the data is not so refined (for Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com7tag:blogger.com,1999:blog-4016016706182957128.post-25644725330264744202014-06-03T10:35:00.002+02:002017-06-26T14:32:59.016+02:00Access Marvel Developer API with Delphi XE6
Marvel has recent made available The Marvel Comics API, that allows developers everywhere to access information about Marvel Universe. "The Marvel Comics API is a RESTful service which provides methods for accessing specific resources at canonical URLs and for searching and filtering sets of resources by various criteria. All representations are encoded as JSON objects".
So my idea is Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com4tag:blogger.com,1999:blog-4016016706182957128.post-87426046635918177202014-04-11T11:56:00.000+02:002014-12-23T16:47:37.177+01:00My First Appmethod AppIn the "bit Time Lab" me and my colleague Daniele Teti have developed an app to control a car via bluetooth with Appmethod, for Android and iOS (released soon) with the same codebase.The main topics covered by the team are the multitouch UI and the bluetooth hardware interface using a true native app (no VMs, no scripting, no compromises). Below the picture of the app and the cars used.
Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com2tag:blogger.com,1999:blog-4016016706182957128.post-64310625440210379492014-03-11T21:30:00.000+01:002014-03-14T14:39:47.141+01:00Gideros Mobile - A game development tool Gideros is a set of software packages created and managed by a company named Gideros Mobile, it provides developers with the ability to create 2D games for multiple platforms by reusing the same code.
At italian DROIDCON in Turin, I held a speech about the Gideros Mobile framework (the slides will be available shortly).
We appreciate this tool so much that in bit Time Software we decided to Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-32955236428882738942013-01-29T16:47:00.000+01:002013-01-30T10:52:18.676+01:00How-To: Send Facebook App RequestHi developer,
the problem in which I came across today was: how to link my Android app using Facebook SDK for Android?
The premise is that your Android app must appear in the App Center of Facebook and must be integrated with Facebook by the appropriate SDK.
The crucial point that is not mentioned by facebook tutorial is that the method to be called is "apprequests".
This is the code:
Bundle Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com1tag:blogger.com,1999:blog-4016016706182957128.post-85325799483267672632013-01-15T20:26:00.000+01:002014-12-23T16:48:26.632+01:00Custom Font for ViewHi developers,
today I want to show you how to set a custom font to a View either by code or using an XML file.
The first way is very simple: just copy the font file into "assets/fonts/" folder and load it using Typeface class, calling createFromAssets method.
TextView txtView1 = (TextView) findViewById(R.id.textView1);
Typeface externalFont = Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com0tag:blogger.com,1999:blog-4016016706182957128.post-1077728002413928092013-01-04T14:03:00.000+01:002013-01-04T14:03:01.809+01:00Sending SMS messagesHi all,
in Android there are two ways to send SMS messages.
The first is to delegate the send action to SMS application by intent:
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "Content of the SMS goes here...");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
The second way is to use the SmsManager (added in API level 4):
//-Spinettarohttp://www.blogger.com/profile/14288568750113444130noreply@blogger.com3