SlideShare ist ein Scribd-Unternehmen logo
1 von 29
DOES THE DELPHI IDE NARROW YOU?
EXTEND IT!
Marco Breveglieri
MARCO BREVEGLIERI
Homepage: www.breveglieri.it 👈
Blog: www.compilaquindiva.com 👈
Delphi Podcast: www.delphipodcast.com 👈
ABLS TEAM Software and Web (Reggio Emilia)
featuring «Leo»
WHAT DO WE TALK
ABOUT?
Plugins!
Extensions!
Experts!
Add-ons!
What do we talk about?
Plugins have made the success of many
apps.
• Browsers
o Mozilla Firefox
o Google Chrome
• CMS
o Wordpress
o Drupal
• Developer tools
o Atom
o Eclipse
o Visual Studio Code
Sometimes, plugins are the piece
of software that really matters.
Plugins, plugins, plugins!
Delphi has some really good add-ons or
tools, freeware or opensource.
• General purpose and coding
• GExperts
• ModelMaker Code Explorer (MMX)
• CnPack Wizards
• DDevExtensions
• Documentation Insight
• Castalia
• Error handling
• Eureka Log
• madExcept
• Testing and quality
• Automated QA
• Test Insight
• Hot fixes
• Delphi SpeedUp
• IDE Fix Pack
…and many others… 👌
But Delphi often lacks specific, targeted
and «feature focused» plugin. 🤔
What about Delphi?
What do I mean?
Open Command
Line
Add New File Trailing Whitespace
Visualizer
Dummy Text
Generator
Show Selection
Length
XML, XPath
& XSLT Tools
Comment
Remover
Console Launcher
Solution Cleaner PowerShell Prompt Encourage Farticus
The only limit is the sky!
Many scenarios deals with writing code, but this is not always the case.
You can create
• Productivity tools that add file templates and projects, refactoring and
cleaning code, add new dialogs or tool windows.
• Support for new syntax and languages directly in the editor.
• Domain specific designers that allow you to «draw» a model and optionally
produce the code (or not).
• Extend debugging features
• Create replacements, integrations and work arounds of limited or disliked IDE
features
What can I do?
• Do things faster!
• Invest more time in automation than documentation
• More speed, less errors, high reliability, soft learning curve
• Share your tools with colleagues or an entire community to get
feedback and improvements, and also new tools
• Decorate your framework with templates for projects and modules
• Fix Delphi bugs or implement workarounds waiting for fixes
• Last but not least… have fun!
Benefits
Nobody is perfect.
Not even Delphi.
What can we do?
Let’s build some
Experts!
So what?
TOOLS API
• Suite of over 100 interfaces!
• Let’s you interact with and control the IDE
Main action lists, image lists and menus
Tool bars
Modules and source editors
Keyboard macros and bindings
Forms (and their components)
Debugger and Breakpoints
Code Completion
Message View
To-Do List
Build process
Project and Item Repository
What is Tools API
• All the interfaces are inside a unique code file:
C:Program Files (x86)EmbarcaderoStudio20.0sourceToolsAPI.pas
• You can implement some interfaces to extend the IDE
• ToolsAPI provides some main kinds of extensions
• Wizard
a sort of setup class to easily build simple features (or host complex ones)
• Notifier
a class that contains logic that Delphi calls back when something interesting happens
• Creator
a class that supports the creation of new project, modules, units or virtually any kind of file
How to use ToolsAPI
interface
uses
ToolsAPI;
type
TFirstWizard = class(TInterfacedObject, IOTAWizard)
public
procedure Execute;
function GetIDString: string;
function GetName: string;
function GetState: TWizardState;
procedure AfterSave;
procedure BeforeSave;
procedure Destroyed;
procedure Modified;
end;
Sample Wizard
Where to put the code
Package
(.dpk)
Library
(.dll)
Library (.dll)
Library
(.dll)
• Quite «old school» solution
• They must be installed via registry
• Runtime packages are required!
• Registration, initialization and
finalization code is more complex
o You have to set the Application
variable
o What about the Memory Manager?
• Delphi loads them early (some
menus to anchor to may not be
available)
• Natural container for all the
elements in Delphi (types,
records, classes, interfaces,
routines, forms, frames, data
modules, …)
• Use of runtime packages is
embedded
• Register classes (and hence
experts) is easy and
straightforward
• They can be installed/uninstalled
«hot» and «live» directly from
the IDE
Where to put the code
Package
(.dpk)
Demo
• There is little… no documentation 😢
• You should refer to the comments inside «ToolsAPI.pas»
• Pay attention! Your code runs inside the IDE
• Delphi can crash or hang if your code misbehave or has errors
• Testing is difficult, debugging even more!
• If you are unsure, install the tool using a separate profile
• Launch the Delphi IDE (bds.exe) as the Host Application
• An effective «Code DOM» and a working parser would be appreciated
• We hope that LSP support will resolve this issue and fill the gap
Warning!
IDE SERVICES
NTA (Native Tools API)
• Grants direct access to actual IDE
objects, such as the TMainMenu
object of the IDE.
• The wizard must use RAD Studio
packages (rtl, vcl, …).
• The wizard is tied to a specific
version of the IDE.
Native/Open Interfaces
OTA (Open Tools API)
• Interfaces do not grant full access
to the IDE.
• All the functionality is available
through OTA interfaces.
• Interacting and extending the IDE
occurs with the OTA layer as a
mediator.
• Services give access to specific features through interfaces.
• Interfaces can be obtained from one single global variable:
BorlandIDEServices.
• To get a service reference, you can call the Supports() method
or cast BorlandIDEServices to the required type.
• Some interfaces have numbers (are versioned when changed).
Tools API Services
procedure SetKeystrokeDebugging(Debugging: Boolean);
var
Service: IOTAKeyboardDiagnostics;
begin
if Supports(BorlandIDEServices,
IOTAKeyboardDiagnostics, Service) then
Dialog.KeyTracing := Debugging;
end;
Get a service /1
var
LServices: IOTAWizardServices;
begin
LServices := BorlandIDEServices as IOTAWizardServices;
WizardIndex := LServices.AddWizard(TFirstWizard.Create);
end;
begin
with BorlandIDEServices as IOTAWizardServices do
WizardIndex := AddWizard(TFirstWizard.Create);
end;
Get a service /2
Demo(s)
RECAP
• Delphi (RAD Studio) Documentation
http://docwiki.embarcadero.com/RADStudio/Rio/en/Extending_the_IDE_Using_the_Tools_API
• Dave’s (David Hoyle) Development Blog
https://www.davidghoyle.co.uk/WordPress/?page_id=667
• Stack Overflow
https://stackoverflow.com/search?q=delphi+ota
Resources
Q & A
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019

