Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
100
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RubyConf Uruguay 2013 - New York, New York
Patricio Mac Adden
March 23, 2013
Other Decks in Programming
See All in Programming
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
210
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
160
AIで効率化できた業務・日常
ochtum
0
140
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
380
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
140
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
Lessons from Spec-Driven Development
simas
PRO
0
220
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
120
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
180
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
7.2k
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
740
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
400
Marketing to machines
jonoalderson
1
5.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
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!