Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 3.62 KB

File metadata and controls

43 lines (30 loc) · 3.62 KB

Job Listings

"Job Listings" is a small project to practice PHP. The goal was to parse a json file with job listing information and display it along with a filter. To this purpose, a very simple solution is offered here - the jobs are filtered by means of a search bar. The results may be filtered (with one word at a time) by: the role (Frontend, Fullstack or Backend), the level (Junior, Midweight or Senior), the languages used (HTML, CSS, JavaScript, Python or Ruby) and the tools used (React, Sass, Ruby, RoR, Vue or Django). Filtering the results with several tags simultaneously may be left for future work. To return to the full list, a home button is included.

File System

This project is organized in a way that ensures an easy maintenance; this logic can be applied to a greater scope of projects.

  • The subdirectory "views" contains all the files responsible for displaying the output. The "layowt.view.php" file contains all the html instructions that define the page. These are the generic instructions that could easily be used in another page. In the body section, the require statement is used to call the code that displays our data. This code is contained in the "index.view.php" file;
  • The subdirectory "app" contains all the auxiliary files. The file "functions.php" is where all the functions are defined; "config.php" contains all the constants of the program (in our case, just the datafile name); the "app.php" calls on the remaining two files with the require statement. The point of this file is to obtain the simplest main program file possible, where we just call a single php file with all auxiliary files, we import the data, parse the data and display it (a total of 4 commands).
  • The remaining subdirectories contain the remaining necessary objects (images and fonts, as the name indicates).
  • In the main directory, there is a total of 4 files: two css files that describe how the html elements are to be displayed (these were retrieved from tutorials and are probably unnecessarily long), the data file and the main "index.php" file. This is our main app file that follows the four steps described above.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Installing & Running the Application

1. PHP is a server-side scripting language, which means that a server executes the instructions in a script. Thus being, a program must be installed to set up your local server. Suggestions:

2. Activate the Apache Web Server by means of the GUI of the software installed in the previous step (take note of the port number);

3. Transfer all the files in this repository;

4. Move the files to the htdocs directory. This is the directory that the Apache web server looks for files to serve on your domain by default. This location can be changed to whatever value you want. All you have to do is point the Document Root to a different folder in your httpd.conf file.

5. To run the application, open your web browser and type in the search bar:

localhost:\<port number\>/Job-listings/

Note that in the previous statement it was assumed that this project folder was named "Job-listings" and was contained in the htdocs directory.