Upload
miniq-epam-systems-inc
View
336
Download
4
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
1
RAD Studio XE4
Alexey Golopyatkin & Vsevolod Leonov
Minsk, June 6, 2013.
translated by Maksim Abramovich.EPAM Systems.
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
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
4
The technology does not stand still
Windows
1999
Windows & Web
2005 2
W
5
2013: The revolution of «clients»
Windows MobileMac
1 Billion 65 Million 1 Billion
6
The revolution of «clients»
Completely new situation
Operation systems market share –iOS + Android = 45% against Windows 35%
7
When the tablets will overtake laptops?
It is done already
8
2013+
Client Device Diversity Will
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
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!
11
Embarcadero: Multi-Device App Development
$
Future
Delphi (С++)
FM3 Framework
One team, one source code, accumulated experience
One teamOne source code
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
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.
15
Embarcadero strategy
?
16
Delphi XE4 Mobile Development
17
Hardware (provisioning)
Ethernet, Wi-Fi(patch cord)
Device cable
http://blogs.embarcadero.com/vsevolodleonov/2013/04/23/dios_dev_hardware/
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)
19
Mac в in the cloud
• Suggested for the initial prototyping only
http://macincloud.com
20
Developer Account
• «Individual» - publish to AppStore
very attractive …
$$$
21
Developer Account
• «Corporate» - without AppStore
very attractive …
$$$
22
Delphi XE4
23
New mobile application
24
Delphi FireMonkey for iOS
• «Native style» iOS• «Native» source code• Well known Delphi development (iOS Human Interface Guidelines)
25
«Native» and custom styles
26
Gesture support
• Swipe• Tap• Pinch & Zoom• Tap & Hold• Double-Tap
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
28
Need Mobile Development training?
You can get it …
29
New language features
30
New Compiler Architecture
Open IR
C/C++
Delphi
Intel
ARM
31
New Language features
• String types• ARC (Automatic Reference Counting)
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)
33
One string type
• Unicode-based• Immutable str1[i] := ch• Reference-counted
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;
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;
36
Zero-based strings
• We are familiar with it– Dynamic arrays– List : TList; List.Items[0]– sList: TStringList; sList[]– ListBox1.Items[0]
• $ZEROBASEDSTRINGS
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;– …
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;
39
Automatic Reference Counting
• Memory management• string• Interface variable• Its not a Garbage Collector!• ARC – automatic reference counting
40
Interface
• TMyClass = class(TInterfacedObject, IMyInterface)
• // ...• end;
• IMyInterface = interface(IInterface)• // ...• end;
41
Interface
• procedure TForm1.Button1Click(Sender: TObject);• var• myInterface : IMyInterface;• begin• myInterface := TMyClass.Create;• //...• end;
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;
43
ARC - release
• procedure TForm1.Button1Click(Sender: TObject);
• var• myObj : TMyClass;• begin• myObj := TMyClass.Create;• // ...• myObj := nil;• // ...• end;
MyObj.DisposeOf;
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;
45
New language features in Delphi
?