SlideShare a Scribd company logo
DAVID NEGRIER Chief Technical Officer THE CODING MACHINE [email_address] http://www.thecodingmachine.com/projects/xaja
THE XAJA MACHINE in four points
Reverse & refresh
PART 2
Reverse Ajax Reverse Ajax is the ability to push data instantly   from a web server to the user's browser, without user interaction. In order to establish a 2 ways data link, the Reverse Ajax technique (also known as Comet) tricks the browser by making several requests, one of which is answered very slowly.
How XAJA works ?  In PHP, there is no standard equivalent of the Java Message System. This is why Xaja comes with its own  Message Broker . Xaja's message broker is a process that should be started when the server is started. The message broker can listen to clients on two kind of sockets: TCP sockets or IPC sockets. A message broker and  a long-lived process  are enough to implement efficient Reverse Ajax applications.  However, this is not exactly easy. For each page, the developer must develop several PHP scripts. Xaja makes this process easy by providing the  XajaController .
Leveraging the power of the long-lived processes In Xaja, the XajaController keeps the state of the whole document that is sent to the browser.  Xaja does this through an output buffer (using PHP's  obstart () function). Xaja parses the document and stores the document in the XajaController. The DOM is stored on the server side. When the developers modifies the DOM on the server side, changes are automatically pushed to the browser. Furthermore, Xaja applies some transformations to the XML. For instance, it provides a number of  new tags  and a number of  new attributes  on standard HTML tags   that makes development really easier.
PART 3
Main points These are only a subset of the features provided by Xaja. Claim Control Of Your Browser! Access Widgets $xajaController->getWidgetById()  will return an HTML node Remove Content $widget->removeChildren()  will remove children HTML nodes Use the pencil $xajaController->setPencil()  will set the pencil in position Use Scriptaculous $widget->pulsate()  … or any other Scriptaculous effect! Use the Message Broker to Push Data to Other Processes! Send a message $xajaController->sendMessageToBroker()  sends messages Listen for messages $xajaController->addListener()  will listen for messages Set the callback $xajaController->setCallBackOnMessage()  sets the callback Use event handlers attributes Use custom attributes phponclick, phpvalue  or any other Xaja special attribute contains  directly PHP code.
Performance impacts on the server side A server running Xaja must run a Broker process. Furthermore, for each client, the server runs 2 long-lived processes. Therefore, an application with 100 concurrent users will start 201 concurrent processes! Hopefully, the “ copy-on-write ” mechanism of the Operating Systems prevents the OS from reloading the whole PHP program each time a process is launched. Memory consumption Broker 11 Mo 1 user 4,2 Mo 10 user 42 Mo Tests performed on the memory consumption of the sample Address Book application show that  a user consumes on average 4,2 Mo  of RAM, for both long-lived processes. Xaja is still in early development stage and no test has been done yet to see the impact of the increase number of processes on the performances. However, we can already say that Xaja behaves correctly with 10 concurrent users.
What’s coming next? Xaja is still in early development and a lot of features need to be added. In the coming monthes, we plan to add: Compatibility with Safari and Opera Several useful tags, including menus, self-validating textboxes, auto-complete controls, trees, drag’n’drop, sliders and all the cool stuff that we got used to! Reverse Data Sources and Reverse Datagrids! Just imagine you could write something like this: <?php $reverse_ds = new ReverseSQLDataSource(“SELECT * FROM users”); ?> <datagrid datasource=“$reverse_ds” /> Xaja will reach its goal if it brings  pervasive reverse ajax : reverse ajax everywhere, with  no need to develop additional code .
Conclusion By leveraging the power of Reverse Ajax, Xaja does not only provide a  push mechanism  on the browser. It also completely  reverses the way a developer should think about its application  and the way applications are designed. It also enables the developer to be much more efficient by using custom tags and attributes. We release Xaja as an  Open Source  library with the hope that many developers will be interested and will come and help us adding features to it. So if you want to enrich Xaja with a new killer tag, if you want to help us improving it by reporting bugs or patches, or if you want to perform a complete performance test, please contact us and join the team!

More Related Content

PPT
Introduction To Asp.Net Ajax
Jeff Blankenburg
 
PPT
Ajax
Mahesh Shitole
 
PPTX
Ajax
Anaghabalakrishnan
 
PPT
Ajax & ASP.NET 2
Talal Alsubaie
 
PPTX
Ajax and ASP.NET AJAX
Julie Iskander
 
DOCX
Jquery Ajax
Anand Kumar Rajana
 
PPT
ASP.NET AJAX Basics
petrov
 
Introduction To Asp.Net Ajax
Jeff Blankenburg
 
Ajax & ASP.NET 2
Talal Alsubaie
 
Ajax and ASP.NET AJAX
Julie Iskander
 
Jquery Ajax
Anand Kumar Rajana
 
ASP.NET AJAX Basics
petrov
 

What's hot (20)

PDF
Introduction to ajax
Nir Elbaz
 
PPTX
Ajax ppt - 32 slides
Smithss25
 
PPTX
What is Ajax technology?
JavaTpoint.Com
 
PPT
Active server pages
mcatahir947
 
PPT
Ajax and PHP
John Coggeshall
 
PPT
Active Server Page(ASP)
Keshab Nath
 
PPTX
Ajax presentation
Bharat_Kumawat
 
PPT
Ajax
Sanoj Kumar
 
PPTX
Introduction to ajax
Pihu Goel
 
PDF
AJAX
Mukesh Tekwani
 
PPTX
Ajax technology
Safal Agrawal
 
PPT
PHP - Introduction to PHP AJAX
Vibrant Technologies & Computers
 
PDF
Ajax basics
Vel004
 
PDF
AJAX in ASP.NET
James Crowley
 
PPT
Introduction to ajax
Venkat Pinagadi
 
PPTX
Ajax
Tech_MX
 
PPTX
Ajax Technology
Zia_Rehman
 
PPTX
ASP.NET MVC and ajax
Brij Mishra
 
PDF
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
Introduction to ajax
Nir Elbaz
 
Ajax ppt - 32 slides
Smithss25
 
What is Ajax technology?
JavaTpoint.Com
 
Active server pages
mcatahir947
 
Ajax and PHP
John Coggeshall
 
Active Server Page(ASP)
Keshab Nath
 
Ajax presentation
Bharat_Kumawat
 
Ajax
Sanoj Kumar
 
Introduction to ajax
Pihu Goel
 
Ajax technology
Safal Agrawal
 
PHP - Introduction to PHP AJAX
Vibrant Technologies & Computers
 
Ajax basics
Vel004
 
AJAX in ASP.NET
James Crowley
 
Introduction to ajax
Venkat Pinagadi
 
Ajax
Tech_MX
 
Ajax Technology
Zia_Rehman
 
ASP.NET MVC and ajax
Brij Mishra
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
Ad

Similar to XAJA - Reverse AJAX framework (20)

PPT
Using Ajax In Domino Web Applications
dominion
 
PDF
Making Of PHP Based Web Application
Sachin Walvekar
 
PPTX
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
Bhavesh Surani
 
PPTX
New microsoft office power point presentation
teach4uin
 
PPTX
Advanced JavaScript
Mahmoud Tolba
 
PPTX
Java Script - A New Look
rumsan
 
PDF
Intro to mobile web application development
zonathen
 
PPT
Programming Server side with Sevlet
backdoor
 
PPT
SynapseIndia asp.net2.0 ajax Development
Synapseindiappsdevelopment
 
DOCX
Resume_Sandip_Mohod_Java_9_plus_years_exp
Sandip Mohod
 
DOCX
Javascript tutorial
Abhishek Kesharwani
 
PPTX
Java script Basic
Jaya Kumari
 
PDF
Brent Wilkins Resume
Brent Wilkins
 
PPT
Web II - 01 - Introduction to server-side development
Randy Connolly
 
PPTX
My Saminar On Php
Arjun Kumawat
 
PDF
sveltekit-en.pdf
ssuser65180a
 
PDF
Javascript - Ebook (A Quick Guide)
sourav newatia
 
PDF
web designing course bangalore
Infocampus Logics Pvt.Ltd.
 
PDF
Progressive Web Apps
Software Infrastructure
 
PPT
Ruby On Rails Siddhesh
Siddhesh Bhobe
 
Using Ajax In Domino Web Applications
dominion
 
Making Of PHP Based Web Application
Sachin Walvekar
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
Bhavesh Surani
 
New microsoft office power point presentation
teach4uin
 
Advanced JavaScript
Mahmoud Tolba
 
Java Script - A New Look
rumsan
 
Intro to mobile web application development
zonathen
 
Programming Server side with Sevlet
backdoor
 
SynapseIndia asp.net2.0 ajax Development
Synapseindiappsdevelopment
 
Resume_Sandip_Mohod_Java_9_plus_years_exp
Sandip Mohod
 
Javascript tutorial
Abhishek Kesharwani
 
Java script Basic
Jaya Kumari
 
Brent Wilkins Resume
Brent Wilkins
 
Web II - 01 - Introduction to server-side development
Randy Connolly
 
My Saminar On Php
Arjun Kumawat
 
sveltekit-en.pdf
ssuser65180a
 
Javascript - Ebook (A Quick Guide)
sourav newatia
 
web designing course bangalore
Infocampus Logics Pvt.Ltd.
 
Progressive Web Apps
Software Infrastructure
 
Ruby On Rails Siddhesh
Siddhesh Bhobe
 
Ad

More from Sri Prasanna (20)

PDF
Qr codes para tech radar
Sri Prasanna
 
PDF
Qr codes para tech radar 2
Sri Prasanna
 
DOC
Test
Sri Prasanna
 
DOC
Test
Sri Prasanna
 
PDF
assds
Sri Prasanna
 
PDF
assds
Sri Prasanna
 
PDF
asdsa
Sri Prasanna
 
PDF
dsd
Sri Prasanna
 
PDF
About stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PDF
About Stacks
Sri Prasanna
 
PPT
Network and distributed systems
Sri Prasanna
 
PPT
Introduction & Parellelization on large scale clusters
Sri Prasanna
 
PPT
Mapreduce: Theory and implementation
Sri Prasanna
 
PPT
Other distributed systems
Sri Prasanna
 
Qr codes para tech radar
Sri Prasanna
 
Qr codes para tech radar 2
Sri Prasanna
 
Test
Sri Prasanna
 
Test
Sri Prasanna
 
assds
Sri Prasanna
 
assds
Sri Prasanna
 
asdsa
Sri Prasanna
 
About stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
About Stacks
Sri Prasanna
 
Network and distributed systems
Sri Prasanna
 
Introduction & Parellelization on large scale clusters
Sri Prasanna
 
Mapreduce: Theory and implementation
Sri Prasanna
 
Other distributed systems
Sri Prasanna
 

Recently uploaded (20)

PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Software Development Methodologies in 2025
KodekX
 
The Future of Artificial Intelligence (AI)
Mukul
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 

XAJA - Reverse AJAX framework

  • 1. DAVID NEGRIER Chief Technical Officer THE CODING MACHINE [email_address] http://www.thecodingmachine.com/projects/xaja
  • 2. THE XAJA MACHINE in four points
  • 5. Reverse Ajax Reverse Ajax is the ability to push data instantly from a web server to the user's browser, without user interaction. In order to establish a 2 ways data link, the Reverse Ajax technique (also known as Comet) tricks the browser by making several requests, one of which is answered very slowly.
  • 6. How XAJA works ? In PHP, there is no standard equivalent of the Java Message System. This is why Xaja comes with its own Message Broker . Xaja's message broker is a process that should be started when the server is started. The message broker can listen to clients on two kind of sockets: TCP sockets or IPC sockets. A message broker and a long-lived process are enough to implement efficient Reverse Ajax applications. However, this is not exactly easy. For each page, the developer must develop several PHP scripts. Xaja makes this process easy by providing the XajaController .
  • 7. Leveraging the power of the long-lived processes In Xaja, the XajaController keeps the state of the whole document that is sent to the browser. Xaja does this through an output buffer (using PHP's obstart () function). Xaja parses the document and stores the document in the XajaController. The DOM is stored on the server side. When the developers modifies the DOM on the server side, changes are automatically pushed to the browser. Furthermore, Xaja applies some transformations to the XML. For instance, it provides a number of new tags and a number of new attributes on standard HTML tags that makes development really easier.
  • 9. Main points These are only a subset of the features provided by Xaja. Claim Control Of Your Browser! Access Widgets $xajaController->getWidgetById() will return an HTML node Remove Content $widget->removeChildren() will remove children HTML nodes Use the pencil $xajaController->setPencil() will set the pencil in position Use Scriptaculous $widget->pulsate() … or any other Scriptaculous effect! Use the Message Broker to Push Data to Other Processes! Send a message $xajaController->sendMessageToBroker() sends messages Listen for messages $xajaController->addListener() will listen for messages Set the callback $xajaController->setCallBackOnMessage() sets the callback Use event handlers attributes Use custom attributes phponclick, phpvalue or any other Xaja special attribute contains directly PHP code.
  • 10. Performance impacts on the server side A server running Xaja must run a Broker process. Furthermore, for each client, the server runs 2 long-lived processes. Therefore, an application with 100 concurrent users will start 201 concurrent processes! Hopefully, the “ copy-on-write ” mechanism of the Operating Systems prevents the OS from reloading the whole PHP program each time a process is launched. Memory consumption Broker 11 Mo 1 user 4,2 Mo 10 user 42 Mo Tests performed on the memory consumption of the sample Address Book application show that a user consumes on average 4,2 Mo of RAM, for both long-lived processes. Xaja is still in early development stage and no test has been done yet to see the impact of the increase number of processes on the performances. However, we can already say that Xaja behaves correctly with 10 concurrent users.
  • 11. What’s coming next? Xaja is still in early development and a lot of features need to be added. In the coming monthes, we plan to add: Compatibility with Safari and Opera Several useful tags, including menus, self-validating textboxes, auto-complete controls, trees, drag’n’drop, sliders and all the cool stuff that we got used to! Reverse Data Sources and Reverse Datagrids! Just imagine you could write something like this: <?php $reverse_ds = new ReverseSQLDataSource(“SELECT * FROM users”); ?> <datagrid datasource=“$reverse_ds” /> Xaja will reach its goal if it brings pervasive reverse ajax : reverse ajax everywhere, with no need to develop additional code .
  • 12. Conclusion By leveraging the power of Reverse Ajax, Xaja does not only provide a push mechanism on the browser. It also completely reverses the way a developer should think about its application and the way applications are designed. It also enables the developer to be much more efficient by using custom tags and attributes. We release Xaja as an Open Source library with the hope that many developers will be interested and will come and help us adding features to it. So if you want to enrich Xaja with a new killer tag, if you want to help us improving it by reporting bugs or patches, or if you want to perform a complete performance test, please contact us and join the team!