SlideShare une entreprise Scribd logo
1  sur  18
Client-Server applications with
     Sinatra and MacRuby
              JULIO JAVIER CICCHELLI
      Software & Web Engineer @ Rock & Code
Why I want to talk about this?

Interesting new technologies and tools.
See for yourself how the future of Ruby will be.
Documentation is not usually complete.
Example source code are vague and pointless.
It’s always nice to do a little bit of R&D yourself!
Ok, here’s the problem!

I’m an avid collector (LP records, DVDs, Games, etc.)
I can’t never remember everything that I have.
I want to store the information on a database.
I’m too lazy to fill in information for every field!
I like simple but beautiful User Interfaces.
So many choices to make!
Architecture: SOA, Client-Server, Distributed, etc.
Web Services: SOAP, REST.
Databases: MySQL, PostgreSQL, SQLite3, DB2, CouchDB, etc.
Ruby Interpreters: MRI, JRuby, MacRuby, IronRuby, Rubinius, etc.
Ruby Web Frameworks: Rails, Merb, Sinatra, Ramaze, etc.
Ruby UI Frameworks: FxRuby, QtRuby, GTK, Cocoa, HotCocoa, Shoes, etc.
Delivery formats: HTML, XML, JSON, YAML, WAP, etc.
My best solution...?!?!	
 Centralized RESTful Web Service that manages the information given to and provided by
clients anywhere.
Architecture is 100% supported by the Web infrastructure.
Sinatra implements the Web Service and interacts via REST with both the CouchDB database
and the Clients.
 MacRuby implements nice UI (if you’ve a Mac, of course!) due to the full access to the Cocoa
Framework.
What’s REST?

Representational State Transfer
Protocol that is client-server, stateless, cacheable, layered.
Use of resources through an URI (global identifier)
A minimal set of HTTP operations: GET, POST, PUT, DELETE
Example: WWW
What’s CouchDB?

Document-oriented database stored as JSON documents.
Written in Erlang.
Views: aggregate functions and filters.
Exposes a RESTful HTTP API for connections.
Benefits: extreme Scalability and easy Deployment.
What’s CouchRest?

RESTful CouchDB Ruby interface.
Ruby gem.
Wraps CouchDB’s API, JSON serialization, URI memorization.
Object-Mapper agnostic.
Easy applications/frameworks-specific object oriented API
What’s Sinatra?

DSL for creating Web Applications and Services effortlessly.
Ruby gem.
Minimal features set, it assumes that your application is written in Ruby and that have URLs.
Maximum flexibility and control over the code.
Not Another MVC web framework!
Coding my Web Service!

Erlang and CouchDB haven’t been compiled yet (CouchDBX).
Record class CouchDB mapping is simple (CouchRest).
Sinatra RESTful implementation is straight-forward.
CouchDB’s views are still not clear to me.
Let’s examine some Code!
What’s MacRuby?

Ruby 1.9 running on top of CoreFoundation framework, Objective-C common runtimes and
Garbage Collector.
 Ruby classes and instances are either Objective-C wrappers or re-implementations on top on
their Cocoa equivalents.
Full access to the Objective-C class hierarchy and frameworks.
Is not a Bridge to the Ruby 1.9 interpreter.
What’s Amazon ECS?

RESTful HTTP API provided by Amazon.
Full access to the Amazon products database.
XML is used as a delivery format.
Excellent example of a complex RESTful API.
Coding my Desktop Client!


MacRuby is still not mature enough.
I’ve never got along with the Cocoa Framework... until now!
Let’s examine some more code!
What are the next steps?
Web Service
  Generalize the Model object to support several kinds of collection items.

Desktop Client
  Update IKImageBrowserView instance into CovertFlow.

  Rewrite the User Interface in HotCocoa.

iPhone Client
So... what’s my point?

Lose the fear for empiricism.
Test the boundaries of new technologies and tools by applying them to specific real problems.
Ruby beyond Rails.
Inspire you!
You MUST check them out!
Sinatra Micro-Framework
 http://www.sinatrarb.com
MacRuby
 http://www.macruby.org
CouchDB
 http://couchdb.apache.org
Contact me if anything!

Mail
Twitter
LinkedIn
Github
Rock & Code
Now... let’s discuss!

