$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RubyConf Uruguay 2013 - New York, New York
Search
Patricio Mac Adden
March 23, 2013
Programming
2
97
RubyConf Uruguay 2013 - New York, New York
Patricio Mac Adden
March 23, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
Grafana:建立系統全知視角的捷徑
blueswen
0
230
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
280
Developing static sites with Ruby
okuramasafumi
0
330
Implementation Patterns
denyspoltorak
0
130
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
AIコーディングエージェント(Gemini)
kondai24
0
280
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
470
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
140
ゆくKotlin くるRust
exoego
1
160
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
220
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
120
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
0
2.1k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
93
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
28
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Balancing Empowerment & Direction
lara
5
820
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
760
So, you think you're a good person
axbom
PRO
0
1.8k
The untapped power of vector embeddings
frankvandijk
1
1.5k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
110
Transcript
New York, New York
Patricio Mac Adden
[email protected]
maxawen
None
Esta charla es sobre Sinatra...
... y sobre buenas prácticas
“Is a DSL for quickly creating web-applications in Ruby.” -
Documentación oficial - Sinatra
Sinatra: routes
Sinatra: views
Sinatra: views
Sinatra: static files
Sinatra: static files
Sinatra: static files
Sinatra: filters
Sinatra: helpers
Sinatra: helpers
Sinatra: configuration
Sinatra: environments
Sinatra: error handling
Sinatra: classic
Sinatra: modular
Sinatra: rides on Rack
Pero...
“It isn’t a typical Model-View-Controller framework, but ties specific URL
directly to relevant Ruby code and returns its output in response. It does enable you, however, to write clean, properly organized applications: separating views from application code, for instance.” - Documentación oficial - Sinatra
Sin estructura de directorios por defecto
Sin ORM por defecto
Sin base de datos por defecto
Sin tasks
Sin test framework por defecto
¡No decide nada por nosotros!
Sinatra es ideal para prototipos, APIs y aplicaciones pequeñas
Pero también para aplicaciones grandes, ¿por qué no?
El problema
Sinatra es flexible
Desorden
¿Como organizar los controllers?
Uso inconsistente del DSL
Rutas no RESTful
Inline templates
Inline templates y templates estándar
etc.
La solución
La solución (no existe una única solución) Mi
Buenas Prácticas
* Definir una estructura de directorios
* ¿Cómo vamos a manejar los controllers?
* ORM (¿Necesitamos ORM?)
* Elegir una base de datos
* Elegir un Test framework
¿Classic o Modular?
* Configuración por defecto
* Configurar los diferentes entornos
* Elegir un template engine
== Application Template
Pero esto todavía no es un framework
* Tasks
* Autoload
Recordar:
Sinatra es flexible
Rack
Seamos inteligentes y usemos esto en nuestro favor
¿Preguntas?
¡Gracias!