dkulp23 / 07-functional-programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CF Lab 07: Functional Programming

The concepts of functional programming have significantly shaped Computer Science from the early days.

Apply some "FP" concepts to the MVC Blog!

We'll make an "admin" page, which will show some stats on how authors on the blog are doing. In the end, it will looks something like this.

Today there are many TODO items, but they are (mostly) smaller bites.

TODOs: MVP

  1. Let's make sure each one of our scripts are properly enclosed. Wrap the contents of article.js in an IIFE, just like articleView.js has been. Set up your IIFE so it receives a parameter to which it can attach behavior.

  2. 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 each of those pages. Help complete the fetchAll function so that it calls a next parameter: a function to invoke when it's work is done.

  3. Ensure both the index page and the admin page call fetchAll in a way that properly triggers the appropriate page setup methods.

  4. Use chained map/reduce calls to transform the data into what you need it to be.

Stretch Goals:

  • What statistical analysis would be of interest to you with this data set? Code it up!
    Words per author Articles per category Number of articles per author

About


Languages

Language:HTML 43.1%Language:JavaScript 40.2%Language:CSS 16.6%