Абрамович Максим, "rad studio xe4"

44
1 RAD Studio XE4 Alexey Golopyatkin & Vsevolod Leonov Minsk, June 6, 2013. translated by Maksim Abramovich. EPAM Systems.

Upload: miniq-epam-systems-inc

Post on 19-Jan-2015

336 views

Category:

Technology


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Абрамович Максим, "Rad studio xe4"

1

RAD Studio XE4

Alexey Golopyatkin & Vsevolod Leonov

Minsk, June 6, 2013.

translated by Maksim Abramovich.EPAM Systems.

Page 2: Абрамович Максим, "Rad studio xe4"

2

Agenda

The strategy of Embarcadero company

Mobile and desktop applications development based on a single source code

FireMonkey as a UI library for iOS application development

Product editions and different licensing opportunities

New database access facilities in Delphi

Practical training. Mobile application development

New language features in Delphi

Page 3: Абрамович Максим, "Rad studio xe4"

3

22 April – the release date of RAD Studio XE4

• The strategy of the company– What is happening on the market?– What we are offering?– Where are we going?

• What does this mean for you?– For your business– For your developers

Page 4: Абрамович Максим, "Rad studio xe4"

4

The technology does not stand still

Windows

1999

Windows & Web

2005 2

W

Page 5: Абрамович Максим, "Rad studio xe4"

5

2013: The revolution of «clients»

Windows MobileMac

1 Billion 65 Million 1 Billion

Page 6: Абрамович Максим, "Rad studio xe4"

6

The revolution of «clients»

Completely new situation

Operation systems market share –iOS + Android = 45% against Windows 35%

Page 7: Абрамович Максим, "Rad studio xe4"

7

When the tablets will overtake laptops?

It is done already

Page 8: Абрамович Максим, "Rad studio xe4"

8

2013+

Client Device Diversity Will

Page 9: Абрамович Максим, "Rad studio xe4"

9

What this means for the developer?

$ $ $ $

C# илиC++

.NET или MFC

C++ или Obj-C

OS X SDK

C++ или Obj-C

iOS SDK

Java

Android SDK

Many languages, many projects, many source code libraries

Page 10: Абрамович Максим, "Rad studio xe4"

10

What Embarcadero strategy is offering?

$ $ $ $

Delphi, C++Builder

FM

Delphi, C++Builder

FM

Delphi, C++Builder

FM

Delphi, C++Builder

FM

Delphi / С++Builder, one project, single source code, one team!

Page 11: Абрамович Максим, "Rad studio xe4"

11

Embarcadero: Multi-Device App Development

$

Future

Delphi (С++)

FM3 Framework

One team, one source code, accumulated experience

One teamOne source code

Page 12: Абрамович Максим, "Rad studio xe4"

12 12

Embarcadero: Multi-Device App Development HTML5 Cross

Platform“Platform Native”

Platform Vendor Tools

Rapid Multi-Device

Examples

Adobe, Sencha, Kendo,

HTML5Builder

Appcellerator, Xamarin

Mono

XCode, Visual Studio, Eclipse

Embarcadero RADStudio

Platforms iOS/Android iOS/AndroidWin or Mac/iOS

or Android(Sep IDE, lang, & SDK

for ea platform)

Mac/Win/iOS & Android* (2013)

Native “Real Code” No No Yes Yes

Native Platform API Access

No (PhoneGap)

Yes Yes Yes

Single Source Multi-Vendor Targeting

Yes No No Yes

Single IDE Yes/Plugin Yes/Plugin No Yes

Single Project Multiple Multiple Multiple Yes

App Performance Low Low High High

App Number Crunching Power

Low Low High High

App Capacity (mem/data)

Low Low/Med High High

App UX (User Experience)

Low/Med Med High High

Enterprise Connectivity Low Low High High

Page 13: Абрамович Максим, "Rad studio xe4"

14

Where are we going?

• Two main projects (2nd half of 2013):– Android support in Delphi– Mobile Development in С++

(April 16 it was announced that, Embarcadero now is a Standard C++ Foundation sponsor - isocpp.org)

• Support other platforms – next stops are

• 2013+ : SmartTV, Car Infotainment, smart home, «smart» watches and other.

Page 14: Абрамович Максим, "Rad studio xe4"

15

Embarcadero strategy

?

Page 15: Абрамович Максим, "Rad studio xe4"

16

Delphi XE4 Mobile Development

Page 16: Абрамович Максим, "Rad studio xe4"

17

Hardware (provisioning)

Ethernet, Wi-Fi(patch cord)

Device cable

http://blogs.embarcadero.com/vsevolodleonov/2013/04/23/dios_dev_hardware/

Page 17: Абрамович Максим, "Rad studio xe4"

18

Additional Sowtware

• Simulator in Mac OS

• RAD PAServer XE4 (need to be running)• VMWare Fusion (Win on Mac)• VNC Viewer (see Mac)• Reflector (see iPhone or iPad)

Page 18: Абрамович Максим, "Rad studio xe4"

19

Mac в in the cloud

• Suggested for the initial prototyping only

http://macincloud.com

Page 19: Абрамович Максим, "Rad studio xe4"

20

Developer Account

• «Individual» - publish to AppStore

very attractive …

$$$

Page 20: Абрамович Максим, "Rad studio xe4"

21

Developer Account

• «Corporate» - without AppStore

very attractive …

$$$

Page 21: Абрамович Максим, "Rad studio xe4"

22

Delphi XE4

Page 22: Абрамович Максим, "Rad studio xe4"

23

New mobile application

Page 23: Абрамович Максим, "Rad studio xe4"

24

Delphi FireMonkey for iOS

