SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Quick and Dirty GUI Applications
(and why you should make them)
Saif Ahmed (SAIFTYNET)
Saif Ahmed
Orthopaedic Surgeon
Interests include:-
(Tissue Engineering)
(Electronics)
(Robotics)
(Programming)
Introduction
%Contents=(
Context => "Brief insight into TE", # Tissue Engineering n=5
GUIDeFATE => "Quick and dirty GUI" , # One way to do it n=18
SIMPLE => "End-user = Developer",# If there is time n=2
Soapbox => "Putting world right" , # Old fart talk n=2
Conclusion => undef,
);
Context
Tissue Engineering
Organisms are made of many organs, made of
many tissues, made of many cells supported
by matrices.
Living structures are made of tissues...a
structure made of cells and a scaffold holding
them together.
Cells need oxygen, nutrients and electrolytes to
function delivered by a perfusion system
So mixing cells, matrix and a blood supply
produces living tissue….simple, eh?
Brief Overview of How Others Do It
Tissue culture is easy: Organ culture is difficult
In an organ diverse specialised cells are
distributed in geographically distinct locations in
a matrix providing mechanical support, in a
biologically well maintained and perfused
environment.
Bioprinters exist. Expensive, proprietary, do not
work.
Generated tissue needs to be kept in a sterile
climate controlled environment.
Usually the entire printing device integrates with
the build environment
The IntraCavity Bio Matrix 3D Printer.
Open Source 3D printer capable of constructing
a living tissue engineered inside a cavity within a
narrow neck. Cheap, novel, reduced
dependencies
Most parts 3D printed
To be driven using a Perl application:-
● Convert raster shape to vector voxels
● Translate polar geometry into cartesian
coordinates for Extruder positioning
● Control flow rate and composition
● Generate the G-code and upload
...via a Real-Time embedded system for
actuator control (like conventional Desktop 3d
printers)
(Help wanted)
The software interface
The positioning electronics and the
hardware=easy, doable, being refined.
Control software objectives : -
● Usable interface for non-programmers
○ Everybody want applications to “just
work”
● Abstraction and Algorithmic transformation
● Motion simulation
● Decomposition of printer mechanical
actions
● G-Code generation
● Testing with final device
Visualisation is critical for 3D development
Need to be able to simulate motion to make
sure algorithms are right
Need to visualise that motion
Need End-user to be able make fine
adjustments without reprogramming
Need to make the tools accessible
for non programmers
Need to make it programmable for
non-programmers
Need to learn A Lot Of Things...
….but I AM OLD
Diversion into Interface Development
by a naive developer
Making Perl GUI Applications
Modules exist for multiple desktop interfaces
Wx, Multiplatform,
QT4 (not installable from CPAN)
GTK
Win32 (Platform constrained)
Tk (Dated looks)
Design tools exist to make things less complicated:
e.g. wxGlade, Glade, Qt designer. Each only work
with one interface, each with a significant learning
curve.
BUT it isn’t as easy as it should be
“Wx not easily installable in some systems, and
in versions of Perl after 5.16”
“QT5 depends on Perl to build, but does not
provide Perl API”
“Tk works but looks ugly”
“Use Inline Python for a GUI in Perl”
“Info on Perl GUI development is illusive or old”
Too much effort, too much to learn
I tried...
Too many Toolkits (wx, Tk, Qt, etc)
Too many paradigms for interacting with GUI
Too many widget types
Too many options for each widget type
Even if it works on one platform, no assurance it
will work for others...dependencies can not
always be met.
Diversity of platform and interface
makes it easier to avoid the
Desktop altogether
… back to the drawing board
How I do it
...it is probably not the best way to
do things
...it is one way to do things
...it may not work for everybody
...it may be coded better
Invitation to constructively criticise
Why I did it this way
Do not have surplus time and energy
Fading memory and learning capacity
Others need to read/adapt my code
Apps to be usable by non-coders
TIMTOWDI
Graphical User Interface Design From A Text Editor
+-------------------------------------------+
|T The Plants List App |
+M------------------------------------------+
| {Refresh Data} dd/mm/yy |
| [ ] {Search} |
| {Angiosperms } 000 {Gymnosperms} 000 |
| {Pteridophytes} 000 {Bryophytes } 000 |
| No item on list |
| +T-----------------+ +I--------------+ |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| +------------------+ +---------------+ |
| {<} { Explore } {>} { Upload Photo } |
| 0000 of 0000 |
| www.theplantlist.org wikipedia.org |
+-------------------------------------------+
Perl is good at parsing textual data
GUIDeFATE-
the world simplest GUI designer
Design Specifications
● No tools = Nothing external to learn
● Backend agnostic = Users choose what
toolkit is installed or can be installed.
Platform unconstrained
● Visual development = easy for a newbie
● Embedded = visible in the program code
● Few widgets = sacrifice capability for
convenience
Downside...programmed by an amateur
Designed in a Text Editor
use GUIDeFATE;
# create textual representation
my $window=<<END;
+----------------+
|T Window Title |
+----------------+
| |
| Hello World |
| |
+----------------+
END
# Convert to a GUI and then start it
my $gui=GUIDeFATE->new($window);
$gui->MainLoop;
The window design is obvious from the code in
monospace font
Looks roughly similar in multiple backends
Supports Wx, Qt, GTK, TK, Win32, HTML
Only one object….the GUI Frame
GUIDeFATE.pm
● Imports frame object from GFwx, GFtk etc
● Parses textual representation: convert()
○ To create a list discovered widgets
○ Allocate sequential Internal IDs
○ Add these objects to the frame
○ Optionally generate developer assistance
● Return the Frame object
if ((!$target)||($target=~/^wx/i)){
$target="wx";
die "Failed to load Wx backend: $@"
unless eval {require GFwx} ;
GFwx->import;
convert($textGUI,$assist);
return GFwx->new();
}
The Frame Object is defined in GFWx, GFtk etc
Offers only a few methods: -
● Set, get and append values
● Open file selector and dialog box
● MainLoop
Invocation
my $gui=GUIDeFATE->new($window,$backend,$assist);
my $frame=$gui->getFrame|| $gui;
$gui->MainLoop;
Options
my $gui=GUIDeFATE->new($window,$backend,$assist);
$window contains the textual representation string
$backend (optional) contains one of “wx”, “gtk”, “qt”, “tk”,
(“html” or “web” experimental options exist as well)
$assist (optional) contains one of :
● “q” for quiet…(default),
● “v” for verbose...prints to console each widget
identified…
● ”a” for autogenerate… generates a perl - file containing
a list of empty subroutines, referring to functions called
for user interaction
Another example GUI string
+------------------------+
|T Calculator |
+M-----------------------+
| [ ] |
| {sqr}{pi }{ C }{AC } |
| { 1 }{ 2 }{ 3 }{ + } |
| { 4 }{ 5 }{ 6 }{ - } |
| { 7 }{ 8 }{ 9 }{ * } |
| { . }{ 0 }{ = }{ / } |
| made with GUIdeFATE |
| and happy things |
+------------------------+
Other widgets…(very few widgets currently, more may eventually follow)
Buttons {label}
Input box [default text]
Combobox ^combo^
ImageBox +I-----------+
|Image.path |
| |
| |
| |
+------------+
TextArea +T-----------+
|content |
| |
| |
| |
+------------+
Example...Logo to SVG convertor
my $window=<<END;
+------------------------------------------------------------------------------+
|T LOGO to SVG convertor |
+M-----------------------------------------------------------------------------+
|{Draw}{Logs} {Zoom in }{Zoom out}{Zoom All}{<}{^}{v}{>}{Center all}{AC}{Reset}|
|+T---------------------++I---------------------------------------------------+|
||# Simple Logo ||simplelogo.svg ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|| || ||
|+----------------------+| ||
|[ ]+----------------------------------------------------+|
+------------------------------------------------------------------------------+
Menu
-File
--New
--Open
--Save Script
--Quit
-Image36
--Draw
--Save SVG
--Save PNG
-Examples
--Star
--Spiral
--Flower
--About
END
Example...A Simple Game
my $window=<<END;
+------------------------------------------------+
|T Rock Paper Scissors Lizard Spock |
+------------------------------------------------+
| |
| Play Rock Paper +I------+ |
| Scissors Lizard |rock.bm| |
| Spock. Click |p | |
| any button to +-------+ |
| play { Rock } |
| |
| +I------+ +I------+ |
| |Spock.j| +I------+ |paper.j| |
| |pg | |sister.| |pg | |
| +-------+ |jpg | +-------+ |
| { Spock } +-------+ { Paper } |
| I am ready |
| |
| +I------+ +I------+ |
| |Lizard.| |scissor| |
| |jpg | |s.jpg | |
| +-------+ +-------+ |
| {Lizard } {Scissrs} |
| |
+------------------------------------------------+
END
Example...The Executioner
my $window=<<END;
+--------------------------------------+
|T Executioner |
+M-------------------------------------+
| ^bends ^ Options ^optns^ |
| {Calculator } |
| {Rock Paper Scissors Lizard Spock} |
| {GUI Gnuplotter } |
| { Text editor } |
| {Image Magick GUI } |
| { Executioner (this) } |
| [ ]{Execute } |
+--------------------------------------+
bends=$backends
optns=Quiet,Verbose,Assist,Debug
END
Convert to a Web Application?
my $gui=GUIDeFATE->new($window, “web”);
Convert something useful into easily usable
e.g. GUI interface for Gnuplot or
ImageMagick
Can create an interface with an editor
panel
Include help and example in the menu
Load, Edit, Save, Export etc without
needing console
Duck-tape the Internet to the Desktop
Connect to Internet Databases and harvests
data and present to the user as needed.
This searches all known plants from
ThePlantList.org creating a local cache, then
searches wikipedia for the plants and if an
image found, saves a copy
The Transformative Effect of Adding a Desktop GUI
● Transforms workflow
● Immediate visual feedback of yields
● Able to identify needs and address wishlist
quickly
● Using a instant GUI frees programming
time to enhance your utility rather than
focus on the interface
● Can make legacy console applications
interact with a modern UI
The web browser has been Perl’s principle GUI.
Not appropriate for all scenarios
Unnecessarily narrows scope
Screenshot application
End-user Programmability
Simple Integratable Modular Programming Language Experiment
● Customisable sequential task
processing from a script.
● Generate visual output, simulating
programmed motion
● Don’t know graphics programming
○ but can understand SVG
○ → SimpleLOGO
● Able to display code, outputs, and
debugging information on GUI
● Perl makes script parsing easy
Soap Box - Vanishing Languages
Goal of Perl "to make the easy things easy, and the hard things possible" (1)
“the power of a programming language
is not what it lets you do, but what it lets you do easily” (2)
Larry Wall
“When I were a lad...”
Perl is clearly good language for
● Command line tools
● Sysadmin tools
● CGI, Webapps
● Bioinformatics
● (? Desktop utilities)
Learn a system, and code it, all the tricks and
nuances, etc
Admire skills of fellow coders
Do a few snippets of code
Feel good about yourself
Which later becomes obsolete…
But Perl seemed, no IS, different...
Perl Super Powers
● CPAN Modules for every task
● Text processing and RegExp power
● Performance
● One-liners
● Do more with fewer lines of code
Paradox...
Perl utilities often serve large numbers of people
behind other more visible interfaces
Webapps, websites, server management etc
Being robust, reliable and low maintenance, the work
is invisible
Invisible Power Tends to Vanish (and no-one notices)
Make Perl Applications Visible- Use a GUI
Accessibility
Usefulness
Simplicity
Intuitiveness
Modern interface paradigms
Sensory stimulus (Multimedia yields)
Unconstrained by OS, Graphical Toolkit or
network
So … Make Desktop Perl applications
Conclusion
It is not enough for a programming language to make hard things possible,
Hard things should be made easy too…
It is not enough for a program to be usable by its developer
Usefulness is defined by the effort required of any user
to reach a desired result
Concentrating on niche server-side, headless and console bound operations limits
a language or an application. It should not be difficult to expand scope of any
application to be delivered from the Desktop as well.

