About

This app keeps a set of code snippets and programming resources categorized by language/library. Each snippet or resource can be associated with multiple languages and vice versa.

Features I plan to add to the backend:

Features I plan to add to the web client:


Tables

There are three main tables:

And three tables used to link these tables together:

Each of the three main tables has a corresponding API endpoint (off of the base URL webdev.neilbrommer.com/multiTable/):


API

Each of the endpoints is off of the base URL of https://webdev.neilbrommer.com/multiTable/. SSL is required.

Arguments that are underlined are optional.

lang.php

For managing the list of languages.

webdev.neilbrommer.com/multiTable/lang.php

Results will appear here
GET

Each of these returns a JSON object with langID, langName, langDescription, a list of related languages, a list of snippets, and a list of resources.

  • No arguments: returns all language entries.
  • langID (number): returns the specified language.
POST

Returns the langID of the new entry.

  • langName (string), langDescription (string), associatedLang (number): Creates a new language with the specified information. associatedLang is the langID of the language you want to link to the one being created. More languages can be linked later via PUT.
PUT

Returns no data.

  • langID (number), langName (string), langDescription (string), associatedLang (number): Modifies any provided fields for the language specified by the langID.
DELETE

Returns no data.

  • langID (number): Deletes the specified language entry, including all connections to snippets, resources, and other languages.
  • langID (number), associatedLang (number): Removes the connection between the two specified languages.

snippet.php

For managing the list of snippets.

webdev.neilbrommer.com/multiTable/snippet.php

Results will appear here
GET

Each of these returns a JSON object with snippetID, snippetName, snippetDescription, snippet, and a list of related languages.

  • No arguments: Returns a list of all snippets.
  • snippetID (number): Returns the entry for the specified language.
  • langID (number): Returns a list of snippets related to the given language.
POST

Returns the snippetID of the new snippet.

  • snippetName (string), langID (number), snippetDescription (string), snippet (string): Creates a new snippet with the given values. Only one language can be associated with a snippet at creation. More can be added later via PUT.
PUT

Returns nothing

  • snippetID (number), langID (number), snippetName (string), snippetDescription (string), snippet (string): Modifies the specified information.
DELETE

Returns nothing

  • snippetID (number): Deletes the entry for the specified snippet.
  • snippetID (number), langID (number): Removes the connection between the specified snippet and language.

resource.php

For managing the list of resources.

The API for resource.php is nearly identical to the one for snippet.php with resourceLink in place of snippet.

webdev.neilbrommer.com/multiTable/resource.php

Results will appear here
GET

Returns JSON encoded resources with a resourceID, a resourceName, a resourceDescription, a resourceLink, and a list of related languages.

  • No arguments: Returns a list of all resource entries.
  • langID (number): Returns a list of resources related to the specified language.
  • resourceID (number): Returns the specified resource entry.
POST

Returns the resourceID of the newly created resource.

  • resourceName (string), langID (number), resourceDescription (string), and resourceLink (string): Creates a resource with the given information. Only one language can be associated at creation. More can be added via PUT.
PUT

Returns nothing.

  • resourceID (number), resourceName (string), langID (number), resourceDescription (string), and resourceLink (string): Modifies the specified data for the specified resource.
DELETE

Returns nothing.

  • resourceID (number): Deletes the specified resource.
  • resourceID (number), langID (number): Removes the connection between the specified resource and language.