FACULTY of
COMPUTER SCIENCE
Multi-platform App Development
Course 1: Intro to Appmethod
Alexandru Balmuș
Embarcadero Technologies
Agenda
• Students Info (RO)
• Multi-platform development intro
• Appmethod demo
• Tour of the IDE
• Basic app structure
• Course overview
2
Agenda
• Teaching Team (Embarcadero Technologies):
– Alexandru Balmuș (Course): alexandru.balmus@info.uaic.ro – Radu Grigoraș (Lab.): radu.grigoras@info.uaic.ro
– Iulian Bodnărescu (Lab.): teodor.bodnarescu@info.uaic.ro
• Course page:
– http://profs.info.uaic.ro/~embt/DAM/
3
Agenda
• Embarcadero Extended Team
4
Agenda
• (RO) EVALUARE
– Metode: Activitate de laborator, proiecte individuale şi/sau în echipă, evaluare pe parcurs – Forme:
• Laborator (L): teme săptămânale de laborator individuale şi/sau în echipă
• Proiect (P): teme individuale şi/sau în echipă
• Testare (T): Doua teste scrise: săptămânile 8 si 15 – Ponderea formelor de evaluare în formula notei finale:
• Punctajul final se stabileşte ca sumă a punctajelor obţinute la laborator, la proiect și la test
• Pentru activitate deosebită se pot acorda bonusuri
• Nota Finală = 0.3*L + 0.3*P + 0.3*T + 1 – standardele minime de performanță:
• L >= 5; max. 2 absente / jumatate de semestru
• P >= 5
5
Multi-platform development intro
• Platform-specific development
Win SDK, Cocoa (OSX/iOS), Android SDK/NDK etc.
• Multi-platform development
- Scripting / VM based (e.g.: HTML5+JavaScript solutions) - Native-code solutions
6
Multi-platform development intro
• Appmethod is an object-oriented, visual programming environment for rapid multi-platform application
development (RAD) using a single code base.
• Appmethod provides the tools you need to model
applications, design UIs, automatically generate and edit code. It also gives you tools to compile, debug, and deploy apps.
7
Appmethod demo
8
Demo 1: fast codeless app creation Demo 2: final goal for lab work
Puzzle 3D
Programming language
Appmethod supports the C++ programming language ...
9
http://docwiki.appmethod.com/appmethod/1.15/topics/en/C%2B%2B_Referencevoid __fastcall TfrmAboutSensors::CreateIfExists(TSensorCategory ASensorCategory)
{ TSensorArray LSensorArray = TSensorManager::Current->GetSensorsByCategory(ASensorCategory);
TListBoxGroupHeader * LHeader = new TListBoxGroupHeader(this->Owner);
LHeader->Parent = lbMain;
LHeader->Text = GetSensorCategoryName(ASensorCategory);
LHeader->Height = LHeader->Height * 2;
for (int i = 0; i < LSensorArray.Length; i++) {
TListBoxItem * LItem = new TListBoxItem(this->Owner);
LItem->Parent = lbMain;
LItem->Text = GetSensorType(LSensorArray[i]);
LItem->ItemData->Accessory = TListBoxItemData::TAccessory::aDetail;
LItem->Data = LSensorArray[i];
LItem->OnClick = ListBoxItemClick;
LItem->Height = LItem->Height * 2;
LItem->Font->Size = LItem->Font->Size * 2;
} }
Programming language
... and also the Object Pascal (which will be used during this course).
10
http://docwiki.appmethod.com/appmethod/1.15/topics/en/Object_Pascal_Language_Guide_Index procedure TfrmAboutSensors.CreateIfExists(ASensorCategory: TSensorCategory);var LSensorArray : TSensorArray;
LSensor : TCustomSensor;
LHeader : TListBoxGroupHeader;
LItem : TListBoxItem;
begin
LSensorArray := TSensorManager.Current.GetSensorsByCategory(ASensorCategory);
LHeader := TListBoxGroupHeader.Create(Owner);
LHeader.Parent := lbMain;
LHeader.Text := GetSensorCategoryName(ASensorCategory);
LHeader.Height := LHeader.Height * 2;
for LSensor in LSensorArray do begin
LItem := TListBoxItem.Create(Owner);
LItem.Parent := lbMain;
LItem.Text := GetSensorType(LSensor);
LItem.ItemData.Accessory := TListBoxItemData.TAccessory.aDetail;
LItem.Data := LSensor;
LItem.OnClick := ListBoxItemClick;
LItem.Height := LItem.Height * 2;
LItem.Font.Size := LItem.Font.Size * 2;
end;
end;
Tour of the IDE
11
http://docwiki.appmethod.com/appmethod/1.15/topics/en/Tour_of_the_IDE_Index_(IDE_Tutorial)-Welcome page is an integrated browser with getting started, code snippets and video resources.
-You can build and deploy your first cross platform multi device app in
minutes.
Tour of the IDE
12
Tour of the IDE
13
For more references see http://docwiki.appmethod.com/appmethod/1.15/topics/en/Tutorial:_Using_the_IDE
Basic app structure
14
.FMX file
The UI
Basic app structure
15
.PAS file
The code
Basic app structure
16
The code
The program heading, uses clause and block statements:
Basic app structure
17
The code
Unit structure and syntax:
Designing the UI
• FireMonkey offers fully customizable drag-and-drop controls:
buttons, menus, combo/list boxes, panels, layouts, tables, tabs etc.
• UI can be shared between platforms
• You can also create your own components
http://docwiki.appmethod.com/appmethod/1.15/topics/en/FireMonkey_Quick_Start_Guide_-_Introduction
18
Designing the UI
The look and feel of an app can be customized via FireMonkey HD styles
19
Designing the UI
Native looking styles are available for each platform
20
Data and connectivity
• Appmethod includes FireDAC, a set of data access
components which offer high performance native access to SQL Server, Oracle, IBM DB2, MySQL, Sybase, Informix,
InterBase, Firebird, SQLite, PostgreSQL
21
Data and connectivity
22
Data and connectivity
• LiveBindings provides a visual way to bind objects to other objects or dataset fields
23
Data and connectivity
• Software technology that enables creation of multi-tier application.
• Applications running on mobile devices are discouraged from directly accessing remote database servers (i.e. SQL Server or MySQL).
• Allows the centralization of all application logic into a single place. This makes it easier to apply updates.
24
Data and connectivity
25
Logic UI
TCP/IP
Client
(presentation tier)
Data Server
UI
Command
Application Server (logic tier)
Get/Set data
Proce ssing