Weitere ähnliche Inhalte

Was ist angesagt?

2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficientlyBruno Capuano
 
YAPC::NA 2007 - Epic Perl Coding
YAPC::NA 2007 - Epic Perl CodingYAPC::NA 2007 - Epic Perl Coding
YAPC::NA 2007 - Epic Perl Codingjoshua.mcadams
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applicationseightbit
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into JavaTom Johnson
 
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingOSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingChris Aniszczyk
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]David Buck
 
Building Native Apps The Lazy Way (BeerJS 2021)
Building Native Apps The Lazy Way (BeerJS 2021)Building Native Apps The Lazy Way (BeerJS 2021)
Building Native Apps The Lazy Way (BeerJS 2021)Nickolay Ninarski
 
API Design - developing for developers
API Design - developing for developersAPI Design - developing for developers
API Design - developing for developersJoy George
 
iOS development best practices
iOS development best practicesiOS development best practices
iOS development best practicesMichal Juhas
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONAYESHA JAVED
 
Writing code samples for API/SDK documentation
Writing code samples for API/SDK documentationWriting code samples for API/SDK documentation
Writing code samples for API/SDK documentationTom Johnson
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
How to Prepare for the OCPJP 8 Exam?
How to Prepare for the OCPJP 8 Exam?How to Prepare for the OCPJP 8 Exam?
How to Prepare for the OCPJP 8 Exam?Ganesh Samarthyam
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksPhill Sparks
 

Was ist angesagt? (19)

2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently
 
YAPC::NA 2007 - Epic Perl Coding
YAPC::NA 2007 - Epic Perl CodingYAPC::NA 2007 - Epic Perl Coding
YAPC::NA 2007 - Epic Perl Coding
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
 
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingOSGi, Eclipse and API Tooling
OSGi, Eclipse and API Tooling
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
 
Building Native Apps The Lazy Way (BeerJS 2021)
Building Native Apps The Lazy Way (BeerJS 2021)Building Native Apps The Lazy Way (BeerJS 2021)
Building Native Apps The Lazy Way (BeerJS 2021)
 
