How allbad/frontend-nanodegree-feedreader works
Project type and purpose
• This is a front-end single‐page web application (“Feed Reader”) that runs entirely in the browser.
• Its job is to fetch RSS feeds from external servers, parse them, and render entries into the page.
• It also includes a Jasmine test harness under jasmine/ for automated behavior checks.
File structure
• Top level
– index.html: entry‐point for the UI
– js/app.js: core application logic (feed definitions, AJAX fetch, DOM updates)
– jasmine/: test harness
• lib/jasmine-2.1.2/: Jasmine framework (boot.js, jasmine.js, CSS)
• spec/feedreader.js: initial test suite
• No dedicated backend – the application runs entirely in the user’s browser and depends on public RSS endpoints.
README for insights
• README confirms a browser-only RSS reader, instructs how to run by opening index.html, and outlines required test specs.
• No build or deployment pipeline – static hosting (e.g., GitHub Pages) is assumed.
Main components and their relationships
a. Static File Host
• Serves index.html, CSS, JS, Jasmine libs
b. Client Browser
• UI Layer (HTML + CSS)
• App Logic (js/app.js):
– FeedModel: definitions for feed URLs + metadata
– FeedLoader: AJAX calls to RSS endpoints
– ViewRenderer: inserts .entry elements into the DOM
– MenuController: toggles menu visibility
• Test Runner (Jasmine boot sequence + spec files)
c. External RSS Feed Servers
• Source of feed XML/JSON via HTTP requests
d. (Optional) Developer Workstation
• Hosts the code, runs tests locally
Data flows and interactions
– Browser ← HTTP GET ─ Static Host ─ delivers index.html, CSS, JS, Jasmine files
– App logic makes AJAX calls → External RSS Feed Servers → returns feed data → parsed by FeedLoader → ViewRenderer updates DOM
– Jasmine boot.js loads tests + app code → executes specs in spec/feedreader.js → reports pass/fail
Architectural patterns and design principles
• Separation of concerns:
– Presentation (HTML/CSS) vs. Application logic (app.js) vs. Tests (jasmine/spec)
• Minimal dependencies: purely client‐side, easy to serve statically
• Test‐first mindset encouraged by Jasmine integration
a. Components
• Static File Host (e.g., GitHub Pages)
• Browser:
– UI Layer (HTML, CSS)
– Application Layer (app.js modules: FeedModel, FeedLoader, ViewRenderer, MenuController)
– Test Harness (Jasmine libs + specs)
• External RSS Feed Servers
b. Relationships & Data Flow
c. Architectural notes
• MVC-like split within app.js
• That there is no backend service beyond RSS sources
d. Key technologies
• HTML5, CSS3
• Vanilla JavaScript
• AJAX / Fetch
• Jasmine 2.x testing framework