Contenu connexe

Similaire à Quick and Dirty GUI Applications using GUIDeFATE

Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisC4Media
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015Dave Stokes
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015Dave Stokes
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202Mahmoud Samir Fayed
 
A miało być tak... bez wycieków
A miało być tak... bez wyciekówA miało być tak... bez wycieków
A miało być tak... bez wyciekówKonrad Kokosa
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGIMike Pittaro
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)Igalia
 
Text classification in scikit-learn
Text classification in scikit-learnText classification in scikit-learn
Text classification in scikit-learnJimmy Lai
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰KAI CHU CHUNG
 
Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)Soshi Nemoto
 
EP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
EP2016 - Moving Away From Nodejs To A Pure Python Solution For AssetsEP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
EP2016 - Moving Away From Nodejs To A Pure Python Solution For AssetsAlessandro Molina
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at JetC4Media
 
Platform agnostic information systems development
Platform agnostic information systems developmentPlatform agnostic information systems development
Platform agnostic information systems developmentMark Jayson Fuentes
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Demi Ben-Ari
 
Dave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceDave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceNagios
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesPuppet
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakNETWAYS
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programmingYanchang Zhao
 

Similaire à Quick and Dirty GUI Applications using GUIDeFATE (20)

Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202
 
Sprint 71
Sprint 71Sprint 71
Sprint 71
 