API Design - developing for developers
API Design - developing for developersAPI Design - developing for developers
API Design - developing for developers
 
iOS development best practices
iOS development best practicesiOS development best practices
iOS development best practices
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATION
 
Writing code samples for API/SDK documentation
Writing code samples for API/SDK documentationWriting code samples for API/SDK documentation
Writing code samples for API/SDK documentation
 
Eclipse Xtend
Eclipse XtendEclipse Xtend
Eclipse Xtend
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
How to Prepare for the OCPJP 8 Exam?
How to Prepare for the OCPJP 8 Exam?How to Prepare for the OCPJP 8 Exam?
How to Prepare for the OCPJP 8 Exam?
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
 

Ähnlich wie Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019

Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11Jorge Hidalgo
 
Arduino Object Oriented Programming (OOP).pptx
Arduino Object Oriented Programming (OOP).pptxArduino Object Oriented Programming (OOP).pptx
Arduino Object Oriented Programming (OOP).pptxEdwinGuillermoKestle1
 
EMPEX LA 2018 - Inclusion Starts with Docs
EMPEX LA 2018 - Inclusion Starts with DocsEMPEX LA 2018 - Inclusion Starts with Docs
EMPEX LA 2018 - Inclusion Starts with DocsPete Gamache
 
Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)David Wesst
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionDave Diehl
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environmentRobert Deutz
 
Using Delphi as a no code development environment
Using Delphi as a no code development environmentUsing Delphi as a no code development environment
Using Delphi as a no code development environmentpprem
 
Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015Daniel Reis
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development EnvironmentsPhilip Johnson
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Florent BENOIT
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxAOmaAli
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyondrsebbe
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Dojo javascript toolkit
Dojo javascript toolkit Dojo javascript toolkit
Dojo javascript toolkit Predhin Sapru
 
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017Florent BENOIT
 

Ähnlich wie Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019 (20)

Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11
 
Arduino Object Oriented Programming (OOP).pptx
Arduino Object Oriented Programming (OOP).pptxArduino Object Oriented Programming (OOP).pptx
Arduino Object Oriented Programming (OOP).pptx
 
EMPEX LA 2018 - Inclusion Starts with Docs
EMPEX LA 2018 - Inclusion Starts with DocsEMPEX LA 2018 - Inclusion Starts with Docs
EMPEX LA 2018 - Inclusion Starts with Docs
 
The Architect Way
The Architect WayThe Architect Way
The Architect Way
 
Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood edition
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environment
 
Using Delphi as a no code development environment
Using Delphi as a no code development environmentUsing Delphi as a no code development environment
Using Delphi as a no code development environment
 
Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development Environments
 
The ABC's of IaC
The ABC's of IaCThe ABC's of IaC
The ABC's of IaC
 
Delphi L01 Intro
Delphi L01 IntroDelphi L01 Intro
Delphi L01 Intro
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptx
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Dojo javascript toolkit
Dojo javascript toolkit Dojo javascript toolkit
Dojo javascript toolkit
 
Ios - Intorduction to view controller
Ios - Intorduction to view controllerIos - Intorduction to view controller
Ios - Intorduction to view controller
 
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017
 

Mehr von Marco Breveglieri

Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingMarco Breveglieri
 
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con DelphiDelphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con DelphiMarco Breveglieri
 
Creare un Information Radiator con Delphi
Creare un Information Radiator con DelphiCreare un Information Radiator con Delphi
Creare un Information Radiator con DelphiMarco Breveglieri
 
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in DelphiMarco Breveglieri
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleMarco Breveglieri
 
Applicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e DelphiApplicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e DelphiMarco Breveglieri
 
Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016Marco Breveglieri
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Marco Breveglieri
 
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, PiacenzaSviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, PiacenzaMarco Breveglieri
 
Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"Marco Breveglieri
 

Mehr von Marco Breveglieri (11)

Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del Testing
 
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con DelphiDelphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
 
Creare un Information Radiator con Delphi
Creare un Information Radiator con DelphiCreare un Information Radiator con Delphi
Creare un Information Radiator con Delphi
 
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarle
 
Applicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e DelphiApplicazioni Web ultra-performanti con Vue.js e Delphi
Applicazioni Web ultra-performanti con Vue.js e Delphi
 
Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016Create a Bot with Delphi and Telegram - ITDevCon 2016
Create a Bot with Delphi and Telegram - ITDevCon 2016
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, PiacenzaSviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
 
