API Appliance for Extreme Agility and Simplicity
Just as you can plug in a toaster, and add bread...
You can plug this API Appliance into your database, and add rules and Python.
Automation can provide:
- Remarkable agility and simplicity
- With all the flexibility of a framework
Using conventional frameworks, creating a modern, API-based web app is a formidable undertaking. It might require several weeks and extensive knowledge of a framework.
In this article, we'll use API Logic Server (open source, available here) to create it in minutes, instead of weeks or months. And, we'll show how it can be done with virtually zero knowledge of frameworks, or even Python. We'll even show how to add message-based integration.
1. Plug It Into Your Database
Here's how you plug the ApiLogicServer
appliance into your database:
$ ApiLogicServer create-and-run --project-name=sample_ai --db-url=sqlite:///sample_ai.sqlite
No database? Create one with AI, as described in the article, "AI and Rules for Agile Microservices in Minutes."
It Runs: Admin App and API
Instantly, you have a running system as shown on the split-screen below:
- A multi-page Admin App (shown on the left), supported by...
- A multi-table JSON:API with Swagger (shown on the right)
So right out of the box, you can support:
- Custom client app dev
- Ad hoc application integration
- Agile collaboration, based on working software
Instead of weeks of complex and time-consuming framework coding, you have working software, now.
Containerize
API Logic Server can run as a container or a standard pip install. In either case, scripts are provided to containerize your project for deployment, e.g., to the cloud.
2. Add Rules for Logic
Instant working software is great: one command instead of weeks of work, and virtually zero knowledge required. But without logic enforcement, it's little more than a cool demo.
Behind the running application is a standard project. Open it with your IDE, and:
- Declare logic with code completion.
- Debug it with your debugger.
Instead of conventional procedural logic, the code above is declarative. Like a spreadsheet, you declare rules for multi-table derivations and constraints. The rules handle all the database access, dependencies, and ordering.
The results are quite remarkable:
- The 5 spreadsheet-like rules above perform the same logic as 200 lines of Python.
- The backend half of your system is 40X more concise.
Similar rules are provided for granting row-level access, based on user roles.
3. Add Python for Flexibility
Automation and rules provide remarkable agility with very little in-depth knowledge required. However, automation always has its limits: you need flexibility to deliver a complete result.
For flexibility, the appliance enables you to use Python and popular packages to complete the job. Below, we customize for pricing discounts and sending Kafka messages:
Extensible Declarative Automation
The screenshots above illustrate remarkable agility. This system might have taken weeks or months using conventional frameworks.
But it's more than agility. The level of abstraction here is very high, bringing a level of simplicity that empowers you to create microservices - even if you are new to Python or frameworks such as Flask and SQLAlchemy.
There are 3 key elements that deliver this speed and simplicity:
- Microservice automation: Instead of slow and complex framework coding, just plug into your database for an instant API and Admin App.
- Logic automation with declarative rules: Instead of tedious code that describes how logic operates, rules express what you want to accomplish.
- Extensibility: Finish the remaining elements with your IDE, Python, and standard packages such as Flask and SQLAlchemy.
This automation appliance can provide remarkable benefits, empowering more people, to do more.