Zen & the Art of No Code App Maintenance
No code apps like Knack allow innovators to move swiftly, saving countless hours of pricey development time. However, the desire to move quickly can sometimes introduce problems that can come back to bite you later.
With Knack, it’s pretty exciting to see your app take life quickly. At the same time, it’s easy to introduce unnecessary redundancies when moving fast.
Are a few extra fields or pages in an app so bad? Well, at first it’s not a big deal, but when the time comes for you or a colleague to make updates it could lead to confusion. All those names and descriptions you added before (or perhaps didn’t) aren’t making as much sense as you remember. Or worse, those unused equations or scheduled tasks are still running jobs and affecting performance.
Whether you are just getting started building your app or cleaning up an existing one, here are a few tips to help you keep your app easy to maintain and running smoothly.
Keep It Clear
Ideally, it should be clear what the purpose is for each element in your app, whether that is a field, view, or a specific record. A clear app is built intentionally, uses descriptions, and has unique values.
Be Intentional With Names
Purposefully choose clear names for elements in your app. Try to think about how these elements fit into the big picture. Avoid the temptation to be vague or use too many abbreviations if you can. Intentional naming will help both you and your user in the Live App.
When naming a field, consider its role within your app. How will this field be used? Does the field’s name accurately represent its purpose? The same can be said for adding pages, views, tasks, or anything else that can be given a name within your app.
Use Descriptions
Be thorough about using descriptions — if not for yourself, then for your users. As with being intentional with naming, think about the purpose you want to communicate in the description. This can be as broad as using app descriptions when managing multiple apps on a single account or using descriptions on individual views within your app. And with a recent improvement within our Knack Builder beta, you can add internal descriptions to individual fields as well.
For example, add detailed descriptions to your views to clarify exactly what a view is displaying or what actions are available. Ask yourself, “what actually happens when I submit this form? Are rules triggered behind the scenes? What records should I be seeing in this table?” This will not only help you navigate future maintenance, but also improve your app’s overall usability.
Use Unique Values
Be sure to have at least one unique field on every object. This ensures you will always be able to identify and differentiate between specific records in your app. Having a unique field ensures you are always viewing or updating the correct record, and greatly reduces the chance for errors or miscommunication with your users.
For example, it’s possible to have customers with the same or similar name. Without a unique customer ID number or email address to search, these records could easily be mixed up.
If your object does not have a unique field, you can quickly add an auto increment field to any object to automatically add an ID number for every record. It’s even possible to start an auto increment from another number if you have an existing ID sequence.
Don’t Repeat Yourself
Don’t Repeat Yourself (DRY) is a common software development principle focused on avoiding redundancy. Don’t Repeat Yourself (DRY) is a common software development principle focused on avoiding redundancy. (Get it?!) While this is typically referenced by developers, No-Code apps can take a lesson here as well when managing with data and the app structure.
Repeating elements within your app can lead to confusion when editing or using your app. Even worse, if the same data lives in multiple places you run the risk of one of those places eventually becoming out of date.
Single Source of Truth
Don’t repeat data across objects. Having duplicate data can introduce unnecessary errors and require data to be updated in multiple places. If you find yourself repeating data in different objects, then these objects likely need to be connected. If they are already connected, great! You can choose to show connected data directly in views, rather than duplicating data in your objects.
For example, if your app manages invoices for customers, the invoices should reference the customer data directly on the customer object via a connection rather than having a separate field in the invoice record to manually update the customer value.
Simplify Your App Structure
Consolidate the pages in your app by linking to existing pages. For example, if you have five places within your app where your users edit customer records, this could result in five pages with edit forms, and five forms that need to be updated if you need to make changes.
Instead, try linking to a single page with an edit form from multiple places within your app. This can drastically reduce your maintenance time and the chance of error if one form is accidentally missed when updating.
Similarly, instead of having different pages and views for specific user types, you can customize what’s displayed on a single page based upon a user’s permissions using Page Rules.
Regularly Prune Your App
Often parts of your app can grow stale. Perhaps sections were left behind by previous edits, or are no longer actively used by your users. This can confuse your users and, in some cases, contribute to poor performance within your app. Regularly prune your app by reviewing for any elements that are no longer being used and removing them. (When in doubt, first make a backup copy of your app within your account).
Objects & Fields
Review your objects and fields for any that are not being used. Extra objects or fields can clutter your app, making it confusing to navigate for both you and your users.
Further, equation and formula field types are updated by jobs processed behind the scenes. So extra equations and formulas that aren’t being used may be running unnecessary jobs. These can contribute to poor app performance.
Tasks
Check your app for unused tasks that are active and may still be running behind the scenes. Not only could these tasks be incorrectly updating records, but they could be chipping away at your app’s performance by regularly running jobs behind the scenes, similar to the equation and formula fields.
Rules
Review the rules used in your app. Ask yourself, “are all these rules necessary? Are they all correct?” Just like equations, formulas, and tasks, rules can affect your app’s performance. For example, a form with many record rules will have more actions happening behind the scenes, meaning the form will take longer to submit.
Pages & Views
Lastly, review your pages and views to see if any are not being used regularly. Often it is easy to leave behind a partial page that you didn’t end up using. This can eventually cause confusion when trying to remember why it’s there, or mistaking it for another page within your app.
Additionally, performance concerns can arise if a page is overloaded with views, so trim off what isn’t needed or split your views between more than one page.
Doesn’t that feel better?
While every app is built for a unique purpose, these best practices are nearly universal. Streamlining your app with these principles can lead to a smoother experience for you, your users, and whoever may inherit your app in the future.
Originally published at https://www.knack.com.