SlideShare uma empresa Scribd logo
1 de 12
Developing Rich Internet
Applications with Perl and JavaScript
           San Diego.pm talk
             Apr 19 2012
Web application evolution
• Once upon a time, there was a static
  page
• Then came CGI scripts
• Then came client side scripting
• Then came AJAX and asynchronous calls
• What next?
Introducing RIA
•   One possible answer: RIAs
•   Stands for: Rich Internet Applications
•   Many ways to develop, many frameworks
•   I have been exploring Ext JS framework
    for JavaScript
How does it work?
• No (or minimal) HTML/JavaScript
  generation on server side
• All client interaction is done in JavaScript
• All middleware/database stuff is done on
  the server side (platform agnostic)
• Communication is done AJAX style, using
  Ext.Direct RPC protocol
Ext JS Advantages
• Cross browser compatibility (even IE6)
• Really good code and issue separation
• Very low overhead on server side
• Very low traffic (only data goes on wire)
• Clean MVC architecture – easier to
  develop
• But wait, where’s Perl?
Perl shines through
•   Perl can be used to develop server side
•   Does things it does best
•   Works anywhere
•   Really easy to plug in existing code
•   Uses RPC::ExtDirect as the glue
Introducing RPC::ExtDirect
• Abstract module that implements
  Ext.Direct protocol
• Has gateways for CGI, Plack (maybe
  mod_perl in future)
• Compatible down to 5.6.0
• Only one non-core dependency:
  JSON.pm (can be pure Perl)
Using RPC::ExtDirect
1. Declare Action (Class, Namespace):
package Foo::Bar;

use RPC::ExtDirect Action => 'Fubar';

sub foo : ExtDirect(2) {
  my ($class, $arg1, $arg2) = @_;

    # do something, store results in scalar
    my $result = ...;

    return $result;
}
Using RPC::ExtDirect, cont.
2. CGI example part 1, API publisher (api.cgi):

use CGI::ExtDirect;

use My::ExtDirect::Published::Module::Foo;
use My::ExtDirect::Published::Module::Bar;

my $direct = CGI::ExtDirect−>new();

print $direct−>api();   # Prints full HTTP response
Using RPC::ExtDirect, cont.
1. CGI example part 2: request router
use CGI::ExtDirect;

use RPC::ExtDirect::API api_path    => '/extdirect_api',
                        router_path => '/extdirect_router’;

use My::ExtDirect::Published::Module::Foo;
use My::ExtDirect::Published::Module::Bar;

my $direct = CGI::ExtDirect−>new({ debug => 1 });
print $direct−>route(); # Prints full HTTP response
Possible applications
• New stuff from scratch, easy and fast
• Retrofit old applications with shiny Web
  interface
• Convert terminal apps to Web apps (screen
  scraping?)
• Easily hack together Web admin apps using
  proven command line tools
• Gluing together heterogeneous applications
  (Web interface for ancient COBOL app?)
• More and more…
Conclusion
• CMS Webdash live demo (if any)
• Questions? Drop me an email:
Alex Tokarev <tokarev@cpan.org>

Mais conteúdo relacionado

Mais procurados

Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHPAurimas Niekis
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devopsRob Kinyon
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreBaris Ceviz
 
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Arrow Consulting & Design
 
Python to go
Python to goPython to go
Python to goWeng Wei
 
Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0joescars
 
meet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakemeet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakeMax Małecki
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend ToolchainBruno Abrantes
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code baseRobert Munteanu
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskipGerard Klijs
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend toolingpksjce
 
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1Rodolfo Finochietti
 
Riak at Posterous
Riak at PosterousRiak at Posterous
Riak at Posterouscapotej
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruitBruce Werdschinski
 
Dev objective2015 lets git together
Dev objective2015 lets git togetherDev objective2015 lets git together
Dev objective2015 lets git togetherColdFusionConference
 

Mais procurados (20)

Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
 
About Clack
About ClackAbout Clack
About Clack
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devops
 
Crystal
CrystalCrystal
Crystal
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET Core
 
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
 
Python to go
Python to goPython to go
Python to go
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0
 
