Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Severe feature-creep in Dispatch "Templates" #990

Open
keeganland opened this issue Jun 24, 2021 · 0 comments
Open

Severe feature-creep in Dispatch "Templates" #990

keeganland opened this issue Jun 24, 2021 · 0 comments

Comments

@keeganland
Copy link
Contributor

This issue is somewhat "high level" and vague, but captures what I believe to be many issues with the Dispatch project.

The Dispatch Templates tab lacks a design contract, and lacks a relationship with what it was intended to be a selector tool for - namely, Django Templates. This drift has occurred over the lifespan of Dispatch like follows:

  1. Since a Django View renders a Django Template based on a string of an HTML filename and some context variables, someone realized you could set which Django Template to be used with user-entered values at a certain point in the Model/View part of program lifecycle. In order to restrict what the users can do with this idea though, a dropdown is implemented that correspond to particular filenames. This was the original core of the Template tab: select a Django template.
  2. But then editors started to request different page layouts they could select from that did not necessarily contain the exact same data. This should technically be interpreted as a request that the Model be altered. But because there were conflicting such requests, a "flexible" solution was sought. The developer added a "template_data" field to contain JSON that would contain flexible extra "field" values over and beyond what was in the table. Kind of sketchy way to do it. Different possible "fields" for template data appear for data entry depending on the dropdown mentioned in 1.
  3. Later developers realize articles can contain effectively any data they like whatsoever without any modification to the Model because there's this template_data JSON field that can contain anything. They start ignoring Models entirely; often, new data lives in this one field.
  4. Developers start releasing "news articles" whose fields contain entire JavaScript programs for single-page apps. There are now "dispatch articles" in the db which in terms of number of characters rival novels in length
  5. Because the template filename string can be modified at many points in the Django run loop, it is so modified when users sometimes want entirely different Django Templates. This means that the fact that the previous dropdown selects a Django Template filename as a string becomes more and more irrelevant to Dispatch, to the point I didn't even notice it would do this. It can now longer be assumed that if a certain "Template" is selected in Dispatch, a certain Django Template file is selected. This kills the correspondence between what Dispatch calls a Template and what Django calls a Template
  6. Dispatch Templates therefore now primarily exist to add to an article arbitrarily-structured data with arbitrary contents, including code. When an article is being written that demands some new feature, often devs add a "Template" to Dispatch, which usually, in fact, bears 0 relationship between how Django uses the word "Template".

In absence of an explicit design contract, a Dispatch feature has utterly transformed to the point that certain things now exist on the site that impose requirements on it that would probably have been not implemented as wildly out of scope if there was a design contract, Furthermore, the requirement that gave the feature its name, namely, that when you select a Template in the Dispatch sense, you receive a Template in the Django sense, is now unfulfilled. So it can be said here, a feature developed in such a way it's no longer the same feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant