DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

AI Automation Essentials. Check out the latest Refcard on all things AI automation, including model training, data security, and more.

Related

  • Instant Integrations With API and Logic Automation
  • Tornado vs. FastAPI: Why We Made the Switch
  • Techniques You Should Know as a Kafka Streams Developer
  • NEXT.JS 13: Be Dynamic Without Limits

Trending

  • Implementing CI/CD Pipelines With Jenkins and Docker
  • The Rise of the Platform Engineer: How to Deal With the Increasing Complexity of Software
  • Behavior-Driven Development (BDD) Framework for Terraform
  • Navigating the Digital Frontier: A Journey Through Information Technology Progress
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. API Appliance for Extreme Agility and Simplicity

API Appliance for Extreme Agility and Simplicity

Use API Logic Server to create an API-based web app in minutes and add message-based integration, all with little knowledge of frameworks or Python.

By 
Val Huber user avatar
Val Huber
·
Mar. 20, 24 · Tutorial
Like (6)
Save
Tweet
Share
4.3K Views

Join the DZone community and get the full member experience.

Join For Free

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.

API Appliance as a toasterAutomation 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)

Running system showing a multi-page Admin app and a multi-table JSON:API with SwaggerSo 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.

Running application showing breakpoint and log that shows rule chaining

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:

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:

  1. Microservice automation: Instead of slow and complex framework coding, just plug into your database for an instant API and Admin App.
  2. Logic automation with declarative rules: Instead of tedious code that describes how logic operates, rules express what you want to accomplish.
  3. 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.

API Open source Framework Python (language)

Opinions expressed by DZone contributors are their own.

Related

  • Instant Integrations With API and Logic Automation
  • Tornado vs. FastAPI: Why We Made the Switch
  • Techniques You Should Know as a Kafka Streams Developer
  • NEXT.JS 13: Be Dynamic Without Limits

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: