All posts by Stephen Ball

Stephen is a Charted IT Professional and the Associate Product Manager for InterBase at Embarcadero. He is also a Product Evangelist for RAD Studio, regularly speaking across EMEA. @DelphiABall

How to convert an object to JSON and back with a single line of code

Ever wanted to take an Object into a format that is easily persisted and back? Well now you can. New in XE6 is the REST.JSON unit. This allows you access to TJSON a class with some very helpful class methods. Using TJSON you can convert an object to a JSON string and back with a little help from generics along the way.

The following code uses a class called TFoo that has a Foo and a Fee property (string and Integer) Using TJson you can then see how to covert the object to a string and back ready for storage, transport etc.

uses REST.JSON; // Also new System.JSON
procedure TForm1.Button1Click(Sender: TObject);
var
  Foo: TFoo;
begin
  Foo := TFoo.Create;
  try
    Foo.Foo := 'Hello World';
    Foo.Fee := 42;
    Memo1.Lines.Text := TJson.ObjectToJsonString(Foo);
  finally
    Foo.Free;
  end;
  Foo := TJson.JsonToObject<TFoo>(Memo1.Lines.Text);
  try
    Foo.Fee := 100;
    Memo1.Lines.Add(TJson.ObjectToJsonString(Foo));
  finally
    Foo.Free;
  end;
end;

If you want to watch this being demo’ed this very show video shows it in action http://youtu.be/TSqWoFvjj5g

@Appmethod and @InterBase in Sweden

Yesterday I had the pleasure of speaking at the 2014 Dev:Mobile event in Gothenburg on Navigating the enterprise road to mobile with @Appmethod and also around Secure Multi-platform database development with @InterBase.

Stephen Ball in Gothenburg with Appmethod

The sessions had lots of Interesting questions, some of which from the database side will be covered in the next weeks webinar “Rising to the data security challenge” (Wednesday 28th May)

There were lots of amazed faces seeing how with Appmethod you can develop fast applications faster with Visual Live Bindings, access to BaaS etc and still have the applications as compiled native code! For those wanting to learn more quickly then I recommend the new series of 20 minute drop in Developer Skill Sprints running every Tuesday and Thursday (starting on the 29th May)

Looking to rise to the data security challenge?

Join me on Wednesday 28th May as we rise to the database security challenge on Windows, Android, iOS, Mac OSX, Linux and Solaris.

Data security is a hot topic right now, and one that is causing a lot of headaches. When it comes to securing your data and applications, small changes can make a massive difference. During the webinar there will be a number of tips relevant to whatever platform or database you develop with. We will also look at how to address a number of these challenges easily by exploring secure database storage with InterBase.

To find out more on this topic, or even if you can’t make it and want to catch the replay later, register now and “Rise to the Data Security Challenge”.

Wednesday, May 28, 2014

  • 6AM San Francisco / 9AM New York / 2PM London / 3PM Milan
  • 11AM San Francisco / 2PM New York / 7PM London / 8PM Milan
  • 5PM San Francisco / 29-May 9AM Tokyo / 29-May 10AM Sydney

Mobilizing Enterprise data – Free White Paper.

If you want to get a head start before the webinar, then it may also be worth downloading this free white paper

Remote Object Persistence with Parse and Kinvey

New BaaS components introduced in RAD Studio XE6 now make it easily to use remote data storage services offered by Kinvey and Parse along with Push notifications, File Storage and user authentication.

This can greatly reduce the infrastructure that you need to code, develop and manage with your application which speeds up time to market for including these features and can drastically reduce cost.

In the typical RAD, Object Orientated style there are a set of new interfaces behind the scenes that are implemented by new provider components that hook into the core components that work across providers, allowing you to code this effort once and work with it over Windows, Mac, iOS and Android.

In this short introduction video you will see how to work with the remote data store as an object persistence layer, learn about the new TBackendObjectList that contains the objects along with TBackendEntityValue to give you unique ID’s for each object without having to code that yourself, which is very cool indeed!

