Tuesday, 01 October 2019 08:45

Anatomy of an Executable Architecture

Written by
Rate this item
(0 votes)

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.

Read 3318 times Last modified on Tuesday, 08 October 2019 22:00
doug rosenberg

doug rosenberg

Parallel Agile, Inc. (Founder, Chief Technology Officer) - formerly ICONIX (CEO)
After running ICONIX for 35 years and writing 7 books on UML, use cases, and agile software development, Doug discovered a new way to improve productivity by leveragng parallel development, and founded Parallel Agile (www.parallelagile.com) in 2018 after 4 years of test projects at the USC Center for Software and Systems Engineering, where he's been working with Prof. Barry Boehm.   A new book "Parallel Agile - Faster Delivery, Fewer Defects, Lower Cost" is mostly written and will be released during 2019.   We're also developing a Parallel Agile Add-In for Enterprise Architect and are available for training and consulting.  
In his previous lifetime...
 
Doug Rosenberg founded ICONIX in his living room in 1984 and began training companies in object-oriented analysis and design around 1990. ICONIX specializes in JumpStart training for UML and SysML, and offers both onsite and open-enrollment courses.
Doug developed a Unified Booch/Rumbaugh/Jacobson approach to modeling in 1993, several years before the advent of UML, and began writing books around 1995. Design Driven Testing is his 6th book on software engineering. He’s also authored numerous multimedia tutorials (including Enterprise Architect for Power Users) and several eBooks, including Embedded Systems Development with SysML.
Doug has spent the last few years doing "deep dive" consulting into cutting-edge technology including cross-platform mobile app development, REST APIs, and NoSQL databases, and gaining first-hand experience on some "hardcore agile" projects of varying sizes.  He's also been working with dozens of graduate students at the University of Southern California Center for Systems and Software Engineering (USC CSSE), managing Directed Research projects and developing/piloting the Parallel Agile process.

www.parallelagile.com
Login to post comments