Giter Club home page Giter Club logo

ib-assignment1's Introduction

Infinitely Beta Programming Assignment

Problem Statement:

  1. Create a web application with a page that always displays two sections: (a) form (b) report

  2. The form should have an URL entry text box and a submit button.

  3. User submits the form. If the URL is blank or not an HTTP scheme, the form should be redisplayed with an appropriate message.

  4. The URL provided should be fetched behind the scenes. URL fetching should be immediate unless the domain has been hit in the last 5 seconds, in which case the program should delay to ensure that no domain receives a request from this application more than twice in 5 seconds.

  5. The URL should be fetched over HTTP behind the scenes. If the result is not HTML, the form should be redisplayed with an appropriate message.

  6. The HTML should be parsed for headings (H1, H2, etc.) and a report should be created, consisting of a table listing all heading texts that contain at least 4 English vowels. The table should have two columns; in the first column is the heading level (H1 is 1, H2 is 2, etc.) and in the second column is the text of the heading with any internal HTML tags stripped or escaped. The table rows should be sorted from most vowels to fewest. The table may optionally have a heading row.

  7. The report detailed in #6 is the report mentioned in #1. The report is global so another user updating the report updates the one you see in your browser upon refresh as well.

  8. The page should have some minor styling for presentation.

Instructions:

Install Requirements:

This application runs into errors when using Ubuntu's default java-jdk.

To change to Sun's jdk:

sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java-6-sun

Install Play framework:

Instructions here: http://www.playframework.org/documentation/1.0.1/install

Install Play Scala plugin:

play install scala

Run application:

Navigate to project folder

play run

Keypoints of solution:

  • Solution is implemented using two actors.
    • UrlParseActor is used to parse urls. This actor also maintains a map with the time when the url was fetched.
    • ReportActor is used to maintain the global report.

Screenshots:

screen1 screen2 screen3

ib-assignment1's People

Watchers

Aziz M. Bookwala avatar James Cloos 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.