FP7-webpage Timeline
Authors
Jacob Suarez @Onamar
Tyrone Turrel @tturrell
Saurabh Verma @sv-uml
Overview
A timeline builder using a SQL Database to create and edit timelines
Screenshot
Concepts Demonstrated
- Data Abstraction is used in the use of the database.
- Modularity through the database tools as well as setting local variables.
External Technology and Libraries
Libraries used for the main webpage:
racket/include`
racket/format
racket-include
racket/runtime-path
racket/date
web-server/formlets
web-server/templates
web-server/servlet
web-server/servlet-env
web-server/http
parser-tools/lex
xml
Libraries used for the database:
racket/list
racket/date
db
Favorite Scheme Expressions
Jacob Suarez @Onamar
This expression deletes an entry from the timeline. I like this expression because in writing it I learned a lot about databases and how to retrieve the id of posts within the database.
(define (delete-entry! a-timeline n)
(query-exec
(timeline-db a-timeline)
"DELETE FROM posts (title, body) WHERE id = n"))Saurabh Verma @sv-uml
I like this expression because it successfully converts the current version number from an external file, increments it by 0.01, then saves it back to the file. In a way, it's an almost perfect application version tracker that doesn't rely on a traditional database.
(begin
(set! CURR_VERSION (+ (string->number (file->string FILE_VERSION_NAME)) 0.01))
(write-to-file FILE_VERSION_NAME CURR_VERSION))How to Download and Run
Latest Releases
https://github.com/oplS16projects/Timeline-Thing/releases
When you run the application from main.rkt, it should open up a page that says "Welcome Back! ... Sign in to access your timelines". The default email and password in the DB are "admin@opl.com" and "admin", respectively. Upon entering that and clicking the blue "Sign In" button, the page should automatically authenticate that email/pass combination on the backend and then redirect you to another page that reads "Timelines". On the top right hand corner, there is a Sign Out link, that unsets the logged in state and signs out the user. While our efforts demonstrated one side of the database interaction (authentication and API for talking with the DB). The ty-main.rkt & tyimodel.rkt files illustrated the other side, specifically the insertion of posts (which utilize a forked version of our APIs).