A miało być tak... bez wycieków
A miało być tak... bez wyciekówA miało być tak... bez wycieków
A miało być tak... bez wycieków
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
 
Text classification in scikit-learn
Text classification in scikit-learnText classification in scikit-learn
Text classification in scikit-learn
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
 
Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)
 
EP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
EP2016 - Moving Away From Nodejs To A Pure Python Solution For AssetsEP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
EP2016 - Moving Away From Nodejs To A Pure Python Solution For Assets
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at Jet
 
Platform agnostic information systems development
Platform agnostic information systems developmentPlatform agnostic information systems development
Platform agnostic information systems development
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"
 
HPC Examples
HPC ExamplesHPC Examples
HPC Examples
 
Dave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceDave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical Experience
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large Enterprises
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programming
 

Dernier

Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 

Dernier (20)

Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 

Quick and Dirty GUI Applications using GUIDeFATE

  • 1. Quick and Dirty GUI Applications (and why you should make them) Saif Ahmed (SAIFTYNET)
  • 2. Saif Ahmed Orthopaedic Surgeon Interests include:- (Tissue Engineering) (Electronics) (Robotics) (Programming) Introduction
  • 3. %Contents=( Context => "Brief insight into TE", # Tissue Engineering n=5 GUIDeFATE => "Quick and dirty GUI" , # One way to do it n=18 SIMPLE => "End-user = Developer",# If there is time n=2 Soapbox => "Putting world right" , # Old fart talk n=2 Conclusion => undef, );
  • 5. Tissue Engineering Organisms are made of many organs, made of many tissues, made of many cells supported by matrices. Living structures are made of tissues...a structure made of cells and a scaffold holding them together. Cells need oxygen, nutrients and electrolytes to function delivered by a perfusion system So mixing cells, matrix and a blood supply produces living tissue….simple, eh?
  • 6. Brief Overview of How Others Do It Tissue culture is easy: Organ culture is difficult In an organ diverse specialised cells are distributed in geographically distinct locations in a matrix providing mechanical support, in a biologically well maintained and perfused environment. Bioprinters exist. Expensive, proprietary, do not work. Generated tissue needs to be kept in a sterile climate controlled environment. Usually the entire printing device integrates with the build environment
  • 7. The IntraCavity Bio Matrix 3D Printer. Open Source 3D printer capable of constructing a living tissue engineered inside a cavity within a narrow neck. Cheap, novel, reduced dependencies Most parts 3D printed To be driven using a Perl application:- ● Convert raster shape to vector voxels ● Translate polar geometry into cartesian coordinates for Extruder positioning ● Control flow rate and composition ● Generate the G-code and upload ...via a Real-Time embedded system for actuator control (like conventional Desktop 3d printers) (Help wanted)
  • 8. The software interface The positioning electronics and the hardware=easy, doable, being refined. Control software objectives : - ● Usable interface for non-programmers ○ Everybody want applications to “just work” ● Abstraction and Algorithmic transformation ● Motion simulation ● Decomposition of printer mechanical actions ● G-Code generation ● Testing with final device
  • 9. Visualisation is critical for 3D development Need to be able to simulate motion to make sure algorithms are right Need to visualise that motion Need End-user to be able make fine adjustments without reprogramming Need to make the tools accessible for non programmers Need to make it programmable for non-programmers Need to learn A Lot Of Things... ….but I AM OLD
  • 10. Diversion into Interface Development by a naive developer
  • 11. Making Perl GUI Applications Modules exist for multiple desktop interfaces Wx, Multiplatform, QT4 (not installable from CPAN) GTK Win32 (Platform constrained) Tk (Dated looks) Design tools exist to make things less complicated: e.g. wxGlade, Glade, Qt designer. Each only work with one interface, each with a significant learning curve. BUT it isn’t as easy as it should be “Wx not easily installable in some systems, and in versions of Perl after 5.16” “QT5 depends on Perl to build, but does not provide Perl API” “Tk works but looks ugly” “Use Inline Python for a GUI in Perl” “Info on Perl GUI development is illusive or old”
  • 12. Too much effort, too much to learn I tried... Too many Toolkits (wx, Tk, Qt, etc) Too many paradigms for interacting with GUI Too many widget types Too many options for each widget type Even if it works on one platform, no assurance it will work for others...dependencies can not always be met. Diversity of platform and interface makes it easier to avoid the Desktop altogether … back to the drawing board
  • 13. How I do it ...it is probably not the best way to do things ...it is one way to do things ...it may not work for everybody ...it may be coded better Invitation to constructively criticise Why I did it this way Do not have surplus time and energy Fading memory and learning capacity Others need to read/adapt my code Apps to be usable by non-coders TIMTOWDI
  • 14. Graphical User Interface Design From A Text Editor +-------------------------------------------+ |T The Plants List App | +M------------------------------------------+ | {Refresh Data} dd/mm/yy | | [ ] {Search} | | {Angiosperms } 000 {Gymnosperms} 000 | | {Pteridophytes} 000 {Bryophytes } 000 | | No item on list | | +T-----------------+ +I--------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +------------------+ +---------------+ | | {<} { Explore } {>} { Upload Photo } | | 0000 of 0000 | | www.theplantlist.org wikipedia.org | +-------------------------------------------+ Perl is good at parsing textual data
  • 15. GUIDeFATE- the world simplest GUI designer Design Specifications ● No tools = Nothing external to learn ● Backend agnostic = Users choose what toolkit is installed or can be installed. Platform unconstrained ● Visual development = easy for a newbie ● Embedded = visible in the program code ● Few widgets = sacrifice capability for convenience Downside...programmed by an amateur
  • 16. Designed in a Text Editor use GUIDeFATE; # create textual representation my $window=<<END; +----------------+ |T Window Title | +----------------+ | | | Hello World | | | +----------------+ END # Convert to a GUI and then start it my $gui=GUIDeFATE->new($window); $gui->MainLoop; The window design is obvious from the code in monospace font Looks roughly similar in multiple backends Supports Wx, Qt, GTK, TK, Win32, HTML
  • 17. Only one object….the GUI Frame GUIDeFATE.pm ● Imports frame object from GFwx, GFtk etc ● Parses textual representation: convert() ○ To create a list discovered widgets ○ Allocate sequential Internal IDs ○ Add these objects to the frame ○ Optionally generate developer assistance ● Return the Frame object if ((!$target)||($target=~/^wx/i)){ $target="wx"; die "Failed to load Wx backend: $@" unless eval {require GFwx} ; GFwx->import; convert($textGUI,$assist); return GFwx->new(); } The Frame Object is defined in GFWx, GFtk etc Offers only a few methods: - ● Set, get and append values ● Open file selector and dialog box ● MainLoop Invocation my $gui=GUIDeFATE->new($window,$backend,$assist); my $frame=$gui->getFrame|| $gui; $gui->MainLoop;
  • 18. Options my $gui=GUIDeFATE->new($window,$backend,$assist); $window contains the textual representation string $backend (optional) contains one of “wx”, “gtk”, “qt”, “tk”, (“html” or “web” experimental options exist as well) $assist (optional) contains one of : ● “q” for quiet…(default), ● “v” for verbose...prints to console each widget identified… ● ”a” for autogenerate… generates a perl - file containing a list of empty subroutines, referring to functions called for user interaction
  • 19. Another example GUI string +------------------------+ |T Calculator | +M-----------------------+ | [ ] | | {sqr}{pi }{ C }{AC } | | { 1 }{ 2 }{ 3 }{ + } | | { 4 }{ 5 }{ 6 }{ - } | | { 7 }{ 8 }{ 9 }{ * } | | { . }{ 0 }{ = }{ / } | | made with GUIdeFATE | | and happy things | +------------------------+
  • 20. Other widgets…(very few widgets currently, more may eventually follow) Buttons {label} Input box [default text] Combobox ^combo^ ImageBox +I-----------+ |Image.path | | | | | | | +------------+ TextArea +T-----------+ |content | | | | | | | +------------+
  • 21. Example...Logo to SVG convertor my $window=<<END; +------------------------------------------------------------------------------+ |T LOGO to SVG convertor | +M-----------------------------------------------------------------------------+ |{Draw}{Logs} {Zoom in }{Zoom out}{Zoom All}{<}{^}{v}{>}{Center all}{AC}{Reset}| |+T---------------------++I---------------------------------------------------+| ||# Simple Logo ||simplelogo.svg || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || |+----------------------+| || |[ ]+----------------------------------------------------+| +------------------------------------------------------------------------------+ Menu -File --New --Open --Save Script --Quit -Image36 --Draw --Save SVG --Save PNG -Examples --Star --Spiral --Flower --About END
  • 22. Example...A Simple Game my $window=<<END; +------------------------------------------------+ |T Rock Paper Scissors Lizard Spock | +------------------------------------------------+ | | | Play Rock Paper +I------+ | | Scissors Lizard |rock.bm| | | Spock. Click |p | | | any button to +-------+ | | play { Rock } | | | | +I------+ +I------+ | | |Spock.j| +I------+ |paper.j| | | |pg | |sister.| |pg | | | +-------+ |jpg | +-------+ | | { Spock } +-------+ { Paper } | | I am ready | | | | +I------+ +I------+ | | |Lizard.| |scissor| | | |jpg | |s.jpg | | | +-------+ +-------+ | | {Lizard } {Scissrs} | | | +------------------------------------------------+ END
  • 23. Example...The Executioner my $window=<<END; +--------------------------------------+ |T Executioner | +M-------------------------------------+ | ^bends ^ Options ^optns^ | | {Calculator } | | {Rock Paper Scissors Lizard Spock} | | {GUI Gnuplotter } | | { Text editor } | | {Image Magick GUI } | | { Executioner (this) } | | [ ]{Execute } | +--------------------------------------+ bends=$backends optns=Quiet,Verbose,Assist,Debug END
  • 24. Convert to a Web Application? my $gui=GUIDeFATE->new($window, “web”);
  • 25. Convert something useful into easily usable e.g. GUI interface for Gnuplot or ImageMagick Can create an interface with an editor panel Include help and example in the menu Load, Edit, Save, Export etc without needing console
  • 26. Duck-tape the Internet to the Desktop Connect to Internet Databases and harvests data and present to the user as needed. This searches all known plants from ThePlantList.org creating a local cache, then searches wikipedia for the plants and if an image found, saves a copy
  • 27. The Transformative Effect of Adding a Desktop GUI ● Transforms workflow ● Immediate visual feedback of yields ● Able to identify needs and address wishlist quickly ● Using a instant GUI frees programming time to enhance your utility rather than focus on the interface ● Can make legacy console applications interact with a modern UI The web browser has been Perl’s principle GUI. Not appropriate for all scenarios Unnecessarily narrows scope Screenshot application
  • 29. Simple Integratable Modular Programming Language Experiment ● Customisable sequential task processing from a script. ● Generate visual output, simulating programmed motion ● Don’t know graphics programming ○ but can understand SVG ○ → SimpleLOGO ● Able to display code, outputs, and debugging information on GUI ● Perl makes script parsing easy
  • 30. Soap Box - Vanishing Languages Goal of Perl "to make the easy things easy, and the hard things possible" (1) “the power of a programming language is not what it lets you do, but what it lets you do easily” (2) Larry Wall
  • 31. “When I were a lad...” Perl is clearly good language for ● Command line tools ● Sysadmin tools ● CGI, Webapps ● Bioinformatics ● (? Desktop utilities) Learn a system, and code it, all the tricks and nuances, etc Admire skills of fellow coders Do a few snippets of code Feel good about yourself Which later becomes obsolete… But Perl seemed, no IS, different...
  • 32. Perl Super Powers ● CPAN Modules for every task ● Text processing and RegExp power ● Performance ● One-liners ● Do more with fewer lines of code Paradox... Perl utilities often serve large numbers of people behind other more visible interfaces Webapps, websites, server management etc Being robust, reliable and low maintenance, the work is invisible Invisible Power Tends to Vanish (and no-one notices)
  • 33. Make Perl Applications Visible- Use a GUI Accessibility Usefulness Simplicity Intuitiveness Modern interface paradigms Sensory stimulus (Multimedia yields) Unconstrained by OS, Graphical Toolkit or network So … Make Desktop Perl applications
  • 34. Conclusion It is not enough for a programming language to make hard things possible, Hard things should be made easy too… It is not enough for a program to be usable by its developer Usefulness is defined by the effort required of any user to reach a desired result Concentrating on niche server-side, headless and console bound operations limits a language or an application. It should not be difficult to expand scope of any application to be delivered from the Desktop as well.