Giter Club home page Giter Club logo

php-recruitment-test's Introduction

Snowdog PHP Recruitment test

Test scenario is cache warming application. When website uses full page caching (like Varnish Cache) there may be requirement to periodically warm cache contents. This consists of purging cache contents for given address and visiting given address. Following application allows for multiple users to define multiple websites and for those websites define multiple URLs to visit.

Application uses:

Following diagram shows basic database scheme Database Scheme

Task 1

Fork this git repository. Make sure to commit Your work after every completed task.

Hint: make sure Your solutions are private, do NOT make pull requests against this repository to submit Your solutions

Install and configure application by running following command php console.php migrate_db

You can run PHP build-in server by running following command php -S 0.0.0.0:8000 -t web/

The web application is running at http://localhost:8000.

Now create .gitignore file appropriate for Your development environment.

Task 2

As You may have noticed console command php console.php warm 3 is failing because it cannot access legacy library located in lib directory. Fix this problem.

Task 3

Modify application so that we can see and track time of last page visit. This will require database modification, changes to cache warming process and changes to pages views.

Hint: for introducing database changes see \Snowdog\DevTest\Command\MigrateCommand

Task 4

On homepage for logged in users add following information:

  • Total number of pages associated with this user
  • Least recently visited page
  • Most recently visited page

Task 5

Allow users to define multiple caching servers. Each caching server has it's own unique IP address and can cache multiple websites. You can assume that different users do not share caching servers. This will require database modification, changes to cache warming process and changes on frontend. Use partial solution available in branch task/five. Use AJAX requests for saving caching server - website association.

Task 6

Create new empty git repository.

In newly created repository create new application component that allows adding new websites and pages by importing sitemap file. This functionality should be accessible via both command line and frontend.

Task 7

As You may have noticed pages that require logged in user are visible to users, and those that make sense only for not logged in users (like login or registration forms) are visible to logged in users. Introduce modification that will fix this problem (show login form to not logged in users on pages that require user context and show 403 message on login and registration forms when user is logged in).

php-recruitment-test's People

Contributors

kamilbalwierz 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.