Keystone Interface
martinfowler.com
martinfowler.com
Say you are adding new features those might be exposed in a API prior to have the UI components that facilitate the user interaction directly this isn’t enough to prevent the user from accessing them if there are no additional controls on the backend.
Even worse I would bet good money that for web applications many teams would add UI components and use the “hidden” attribute as a keystone and even if they don’t add any direct UI elements they quite likely to add the JavaScript functions that facilitate those before exposing their trigger in the UI.
Let’s say a user notices that submit order POST requests now have another field “rush_order=false” what happens when it’s set to true?
Sure you can say well the businesses logic would handle this but then you need to make your business logic “aware” of this type of a development which means the keystone isn’t the UI anymore.
This type of development can expose you to various business, legal and security risks if there aren’t excellent controls behind it.
If it's a requirement that such features absolutely cannot be invoke by end users in advance of release, it seems like you could always use access control or feature toggles in front of the new backend API. It's important to be aware of such a requirement, but I don't think the fact that some use cases have this requirement gets in the way of "Keystone Interface" as a concept.
Consider, however, cases where the company has long term relationships with customers; say, industries where real customer support is in place. In these cases, an infrastructure for “feature toggles” is extremely helpful, because you can turn on the feature for specific customers (or developers for testing!), or certain segments of customers (e.g. early access customers). In such an infrastructure, there is no “security through obscurity”; you’re authorizing transactions on the backend (based on whether specific users are allowed to use the feature), and merely enabling the UI on the front end based on user whitelists.
Incidentally, once this is in place it’s just another half step to implement phased releases, or A/B testing. Makes rolling back easy too.
This is very specific to your example, but I guess my point is it is almost always possible to design your in-progress state in a way such that new features are obscured.
It's not about delivering changes that are not fully ready to be in production. It's about breaking down a larger change, and delivering it in chunks, as and when each one is fully ready.
Seems that the answer in such cases is that enabling the option on the UI is not the keystone, but rather the usage of said fields in other APIs or functionality within the backend. But this complicates matters depending on the backend itself as well as the required usage of said required field(s).
So while I can see some value here, I dont think required inputs are as simple or easy to chalk up.
This can also be used to hack productivity - making a task seem larger than it actually is, and allowing more time to solve related technical debt by slowing down the rate of visible stakeholder deliverables, but giving just enough carrot to keep their attention. If you introduce the UI quickly but continuously ask for more time to solve the related back-end issues, the stakeholders quickly become frustrated.
The idea of the feature flag could be expanded too, so that if "off" it generated some dummy data while when "on" had the data come from the now-visible UI field.
>That said, there are cases when the UI can't be packaged into a simple keystone. When that's the case then it's time to use Feature Toggles.
I remain a bigger fan of the feature flags approach. Even if it's a really nasty redesign and you have to copy/paste an entire view so that you can hack on it in the background and have just a coarse-grained switch to switch between the existing version of the view and the WIP, that's fine, I'd rather have a temporary code freeze on the old version of the view (so you don't accidentally stomp bugfixes or tweaks when switching to the new) than have a project that's big enough it can't be fit into a single sprint get stuck with an outsize risk of nasty surprises late in its development lifecycle.