Displaying items by tag: database engineering

Tuesday, 01 October 2019 08:45

Anatomy of an Executable Architecture

Anatomy of an Executable Architecture

 

A few months ago, we released the Parallel Agile Add-in for Enterprise Architect.  This add-in gives Enterprise Architect users a unique opportunity to save substantial amounts of time in building the database infrastructure for your project, because you can now generate it automatically from a domain model (class diagram).   What gets generated includes database access functions, an API to access the database, API documentation of, and some client side code that shows you how to call the API - what we're calling an Executable Architecture.  Our first target platform is MongoDB and Node.JS (aka MEAN Stack), but we're currently working on additional platforms including MySQL and Firebase, so stay tuned.  

Meanwhile, let's say you’re starting a new MEAN Stack project and you’re going to need a MongoDB database, Node API to access it, API documentation and some client-side code, so you can start prototyping. How fast can your engineering team get it done? How about an hour?

With Parallel Agile CodeBot you can spend an hour or so with the project stakeholder, BA and a bunch of other people, creating a domain model. Then simply right-click in the model and click Generate Project. Seconds later, you have a complete, working API, client library, Swagger API docs, and it’s already hosted as a live prototype API for your team to try out.

Here’s an example of what CodeBot will create based on your domain model, for a Node/Mongo architecture:

infrastructure

Let’s say you’re creating a single database collection called PaymentMethods. Typically you would need to create at least all of the following, just to be in a position to start prototyping the UI and so forth.

First, you would need to build the basic set of database access functions for each database collection (or table) that you’re going to need.  These are the CRUD (Create, Read, Update, Delete functions).  In a NoSQL database like Mongo these are implemented with GET / PUT / POST methods:

 CreateOne Mongo

Next, you would need to define a REST API to allow your client-side code to call the database access functions.   In a MEAN Stack application these are bundled together in an Express JS file as shown above.  Note that each of your database access functions has several layers of exception handling that need to be built.

After creating the API, you’ll need to create API documentation so that your client-side developers know how to call it:

CreateOne API Docs

Once your API is in place and documented, you’ll want to write some client side code that encapsulates the database access methods.  You might write a JavaScript client that handles callbacks:

CreateOne JS Client

Or you might write a Java client:

CreateOne Java Client

 

It’ll make sense for your Java client to have an entity class (often referred to as a Plain Old Java Object or POJO) available for each domain object:

pojo

All of this code is infrastructure for your project, and tends to be of a somewhat boring and repetitive nature - you always need to write the database access functions, they need to be written for each collection, and the code is all very similar to the code you wrote yesterday.  Writing it by hand is slow, tedious, and error-prone.

Yet in thousands of development organizations around the globe, developers are writing the database access layer of their applications manually.  We asked ourselves if there was a better way and decided the answer was yes.  And then we built it.  If you’d like to try it, download the free Parallel Agile Add-In for Enterprise Architect.

Published in Tutorials
Wednesday, 03 February 2016 21:47

Introduction to the Database Builder

enterprise architect for database administrator roles banner

Enterprise Architect’s Database Builder provides interactive connectivity to a DBMS,  supporting both the initial creation of a database and the ongoing update of tables, views, triggers and procedures – all from within the design model.

 

This tutorial paper works through a simple database example (attached in .ZIP file) using the Database Builder to create tables within a new Database, then make modifications in both the model and the Database and use the compare functionality to update the Database and the model respectively.

Published in White Papers

Enterprise Architect includes a powerful new database engineering toolset. The new Database Builder greatly enhances Enterprise Architect's existing data modeling capabilities – making it easier than ever to model, generate and synchronize database designs.

In this webinar you will learn how to:

  • Model a database from scratch using predefined patterns
  • Connect to live databases, run queries and compare differences
  • Synchronize your live database schema based on model changes

For more information:

http://sparxsystems.com.au/resources/webinar/database-engineering/database-builder-intro/database-engineering-in-enterprise-architect.html

To view the entire webinar series:

http://www.sparxsystems.com/resources/webinar/webinar-series.html

Click the link below to register:

Register for Webinar
Published in News