Follow the submission instructions from Lab 01.
Your repository must include:
10-functional-programming
├── .eslintrc.json
├── .gitignore
├── LICENSE
├── README.md
├── node_modules
├── package-lock.json
├── package.json
├── public
│ ├── data
│ │ └── hackerIpsum.json
│ ├── admin.html
│ ├── index.html
│ ├── new.html
│ ├── scripts
│ │ ├── article.js
│ │ └── articleView.js
│ ├── styles
│ │ ├── base.css
│ │ ├── fonts
│ │ │ ├── icomoon.eot
│ │ │ ├── icomoon.svg
│ │ │ ├── icomoon.ttf
│ │ │ └── icomoon.woff
│ │ ├── icons.css
│ │ ├── layout.css
│ │ └── modules.css
│ └── vendor
│ └── styles
│ ├── default.css
│ ├── normalize.css
│ └── railscasts.css
└── server.js
As a user, I want an admin page so I can easily view the stats of my blog app.
- For both index.html and admin.html, we'll want access to the
Article.all
data... but we'll have different view functions to set up for each of those pages. Complete theArticle.fetchAll()
method so that it calls anext
parameter: a function to invoke when its work is done.
As a developer, I want to utilize IIFEs so that all of my function calls are executed on page load.
- Let's make sure each one of our scripts are properly enclosed. Wrap the contents of article.js and articleView.js in an IIFE, like we did in class. Then pass in the new "app" object as an argument to the IIFEs and be sure to remember to export the
Article
andarticleView
objects. Keep in mind that this will change how we refer to those two objects throughout the app. - Ensure both the index page and the admin page call
Article.fetchAll()
in a way that properly triggers the appropriate page setup methods.
As a developer, I want to utilize functional programming so that my code makes sense and follows modern practices.
- Use the array methods
.filter()
,.map()
,.reduce()
, and.forEach()
to transform the data into what you need it to be. Chain these methods together as needed.
As a user, I want additional stats so that I can track the progress of my app.
- What additional statistical analysis would be of interest to you with this data set? Code it up!
Your README.md must include:
# Project Name
**Author**: Your Name Goes Here
**Version**: 1.0.0 (increment the patch/fix version number up if you make more commits past your first submission)
## Overview
<!-- Provide a high level overview of what this application is and why you are building it, beyond the fact that it's an assignment for a Code Fellows 301 class. (i.e. What's your problem domain?) -->
## Getting Started
<!-- What are the steps that a user must take in order to build this app on their own machine and get it running? -->
## Architecture
<!-- Provide a detailed description of the application design. What technologies (languages, libraries, etc) you're using, and any other relevant design information. -->
## Change Log
<!-- Use this are to document the iterative changes made to your application as each feature is successfully implemented. Use time stamps. Here's an examples:
01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.
## Credits and Collaborations
<!-- Give credit (and a link) to other people or resources that helped you build this application. -->
-->