The video uses demo code that is in code central, submission 29846. NOTE: You will need to have a Kinvey or Parse account to use the demo, but a suitable accounts is quick and free to setup.

OpenSSL and InterBase = all is OK!

I am sure many of you have seen in the news this week the well publicised vulnerability in OpenSSL that has been named Heartbleed. https://www.openssl.org/news/secadv_20140407.txt and http://heartbleed.com/

InterBase is not affected by this issue. InterBase encryption uses OpenSSL versions that are NOT affected by this vulnerability.

For more information on InterBase please visit http://www.embarcadero.com/products/InterBase

InterBase XE3 update 4 released

We are proud to announce InterBase XE3 Update 4 is now available for download for registered users: http://cc.embarcadero.com/reg/interbase

New platform on XE3!

Along with the regular speed improvements, bug fixes etc, this release also brings the InterBase Linux engine up to XE3 from the previous InterBase XE edition.

Full details of what is contained in the update are available in the readme. http://docs.embarcadero.com/products/interbase/IBXE3Update4/Readme.html

InterBase XE3 versions

If you are developing business applications, InterBase gives a real edge around data security and best practice in data protection across all supported platforms, including mobile.

InterBase XE3 Update 4 – editions includes

Server Edition Desktop Edition ToGo and IBLite (embeddable)
  • Windows (32bit & 64bit)
  • Linux
  • Windows
  • Windows (32bit & 64bit)
  • Mac OS X
  • iOS Simulator and Device
  • Android

There is an Update/Patch installer for existing installations of InterBase XE3 Server/Desktop/Developer Edition on Windows. Trial editions will be updated soon.

Embedding InterBase

The quick guide for ToGo has also been updated and is available here http://docs.embarcadero.com/products/interbase/IBXE3Update4/ToGoQuickStart/Introduction.htm or if you prefer video’s check out InterBase Labs

Why InterBase?

If you want to know more about why customers are upgrading to the latest versions of InterBase and using InterBase in their current applications please read this Mobilising Enterprise Data – free white paper and also visit the InterBase pages

RAD lectures at Jyväskylä University, Finland

Last week I was on the road again, this time visiting Finland for customer meetings but mainly to lecture and help with student lab time at Jyväskylä University. This trip was part of our commitment towards education and arranged by the local partner for Delphi and C++ Builder in Finland, Moonsoft@MoonsoftOy

Jyväskylä is about 4 hours drive from Helsinki and so I’m told the heart of a technical area where a lot of Nokia is based, so it was kind of fun to show off the Nokia X with Delphi App running that I picked up in Barcelona.

The lecture was hosted both in the university and streamed live and was the follow on to a number of sessions run earlier in the year by Juha Piispa from Moonsoft. After the lecture in the morning I had the pleasure of lunch with the dean before looking at some really old hardware, including what I was told was Finland’s first super computer and a massive IBM hard drive from before I was even born! Kind of geeky cool; before heading to the labs, where we had not 1 but 4 labs booked out (around 50 PCs) with students working together through a number of tutorials on http://docwiki.embarcadero.com learning about Visual LiveBindings, FireDAC and also the base language capabilities before running the output to both Windows preview and Android emulators / devices.

Unfortunately, I was so focused on what I was doing I forgot to take a load of pictures!

Are you sleep walking into XP end of life?

Today I came across an excellent blog post by Simon Rice from the ICO looking at the business reasons you and your customers need to look to get off XP. Microsoft XP goes end of life on 8th April.

iconewsblog.wordpress.com/2014/03/10/data-security-officers-set-your-alarms-10032014

If you are still developing on XP and on an old edition of Delphi of C++ Builder then now is a great time to upgrade with special offer running to the end of March for those on any old edition.

For more about the latest offers on RAD Studio, Delphi and C++ Builder, including a current promotion of 50% off the mobile pack for XE5 then visit http://www.embarcadero.com/radoffer now!