Toggle navigation
TOC
Project Outline
Deliverables
Presentations
Examples
Sinatra Horoscope Fortune
Write a
very simple
Sinatra Horoscope app
Implements a server that gives fortunes. The idea is that the server has a way to generate a fortune on command (like a horoscope) and returns it as data for someone else to incorporate in their application. So your server accepts a URL and returns a fortune. Here are the patterns:
/fortunes/:n should return fortune #n
/fortunes/random should return a random fortune
/fortunes/ should returnn a list of all the fortunes
What does the server return? NOT HTML!
The server returns “data” in the form of JSON. JSON is a textual representation of hierarchical data designed specifically for this purpose. You have already used it in previous homeworks.
In Ruby, any Hash can be turned into JSON by doing .to_json
Where do the fortunes come from? You need to have some kind of database. That database could be on disk (i.e. using Mysql or Sqllite) or you could just represnet them in an array: ```FORTUNES = [“You will win the lottery”, “You will make an important discovery”, “You will loose your mind”]
Feel free to add features to make it more interesting!
Deliverable:
A brief screencast demonstrating that your code works. (see
Screencast
)
Welcome
2018 Syllabus
Calendar of Lectures and homeworks
Resources
Lectures
Pilot Project
Welcome!
Lean Startup
Hypotheses
Working on Teams
MVP
Guest Lecture: Michael Skok
Pilot Project Conclusion
Term Project: Startup
Welcome to Term Projects!
Build Measure Learn
Project Planning
The Pivot
The Engine of Growth
Mockups & Prototypes
Testing Techniques
Term Project: Product
Product Market Fit
Jeffrey Beir: Metrics
Business Models
Pricing Models
Andy Payne: Startup Finance
Intellectual Property
Term Project: Business
Finance for Geeks
Founding a company
Real World Survival Kit
Management and Leadership
Dulcie Madden: Startup Teams
Last day converstation
Term Project
Term Project Outline
Minimum Viable Product Info
Hypotheses
Final Presentations
Background
Learning Goals
Grading
Teachers
Lexicon
Interesting links
Credits and acknowledgements