Reportage Delphi Day 2012
Reportage Delphi Day 2012Reportage Delphi Day 2012
Reportage Delphi Day 2012
 
Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"Reportage "RAD Studio XE2 World Tour"
Reportage "RAD Studio XE2 World Tour"
 

Kürzlich hochgeladen

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Kürzlich hochgeladen (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019

  • 1. DOES THE DELPHI IDE NARROW YOU? EXTEND IT! Marco Breveglieri
  • 2. MARCO BREVEGLIERI Homepage: www.breveglieri.it 👈 Blog: www.compilaquindiva.com 👈 Delphi Podcast: www.delphipodcast.com 👈 ABLS TEAM Software and Web (Reggio Emilia) featuring «Leo»
  • 3. WHAT DO WE TALK ABOUT?
  • 5. Plugins have made the success of many apps. • Browsers o Mozilla Firefox o Google Chrome • CMS o Wordpress o Drupal • Developer tools o Atom o Eclipse o Visual Studio Code Sometimes, plugins are the piece of software that really matters. Plugins, plugins, plugins!
  • 6. Delphi has some really good add-ons or tools, freeware or opensource. • General purpose and coding • GExperts • ModelMaker Code Explorer (MMX) • CnPack Wizards • DDevExtensions • Documentation Insight • Castalia • Error handling • Eureka Log • madExcept • Testing and quality • Automated QA • Test Insight • Hot fixes • Delphi SpeedUp • IDE Fix Pack …and many others… 👌 But Delphi often lacks specific, targeted and «feature focused» plugin. 🤔 What about Delphi?
  • 7. What do I mean? Open Command Line Add New File Trailing Whitespace Visualizer Dummy Text Generator Show Selection Length XML, XPath & XSLT Tools Comment Remover Console Launcher Solution Cleaner PowerShell Prompt Encourage Farticus
  • 8. The only limit is the sky! Many scenarios deals with writing code, but this is not always the case. You can create • Productivity tools that add file templates and projects, refactoring and cleaning code, add new dialogs or tool windows. • Support for new syntax and languages directly in the editor. • Domain specific designers that allow you to «draw» a model and optionally produce the code (or not). • Extend debugging features • Create replacements, integrations and work arounds of limited or disliked IDE features What can I do?
  • 9. • Do things faster! • Invest more time in automation than documentation • More speed, less errors, high reliability, soft learning curve • Share your tools with colleagues or an entire community to get feedback and improvements, and also new tools • Decorate your framework with templates for projects and modules • Fix Delphi bugs or implement workarounds waiting for fixes • Last but not least… have fun! Benefits
  • 10. Nobody is perfect. Not even Delphi. What can we do? Let’s build some Experts! So what?
  • 12. • Suite of over 100 interfaces! • Let’s you interact with and control the IDE Main action lists, image lists and menus Tool bars Modules and source editors Keyboard macros and bindings Forms (and their components) Debugger and Breakpoints Code Completion Message View To-Do List Build process Project and Item Repository What is Tools API
  • 13. • All the interfaces are inside a unique code file: C:Program Files (x86)EmbarcaderoStudio20.0sourceToolsAPI.pas • You can implement some interfaces to extend the IDE • ToolsAPI provides some main kinds of extensions • Wizard a sort of setup class to easily build simple features (or host complex ones) • Notifier a class that contains logic that Delphi calls back when something interesting happens • Creator a class that supports the creation of new project, modules, units or virtually any kind of file How to use ToolsAPI
  • 14. interface uses ToolsAPI; type TFirstWizard = class(TInterfacedObject, IOTAWizard) public procedure Execute; function GetIDString: string; function GetName: string; function GetState: TWizardState; procedure AfterSave; procedure BeforeSave; procedure Destroyed; procedure Modified; end; Sample Wizard
  • 15. Where to put the code Package (.dpk) Library (.dll)
  • 16. Library (.dll) Library (.dll) • Quite «old school» solution • They must be installed via registry • Runtime packages are required! • Registration, initialization and finalization code is more complex o You have to set the Application variable o What about the Memory Manager? • Delphi loads them early (some menus to anchor to may not be available)
  • 17. • Natural container for all the elements in Delphi (types, records, classes, interfaces, routines, forms, frames, data modules, …) • Use of runtime packages is embedded • Register classes (and hence experts) is easy and straightforward • They can be installed/uninstalled «hot» and «live» directly from the IDE Where to put the code Package (.dpk)
  • 18. Demo
  • 19. • There is little… no documentation 😢 • You should refer to the comments inside «ToolsAPI.pas» • Pay attention! Your code runs inside the IDE • Delphi can crash or hang if your code misbehave or has errors • Testing is difficult, debugging even more! • If you are unsure, install the tool using a separate profile • Launch the Delphi IDE (bds.exe) as the Host Application • An effective «Code DOM» and a working parser would be appreciated • We hope that LSP support will resolve this issue and fill the gap Warning!
  • 21. NTA (Native Tools API) • Grants direct access to actual IDE objects, such as the TMainMenu object of the IDE. • The wizard must use RAD Studio packages (rtl, vcl, …). • The wizard is tied to a specific version of the IDE. Native/Open Interfaces OTA (Open Tools API) • Interfaces do not grant full access to the IDE. • All the functionality is available through OTA interfaces. • Interacting and extending the IDE occurs with the OTA layer as a mediator.
  • 22. • Services give access to specific features through interfaces. • Interfaces can be obtained from one single global variable: BorlandIDEServices. • To get a service reference, you can call the Supports() method or cast BorlandIDEServices to the required type. • Some interfaces have numbers (are versioned when changed). Tools API Services
  • 23. procedure SetKeystrokeDebugging(Debugging: Boolean); var Service: IOTAKeyboardDiagnostics; begin if Supports(BorlandIDEServices, IOTAKeyboardDiagnostics, Service) then Dialog.KeyTracing := Debugging; end; Get a service /1
  • 24. var LServices: IOTAWizardServices; begin LServices := BorlandIDEServices as IOTAWizardServices; WizardIndex := LServices.AddWizard(TFirstWizard.Create); end; begin with BorlandIDEServices as IOTAWizardServices do WizardIndex := AddWizard(TFirstWizard.Create); end; Get a service /2
  • 26. RECAP
  • 27. • Delphi (RAD Studio) Documentation http://docwiki.embarcadero.com/RADStudio/Rio/en/Extending_the_IDE_Using_the_Tools_API • Dave’s (David Hoyle) Development Blog https://www.davidghoyle.co.uk/WordPress/?page_id=667 • Stack Overflow https://stackoverflow.com/search?q=delphi+ota Resources
  • 28. Q & A

Hinweis der Redaktion

  1. Presentarsi molto velocemente per procedere poi con il tema principale.
  2. Spiegare subito qual è il tema della sessione.
  3. Nel talk si parlerà di creare plugin (con tutti i relativi sinonimi) per arricchire le funzionalità di Delphi. Anticipare poi la motivazione per cui si ritiene questo tema estremamente importante.
  4. Evidenziare come, per molti software (compreso i concorrenti di Delphi) la presenza di un fiorente marketplace di plugin disponibili aumenti l’adozione dell’ambiente di sviluppo e crei un maggiore senso di community, fino ad arrivare al caso estremo di «VSCode» dove i plugin costituiscono la parte più rilevante del software.
  5. Illustrare la situazione nel mondo Delphi, prevalentemente costituita da prodotti «macro», che spesso estendono l’IDE per gestire le proprie funzionalità, o nel caso di feature specifiche sono «collezioni» che a volte si sovrappongono pure e finiscono anche per ostacolarsi. Chiarire quindi qual è il tipo di estensione che si ha in mente.
  6. Fornire qualche esempio di plugin che sarebbe interessante avere in Delphi e che risolve problematiche molto specifiche, ma nel contempo accelerando i tempi di sviluppo e riducendo drasticamente il «time to marker», con l’unico limite della fantasia. Mostrare anche il demo del plugin «Code Smells».
  7. Spiegare quali sono i tipi di estensione che si possono creare e le funzionalità che possono avere (magari qualcuno non ci ha mai pensato).
  8. Cosa fare quindi? Introdurre il percorso esplorativo per la creazione di nuovi expert per Delphi, esortando il pubblico a farlo e, se si ottiene qualcosa di utile, condividerlo, magari proponendo uno spazio su GetIt o DCI o altrove per beneficiarne tutti.
  9. Creazione package, agg. riferimento a «DesignIDE», creazione classe OTAWizard.
  10. Fare carrellata di tutti i demo che è stato possibile produrre.