meet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakemeet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrake
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
PHP and node.js Together
PHP and node.js TogetherPHP and node.js Together
PHP and node.js Together
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskip
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
 
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
 
Riak at Posterous
Riak at PosterousRiak at Posterous
Riak at Posterous
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruit
 
Node.js
Node.jsNode.js
Node.js
 
Dev objective2015 lets git together
Dev objective2015 lets git togetherDev objective2015 lets git together
Dev objective2015 lets git together
 

Semelhante a Developing Rich Internet Applications with Perl and JavaScript

apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the EnterpriseJames Williams
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaRichard Gee
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.jsmattpardee
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 
The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)Geekstone
 
BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013Andy Bunce
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCTim Burks
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM ichukShirley
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and TomorrowJon Galloway
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesVagif Abilov
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Gabriel Villa
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScriptOleg Podsechin
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceIntel® Software
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCorky Brown
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 

Semelhante a Developing Rich Internet Applications with Perl and JavaScript (20)

apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the Enterprise
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)
 
BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and Tomorrow
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript Performance
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From Scratch
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
Nodejs
NodejsNodejs
Nodejs
 

Último

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Último (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Developing Rich Internet Applications with Perl and JavaScript

  • 1. Developing Rich Internet Applications with Perl and JavaScript San Diego.pm talk Apr 19 2012
  • 2. Web application evolution • Once upon a time, there was a static page • Then came CGI scripts • Then came client side scripting • Then came AJAX and asynchronous calls • What next?
  • 3. Introducing RIA • One possible answer: RIAs • Stands for: Rich Internet Applications • Many ways to develop, many frameworks • I have been exploring Ext JS framework for JavaScript
  • 4. How does it work? • No (or minimal) HTML/JavaScript generation on server side • All client interaction is done in JavaScript • All middleware/database stuff is done on the server side (platform agnostic) • Communication is done AJAX style, using Ext.Direct RPC protocol
  • 5. Ext JS Advantages • Cross browser compatibility (even IE6) • Really good code and issue separation • Very low overhead on server side • Very low traffic (only data goes on wire) • Clean MVC architecture – easier to develop • But wait, where’s Perl?
  • 6. Perl shines through • Perl can be used to develop server side • Does things it does best • Works anywhere • Really easy to plug in existing code • Uses RPC::ExtDirect as the glue
  • 7. Introducing RPC::ExtDirect • Abstract module that implements Ext.Direct protocol • Has gateways for CGI, Plack (maybe mod_perl in future) • Compatible down to 5.6.0 • Only one non-core dependency: JSON.pm (can be pure Perl)
  • 8. Using RPC::ExtDirect 1. Declare Action (Class, Namespace): package Foo::Bar; use RPC::ExtDirect Action => 'Fubar'; sub foo : ExtDirect(2) { my ($class, $arg1, $arg2) = @_; # do something, store results in scalar my $result = ...; return $result; }
  • 9. Using RPC::ExtDirect, cont. 2. CGI example part 1, API publisher (api.cgi): use CGI::ExtDirect; use My::ExtDirect::Published::Module::Foo; use My::ExtDirect::Published::Module::Bar; my $direct = CGI::ExtDirect−>new(); print $direct−>api(); # Prints full HTTP response
  • 10. Using RPC::ExtDirect, cont. 1. CGI example part 2: request router use CGI::ExtDirect; use RPC::ExtDirect::API api_path => '/extdirect_api', router_path => '/extdirect_router’; use My::ExtDirect::Published::Module::Foo; use My::ExtDirect::Published::Module::Bar; my $direct = CGI::ExtDirect−>new({ debug => 1 }); print $direct−>route(); # Prints full HTTP response
  • 11. Possible applications • New stuff from scratch, easy and fast • Retrofit old applications with shiny Web interface • Convert terminal apps to Web apps (screen scraping?) • Easily hack together Web admin apps using proven command line tools • Gluing together heterogeneous applications (Web interface for ancient COBOL app?) • More and more…
  • 12. Conclusion • CMS Webdash live demo (if any) • Questions? Drop me an email: Alex Tokarev <tokarev@cpan.org>