1 / 0

… in ACTION!

… in ACTION!. David Intersimone “David I” Vice President of Developer Relations and Chief Evangelist davidi@embarcadero.com. Agenda. RAD Studio XE2 Overview FireMonkey Overview Break FireMonkey Principles Applied FireMonkey Break Platform C onsiderations End-to-End FireMonkey

chibale
Download Presentation

… in ACTION!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. … in ACTION!

    David Intersimone “David I” Vice President of Developer Relations and Chief Evangelist davidi@embarcadero.com
  2. Agenda RAD Studio XE2 Overview FireMonkey Overview Break FireMonkey Principles Applied FireMonkey Break Platform Considerations End-to-End FireMonkey Android and iOS mobile development with RadPHP XE2 Delphi for 64-bit Windows Summary and Close
  3. RAD Studio XE Overview

    Windows, Macintosh, Web and Mobile Development
  4. RAD Studio XE2 …and more!
  5. Fast Native applications for Windows, Macintosh, Web and Mobile Write app once, compile for multiple platforms Data-rich, Component-based Delphi and C++ native code performance Delphi for 64-bit Windows VCL Styles RadPHP for full visual web development
  6. Introducing The Next Generation Business Application Platform Stunning HD and 3D Business Applications Native Power and Performance Connect with any Data and Services Full Suite of UI Controls Visualize Live Data Styled Vector UIs without coding Communicate with Animations No-Code Hardware Effects
  7. Applications that Connect Everywhere High-speed connectivityto popular databases Multi-tier applications Clients on multiplecomputers and devices Connect to the worldof data, services,and the cloud
  8. Mobile choices for you and your users Native mobile apps for DataSnap iOS, Android, Blackberry, and Windows Phone 7 Delphi and C++Builder DataSnap Servers Mobile-optimized PHP web apps Web apps that look great Web apps that work great on mobile devices Package applications for distribution Sell on Apple App Store and Android Marketplace
  9. RAD Studio XE2 - Editions for Every Developer Starter (Delphi/C++Builder) Professional Enterprise Ultimate Architect
  10. Beyond XE2 Frequent and regular FireMonkey updates Expanded Mobile UI and Device support including Location, Camera, Accelerometers, etc. Next generation compilers Delphi compiler - multiple HW/OS targets RAD C++ compiler - multiple HW/OS targets 64bit RAD C++ GPU computing Parallel programming Delphi and C++ native ARM Support Extended iOS support Android support Win8/Metro support - Intel & ARM
  11. FireMonkey Overview

    The Next Generation Application Development Platform
  12. FireMonkey Next generation CPU/GPU powered application platform for business, enabling developers to rapidly build visually engaging HD and 3D applications with blazing performance on Windows, Mac and Mobile
  13. FireMonkey is Application Development Platform C++Builder Delphi Windows Mac OS iOS
  14. Business/Industry Software Stuck in Past 90’s Windows user experiences Confined to mouse/keyboard interaction Complex to learn - slow to use
  15. Consumer Software - Innovative User Experience Media and graphics rich user experiences Intuitive and interactive – easy to learn Touch and motion interaction
  16. Consumer Software Renaissance Media and graphics Rich user experiences Intuitive and interactive – easy to learn Simulated real world physics Touch and motion interaction
  17. Key Markets ISV’s / Packaged Software Healthcare / Medical Manufacturing Financial Services Telecommunications Energy Aviation & Automotive BioSciences Pharmaceuticals Utilities
  18. Shortcomings of Today’s Solutions Script and VM/JIT engines lack UX (User Experience) performance, responsiveness, and hardware accessibility for desktop business, ISV, and Vertical industry applications
  19. FireMonkey is not … RIA Managed Game Engine HTML5/CSS3
  20. User Experience FireMonkey Business SW is stuck here VCL UE Richness MFC UE Performance
  21. FireMonkey – Rich Business Applications More visually stunning and interactive More power and performance More connected
  22. FireMonkey – Rich Business Applications More visually stunning and interactive More power and performance More connected
  23. HD Forms High performance GPU powered Scalable Vector Uis Maximum resolution on any device Hundreds of visual UI components GPU based Style Engine to control UI look & feel HUDs with transparencies and transition effects
  24. 3D Forms GPU powered 3D Forms Hardware based lighting, textures, and animation 3D Forms can contain HD UI elements and effects
  25. Effects & Animation 50+ Photoshop-like GPU Effects Simultaneous multiple effects without performance hit Path based animation for all HD and 3D UI and graphics
  26. Demonstrations Delphi and C++ project types HD and 3D business apps and database Using Styles Using Effects and Animations
  27. FireMonkey – Rich Business Applications More visually stunning and interactive More power and performance More connected
  28. Development Speed – Fast Prototyping Rapid Application Development to reduce development time Show customers what they are looking for with fast prototyping Easily move from prototype to production without wasted effort
  29. Development Speed - Built-in Components Built-in advanced components to increase quality and functionality including: user interface components database multi-tier web apps Extend and customize components Create your own components Use free and commercial components created by the developer community
  30. Native CPU/GPU Application Platform Compile natively to Windows, Mac, and iOS Application, database, and animation are CPU powered All UI, graphics, and effects are GPU powered
  31. Demonstrations Pixel Shader Simple native Windows/Mac/iOS demo
  32. FireMonkey – Rich Business Applications More visually stunning and interactive More power and performance More connected
  33. Enterprise Database Connectivity Built-in native connectivity to all popular databases Connectivity with Amazon and Azure cloud services
  34. LiveBindings Data Visualization Connect any UI, HD, or 3D graphics to any data source Create active “interdependent” bindings
  35. Demonstrations FireFlow MultiFormView MultiFormViewApp VCL and FireMonkey together MIDA VCL to FireMonkey converter – first look
  36. Overview Summary Quickly create visually stunning HD and 3D business applications with blazing native performance on Windows, Mac and iOS Ensure high performance of your business applications by utilizing the full GPU power of today’s hardware Handle any architecture requirement with the ability to easily connect to multiple devices, databases, protocols and services
  37. Break

  38. FireMonkey Principles

    Lights! Camera! Action!
  39. “FireMonkey” – HD, 3D, and GPU FireMonkey takes advantage of GPU whenever possible HD Form can be rendered on a computer without a GPU with a few restrictions: No TViewport3D, No Shader based Filters A 3D Form requires a GPU - performs sophisticated transitions and manipulations of the user interface… … in other words, a 3D form may be the best choice for building a sophisticated HD user interface
  40. Comparing VCL & FMX FMX and VCL share Common Ancestry TObjectTPersistentTComponent After TComponent dramatically different… Courtesy: Ray Konopka Raize Software
  41. VCL Courtesy: Ray Konopka Raize Software
  42. FMX Courtesy: Ray Konopka Raize Software
  43. Comparing VCL & FMX Event model is the same Persistence is shared No Component Messages in FMX Coordinate System Origin is upper left VCL – Integer FMX – Floating-point Property changes Caption ➜ Text (except for TForm) Left, Top ➜Position.X, Position.Y Courtesy: Ray Konopka Raize Software
  44. Owners, Parents, and Children Concept of Ownership is the same FMX has the notion of Parent, but it is not quite the same as in VCL Any control can be the parent of another control Not restricted to container-like controls. e.g. a TEdit can be the parent of a TLabel Child objects share attributes of parent Coordinate space Visibility & Opacity Rotation & Scale. Courtesy: Ray Konopka Raize Software
  45. TCanvas Differences More abstract in FMX than in VCL i.e. not a direct wrapper around device context Fills and Strokes handled by separate calls FillRect DrawRect Text displayed using FillText Draws text and fills with specified TBrush Allows gradient fills in text However, rarely use TCanvas directly Use primitives instead. Courtesy: Ray Konopka Raize Software
  46. Supported Platforms RTL is shared between VCL & FMX VCL and FMX are more than Component Libraries, they are Application frameworks As a result, you cannot intermix VCL & FMX in the same application. Courtesy: Ray Konopka Raize Software
  47. 3D Programming One object model to target multiple platforms FM uses right-handed orientation in 3D Hardware acceleration Windows – DirectX MacOS – OpenGL iOS – OpenGL ES
  48. FireMonkey Graphics Architecture *) *) Delphi only in XE2
  49. FireMonkey Technology Windows - Direct2D for HD, Direct3D for 3D Note: FireMonkey can use GDI+ for HD vector forms/controls, when GPU is not available Mac- Quartz for HD, OpenGL for 3D iOS - Core:Graphics for HD, OpenGL/ES for 3D
  50. FireMonkey graphic elements HD TLayout, TScaledLayout TGridLayout, TScrollBox Shapes 3D TLayout3D, TLayer3D TViewport3D TCamera, TLight Shapes including TMesh, TModel3D, TGrid3D Grids TStringGrid, TGrid
  51. When to use HD, 3D, Animations, Effects UI guidelines and things to consider Effects (glow) to draw attention to control Animations for appearance of UI elements Opacity – dim parts of a complex form Move non-focus parts of 3D UI into the distance Using a 2D mouse in a 3D world – button use Use ViewPort3D in an HD form
  52. Demonstrations Controls Demo – scaling forms/controls Lights, Camera, Action!
  53. Applied FireMonkey

    Styles, Animations, Filters and LiveBindings
  54. Applied FireMonkey Styles Animations Effects/Filters Building Components LiveBindings
  55. FireMonkey Styles FireMonkey Stylebook Any object inherited from TBaseObject Set StyleName to identify Found using FindStyleResource method from parented object Stored In / Loaded From a stream file FireMonkey Styles A collection of FireMonkey resource style WPF type of implementation Styles can be inherited, saved, loaded Look and Feel style files for Win7, MacOS, iOS and custom themes
  56. “FireMonkey” – Animation Used to modify property values over time Machine speed independent Can be looped and / or reversed Can follow a variety of time / value curves Can be triggered by MouseOver, Focus, Visibility, etc.
  57. “FireMonkey” – Effects / Filters Can be applied to bitmaps Can be applied to controls Can be triggered by MouseOver, Focus, Visibility, etc. GPU shader based implementation
  58. Building FireMonkey Components Bruno/Ray slides Docwilki
  59. FireMonkey Components - The Process Basically the same as creating VCL components Prepare for new component Create a new directory Create a test application Create the component unit Manually or Component Expert? Name the component Create the component class Test runtime behavior Dynamically create component in test application. Courtesy: Ray Konopka Raize Software
  60. The Process (cont.) Register and install component Register component in a new or existing registration unit Add component unit to a runtime package Add registration unit to design package which will require the runtime package Build packages, deploy, install Test design-time behavior. Courtesy: Ray Konopka Raize Software
  61. Creating new Styles Use the built-in Style Designer Save to *.style file Create separate styles to handle platform differences Courtesy: Ray Konopka Raize Software
  62. Component Guidelines Use Styles Name style elements appropriately Be sure to document all Style contracts Utilize primitives for painting whenever possible When used within styles, they can be replaced or subclassed Complex controls can be built through code with styled components. Courtesy: Ray Konopka Raize Software
  63. LiveBinding Engine Allows developers to create live binding in run-time between components/objects at design-time. The LiveBinding visual components use the engine: TBindScope for bindings to components TBindScopeDB for bindings to databases TBindingsList for holding of binding lists A number of conversion services in the box and allows to create new conversion service Automatic updates Expressions automatically re-evaluated when a variable (e.g.; property) referenced by an expression has changed value. Requires - external notification – Notify(object, ‘variable’);
  64. Expression Engine – Simple Expressions Operators: +, -, /, * Literals: ‘abc’, 1, 1.23, True, False, nil Scope: Provides symbols and values available to an expression. Includes operators. Scopes may be nested. TDictionaryScope: Associates a name with an object Expression string: String to evaluate TBindingExpression: Expression engine object which holds a scope and expression string. Evaluate: Expression engine processes the expression string and returns a value. TValue: Delphi RTTI representation of a value. May be an object, string, integer, array, etc.
  65. Expression Engine – Simple Expressions Built-in Methods: Global methods registered by the expression engine WrapObject(): Create a scope which exposes members of the object, including properties and methods RTTI: Delphi RTTI is used by expression engine to access the member of an object Self: A scope can be associated with “Self”. Members can be accessed without a qualifier. Association: A scope can be associated with a name. The name is used as a qualifier. Custom Methods: Global methods registered in user code
  66. Expression Engine – Binding, Scope, etc Binding: Expressions are used to assign from one value to another Input expression and scope: Evaluated to get the input value Output expression and scope: Evaluated to get the output location Managed: Managed bindings are owned by the expression engine and may be automatically re-evaluated. Unmanaged: Unmanaged bindings are owned by application and must be explicitly evaluated by calling Evaluate.
  67. Expression Engine – Unmanaged Bindings Output Converters Used when assigning the value of the input to the location of the output. Typically used to handle assignment of mismatched types such as integer to string.
  68. Expression Engine – Managed Bindings Notify() The Notify method informs the manager that the value of an object/property has changed. The manager will re-evaluate dependent bindings. Events Events are called during expression evaluation. OnAssigning OnAssign OnException
  69. Components – Unmanaged Binding TBindExpression Component to create a managed or unmanaged binding Properties SourceComponent SourceExpression ControlComponent ControlExpression Direction TBindScope Component to wrap a TObject in a scope Properties DataObject
  70. Components – Unmanaged Bindings TBindExprItems Component to create one or more managed or unmanaged binding Properties SourceComponent SourceExpression ControlComponent ControlExpression FormatExpressions collection
  71. Components – Designing TBindExpression TBindingsList: List of binding components such as TBindExprItems Bindings List Editor: Edits the list of binding components TBindExpression properties Active Binding expressions are evaluated when Active is set to True AutoActivate Set Active when the component is loaded Expression Editor Edit the expression strings of a binding component Test expressions
  72. Demonstrations Styles Loading a style from resource, file? Modifying styles at design time and runtime Style Lookup, Apply Style? Animations and effects LiveBindings BindScopeDB – uses DataSource Managed and Unmanaged bindings Circle example method for condition test returning color Building components - TRkDialogButtons for FMX
  73. Break

  74. Platform Considerations

    Deployment to Windows, OSX and iOS
  75. Platform Considerations Project Types Windows, Mac, iOS Project | Deployment Feature Files Additional files Platform Assistant Debugging, Deployment Win32, Win64, Mac
  76. FireMonkey and Cross Platform FM is a platform that supports RTL GUI Database Operating System Compile / Run on all platforms we support * * subset for mobile platforms
  77. FireMonkeyiOS UI design on Windows Handling devices, orientation Code for iOS hardware, file system, OS Anders’ slides http://itunes.apple.com/us/app/anders-analog-clock/id475178939?mt=8
  78. iOS User Interface Guidelines Find the problems… ;) Green buttons? Maybe… Button font size? Scroll bars?
  79. iOS User Interface Guidelines That’s better! Need to turn off scroll bars! Edit box at the bottom? No! Has to be upper half of screen Why?
  80. iOS User Interface Guidelines We’re getting somewhere! But wait… Rounded corners?
  81. iOS User Interface Guidelines Nice! Modeled after the Contacts app Edit boxes have labels in them Text fields are right adjusted Minute details remain Text in memo should be padded more Maybe Panel with Label and Edit (LJ) inside? Button should have rounded edges to it
  82. iOS User Interface Guidelines Close! 
  83. iOS User Interface Guidelines Resources iOS Human Interface Guidelines web site http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html Apple’s iOS Human Interface Guidelines http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/MobileHIG.pdf
  84. Handling Multi-Platform issues TMenuBar – UseOSMenu property Dialogs, ShowMessage File System – IOUtils – Win/Mac Malcolm’s hidden user files TRegistryvsTIniFile TOSVersion (run time), conditional defines (compile time) File Volume/Path issues DLLs, Dylibs Debugging
  85. Demonstrations TOSversion database example UseMenuBar iOS client applications
  86. End-to-End FireMonkey

    Enterprise Solutions
  87. Enterprise Landscape CORBA JEE WCF DataSnap … SOA SaaS PaaS …
  88. End-to-End FireMonkey FireMonkey client and … Scenario 1: Remote RDBMS or Cloud Storage Scenario 2: XML/SOAP & JSON/REST Web Services Scenario 3: Delphi/C++ DataSnap server deployed to EC2 cloud Scenario 4: Delphi FM iOS client to DataSnap server Scenario 5: FireMonkey client connected to Enterprise Infrastructure – JEE, CORBA, and .NET
  89. Scenario 5: FireMonkey & .NET Web Service .NET WCF web service Embarcadero Prism console application FireMonkey client WSDL importer and HTTPRIO component
  90. Demonstration Embarcadero Prism WCF calculator service
  91. Android and iOS app development with RadPHP XE2 JQueryMobile visual, component-based development of mobile optimized web pages Create iOS and Android applications that you can sell on the Apple and Android app stores
  92. Demonstration RadPHP XE2 – web mobile client RadPHP XE2 – native mobile clients
  93. Delphi 64-bit

  94. What’s the same? Integer, Longint, Cardinal – still 32bits Int64, UInt64 – still 64bits UnicodeString, AnsiString, WideString Exceptions Runtime Library (RTL) SysUtils, Classes, etc…
  95. What’s different? NativeInt, NativeUint – 64bits Pointer (all pointers) – 64bits Dynamic Arrays – 64bit indexing Floating point math - Double
  96. Delphi 32 and 64-bit Pointer Types Pointer types Delphi/32 Delphi/64 Pointer String Class instance Class reference Interface AnsiString 4 bytes 8 bytes WideString UnicodeString Procedure pointer Dynamic array PAnsiChar PWideChar PChar
  97. Delphi 64-bit on Windows Same Windows API CreateWindowEx, PeekMessage, etc.. Same Delphi RTL SysUtils, Classes, Generics.Collections, etc… Same VCL Forms, Graphics, Controls, Menus, etc..
  98. Delphi 64-bit on Windows – some gotcha’s SizeOf(Pointer) <> SizeOf(Integer) Integer<->Pointer casts will break in 64bit SizeOf(THandle) = SizeOf(Pointer) All Handles = SizeOf(Pointer) (HWND, HDC, etc..). All code in process must be 64bit Must have 64bit versions of external non-Delphi libraries (DLLs) One, and only one, calling convention register, pascal, cdecl, stdcall are ignored. safecall is still “special” Old “pointer math” code may break Works in 32 and 64bit: MyPtr := PByte(P) + 10; TList’s internal FList is now a TPointerList. Used to be a PPointerList. Removing ^ should be sufficient to port from 32-bit to 64-bit. Tag property is now a NativeInt (32-bit vs 64-bit)
  99. Delphi 64-bit on Windows – some gotcha’s Inline Assembly Cannot mix asm blocks with Pascal code Only procedural level asm blocks supported Stack must be 16-byte aligned at each call instruction Define locals for temp storage Do not modify the RSP stack pointer New unified calling convention. First 4 parameters in registers, RCX, RDX, R8, R9 (or XMM0-XMM3) Exception unwinding No change for pure Delphi code. Exceptions function identically. Inline Assembly can cause exception unwinding to fail if not properly written. SHL/SHR – 32-bit values (Integer et al) will only shift in 32-bit space. 64-bit values will of course shift in 64-bit space. No Extended type in 64-bit. Use TExtendedRec80 if necessary (binary files with Extendeds in them for instance)
  100. Windows API gotcha’s SetWindowLong / GetWindowLong should be replaced by SetWindowLongPtr / GetWindowLongPtr for GWLP_HINSTANCE, GWLP_WNDPROC, etc… as they return pointers and handles. Pointers passed to SetWindowLongPtr should be type-casted to LONG_PTR and not to Integer / Longint. SetWindowLong mapped to SetWindowLongPtr in Windows.pas. Calls to our declaration of SetWindowLong are safe, as long as they are cast correctly.
  101. Windows API gotcha’s (con’t) Use explicit casts to WPARAM and LPARAM where appropriate. Example: Passing pointers through SendMessageSendMessage(hWnd, WM_SETTEXT, 0, LPARAM(@MyCharArray)); Use LRESULT to cast message results Example: Message.Result := LRESULT(Self); Message cracker records (TWMxxx) changed Alignment changes and field-size changes
  102. Summary

  103. FireMonkey FireMonkey - The Next Generation Business Application Platform Fully harness the powerful GPU graphics hardware Rapidly build visually spectacular applications Invest in one platform and deploy to numerous OS-s Delphi and C++ compiled, native executable Fully programmable animations and effects Your imagination is the only limit !!! Go FIREMONKEY !!!
  104. RAD Studio XE2 The ultimate application development suite for Windows, Mac, mobile and Web Deliver Fast Native Applications on Windows, Mac, Web and Mobile Speed Up Your Development Process with RAD Create Visually Stunning and Interactive Business Applications Build Applications that Connect Everywhere Break Free from Grids – Visualize Live Data
  105. Resources RAD Studio XE2 samples on SourceForge https://radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE2/ FireMonkey components Guide http://docwiki.embarcadero.com/RADStudio/en/FireMonkey_Components_Guide Anders Ohlsson FireMonkey iOS blog http://blogs.embarcadero.com/ao/2011/10/26/39188 CodeRage 6 – session replays http://cc.embarcadero.com/coderage RAIZE Software http://www.raize.com MIDA VCL to FireMonkey Converter http://midafiremonkey.wordpress.com/ JQueryMobile http://jquerymobile.com/
  106. Q&A
  107. Nabídky pro konec roku 2011

  108. Získejte licence navíc Nabídka platí pro objednávky podané od 3.11. do 30.12.2011 Produkty získané zdarma si musíte vyžádat do 15.1.2012
  109. Co je co Rapid SQL XE2 – je integrované vývojové prostředí jazyka SQL, které vám umožní vytvářet výkonný kód SQL pro vaše aplikace napsané v Delphi a C++Builderu. Fastcube – je nástroj pro efektivní analýzu dat. DB Optimizer XE2 – pomůže vám zvýšit celkový výkon vašich databázových aplikací a maximalizovat odezvu databází. DB Change Manager XE2 – umožní vám sledovat a zvládat změny v používaných databázích stejným způsobem, jakým například sledujete změny zdrojového kódu.
  110. Pamatujte taky, že … Možnost upgrade z verze 2007 na verzi novější skončí zároveň s koncem roku 2011 S nákupem verze XE2 produktu z rodiny RAD Studio XE2 získáte i starší verze XE, 2010, 2009, 2007 a Delphi 7 či C++Builder 6 S nákupem verze XE2 získáte to, co zatím nemáte a jinde nenajdete: 64bitový kompilátor Delphipro aplikace, které využijí možnosti nejnovějšího hardware Skutečně oslňující vizuální obchodní aplikace vytvořené pomocí komponent FireMonkey™ Výkonné nativní aplikace proWindows, Mac a iOS LiveBindings™ dovolící propojit jakýkoli vizuální prvek s libovolným typem dat Propojitenost s mobilními systémy a cloudempomocí vícevrstvé technologie DataSnap
  111. Další informace najdete zde http://www.embt.cz Borland s.r.o. Belgická 15, 120 00 Praha 2, CZ e-mail: info@embt.cz telefon: +420 273 132 190
  112. Thank You

    www.embarcadero.com/products/firemonkey davidi@embarcadero.com
More Related