Code Monkey home page Code Monkey logo

baby-got-backend's People

Watchers

 avatar  avatar

baby-got-backend's Issues

editor

build a rudimentary editor that can change the contents of files

Routing

set this bad boy up with routing and the capacity to switch views!

Template/Wildcard Route Use Case

templates & wildcard routes

When template is defined on the pageSpec, or, when the route is expressed with a wildcard parameter (such as /object/:id), we want the following behavior:

  • support pageSpec.template -> template should take precedence over filename for the file to be edited in the editor
  • the dataObject passed to render must change accordingly

We need to accept some definitions of how to get particular data objects to mock the rendering.

Maybe a function of the urlParams called getData that returns the dataObject to be passed to the data function.

different render funcs for filename vs text string rendering

a common use case is for render funcs to take a text string, or to take the filename. we should have options for both these cases.

  • render might better be called renderFromText, and is for use cases like markdown.render(text) or render(text, dataObject).
  • renderFromFilename is for use cases like pug.renderFilename(filenameOrTemplate, dataObject).

determining the dataObject

the dataObject defaults to the postSpec. if getData is defined, dataObject is whatever is returned by getData(urlParams). if the route has wildcards & there is no getData func defined, the urlParams should also be passed to render...

  • recognize wildcard routes
  • implement getData

default or mock-up data for rendering

  • provide a way to mock data for rendering

pageSpec.mockData for the default object used to render? or maybe mockUrlParams or defaultUrlParams?

basic editing API

also going to need some way to differentiate post types from actual instances of them...

endpoints for

  • loading post (Read, GET /posts/<id>)
  • saving changes (Update, POST or PUT? or PATCH? /posts/<id>)

ListViewer filtering

allow filtering in the ListViewer on some properties on each post.

eventually we can add in categories/tag-type support here.

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.