SlideShare a Scribd company logo
Create Your Bot with Delphi
Crea il tuo Bot con Delphi
Who am I?
About me
Marco Breveglieri
Software and Web Developer
www.compilaquindiva.com
Via De Gasperi 14
42019 Scandiano (RE)
ITALY
You might find interesting…
Delphi Succinctly
Learn the fundamentals of Delphi
to build a variety of solutions for
many devices and platforms in
about 100 pages.
Find more here:
👉 http://bit.ly/delphi-succinctly
You might find interesting…
Delphi Podcast
The first Italian podcast
about Delphi.
Listen here:
👉 http://www.delphipodcast.com
and also take part in it!
You might find interesting…
Component Tales
Find out what Delphi components
do when you close the IDE...
Smile (if you can) here:
👉 https://twitter.com/ComponentTales
Bots!
An introduction to Bots
What is a Bot?
A «(Ro)bot» is a software
application that runs
automated tasks over the
Internet.
Typically, bots perform tasks
that are both simple and
structurally repetitive, at a
much higher rate than
would be possible for a
human alone.
Bot Purposes
• Communicate with other users (that's our case 👍)
• Instant Messaging and IRC
• Social Bots
• Telegram Bots
• Commercial Purposes
• Auctions and Bets (eBay, Betfair, …)
• Application and Content Stores (Apple Store, Google Play, YouTube …)
• Malicious Purposes
• Spam bots
• DDos attacker
• Gaming
• MMORPG
What you can do
• Get customized notification and
news
• Integrate your messaging
experience with external
services
• Create your own custom service
• Create games (NEW! in Telegram
Bots)
• Smart newspapers
• Weather forecast
• Local news or events
• Track shipping
• Translate content on-the-fly
• Import photos, videos and
content
• Build a knowledge base
• Get cool! 😎
What you can do
Why Chat Bots?
• Bots are a lot easier to install than mobile apps
• Bots are easily distributed
• Quality mobile apps are expensive to build, mantain and deploy
• You don't have to deal with security aspects
• Moving complexity to the cloud reduces a user's cognitive load
Natural Language Processing
NLP is the ability of a
computer program to
understand human speech
as it is written or spoken.
• It makes computer to perform
useful tasks with the natural
languages humans use
• It is based on machine learning
• Supports both speech and text
But we will not deal with NLP in
this speech.
Platforms and Frameworks
Just to name a few…
• Microsoft Bot Framework
• Telegram API/SDK
• Facebook Messenger Bots
• Google Allo (?)
Telegram
Get to know Telegram
What is Telegram?
Telegram is a cloud-based instant
messaging (IM) service.
Users can send and exchange
• Simple messages
• Photos and videos
• Stickers
• Virtually any type of file
• Supports (custom) encrypted
(E2E) messaging
• Cloud Based Architecture
• Native app for every platform,
including Web
• Client-side code is open-source
• Server-side code is proprietary
and closed-source
Available Clients
Telegram supports a wide
range of devices and
operating systems.
• Web
• Windows
• Android
• iOS
• Windows Phone
• OSX
• Linux
• Ubuntu Touch
Telegram Facts
• 100 million Monthly Active Users
• 350 K of signups per day
• 15 billion daily message sent
• Has proven to be quite robust
• Has a good Bot platform!
Telegram Bot Platform
• Release in June 2015:
recent but powerful!
• Updated just some day ago
(added Game support)
• Open to everyone without
barriers
• No approval process required
• Allows 1-1 conversations
• Can be added to groups
and channels
• Can be invoked "on the fly"
(inline bots)
Difference with humans
• No online status and no last seen timestamps
• Can't initiate conversation with users
• Username always ends in "bot"
• When added to a group, bots do not receive all messages by default
• Bots never eat, sleep or complain (unless expressly programmed
otherwise)
Let's see some sample
Comune di Reggio Emilia BOT (@ComuneREbot)
https://telegram.me/ComuneREbot
Nice Bots:
• TrackBot (https://botfactory.info/trackbot/)
• Giphy Bot (https://telegram.me/gif)
• TerremotiBot (https://botfactory.info/terremotibot/)
• CinemasBot (https://telegram.me/cinemasbot)
Want more?
http://botsfortelegram.com/
Create a Bot
Let's create a Bot with Telegram
How do bots work?
• Send messages and commands to
bots by opening a chat with them
or by adding them to groups.
• Send requests directly from the
input field by typing the bot's
@username and a query (inline
bots)
• Messages, commands and requests
sent by users are passed to the
software running on Telegram
servers.
• Telegram servers handles all
encryption and communication
with the Telegram API for you.
• You communicate with this server
via a simple HTTPS-interface that
offers a simplified version of the
Telegram API: the Bot API.
Create a new Bot
BotFather is the one bot to rule
them all.
It will help you create new bots
and change settings for existing
ones.
«One Bot to rule them all, One Bot to
find them
One Bot to bring them all and in the
darkness bind them»
-- The Lord of the Bots, J.R.R.Tolkien
Bot API
• The Bot API is an HTTP-based api
• It supports GET and POST requests
Making Requests
• All queries must be served over HTTPS and in this form:
https://api.telegram.org/bot<token>/METHOD_NAME
• All queries must be made using UTF-8
• All methods are case-insensitive
• The response is a JSON object which:
• always has an 'ok' boolean field.
• has a 'result' field if the response is ok.
• may have an optional 'description' field which contains some info about the occurred error
• also has a 'error_code' in the case of errors.
Let's test it!
How to get updates?
Call the method name:
getUpdates()
You can use
• Continuous Polling
• Long Polling technique
(easy, but slightly inefficient and
resource consumer)
• Webhooks
(better, but more complex)
Let's see some code
Questions?
Don't be afraid
of asking…
Thanks!
😇

More Related Content

What's hot

Scaling Sales: Growth Strategies Of The Fastest Growing Internet Retailers
Scaling Sales: Growth Strategies Of The Fastest Growing Internet RetailersScaling Sales: Growth Strategies Of The Fastest Growing Internet Retailers
Scaling Sales: Growth Strategies Of The Fastest Growing Internet Retailers
Roland Frasier
 
Claves SEO para Ecommerce #RMC22
Claves SEO para Ecommerce  #RMC22Claves SEO para Ecommerce  #RMC22
Claves SEO para Ecommerce #RMC22
MJ Cachón Yáñez
 
Number One Book System Presentation Orlando
Number One Book System Presentation OrlandoNumber One Book System Presentation Orlando
Number One Book System Presentation Orlando
Roland Frasier
 
Blockchian introduction
Blockchian introductionBlockchian introduction
Blockchian introduction
kesavan N B
 
Mimosa Mastermind - Growth Drivers for 2021 - Perry Belcher
Mimosa Mastermind - Growth Drivers for 2021 - Perry BelcherMimosa Mastermind - Growth Drivers for 2021 - Perry Belcher
Mimosa Mastermind - Growth Drivers for 2021 - Perry Belcher
Perry Belcher
 
Blockchain and the future
Blockchain and the futureBlockchain and the future
Blockchain and the future
Minh-Duc Do
 
Viral Videos | Marketing Strategies | Marketing | Content Marketing | SEO
Viral Videos | Marketing Strategies | Marketing | Content Marketing | SEOViral Videos | Marketing Strategies | Marketing | Content Marketing | SEO
Viral Videos | Marketing Strategies | Marketing | Content Marketing | SEO
Roland Frasier
 
How to use MongoDB with CakePHP
How to use MongoDB with CakePHPHow to use MongoDB with CakePHP
How to use MongoDB with CakePHP
ichikaway
 
La mejor Presentación de Bitcoin y las criptomonedas.
La mejor Presentación de Bitcoin y las criptomonedas.La mejor Presentación de Bitcoin y las criptomonedas.
La mejor Presentación de Bitcoin y las criptomonedas.
Enrique Borda Penarrieta
 
Ef code first
Ef code firstEf code first
Ef code first
ZealousysDev
 
Bitcoin
BitcoinBitcoin
SEO On-page 2.0: da Intenção à Conversão
SEO On-page 2.0: da Intenção à ConversãoSEO On-page 2.0: da Intenção à Conversão
SEO On-page 2.0: da Intenção à Conversão
Felipe Bazon
 
KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19
KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19
KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19
Iñaki Huerta (ikhuerta)
 
Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...
Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...
Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...
Oban International
 
Oracle's Listagg Function - Uses and Duplicate Removal
Oracle's Listagg Function - Uses and Duplicate RemovalOracle's Listagg Function - Uses and Duplicate Removal
Oracle's Listagg Function - Uses and Duplicate Removal
Bryan L. Mack
 
No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...
No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...
No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...
Aleyda Solís
 
►TOP 13 • Blockchain Use Cases
►TOP 13 • Blockchain Use Cases ►TOP 13 • Blockchain Use Cases
►TOP 13 • Blockchain Use Cases
Andrea Soto
 
Laravel
LaravelLaravel
Laravel
tanveerkhan62
 
Zoho CRM Overview: Let Your Business Benefit
Zoho CRM Overview: Let Your Business BenefitZoho CRM Overview: Let Your Business Benefit
Zoho CRM Overview: Let Your Business Benefit
Oleksandra Lukavetska
 
SEO On-page 4.0: da intenção à conversão
SEO On-page 4.0:  da intenção à conversãoSEO On-page 4.0:  da intenção à conversão
SEO On-page 4.0: da intenção à conversão
Felipe Bazon
 

What's hot (20)

Scaling Sales: Growth Strategies Of The Fastest Growing Internet Retailers
Scaling Sales: Growth Strategies Of The Fastest Growing Internet RetailersScaling Sales: Growth Strategies Of The Fastest Growing Internet Retailers
Scaling Sales: Growth Strategies Of The Fastest Growing Internet Retailers
 
Claves SEO para Ecommerce #RMC22
Claves SEO para Ecommerce  #RMC22Claves SEO para Ecommerce  #RMC22
Claves SEO para Ecommerce #RMC22
 
Number One Book System Presentation Orlando
Number One Book System Presentation OrlandoNumber One Book System Presentation Orlando
Number One Book System Presentation Orlando
 
Blockchian introduction
Blockchian introductionBlockchian introduction
Blockchian introduction
 
Mimosa Mastermind - Growth Drivers for 2021 - Perry Belcher
Mimosa Mastermind - Growth Drivers for 2021 - Perry BelcherMimosa Mastermind - Growth Drivers for 2021 - Perry Belcher
Mimosa Mastermind - Growth Drivers for 2021 - Perry Belcher
 
Blockchain and the future
Blockchain and the futureBlockchain and the future
Blockchain and the future
 
Viral Videos | Marketing Strategies | Marketing | Content Marketing | SEO
Viral Videos | Marketing Strategies | Marketing | Content Marketing | SEOViral Videos | Marketing Strategies | Marketing | Content Marketing | SEO
Viral Videos | Marketing Strategies | Marketing | Content Marketing | SEO
 
How to use MongoDB with CakePHP
How to use MongoDB with CakePHPHow to use MongoDB with CakePHP
How to use MongoDB with CakePHP
 
La mejor Presentación de Bitcoin y las criptomonedas.
La mejor Presentación de Bitcoin y las criptomonedas.La mejor Presentación de Bitcoin y las criptomonedas.
La mejor Presentación de Bitcoin y las criptomonedas.
 
Ef code first
Ef code firstEf code first
Ef code first
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
SEO On-page 2.0: da Intenção à Conversão
SEO On-page 2.0: da Intenção à ConversãoSEO On-page 2.0: da Intenção à Conversão
SEO On-page 2.0: da Intenção à Conversão
 
KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19
KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19
KPIs Con los que cambiaras tu forma de hacer SEO - Congreso Web 19
 
Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...
Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...
Brighton SEO 2021 | The Mother of all Updates - What Google's MUM update will...
 
Oracle's Listagg Function - Uses and Duplicate Removal
Oracle's Listagg Function - Uses and Duplicate RemovalOracle's Listagg Function - Uses and Duplicate Removal
Oracle's Listagg Function - Uses and Duplicate Removal
 
No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...
No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...
No More "It Depends" - Learn to Set your Visual SEO Resources #LondonSEOMeetu...
 
►TOP 13 • Blockchain Use Cases
►TOP 13 • Blockchain Use Cases ►TOP 13 • Blockchain Use Cases
►TOP 13 • Blockchain Use Cases
 
Laravel
LaravelLaravel
Laravel
 
Zoho CRM Overview: Let Your Business Benefit
Zoho CRM Overview: Let Your Business BenefitZoho CRM Overview: Let Your Business Benefit
Zoho CRM Overview: Let Your Business Benefit
 
SEO On-page 4.0: da intenção à conversão
SEO On-page 4.0:  da intenção à conversãoSEO On-page 4.0:  da intenção à conversão
SEO On-page 4.0: da intenção à conversão
 

Similar to Create a Bot with Delphi and Telegram - ITDevCon 2016

Bot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent EllerbachBot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent Ellerbach
ITCamp
 
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp
 
Lessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platformLessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platform
Jordi Cabot
 
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
Sébastien Levert
 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
Geff Thomas
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptxGlobal Azure2021 Verona.pptx
Global Azure2021 Verona.pptx
Luis Beltran
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
Abhishek Sur
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
Jordi Cabot
 
Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017
Jalpesh Vadgama
 
Chatbot Revolution: Exploring Opportunities, Use Cases, & Bot Design
Chatbot Revolution: Exploring Opportunities, Use Cases, & Bot DesignChatbot Revolution: Exploring Opportunities, Use Cases, & Bot Design
Chatbot Revolution: Exploring Opportunities, Use Cases, & Bot Design
Stefan Kojouharov
 
Etherium Intro for techies
Etherium Intro for techiesEtherium Intro for techies
PyMultitor
PyMultitorPyMultitor
PyMultitor
Tomer Zait
 
Dialogflow
DialogflowDialogflow
Dialogflow
Ahmed rebai
 
Everything you need to know about chatbots
Everything you need to know about chatbotsEverything you need to know about chatbots
Everything you need to know about chatbots
Konstant Infosolutions Pvt. Ltd.
 
Ai chatbot ppt.pptx
Ai chatbot ppt.pptxAi chatbot ppt.pptx
Ai chatbot ppt.pptx
aashnareddy1
 
OroCRM CTO Yoav Kutner Presents at Meet Magento
OroCRM CTO Yoav Kutner Presents at Meet MagentoOroCRM CTO Yoav Kutner Presents at Meet Magento
OroCRM CTO Yoav Kutner Presents at Meet Magento
Jary Carter
 
JanusCon 2024: Mom there are robots in my meeting
JanusCon 2024: Mom there are robots in my meetingJanusCon 2024: Mom there are robots in my meeting
JanusCon 2024: Mom there are robots in my meeting
Saúl Ibarra Corretgé
 
Build an Intelligent Bot
Build an Intelligent BotBuild an Intelligent Bot
Build an Intelligent Bot
Sorin Peste
 
rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...
rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...
rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...
Dariia Seimova
 
Conversational UI Bot Framework
Conversational UI Bot FrameworkConversational UI Bot Framework
Conversational UI Bot Framework
vivek p s
 

Similar to Create a Bot with Delphi and Telegram - ITDevCon 2016 (20)

Bot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent EllerbachBot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent Ellerbach
 
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
 
Lessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platformLessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platform
 
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptxGlobal Azure2021 Verona.pptx
Global Azure2021 Verona.pptx
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
 
Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017
 
Chatbot Revolution: Exploring Opportunities, Use Cases, & Bot Design
Chatbot Revolution: Exploring Opportunities, Use Cases, & Bot DesignChatbot Revolution: Exploring Opportunities, Use Cases, & Bot Design
Chatbot Revolution: Exploring Opportunities, Use Cases, & Bot Design
 
Etherium Intro for techies
Etherium Intro for techiesEtherium Intro for techies
Etherium Intro for techies
 
PyMultitor
PyMultitorPyMultitor
PyMultitor
 
Dialogflow
DialogflowDialogflow
Dialogflow
 
Everything you need to know about chatbots
Everything you need to know about chatbotsEverything you need to know about chatbots
Everything you need to know about chatbots
 
Ai chatbot ppt.pptx
Ai chatbot ppt.pptxAi chatbot ppt.pptx
Ai chatbot ppt.pptx
 
OroCRM CTO Yoav Kutner Presents at Meet Magento
OroCRM CTO Yoav Kutner Presents at Meet MagentoOroCRM CTO Yoav Kutner Presents at Meet Magento
OroCRM CTO Yoav Kutner Presents at Meet Magento
 
JanusCon 2024: Mom there are robots in my meeting
JanusCon 2024: Mom there are robots in my meetingJanusCon 2024: Mom there are robots in my meeting
JanusCon 2024: Mom there are robots in my meeting
 
Build an Intelligent Bot
Build an Intelligent BotBuild an Intelligent Bot
Build an Intelligent Bot
 
rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...
rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...
rohit sharma - dev ops virtual assistant - automate devops stuffs using nlp a...
 
Conversational UI Bot Framework
Conversational UI Bot FrameworkConversational UI Bot Framework
Conversational UI Bot Framework
 

More from 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 Testing
Marco 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 Delphi
Marco Breveglieri
 
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Marco Breveglieri
 
Creare un Information Radiator con Delphi
Creare un Information Radiator con DelphiCreare un Information Radiator con Delphi
Creare un Information Radiator con Delphi
Marco 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 Delphi
Marco Breveglieri
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarle
Marco 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 Delphi
Marco 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 2016
Marco 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, Piacenza
Marco Breveglieri
 
Reportage Delphi Day 2012
Reportage Delphi Day 2012Reportage Delphi Day 2012
Reportage Delphi Day 2012
Marco 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
 

More from 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
 
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Confer...
 
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
 
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"
 

Recently uploaded

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 

Recently uploaded (20)

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 

Create a Bot with Delphi and Telegram - ITDevCon 2016

  • 1. Create Your Bot with Delphi Crea il tuo Bot con Delphi
  • 3. About me Marco Breveglieri Software and Web Developer www.compilaquindiva.com Via De Gasperi 14 42019 Scandiano (RE) ITALY
  • 4. You might find interesting… Delphi Succinctly Learn the fundamentals of Delphi to build a variety of solutions for many devices and platforms in about 100 pages. Find more here: 👉 http://bit.ly/delphi-succinctly
  • 5. You might find interesting… Delphi Podcast The first Italian podcast about Delphi. Listen here: 👉 http://www.delphipodcast.com and also take part in it!
  • 6. You might find interesting… Component Tales Find out what Delphi components do when you close the IDE... Smile (if you can) here: 👉 https://twitter.com/ComponentTales
  • 8. What is a Bot? A «(Ro)bot» is a software application that runs automated tasks over the Internet. Typically, bots perform tasks that are both simple and structurally repetitive, at a much higher rate than would be possible for a human alone.
  • 9. Bot Purposes • Communicate with other users (that's our case 👍) • Instant Messaging and IRC • Social Bots • Telegram Bots • Commercial Purposes • Auctions and Bets (eBay, Betfair, …) • Application and Content Stores (Apple Store, Google Play, YouTube …) • Malicious Purposes • Spam bots • DDos attacker • Gaming • MMORPG
  • 10. What you can do • Get customized notification and news • Integrate your messaging experience with external services • Create your own custom service • Create games (NEW! in Telegram Bots) • Smart newspapers • Weather forecast • Local news or events • Track shipping • Translate content on-the-fly • Import photos, videos and content • Build a knowledge base • Get cool! 😎
  • 12. Why Chat Bots? • Bots are a lot easier to install than mobile apps • Bots are easily distributed • Quality mobile apps are expensive to build, mantain and deploy • You don't have to deal with security aspects • Moving complexity to the cloud reduces a user's cognitive load
  • 13. Natural Language Processing NLP is the ability of a computer program to understand human speech as it is written or spoken. • It makes computer to perform useful tasks with the natural languages humans use • It is based on machine learning • Supports both speech and text But we will not deal with NLP in this speech.
  • 14. Platforms and Frameworks Just to name a few… • Microsoft Bot Framework • Telegram API/SDK • Facebook Messenger Bots • Google Allo (?)
  • 16. What is Telegram? Telegram is a cloud-based instant messaging (IM) service. Users can send and exchange • Simple messages • Photos and videos • Stickers • Virtually any type of file • Supports (custom) encrypted (E2E) messaging • Cloud Based Architecture • Native app for every platform, including Web • Client-side code is open-source • Server-side code is proprietary and closed-source
  • 17. Available Clients Telegram supports a wide range of devices and operating systems. • Web • Windows • Android • iOS • Windows Phone • OSX • Linux • Ubuntu Touch
  • 18. Telegram Facts • 100 million Monthly Active Users • 350 K of signups per day • 15 billion daily message sent • Has proven to be quite robust • Has a good Bot platform!
  • 19. Telegram Bot Platform • Release in June 2015: recent but powerful! • Updated just some day ago (added Game support) • Open to everyone without barriers • No approval process required • Allows 1-1 conversations • Can be added to groups and channels • Can be invoked "on the fly" (inline bots)
  • 20. Difference with humans • No online status and no last seen timestamps • Can't initiate conversation with users • Username always ends in "bot" • When added to a group, bots do not receive all messages by default • Bots never eat, sleep or complain (unless expressly programmed otherwise)
  • 21. Let's see some sample Comune di Reggio Emilia BOT (@ComuneREbot) https://telegram.me/ComuneREbot Nice Bots: • TrackBot (https://botfactory.info/trackbot/) • Giphy Bot (https://telegram.me/gif) • TerremotiBot (https://botfactory.info/terremotibot/) • CinemasBot (https://telegram.me/cinemasbot) Want more? http://botsfortelegram.com/
  • 22. Create a Bot Let's create a Bot with Telegram
  • 23. How do bots work? • Send messages and commands to bots by opening a chat with them or by adding them to groups. • Send requests directly from the input field by typing the bot's @username and a query (inline bots) • Messages, commands and requests sent by users are passed to the software running on Telegram servers. • Telegram servers handles all encryption and communication with the Telegram API for you. • You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API: the Bot API.
  • 24. Create a new Bot BotFather is the one bot to rule them all. It will help you create new bots and change settings for existing ones. «One Bot to rule them all, One Bot to find them One Bot to bring them all and in the darkness bind them» -- The Lord of the Bots, J.R.R.Tolkien
  • 25. Bot API • The Bot API is an HTTP-based api • It supports GET and POST requests Making Requests • All queries must be served over HTTPS and in this form: https://api.telegram.org/bot<token>/METHOD_NAME • All queries must be made using UTF-8 • All methods are case-insensitive • The response is a JSON object which: • always has an 'ok' boolean field. • has a 'result' field if the response is ok. • may have an optional 'description' field which contains some info about the occurred error • also has a 'error_code' in the case of errors. Let's test it!
  • 26. How to get updates? Call the method name: getUpdates() You can use • Continuous Polling • Long Polling technique (easy, but slightly inefficient and resource consumer) • Webhooks (better, but more complex)