Contenu connexe

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Client Server Applications With Sinatra And Mac Ruby

  • 1. Client-Server applications with Sinatra and MacRuby JULIO JAVIER CICCHELLI Software & Web Engineer @ Rock & Code
  • 2. Why I want to talk about this? Interesting new technologies and tools. See for yourself how the future of Ruby will be. Documentation is not usually complete. Example source code are vague and pointless. It’s always nice to do a little bit of R&D yourself!
  • 3. Ok, here’s the problem! I’m an avid collector (LP records, DVDs, Games, etc.) I can’t never remember everything that I have. I want to store the information on a database. I’m too lazy to fill in information for every field! I like simple but beautiful User Interfaces.
  • 4. So many choices to make! Architecture: SOA, Client-Server, Distributed, etc. Web Services: SOAP, REST. Databases: MySQL, PostgreSQL, SQLite3, DB2, CouchDB, etc. Ruby Interpreters: MRI, JRuby, MacRuby, IronRuby, Rubinius, etc. Ruby Web Frameworks: Rails, Merb, Sinatra, Ramaze, etc. Ruby UI Frameworks: FxRuby, QtRuby, GTK, Cocoa, HotCocoa, Shoes, etc. Delivery formats: HTML, XML, JSON, YAML, WAP, etc.
  • 5. My best solution...?!?! Centralized RESTful Web Service that manages the information given to and provided by clients anywhere. Architecture is 100% supported by the Web infrastructure. Sinatra implements the Web Service and interacts via REST with both the CouchDB database and the Clients. MacRuby implements nice UI (if you’ve a Mac, of course!) due to the full access to the Cocoa Framework.
  • 6. What’s REST? Representational State Transfer Protocol that is client-server, stateless, cacheable, layered. Use of resources through an URI (global identifier) A minimal set of HTTP operations: GET, POST, PUT, DELETE Example: WWW
  • 7. What’s CouchDB? Document-oriented database stored as JSON documents. Written in Erlang. Views: aggregate functions and filters. Exposes a RESTful HTTP API for connections. Benefits: extreme Scalability and easy Deployment.
  • 8. What’s CouchRest? RESTful CouchDB Ruby interface. Ruby gem. Wraps CouchDB’s API, JSON serialization, URI memorization. Object-Mapper agnostic. Easy applications/frameworks-specific object oriented API
  • 9. What’s Sinatra? DSL for creating Web Applications and Services effortlessly. Ruby gem. Minimal features set, it assumes that your application is written in Ruby and that have URLs. Maximum flexibility and control over the code. Not Another MVC web framework!
  • 10. Coding my Web Service! Erlang and CouchDB haven’t been compiled yet (CouchDBX). Record class CouchDB mapping is simple (CouchRest). Sinatra RESTful implementation is straight-forward. CouchDB’s views are still not clear to me. Let’s examine some Code!
  • 11. What’s MacRuby? Ruby 1.9 running on top of CoreFoundation framework, Objective-C common runtimes and Garbage Collector. Ruby classes and instances are either Objective-C wrappers or re-implementations on top on their Cocoa equivalents. Full access to the Objective-C class hierarchy and frameworks. Is not a Bridge to the Ruby 1.9 interpreter.
  • 12. What’s Amazon ECS? RESTful HTTP API provided by Amazon. Full access to the Amazon products database. XML is used as a delivery format. Excellent example of a complex RESTful API.
  • 13. Coding my Desktop Client! MacRuby is still not mature enough. I’ve never got along with the Cocoa Framework... until now! Let’s examine some more code!
  • 14. What are the next steps? Web Service Generalize the Model object to support several kinds of collection items. Desktop Client Update IKImageBrowserView instance into CovertFlow. Rewrite the User Interface in HotCocoa. iPhone Client
  • 15. So... what’s my point? Lose the fear for empiricism. Test the boundaries of new technologies and tools by applying them to specific real problems. Ruby beyond Rails. Inspire you!
  • 16. You MUST check them out! Sinatra Micro-Framework http://www.sinatrarb.com MacRuby http://www.macruby.org CouchDB http://couchdb.apache.org
  • 17. Contact me if anything! Mail Twitter LinkedIn Github Rock & Code