This tutorial will show you how to quickly generate a complete graphical application to create, read, update, and delete (CRUD) data from almost any database, including MySQL, PostgreSQL, and MongoDB, in just a few clicks.
Appsmith is an internal app platform that reduces the labor of generating user-friendly interfaces to your data, so that you can quickly iterate on new CRUD application ideas and build apps your organization can rely on.
What is a CRUD application?
CRUD is an acronym for the basic operations that you perform on a database to interact with the data in it:
- Create a new row of data in a table
- Read one or more rows from a table
- Update one or more rows in a table
- Delete one or more rows from a table
Every application that stores data in a database is built on these basic operations. Examples of this are:
- Social media apps: create posts, read posts, update posts (add likes or comments), and delete posts
- Project management apps: create tasks, read tasks (to see the status of a task), update tasks (with comments), and delete tasks (once completed)
- Calendar apps (such as Google Calendar): create appointments, read appointments (to see what you are doing today), update appointments (if you have to shuffle meetings around), and delete appointments (if somebody has to cancel a meeting)
Choosing the right CRUD generator to build your ideas and internal tools
No matter what kind of application you are building, it must be able to perform CRUD operations. Connecting an interface to your database and manually building all of the pages, forms, fields, and interactivity required to make your application work typically involves a lot of work. Before you start developing, you need to decide whether to start from scratch or build using existing tools.
A number of tools exist to generate CRUD interfaces, but most of them are specific to a particular database platform, are not cross platform, or require further development work to work for end users. The best tool for the job allows you to quickly spin up new apps and completely customize their functionality.
Newer app platforms satisfy both of these requirements as they allow you to massively automate certain repetitive steps in the software development process while still having all the versatility of building from scratch.
Appsmith automatically builds database CRUD interfaces for any database with just a few clicks
Appsmith is one such app platform that leverages automation to allow developers to quickly spin up applications, including database front ends. Then you can use custom SQL queries and front-end JavaScript logic to interact with back-end datasources including MySQL, PostgreSQL, and many other popular databases.
To speed up this process even more, we’ve created a new feature that automates the creation of CRUD apps in Appsmith even further. We’ve named this feature “Generate New Page” because it creates an entirely new page in your application with all the widgets you’d need to perform CRUD operations on your database.
Now, Appsmith can inspect your database and automatically generate all of the forms and inputs required to interact with it on the front end. From there, you can tweak the application using a drag-and-drop WYSIWYG interface to further customize.
How to implement a CRUD application with Appsmith in under five minutes
Assuming that you already have your database, you can create a complete application to create, read, update, and delete data with three simple steps.
Step 1: Get Appsmith
Getting started with Appsmith only takes a minute. You can sign up for the free cloud-hosted version to get up and running immediately or self-host Appsmith on your own infrastructure.
Step 2: Create a new Appsmith application
After you sign into Appsmith, create a new application and give it a name.
Step 3: Click “Generate new page” to create your database UI
From here, you can add whatever datasource you want to your Appsmith application. For this tutorial, you can use the mock users database that ships with Appsmith. Do this by clicking Show all datasources under the Datasources section, clicking Create new, and then selecting the users database.
Then click Show all datasources again, hit Generate new page for the users datasource, and fill in the information needed to generate your front end.
Et voilà! Now you have your own complete, fully functional CRUD front end for this database.
From here, you can tweak your new database CRUD UI to your heart’s content, including hiding fields, changing field types, making text areas dropdowns, and almost anything else you could imagine. That way, you’re completely in charge of how your new app looks and behaves.
Save time and effort when prototyping reliable production apps
Appsmith’s ability to generate a new page, automatically populated with form inputs and wired up to perform CRUD operations on the database you feed in, is a real time saver for developers.
This is perfect for interacting with databases at any level, whether you’re quickly spinning up a database front end to debug, building an internal tool that allows technical and non-technical team members to easily update a database without mistakes, or creating a full-fledged application that interacts with multiple databases.
If you want to quickly spin up your own CRUD applications from a database, sign up for the free cloud-hosted version of Appsmith today and give this feature a try for yourself!
Top comments (0)