Delphi Boot Camp add’s YouTube and Facebook streams to service demand.
Today was very exciting in the Embarcadero offices. Developers have been registering for Delphi Boot Camp in their thousands, with over 1000+ registering in the last weekend alone.
Having all this interested in Delphi is awesome, but also has raised quite a challenge for the team delivering Boot Camp due to physical viewing limitations in GoToWebinar. The decision was taken last week that we should add additional ways to stream this out to the 1000’s who were going to attend and Jim McKeeth started off looking into YouTube and Facebook streaming.
This morning, all attendees received an update email with the multiple streaming options included. During the first of the two live daily sessions we have seen huge numbers viewing on both Facebook and YouTube.
If you couldn’t get into GoToWebinar, either try the second session or watch the replay on YouTube later, keep an eye on community for the replays.
If you did watch the Boot Camp on YouTube, thank you to everyone who joined in with such fun discussions. (my personal favourite question was “So can I talk to Dolphins with this?” – I’ve seen some cool delphi apps, but that would be a nice hardware integration project) Please let us know what you think about these medias for the future.
You can also use the Starer Edition to qualify for upgrade pricing to RAD Studio or Delphi Pro / Enterprise or Architect editions. And with the mobile add on pack included along with the bonus pack, now is a great time to do that.
Join Embarcadero experts and leading community MVP’s for 5 workshops from Monday 5th September to Friday 9th September.
Focusing on getting stared and using the FMX framework to create cross platform ready code, Delphi Boot Camp is a great way to learn new skills and ask leading experts direct questions on application development.
Introduction to Delphi: The IDE and Your First App
Getting to Know the Delphi Language
Building Effective User Interfaces with FireMonkey
The final part of the Boot Camp is the programming book! Delphi is the home to modern Object Pascal programming and you can get up to speed with the modern Delphi / Object Pascal language with the help of Marco Cantu’s awesome handbook.
On the whole moving to 64bit (on iOS or Windows) is beautifully simple to achieve! It can be just as simple as adding the Delphi 64bit Windows target platform in the project manager and rebuilding the project.
My experience from talking to many developers who have moved up is that normally there are a few things to check in your code but typically its not a massive task to get compiling and ready to test.
A lot has been recorded on moving from Windows 32bit to Windows 64bit Delphi and this should be a useful summary if your just planning now moving up from older versions of Delphi to Delphi 10. If you are building iOS applications, then you will need to use the 64bit build now to get into the AppStore. Thankfully, Delphi has made the task of using 64bit very simple across all platforms and protected us from the headaches non Delphi Developers have had on the whole.
Lets start with this short video from David I who covers some the foundations in 7 minutes!
We (geeks) should all know that applications that run in memory run faster than those that have regular disk I/O.
Having more of the data processing in memory has a positive effect on speed and performance, however its not without risk. As memory is transient, you are always at risk of data loss if the data in memory hasn’t been saved to disk (which is where you get the disk i/o speed degradation again.
InterBase brings together the speed of in memory data processing with the security of immediate disk I/O with InterBase Journaling. The write ahead logging enables InterBase to securely log the write transactions to the journal making the best of both worlds possible.
In FireMonkey, Bitmap is the common currency for working with images. If you want to send an image via Stream using LiveBindings or want to save an Image to disk or into a database on a device with limited storage however, they are quite large.
Thankfully FireMonkey has a really easy to use CodecManager that allows you to SaveToFile or SaveToStream and convert to PNG or JPG across all platforms (which are vastly smaller in size).
Creating a PNG, JPG/JPEG is as simple as calling the Bitmap.SaveToFile with the correct file extension. This works really well with even more extensions supported.
Personally I would use PNG as the JPG formats are around the same size on some test I’ve run, but produce a better quality of image, especially when grabbing screenshots.
SaveToStream and TBitmapCodecManager
Bitmap.SaveToStream doesn’t expose the CodexManager in the same way as it is available automatically with the SaveToFile option so takes a little more work to get a compressed image into the memory stream.
This is done using the TBitmapCodecManager class. A simple screen test has gone from over 1mb as a bitmap to around 6kb when saved to PNG using this approach.
The following code is an example using two image viewers (and a few save to files to help demonstrate the difference in file size). The key part is the TBitmapSurface and TBitmapCodecManager.
procedure TForm1.Button1Click(Sender: TObject);
aFile : string;
// Comparison save file as BMP
aFile := 'c:\test\myImage';
Stream := TMemoryStream.Create;
Stream.Position := 0;
Surf := TBitmapSurface.Create;
// use the codec to save Surface to streamifnot TBitmapCodecManager.SaveToStream(
'.png') thenraise EBitmapSavingFailed.Create(
'Error saving Bitmap to png');
// do something with the png stream image
Stream.Position := 0;
// comparison output as PNG from the stream
Stream.Position := 0;
Now, you can obviously save as a ‘PNG’ from the bitmap, but the above code shows how to avoid saving a file to disk unless you really need to.
In this post, Tag properties and using Rtti.TValue data property as an alternative in FireMonkey / FMX.
Click / Select… now what?
One common challenge we face as developers is that the user clicks on something, we now need to find the object that is required to do the next task based on the item selected.
Sometimes this is from a dataset linked to the control and it may be taken care of for us, other times, we may need to find a specific object that then has the data we need.
Most of us have done it at some time….
Yes… that naughty little trick of using the tag property of a TComponent to store a pointer to an instance of an object that you want a quick way of reaching.
I remember doing this in a POS system where buttons that represented different stock items were linked to dynamically created screens. I also remember often using the TListView and thankfully, the TListViewItem in VCL had a Data property (of type Pointer) that you can set at runtime to an instance of an object. This was a little less naughty when moving to 64bit coding when Integer and Pointer all of a sudden became different sizes, (and if it wasn’t for some insight from the Delphi team to swap tag to NativeInt – lots of code would have broken).
The problem with a pointer property (or using a NativeInt to achieve the same goal) is that it leaves a lot of typecasting in your code, which never sat easy with me.
I’m sure some of you have seen the new Delphi, C++ and InterBase community platform that is being developed at Embarcadero. If not I would highly recommend a visit.
The Embarcadero Community is the new home to blogs, event diaries, latest news and features articles. While the old locations are still working, over time expect to see more and more on the community. Community is also social media ready with links for Facebook, Twitter, linkedIn and Google+
FireDAC is the Universal Data Access library for developing applications for multiple devices, connected to enterprise databases.
Starting tomorrow you can join the embarcadero team for free FireDAC training online in these special sessions, where you will be taken from a beginner to an expert by showing you how to utilise FireDAC in multiple situations.
Having used multiple database technologies over the years of developing with Delphi, I have been exceptionally impressed by the raw power of FireDAC and how fast and easy it makes the most difficult jobs as a database developer.
The sessions run every Thursday from Jan 22-Mar 26 in 3 time zones so no excuse for missing out!