GithubHelp home page GithubHelp logo

rossanthony / play-travel Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.42 MB

An On-Line Travel Reservation System built with the Scala Play framework

License: Other

Scala 54.37% HTML 16.41% JavaScript 12.70% CSS 16.51%

play-travel's Introduction

Play Travel

An On-Line Travel Reservation System

Coursework submission for Birkbeck MSc module, Component Based Software Development.

Backend Stack

Build Tools

Frontend

Build and run locally

Firstly you will need to setup a local MySQL database and add the credentials in the config here: conf/application.conf.

Assuming you already have SBT installed and the project cloned, it can be started locally by running: sbt run from the project root folder. By default it will fire up on 127.0.0.1:9000.

Upon first loading the frontend page (or requesting one of the REST endpoints) the code will compile and Play will show a message regarding migrations (or evolutions as Play calls them) which need to be run, just click the red button and let Play do its magic. (for reference the migration SQL scripts can be found here: conf/evolutions/default/*)

Once the migrations have run, then you will need to add some seed data to test with (a test user, flights etc) these will need to be imported into your database manually (via something like SequelPro). The seed SQL scripts can be found in: conf/seeds/* (import all .sql files in this folder).

The seed data includes a user with the following credentials:

username: [email protected]
password: pw123

which can be tested on the login page: http://127.0.0.1:9000/auth/sign-in

Progress

Unfortunately despite having devoted around two solid weeks to this project (spread out over several months) I have been unable to meet all of the requirements. Being relatively new to Scala and completely new to Play + Slick, I found it particular challenging to get all of the required elements of the coursework completed. The parts I have managed to get working are as follows:

  • User sign-up and login (for online travellers)
  • Login for admin users (reservation managers)
  • Dashboard for reservation managers; with list view of flights, ability to delete + create flights
  • Flight searching with some of the required filters in place

Things outstanding

  • Frontend booking of flights and viewing of previous bookings. Models for bookings and tickets are in place, however I did not have time to complete the frontend part for this.
  • Admin screens for viewing bookings, showing how many seats are sold per flight etc.
  • Write unit tests

Particular challenges with Slick

It has been a difficult and somewhat frustrating experience at times dealing with Slick and its API for building SQL queries. Dealing with joins and filtering I found particularly troublesome at first and the documentation on the Slick website is a bit sketchy in parts.

I ended up getting help on Stackoverflow for a few issues:

Resolving these issues among others, caused significant setbacks in terms of the timescale.

Conclusion / outcomes

While it is disappointing to have fallen short in getting everything in the spec done on time, nevertheless I feel it has been a rewarding and beneficial experience. It has certainly sparked a keen interest in the potential of Play + Slick and I plan to continue with this build in my own time. While it may have been easier and more feasible to get all (or closer to all) of the requirements met if using JEE (e.g Spring Roo) instead, however I set myself the challenge of attempting it with Scala, Play + Slick and persisted with this goal, setbacks aside.

It was only when I had already gone too far down this road that it became increasingly evident that I was running behind schedule and would likely be unable to complete all parts of the spec. So, while in some respects I am the victim of the age-old sunk costs fallacy, I still standby my decision for the reasons already mentioned. I hope that those examining this coursework will take these points on board when considering the final mark.

play-travel's People

Contributors

rossanthony avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.