• «Native style» iOS• «Native» source code• Well known Delphi development (iOS Human Interface Guidelines)

Page 24: Абрамович Максим, "Rad studio xe4"

25

«Native» and custom styles

Page 25: Абрамович Максим, "Rad studio xe4"

26

Gesture support

• Swipe• Tap• Pinch & Zoom• Tap & Hold• Double-Tap

Page 26: Абрамович Максим, "Rad studio xe4"

27

Open or Grab XE4 FireMonkey MobileSamples and Code Snippets

• File | Open from Version Control…– http://svn.code.sf.net/p/radstudiodemos/code/branches/RadStudio_XE4/FireMonkeyMobile/– http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE4/iOSCodeSnippets/

• SVN Command Line to get all XE4 samples – svn co svn://svn.code.sf.net/p/radstudiodemos/code/branches/RadStudio_XE4 c:\AllSamples

Page 27: Абрамович Максим, "Rad studio xe4"

28

Need Mobile Development training?

You can get it …

[email protected]

Page 28: Абрамович Максим, "Rad studio xe4"

29

New language features

Page 29: Абрамович Максим, "Rad studio xe4"

30

New Compiler Architecture

Open IR

C/C++

Delphi

Intel

ARM

Page 30: Абрамович Максим, "Rad studio xe4"

31

New Language features

• String types• ARC (Automatic Reference Counting)

Page 31: Абрамович Максим, "Rad studio xe4"

32

Different String Types

• Pascal short strings (255)• AnsiString (C-o-W, R-C)• + little bit more (UTF8String и RawByteString)• С-like (PChar)• Unicode strings (from 2009), UTF16 (C-o-R, R-C)• COM-compatible (no R-C)

Page 32: Абрамович Максим, "Rad studio xe4"

33

One string type

• Unicode-based• Immutable str1[i] := ch• Reference-counted

Page 33: Абрамович Максим, "Rad studio xe4"

34

What is the right way?

• TStringBuilder (it is not new …)

• s1, s2, s3 : string;• s1 := ‘Hello’;• s2 := ‘World’;• s3 := s1 + s2;

• sBuilder := TStringBuilder.Create; • sBuilder.Append(s1);• sBuilder.Append(s2);• s3 := sBuilder.ToString;• sBuilder.Free;

Page 34: Абрамович Максим, "Rad studio xe4"

35

Immutable

• TStringBuilder (it is not new …)

for I := Low (str1) to High (str1) do if str1 [I] = 'a' then str1 [I] := 'A’;

sBuilder := TStringBuilder.Create;for I := Low (str1) to High (str1) do if str1.Chars [I] = 'a' then sBuilder.Append ('A') else sBuilder.Append (str1.Chars [I]);str1 := sBuilder.ToString;sBuilder.Free;

Page 35: Абрамович Максим, "Rad studio xe4"

36

Zero-based strings

• We are familiar with it– Dynamic arrays– List : TList; List.Items[0]– sList: TStringList; sList[]– ListBox1.Items[0]

• $ZEROBASEDSTRINGS

Page 36: Абрамович Максим, "Rad studio xe4"

37

Zero-based strings

• No changes in the string.• You can mix it (project, unit, function)• RTL functions are still 1-based• Use TStringHelper

– unit System.SysUtils;– MyString.Length; MyString.ToInteger;– …

Page 37: Абрамович Максим, "Rad studio xe4"

38

TStringHelper

• procedure TForm4.Button1Click(Sender: TObject);• var• s1: string;• begin• // apply to a variable• s1 := 'Hello';• if s1.Contains('ll') then• ShowMessage

(s1.Substring(1).Length.ToString);• // apply to a constant• Left := 'Hello'.Length;• // «in chain»• Caption := ClassName.Length.ToString;• end;

Page 38: Абрамович Максим, "Rad studio xe4"

39

Automatic Reference Counting

• Memory management• string• Interface variable• Its not a Garbage Collector!• ARC – automatic reference counting

Page 39: Абрамович Максим, "Rad studio xe4"

40

Interface

• TMyClass = class(TInterfacedObject, IMyInterface)

• // ...• end;

• IMyInterface = interface(IInterface)• // ...• end;

Page 40: Абрамович Максим, "Rad studio xe4"

41

Interface

• procedure TForm1.Button1Click(Sender: TObject);• var• myInterface : IMyInterface;• begin• myInterface := TMyClass.Create;• //...• end;

Page 41: Абрамович Максим, "Rad studio xe4"

42

ARC

• ARC by default in LLVM compiler• iOS device and Simulator (Mac)

• procedure TForm1.Button1Click(Sender: TObject);

• var• MyObj: TMySimpleClass;• begin• MyObj := TMySimpleClass.Create;• // ...• end;

Page 42: Абрамович Максим, "Rad studio xe4"

43

ARC - release

• procedure TForm1.Button1Click(Sender: TObject);

• var• myObj : TMyClass;• begin• myObj := TMyClass.Create;• // ...• myObj := nil;• // ...• end;

MyObj.DisposeOf;

Page 43: Абрамович Максим, "Rad studio xe4"

44

ARC - reference• type• TMyComplexClass = class;•  • TMySimpleClass = class• private• [Weak] FOwnedBy: TMyComplexClass;• public• constructor Create();• destructor Destroy (); override;• procedure DoSomething(bRaise: Boolean = False);• end;•  • TMyComplexClass = class• private• fSimple: TMySimpleClass;• public• constructor Create();• destructor Destroy (); override;• class procedure CreateOnly;• end;

Page 44: Абрамович Максим, "Rad studio xe4"

45

New language features in Delphi

?