Displaying items by tag: devops

Hello CodeBot – a simple, secure, rich media, low code application

 

Matt Stephens and Doug Rosenberg

Parallel Agile, Inc.

 

www.parallelagile.com

 

Everyone’s familiar with introductory “Hello World” programs as a way to help you learn a new programming language. CodeBot™ generates and deploys web applications from UML models with virtually no programming (literally speaking, the model is the code).  So what does “Hello World” look like when the code is a UML model?

Hello CodeBot is simple. There are only 3 webpages and 2 domain classes.  But it illustrates many of the things you need to know to get started generating your own web apps.

Hello CodeBot is secure. It uses JSON web tokens (JWT) to provide secure access.  Register and Login methods are automatically generated in the API and used by the generated React JS pages.

Hello CodeBot is rich media.  It plays videos, uses image components and CSS stylesheets.

Hello Codebot is designed to be a starter model for your own web apps.  You can use our pre-built Registration and Login pages, then build out your own web application by replacing our Home page.  Figure 1 shows the application’s 3 pages; you can Register, Login and Play Videos (in this case, tutorials from our YouTube Channel). 

   figure 1

Figure 1 - Hello CodeBot generates Register, Login and Home pages from wireframes

Hello CodeBot is free to download.  Each of these pages was 100% code generated from wireframes within the (free to download) UML model.  You read that right, virtually no code was written manually to generate this web application.  The single solitary piece of code initializes the video list with data and is embedded within the UML model.  You can download the UML model and the MERN Stack web app in a zipfile, including database (Mongo), API (Node), API documentation (Swagger) and React JS pages, from our online process guide at: https://parallelagile.github.io/CodeBot/codegen-process-guide/hello-codebot-project 

Project Structure

Figure 2 shows the Enterprise Architect project browser window displaying the high level package structure for the project.  There are 3 main packages – one for the Domain Model, one for the Use Cases, and one for the User Experience (UX). 

CodeBot generates a database and an API from the Domain Model, and generates the React JS web application from the UX package.  More specifically the React pages are generated from wireframes, and the navigation between pages is generated from the State Machine within the Navigation package.

figure 2 browser

Figure 2 - There are 3 top level packages, with sub-packages in the UX folder

The UX package also contains a nested package called Assets.  This package contains image assets as well as Cascading Style Sheets which CodeBot applies to the generated pages to produce nicely styled and formatted web pages. 

CodeBot doesn’t directly generate anything from the Use Case package, but it’s a good idea to include them in your model, especially if you plan on generating scenario test scripts later.

Navigation State Machine

CodeBot uses a state machine to determine the sequencing logic for how pages are displayed.  Each state on the state machine matches the name of a wireframe.  Since Hello CodeBot has three pages, our state machine has three states (see Figure 3).

figure 3 navigation

Figure 3 - It's easiest if you match your state names and wireframe names

When you start Hello CodeBot it takes you to the Login page.  If you’re a new user, click the Register button to go to the Register page.  Once you’ve registered successfully you’re automatically directed to Login.  Once you’ve logged in, you’re directed to the Home page, where you can play videos.

When you build out your own web applications, you’ll add additional wireframes and additional states and transitions on the state machine to make your application as complex as you like.

Registration

The wireframe for the Registration page is shown in Figure 4.  The diagram type is Webpage Wireframe, available from Enterprise Architect’s Wireframing toolbox.  There are 4 “client areas” on the diagram – one to contain the entire webpage, with nested client areas for entering username and password, one for the image, and one for navigating to the Login page. 

figure 4 registration wireframe

Figure 4 - Register is a "webpage wireframe" with three nested client areas

Each nested client area can be individually styled by setting UML Tagged values on the client area.  Figure 5 shows that the blue client area uses the “primary” variant.

figure 5 variant tag

Figure 5 - Use tagged values to specify React/Bootstrap styling info

The wireframes can be linked to the domain model by dragging the appropriate domain class onto the wireframe diagram and connecting it to the client area using a UML Dependency arrow.  CodeBot matches the text field names on the wireframe with attribute names on the domain class.   In the case of text fields, we can use a “placeholder” tag to specify the text that appears on the generated React page (Figure 6).

figure 6 placeholder tag

Figure 6 - CodeBot matches field names to class attributes

Adding the image to the wireframe is accomplished by first importing the image into the EA model via drag-and-drop onto the diagram, moving the imported image into the Assets folder in the EA project browser, and then dragging the image asset onto the client area (see Figure 7). Image assets get exported in the XML file that CodeBot uses for input so the images show up on the generated React pages.

figure 7

Figure 7 - Just drag the image asset onto the client area

Buttons on wireframes can have Actions assigned to them.  Figure 8 shows that we’ve assigned an API call to register (on the User class) by adding a tagged value.

figure 8 actions on buttons

Figure 8 - Buttons can make API calls by using the action tag

JWT Authentication

CodeBot generates secure, server-side login for login and register for the Identity class that’s specified, if JWT Authentication is selected.  So the register API endpoint is produced automatically and thus the “action register” tag has something to link to.  Auto-generated REST endpoints for register and login are shown in Figure 9.

figure 9 jwt authentication

Figure 9 - CodeBot automatically generates REST endpoints for register and login for the identity class

The identity class is currently specified in the CodeBot web console’s Project Details window when the Uses JWT Authentication checkbox is selected.  CodeBot generates login and register endpoints for the identity class.

figure 10 web console 2 project details

Figure 10 - CodeBot simplifies the process of developing with JWT

Automatic Deployment for Rapid Iteration Testing

Once your project setup is complete, export an XMI file from your UML model containing the packages you want to generate, and run CodeBot.  You’ll be prompted to download a zipfile containing your web application, and if you’ve checked the Hosted box, CodeBot will automatically build your React JS web app and host it in the cloud, as shown in Figure 11.

figure 11 react build successful

Figure 11 - CodeBot does DevOps.  Your application is immediately deployed for fast-iteration testing.

When your React build is ready, just click the Visit Website button and your application is live and available for immediate testing.  The generated Register page is shown in Figure 12.

figure 12 register

Figure 12 - Your fully styled, database-linked React web app is ready.

App in a Zipfile

If you decide to host your application yourself, you’ll use the contents of the downloaded zipfile.  Hello CodeBot is a complete MERN stack application that includes Mongo DB, Express JS, React JS and Node.JS, along with Swagger API documentation, and some client-side API interface code (Figure 13).

figure 13 MERN stack in a zipfile

Figure 13 - Here's the Hello CodeBot MERN Stack App in a zipfile.

Login

The Login wireframe shown in Figure 14 follows a very similar pattern to the Register wireframe.  To recap, it’s a webpage wireframe with 3 nested client areas inside the main client area.   The top client area contains the banner image asset, the middle one uses the “primary” variant and displays in blue.  This panel links to the User class from the domain model, and matches the names on the text fields to the names of the domain attributes (username and password).  The Login button has an action to call the User login API endpoint.

figure 14 login wireframe

Figure 14 - the Login wireframe is similar to the Register wireframe

CodeBot turns this wireframe into executable React JS in a big hurry.   Much faster than anyone could code it by hand – giving a whole new meaning to the term “project velocity”

figure 15 login

Figure 15 - CodeBot makes it very fast to develop MERN stack applications

Home Page

Hello CodeBot’s Home page, on the other hand, shows off some considerably more advanced capability.  The Home page lets you play tutorial videos from the Parallel Agile YouTube channel and introduces a couple of more React JS components, specifically a media player and a combo box/dropdown list.  These components can simply be dragged from EA’s toolbox onto the wireframe, as shown in Figure 16.

figure 16 homepage wireframe

Figure 16 - CodeBot's ability to bind components together and manage UI state yields surprising results

The real magic, though, comes in when you connect the components using Dependency arrows.  The combo box is dependent on the Video class and the dependency is called “name”.  This causes a query to be run on the Video collection and the names of the videos displayed in the dropdown list.  All of that without a line of code.  Next, the media player is dependent on the value selected on the dropdown list so the video plays on the generated page.  Again, no coding required.

figure 17 home page

Figure 17 - CodeBot uses Redux state management to produce sophisticated UIs

There’s only one small piece of code required to make Hello CodeBot work, and that’s to initialize the Video collection with the names and URLs of a couple of videos.  As shown in Figure 18, the code (for the moment at least) has been attached to the on register method on the User class, so the database will get initialized when a new user registers.

figure 18 code snip

Figure 18 - We need a small snip of code to pre-load the database with videos

Fortunately, EA has a built-in code editor that makes it easy to attach code snippets to the UML model.  CodeBot merges these snippets in with the auto-generated code so that it is invoked at the proper time.  This code snip creates a JSON structure called data which holds a couple of name/URL pairs, and then calls the create method on the VideoDao class, which has been generated by CodeBot.

Learn More

You can get more detail on the parallelagile.com website, and we’ve added a section on Hello CodeBot to our online process guide at

https://parallelagile.github.io/CodeBot/codegen-process-guide/hello-codebot-project

To sum up, Hello CodeBot is a simple, secure, rich media MERN stack application that’s designed to help you get started doing development with CodeBot.  We think you’ll find developing with CodeBot to be an order of magnitude faster than writing code by hand.

Please contact us at This email address is being protected from spambots. You need JavaScript enabled to view it. if we can answer any questions for you.

Published in Tutorials

Adventures in User Interface Design and Code Generation – Part 1

Doug Rosenberg

Parallel Agile

This email address is being protected from spambots. You need JavaScript enabled to view it.

This email address is being protected from spambots. You need JavaScript enabled to view it.

We’re busy these days teaching CodeBot how to generate fully functional web applications from UML models, with as little coding as possible (and ideally with no coding at all).  The basic steps involved are

  1. Develop a domain model and code generate database and API
  2. Wireframe the screens and link them to the API
  3. Develop a UX Navigation State Machine that defines the sequence in which screens appear
  4. Code Generate and automatically host the generated database, API, and web app code
  5. Test, iterate, and refine

 

We’re using a Location Based Advertising (LBA) System to test CodeBot’s performance on a real project.  LBA is a geofenced coupon delivery system and its web application allows advertisers to Register for an Account, Login, and Publish Coupons.  These coupons are then received by a mobile app that’s connected to the hosted API when a geofence is entered.

CodeBot Generates UI Code

CodeBot generates React/Bootstrap code from wireframes as shown in Figure 1.

Fig 1 Register wireframe and screenshot

Figure 1 - No coding is needed to create the Registration Page – because it’s generated from a wireframe

The screens are linked to the API using UML Tagged Values, and both Registration and Login are done securely on the server-side using JWT authentication, as CodeBot generates Login and Register methods in the API automatically. The sequencing of the generated screens is defined using a UX Navigation State Machine as shown in Figure 2.

Fig 2 LBA1 navigation

Figure 2 - First draft UX Navigation state machine is simplistic

At first glance, the initial state machine makes sense; first you Register and then you Login, right?  But when you code generate the project and start using the hosted web app, you quickly realize that whoops, once I’m signed up, I don’t want to see the Registration page anymore.  I want the web app to take me to the Login page first, and if I’m a new user, allow me to Register, then take me back to Login.

Which comes first, the chicken or the egg?

From a use case standpoint, it’s a pretty simple modeling decision…does Register <precede> Login or does Login <invoke> Register?  If you reflect on it for a few seconds, it’s pretty clear that Login needs to invoke Register (Figure 3). This is where the rapid iteration between design, generated code, and hosted application that CodeBot enables really shows its power. 

Fig 3 precedes or invokes

Figure 3 - In a real system, Login <invokes> Register, because you only Register once

Developing at the speed of thought

An ideal scenario would be to make these changes to the application at the speed of thought…just re-wire my state machine (Figure 4), make a couple of changes to the Register and Login wireframes, press the button and have CodeBot automatically re-generate the entire web application and host it in the cloud.

Fig 4 LBA2 navigation

Figure 4 – Ah, that’s better: re-wiring the state machine to start with Login

As “developing at the speed of thought” is the goal of CodeBot, that’s exactly how it works. The re-wired state machine now starts with Login and handles transitions between Login and Register Pages.

Fig 5 login 1 and login 2

Figure 5 – Modified Login wireframe allows us to Register new users

While we’re re-wiring the navigation state machine, we also update the Login wireframe to take new users to the Register page (Figure 5) and similarly update the registration page.  After a quick visit to the CodeBot web console we’ve got a re-deployed web application as shown in Figure 6.

Fig 6 CodeBot makes quick work of rebuilding the React pages

Figure 6 - Ah, that's even more better.  CodeBot makes quick work of generating and hosting the new web app.  It’s up and running in minutes!

The real power of CodeBot driven UX development is the ability to rapidly generate and deploy new versions of an application in minutes to get the feedback-driven benefits of agile development.  Short iterations are the key to developing a refined and customer-tested user interface (and associated access-controlled database).

How do we manage one developer per use case?

If you’ve been reading anything about Parallel Agile you already know that we like to enable projects to get done quickly by having developers work in parallel.  So we might have one developer working on the Login and Register wireframes and another working on the UX Navigation state machine.

Fig 7 one developer per use case

Figure 7 - Working in parallel requires good version control

What if each of our developers were working on a separate UML model?  We’d need some way to manage and merge versions of the model.

Like branches on a tree

We’ve recently discovered a companion product to CodeBot that manages branching of UML models in a way we’ve always wanted to see – with visual differencing on diagrams. That product is called LemonTree, from LieberLieber software. We’re pretty excited about the potential of using CodeBot and LemonTree together (more on that coming soon).

Fig 8 LemonTree diff navigation 2 Register

Figure 8 - LemonTree does visual differencing on state machine diagrams

Fig 9 LemonTree diff wireframe login copy

Figure 9 - Visual differencing on wireframes enables parallel development

With visual differencing and model versioning, the “one developer per use case” paradigm of Parallel Agile becomes quick and easy to manage.

The Need for Speed

Our mission at Parallel Agile is to help you to develop software radically faster while simultaneously improving its quality.   Our approach is to systematically remove obstacles from from an idealized process of “developing at the speed of thought”.

At a macro level, speed improvements are made possible by encouraging a scalable one-developer-per-use-case paradigm.  This is enabled by CodeBot’s automatic generation of database, API, and API documentation from an easy-to-understand domain model. Incorporation of things like JWT tokenized Registration and Login and Role Based Access Control into CodeBot’s API generation simplifies handling of data privacy issues.

At a more-fine grained level (within each use case) CodeBot’s generation of web applications from wireframes and state machines gets your system up and running in a big hurry, then short iterations of an automatically hosted and deployed application allow for rapid refinement of the system to make sure it meets customer needs.  Management of a highly parallel development process where “the model is the code” is facilitated by LemonTree’s visual differencing and merge capabilities.

If you need to develop software faster and all of this catches your interest, we’d love to hear from you.  User Interface code generation is currently available in pre-release for our Early Access customers (Early Access is available on request for all paid CodeBot licensees).  Watch for announcements coming soon.


Dive in deeper

 

CodeBot 201 Generating complete web apps including UI and database

Video: CodeBot - Generating complete web apps including UI and database

Here are a few links for further exploration:

Parallel Agile Blog: https://medium.com/parallel-agile-blog

Parallel Agile Book on Amazon: https://www.amazon.com/Parallel-Agile-faster-delivery-defects/dp/303030700X

Training on the Parallel Agile Process: http://parallelagile.com/training.html

Parallel Agile CodeBot Home Page: https://parallelagile.net/

LemonTree from LieberLieber: https://www.lieberlieber.com/lemontree/en/

Webinar: Model Management for Low Code Projects: https://www.lieberlieber.com/en/webinar-model-management-for-low-code-projects/

Published in Tutorials

The need for speed

With the recent passing of General Chuck Yeager as well as the beginning of 2021, I thought it might be a good time to reflect on the never ending quest for speed. General Yeager, of course, was the man who broke the sound barrier in his Bell X-1 aircraft on October 14, 1947.

It’s always worthwhile trying to do things faster and better — that’s what drives progress and innovation. In the software industry we’re talking about a less death-defying problem than the airspeed pioneers faced, but an important one nonetheless: how fast we can develop software?

 

1 Chuck Yeager X 1 color

Chuck Yeager and the Bell X-1 that broke the sound barrier, Glamorous Glennis

Our primary mission at Parallel Agile is to help companies accelerate the development of high-quality systems — so projects are both faster and cheaper, without sacrificing quality. (Yes, it really can be done!). Maybe in a few years we’ll look back at today’s software engineering techniques with similar nostalgia as we’d look at 1940s subsonic aircraft design.

What makes software slow?

Let’s start by looking at what’s holding a typical software project back from getting itself done quickly:

 

2 speed limiters

Many factors can slow down your project — here are a few chronic causes of software getting done slowly

So, what makes software slow? First of all, the common perception that it’s not possible to develop with bigger teams because of communication overhead. Second, typical agile development processes tend to favor feedback over planning, resulting in under-planned systems that spend lots of time on retrospectives and refactoring. Additional factors relate to a general state-of-the-practice of most code being written by hand — often driven by a general mistrust of generated code. Everything from fundamental database access functions to basic UI functionality is most often still coded by hand. Add in modern requirements for data privacy and database security (things that often don’t fit well into 2 week sprints) and you’ve got lots of time spent writing code the hard way — labor-intensive development. Finally, with CI/CD we’ve got deployment pipelines that get executed on a continuous basis.

How do you go supersonic with your dev process?

So, what’s the right stuff that can help you accelerate your software project? Parallel Agile as a development process, and CodeBot as its primary enabler, offer a different vision for software engineering where the speed limiters shown above are systematically removed. You can remove some of the speed limiters and go faster than before, but it’s really removing the whole set of forced-slowdown practices that yields the most dramatic results.

3 removing speed limits

If your project is being slowed down by anything on the list above, we can help.

Project development is organized by scenario In the first place, from a process perspective, with Parallel Agile you organize your project with a developer responsible for each scenario (hence the “Parallel” part of PA).

 

4 one developer per scenario

It’s simple: assign a developer to each scenario (scale as needed)

You don’t have to work in small teams (although you still can if you prefer to). Communication overhead is reduced by virtue of a shared (executable) domain model among developers. Rather than time slicing development into 2 week sprints (with time on each end for planning and retrospectives), you can allow each use case to evolve along a simplified spiral model starting with proof of concept, moving on to minimum viable product (MVP) and then through as many optimization cycles as needed.

5 spiral

Each scenario (aka use case) evolves asynchronously along it’s own spiral model

How CodeBot shatters the team-size barrier

Back when General Yeager was pioneering flight faster than the speed of sound, it was a dangerous activity because aircraft tended to shake apart due to excessive vibration at Mach 1. But advances in aerodynamics eventually overcame the sound barrier.

What’s the analogy to large team software development? Consider the case where several use case scenarios make use of the same domain object. If you assign a different developer to each scenario, each of those developers needs a common understanding of the data structure (JSON) that comprises that domain object. If you allow each scenario to evolve independently you’ve got a communication and coordination problem to deal with. Having the domain model documented on a UML diagram helps, but it isn’t enough.

We discovered the solution to this problem during the early years of our research into parallel development — to be specific, between 2014 and 2016. During that time we were experimenting with an early version of CodeBot that generated a database access API (and API documentation) from a domain model. We discovered that our developers were able to collaborate easily, even when some were working on mobile apps and others working on web apps. Our first test project involved 47 graduate students working in parallel, on a location-based advertising system (LBA).

We also found that most of the evolution of domain class schema happened during Proof of Concept, and that using a NoSQL database allowed multiple developers to evolve the schema independently. Later, we added switchable schema validation to CodeBot, allowing more free-wheeling changes during prototyping but then providing the ability to lock things down as we moved forward into MVP. We also made updated API docs immediately available online. This ability to rapidly generate a new API along with updated API documentation as changes happen in the shared domain model allows projects to be staffed elastically — your team can be “right-sized” to the problem at hand rather than constrained by pre-imposed limits. This lets you go a lot faster.

6 executable domain model 1

CodeBot turns your domain model into a working database, accessible by a REST API, in moments

Inside the use cases: Getting WIRED

We’ve found that it makes sense to organize the project along use case boundaries, with larger teams of developers each working their own use case, interfacing to a shared domain-driven database API (or event-based model, etc). But what happens inside the use cases? Do we need to do a lot of formal use case modeling? Not necessarily…

We think the fastest way to proceed within each use case is to wireframe up the screens that participate in the use case, connect the wireframes to the executable domain model, and then code generate the screens. Think of this as Wireframe-driven, Iterative, Rapid, Enterprise-ready Development (WIRED).

7 wireframe MVC

You might recognize a Model-View-Controller pattern in CodeBot’s generated UI code

We use the CodeBot full-stack application generator to do this code generation for us. In fact, CodeBot is optimized towards PA’s highly iterative process. In short, you can use CodeBot to generate working user interface code (e.g. React JS) from wireframes, where the UI navigation or user flow is driven from a UML state machine, and the screens connect to the database using the API. It all happens automatically, and it happens very quickly with CodeBot UX.

 

8 wireframe to map

CodeBot UX is the fastest way to get from an EA wireframe to a running web application

 

Being Enterprise-ready means Security is baked in

To be Enterprise-ready in 2021, you need to deal with requirements for data privacy.  This means avoiding threats from hackers, making your applications fully security-aware, and implementing best practices for secure development. From an app development standpoint, dealing with security concerns slows you down, and complicates hiring and staffing your project as not all developers are expert at security-related issues.

9 access control

CodeBot-generated APIs come with an Access Control Layer that helps prevent unauthorized access

Over the last year we’ve spent massive amounts of effort building security infrastructure into CodeBot. Capabilities like server-side registration and login automatically generated as part of the API, fully-tokenized (JWT) access, and Role Based Access Control (RBAC) are built-in to the database access API as an access control layer when the model is code generated. The resulting time and cost savings all accrue to your benefit. And if you consider the cost of getting your database hacked…it’s a pretty easy decision to make.

Rapid Iterations come with auto-deployment

To fully realize the promise of agile, feedback-driven development, you need to iterate the project’s use cases quickly to gain immediate feedback from clients. CodeBot enables this capability through automatic deployment of both the UI and the back-end database/API.

10 deployment

With CodeBot UX you go from a UML model to a running (and hosted) web app in under 5 minutes

At present, CodeBot can generate and deploy a securely hosted full-stack web application from a UML model in approximately 4 minutes. This capability makes it quick and easy for each use case to evolve through its spiral model and to quickly test in the context of a deployed system.

So, how fast do you want to go?

Are you content with the pace of small-team, short-sprint agile development, or would you like to deploy a larger team on a more complex problem and get the project done more quickly? Are you happy with the pace of writing database access code by hand, and wrapping the common database functions in a REST API, by hand? Is it quick and easy to turn a set of wireframes into fully-functional user interface code, where the screens are automatically linked to the database? Are you happy with the pace of adding Security to your applications? And finally, does it take you longer than 4-minutes to build and deploy a fully-working application? If you’d like to get your projects done faster and less expensively, but without sacrificing quality… contact us at This email address is being protected from spambots. You need JavaScript enabled to view it..

Published in White Papers

How to create a full-stack React Bootstrap UI in under 10 minutes

A tutorial and reference on designing a complete web application and generating it with CodeBot UX

by Matt Stephens, Parallel Agile

This article was originally published here: https://medium.com/parallel-agile-blog/create-a-full-stack-react-bootstrap-ui-in-under-10-minutes-d0eec3077618

CodeBot from Parallel Agile is a full-stack application generator, which can also host your generated application in the cloud. Give CodeBot a domain model and UI wireframes, and it’ll create:

  • a React web UI
  • a MongoDB database
  • a Node/Express.js REST API, optionally secured using JWT
  • API client libraries — currently Java and JavaScript, with other languages set to be released soon, including C#, Swift, TypeScript
  • JSON Schema
  • Swagger/OpenAPI docs

We have more targets, platforms, architectures and languages on the way, but that’s plenty to get started with!

To whet your appetite, here’s a quick CodeBot video that shows a project being turned into a generated UI:

tutorial1

 

Getting Started

To get started designing your new application, you’ll need:

  • a copy of Enterprise Architect (EA)  to create the domain model and wireframes
  • a CodeBot account from Parallel Agile

At the time of writing, the generated React UI isn’t in full release, but it’s available under Early Access for customers with a CodeBot license (to gain access, please email us)

There’s also a handy series of step-by-step CodeBot 101 videos that show how to get everything installed and set up — so I won’t repeat those details here:

VSRADS Example

In this article I’ll walk through the a much-simplified version of the “VSRADS” model shown in the above example video.

VSRADS stands for “Very Short Range Air Defence System” — it’s basically a mosquito zapper. It listens for the high-pitched whine of a mosquito flying by, calculates its position and trajectory, and zaps it with a low-frequency laser.

Our example project is a state machine simulator… given a series of states, a web page is generated to represent each one; and the state machine itself is turned into the navigation “user flow” between pages — i.e. the routes.

So let’s get started!

Step 1: Create a project with 3 top-level packages

Create a new, blank project in EA, and give it the following 3 packages (via “Add View” in the right-click menu):

tutorial2

 

This will become a familiar pattern… the “three amigos” for defining a new full-stack project

When the model is generated later, the elements in each of these packages will contribute to the generated application, as follows:

tutorial3

  • Each wireframe is turned into a React web page
  • The navigation state machine is turned into a set of routes
  • Each domain class (created in the Domain Model package) is turned into a MongoDB collection and REST API create/read/update/delete endpoint

Step 2: Draw the domain model

Under “Domain Model”, create a class diagram and populate it with some domain classes.

The complete VSRADS domain model looks like this:

 tutorial4

For this example you could just create a subset — just be sure to include Simulation Run, as we’ll be linking it to the UI and database.

Step 3: Design the UI Navigation

The idea is that you design individual screens as wireframes, and link them together via a “user flow” or navigation diagram; in this case we’ll draw the user flow as a state machine:

  • Each state represents a screen or page
  • Each transition (the arrows linking the states together) represents a navigation route

Navigation routes are triggered by things like clicking a link, or submitting a form — “create” or “update” actions.

To introduce the idea, here’s a “hello world” kind of example:

 tutorial5

 

Each generated page will be given its own URI (/login, /view_products etc) so can be individually bookmarked. However, the “Initial” pseudo-state is used to determine which page is displayed by default— the “navigation root” or home page.

Back to VSRADS though… this is a more complex state machine:

 tutorial6

 

Each transition arrow has been given a trigger, which is shown as a label in the diagram. To add a trigger, double-click on the transition:

 tutorial7

 

In EA, you don’t need to select the trigger type etc, you can just enter a name, to keep it simple.

The name needs to match up with the component name in the wireframe, e.g. a button called “Target Identified” — you’ll see some examples of this in the next section.

Usually, the trigger name is also prefixed with an event type, such as on click: or on create: . However, “on click” is the default, so can be omitted.

It’s also worth noting, if the button name is the same as the target page, then CodeBot will figure it out, so you then don’t even need to give the transition a name.

The following event prefixes are supported:

  • on click— e.g. “on click: Login”
  • on create — e.g. “on create: Target”
  • on update — e.g. “on update: Target”

The events all take place in the “source page”, i.e. the page that the transition arrow points from. The trigger will, as you’d expect, result in the app navigating to the “target page”.

The create and update events are triggered when a form is submitted in the “source page”.

Now that you have the overall website or application designed, it’s a good time to create a wireframe for each one.

Step 4: Design the wireframes

EA has a UI wireframe designer built-in. Because the wireframes are fully integrated into the UML model, you can link together wireframe elements, classes, states and other elements… so everything fits together in the generated project.

The VSRADS model has 8 wireframes in total. For this article we’ll focus on two of them, Set Up Simulation (the start page), and Listening for Mosquitoes.

Creating a Wireframe

Right-click on the Wireframes package and choose New Diagram:

tutorial8

In the new wireframe, you need to create a top-level frame which serves as the page-size boundary. This may seem less relevant for websites, but will become important when CodeBot also generates other platforms such as mobile apps. (New feature coming soon!!)

 tutorial9

Always add a “Client Area” to represent the page boundary, and fit all the wireframe components inside it

Next, add some components to the page!

  tutorial10a

Currently with the Early Access release, CodeBot recognises a subset of all the available components. So for now, be sure to only add from the Controls and Website Controls tool palettes.

Position and size the components to match your page design. CodeBot will translate this into a responsive website layout; e.g. it’ll detect grids of label/textfield pairs, alignment of individual labels or buttons, etc.

You can also supply hints to influence how the page is generated. In EA, this is done via tagged values — you can find these on the Tags tab in the Properties panel:

 tutorial11

In the above screenshot, the Set up Simulation title has been given a tag called css class, with the value h1 (“Heading 1”). To add more than one CSS class, separate them with spaces.

The generated website uses the popular React-Bootstrap project, meaning you can specify any “Bootstrap-standard” CSS classes here.

Another useful tag is variant. This conforms to the Bootstrap 4 colour variants:

 tutorial12

For example, the Run Simulation button is given the “primary” variant (the exact case doesn’t matter) via a tagged value, so will be rendered in the page with a solid-blue background:

 tutorial13

In this way, it’s possible to adhere to Bootstrap’s design language—the “primary” variant represents the main or default action, etc.

For future platforms even if they don’t use Bootstrap, CodeBot will adapt the same “Bootstrappy” tagged values to the target platform, so you’ll only have to draw the wireframes once in order to get a generated website, mobile app, desktop app etc.

Just to illustrate another page in the same UX design, here’s the Listening for Mosquitoes wireframe:

 tutorial14

The Image component can display any image type normally supported in web browsers (jpeg, gif, png). Just include a url tag with the complete URL where the image can be loaded from.

Step 5: Define actions on UI elements

In the previous screenshot, the Run Simulation button also has a tag called action, with the value create.

As long as the button resides in a container panel with form components (text fields etc), when the button is clicked, the form will be submitted to the generated REST API. What happens next depends on the value of the action tag:

  • create (create a new record in the database)
  • update (update the current record)

The form elements do need to be linked to a particular domain class, though; so let’s do that next.

Step 6: Link UI elements to the domain model

There are two ways to associate UI elements with a particular domain class:

  1. Use the domain tag
  2. Draw a dependency relationship from the UI element to the domain class

Which one you use is entirely up to you; the effect on the generated code is exactly the same. It’s more of a stylistic choice, as some people appreciate the visual aspect of seeing a link on the diagram, while others prefer the detail to be tucked away.

Domain tag

Click on the form component you’d like to link, and add a tag as follows:

tutorial 16a

The domain tagged value uses the form:

Class Name.attribute name

e.g. Simulation Run (the domain class), a dot, then name (the attribute name).

As a time saver, you can also just add the domain class name to the parent container panel:

 tutorial17a

The “child” form components are then auto-linked to the domain attributes, by matching each component name with an attribute name.

Once this linking-up is done, then when the generated form is submitted, it’ll automatically call the correct REST API endpoint for that domain class.

Dependency arrow

As an alternative to the domain tag, simply drag the relevant domain class from the package explorer onto the wireframe. Then draw a dependency arrow from the container panel to the class:

 tutorial17

You can also link the individual text fields to the class, if preferred.

To emphasize again, this has exactly the same effect as using the domain class; which you use is just a personal preference.

 

Step 7: Generate the application

If you have the CodeBot add-in installed in EA, right-click on the root (“Model”) package in the package browser. Then choose:

Specialize > Parallel Agile > Generate Project

If you can’t run the add-in for any reason (e.g. you’re on a Mac using a Windows VM), another way to run CodeBot is as follows:

  1. Make sure you’ve selected the root (“Model”) package, then from EA’s ribbon menu, choose:
    Publish > Export-XML -> Export XML for Current Package
  2. Login into the CodeBot Web Console at parallelagile.net, and choose Upload XMI:

 tutorial18

tutorial19

CodeBot will detect that the model contains wireframes, and automatically generate a Bootstrap-React project. You can find it in the downloaded zipfile, in the UX/React folder.

 

Step 8: Run the React app!

You can optionally elect the generated application to be hosted — just make sure the “Publish to our cloud service” checkbox in the above screenshot is ticked.

In this case, CodeBot will automatically build the React app, and then publish the full website, REST API and database to our secure cloud service.

To access the hosted website, click the blue Visit Website button (visible in the above screenshot).

The Set up Simulation page will load in a separate tab:

 tutorial20

 

When you enter some form details and click Run Simulation, the following series of events take place:

  1. Due to the action tag and the linked domain class, the React app submits the form to the REST API
  2. The REST API validates the form data against the generated JSON Schema (based on the domain class and attributes), then creates the new record in the MongoDB database
  3. Due to the on create: Run Simulation trigger on the navigation state machine, the React app will detect that a “create” just happened linked to the Run Simulation button. So (as the trigger is on a transition), the browser navigates to the next page, Listening for Mosquitoes:

 tutorial21

In closing…

CodeBot UX radically shortens the iterative feedback loop when developing new software. When domain modeling, you can now quickly create a working prototype, use the prototype to elicit new or changed requirements, feed the updates back into the model, rinse and repeat…

… often several times in the same workshop session, with the customer or domain expert right there in the room (or on the same Zoom call).

CodeBot UX is available now for Early Access customers. To request access, please email us at: This email address is being protected from spambots. You need JavaScript enabled to view it. — we’ll welcome your feedback!

Published in Tutorials

sdtimes 100In an in-depth and illuminating interview with Sparx Systems Founder and CEO Geoffrey Sparks, Alexandra Weber Morales from SD Times identified several key aspects surrounding the company's continued growth in the DevOps space.

 

Geoffrey illustrated how Enterprise Architect provides a solid platform for the delivery and support of new applications, services, and technologies, by encouraging and facilitation of increased productivity between development (Dev) and IT operations (Ops). The Sparx CEO also explained the importance of UML as the established standard for software modeling.

 

"Within those organizations that are undergoing digital transformation
to improve operational efficiencies (many of whom are Sparx Systems
customers), there is a prevalence of UML tools deployed to manage application
delivery, a process which relies implicitly on code quality assurance."

- Geoffrey Sparks, CEO & Founder, Sparx Systems

 

Read the full article in PDF - available on the Sparx Systems website here

Visit SD Times website here

Read More about Sparx Systems and DevOps here

 

 

 

 

Published in News

SDTDevOpsInterview

In this month's edition of SD Times, reporter Alexandra Weber Morales has interviewed Sparx Systems CEO, Geoffrey Sparks about the prevalence of UML in DevOps culture.

Morales, who originally profiled Sparx Systems over 10 years ago, reconnected again to ask about the Sparx Systems' approach to DevOps, digital transformation and how UML can assist in automating aspects of the delivery pipeline.

'UML is the established standard for software modeling - anyone sketching a simple use case is modeling in UML.' 

- Geoffrey Sparks

 

The article can be read in its entirety at: http://sdtimes.com/uml-makes-devops-driven-digital-transformation-possible

The interview is also published in the March edition of SD Times. 

Published in News

sdtimes 100Regular contributor to SD Times, Lisa Morgan, has published an in-depth piece titled 'Navigating the endless ALM river', she investigates alternative solutions to some of the premium offerings within the marketplace.

Lisa investigates the latest thinking within this space, gathering insight from senior subject matter experts, who describe contemporary thinking in this fast-paced sector.

Sparx Systems Enterprise Architect is included within a list of highly-valued software solutions that facilitate continuous delivery, deployment and integration processes.

We encourage you to read the full article at the SD Times website.

Published in News
Tuesday, 29 November 2016 22:47

Requirements for Digital Transformation

Requirements are fundamentally important as they are about building the right system.

Yet the failure of requirements is the primary cause of project failure.

cogs triptych 844x160

How many times do we forget passwords AND user names? This is a clear example of the risk associated with the reliability of the human memory and associated human error. Let's consider the management of the myriad detail accumulated throughout the requirements planning process and the steps of Eliciting, Documenting, Analysing and Communicating. Oh, and let's not forget Tracking, Validating and Verifying!

So spare a thought for the Business Analyst, whose whole focus is on capturing requirements, to ensure successful project outcomes. Or to put it another way, the task of translating the needs, wants and expectations, of all user stakeholders, into technical language for the developers and others, to ensure that they - the users - are are going to get the functionality, that they need, want and expect from a system. This is not a petty task and it can take months. Meanwhile, there is the probability, due to complexity, that not all of the requirements are going to be addressed because of a number of factors, not least, their having been lost or forgotten.

Requirements Coques2 175x100However if effectively managed, requirements identification and supporting traceability improves the overall project outcome, simply because time will be saved, less money will be spent, and most importantly, the customer will be happier.

The Requirements management process has seen much change in the past 20 years and two of the most obvious are the involvement of the customer in all phases of the process and that the requirements process itself is now dynamically linked into an agile culture of continuous integration and delivery. The increase in software defined business, is driving the growth and importance of application delivery within encumbent enterprise and with ever more startups disrupting their industries, enterprise needs greater levels of automation to compete and to deliver quality, quicker than competitors.

In the past Requirements were captured in hand written paper documents, which in time, were augmented with spreadsheets and word documents. The rigour of the process left space for improvement. Today, requirements associated material is held in a central repository and updates are visible to all stakeholders. Enterprise Architect can capture all of the different information that records requirements information, be it from Word, Excel, Visio, handwritten notes, video or audio.

Requirements Coques3 175x100In the past Requirements was an isolated process that had built in “wait” or handover periods before being consumed by the other phases of the project life cycle. Today these gaps are closed with automation and requirements are integrated across the development life cycle, with many other functions. The end result is less time to delivery.

Organisational cultures of resistance to change, identified by a bulwark of divisional and departmental silos and a reluctance to co-operate, increased the risk of failure for the change process. Today, technology based collaborative platforms are increasingly being adopted as they are inclusive, breaking open silos, empowering stakeholders and drawing them together.

The progress of development projects lacked transparency for most key stakeholders, right to the point when business took delivery. Whatever visibility the stakeholders had, was gathered from assumptions, rather than from objective data. Today, key stakeholders form an integral part of the development team and have access to progress charts and dashboard metrics.

In the past, the management of shareholder supported organisations held tightly to the overarching goal of ensuring change was minimised or avoided, so as to maintain the value of their shares. Today the digital imperative, as opposed to the business imperative, says be prepared to change, or risk oblivion.

Requirements Coques 175x100These examples are a reflection of the changes in the Requirements Management process, which in the development model of today, supports iterative requirements gathering and continuous delivery of software. It has become an Agile practice approach, being adopted to address the challenge of digital transformation. This collaborative, iteration based business lifecycle, between requirements and stakeholders, has given rise to DevOps, a strategy for managing continuous change.

Enterprise Architect is unique in its ability to support Requirements throughout the development lifecycle and to deliver the benefits of the Agile practice approach. Requirements can be defined in the model, or imported from other tools including Visio.

Recently, through agreement with IIBA, Sparx Systems is in the process of developing the Enterprise Architect Guide to BABOK Implementation. Through the power of this collaborative, visual modeling platform, the extension provides the Business Analyst with a fully augmented BABOK user experience.

On March 29, 2017, the public Beta launch of Tools & Techniques for BABOK Guide v3 was announced - please visit the Sparx Systems website for more details.

Published in Sparx Insights
Tuesday, 01 November 2016 02:47

DevOps and ALM: Bridging Business and IT Cultures

AgilDevops illu 400x400Application Lifecycle Management (ALM) can move IT and Business to a position of congruency and shift IT from application thinking to process (and service) thinking and in Business, from service to IT. The gulf between Business and IT exists on a relationship from a time past, when there was little contact between the two parties following a commission from Business to IT for services and/or products.

Before the availability of ALM, the window on the progress of development projects lacked transparency for most managers, right to the point when business took delivery. Whatever visibility the managers had, was gathered from assumptions rather than from objective data.

Sparx Systems attended the Gartner Enterprise Architecture Summit in National Harbor during May 2016 where Enterprise Architecture was reviewed as a “catalyst for Digital Tranformation.” and two “big” challenges were identified, as the transformation moves forward. These were, managing the connections within complex ecosystems of communications, partners, platforms, services and technologies and working with New Development methodologies such as Agile, DevOps and Continuous Delivery.

ALM makes IT development visible to upper management and reinforces the requirements of Business to demonstrate Governance, Risk Management and Compliance. On a competitive level it assists in the reduction of development costs, increases innovation and effectively supports change management. As a business process for the management of end to end software development ALM promises benefits in terms of increased project success rates, improved quality of deliverables and reduced development timescales.

Between IT and Business, ALM creates and supports a bridge which embodies a set of processes and methods, including software development, operations, and services, to enhance communication and collaboration between departments. It also aligns the business, development and operations capabilities of the organization, by providing the ability to integrate different tools used and the activities performed within each.

While this establishes a culture of more frequent software builds, tests and releases, the pressure to manage application delivery is growing ,as is the complexity. The need to co-ordinate and automate the process of delivering these projects, with collaborative planning and reporting activities has become critical. Sparx Systems recognises that this requirement makes ALM processes essential to the delivery of worlds best development practices.

 

"DevOps is a culture that supports improvements
in the software development lifecycle through
automation, best practice and collaboration."

 

Tight coupling of the stages of the application lifecycle is a key to increasing productivity in application development and establishing traceability and accountability across multiple processes, locations and tool types, in the stages of development and delivery. This completeness of functionality leads to increased quality, reduces time to market and promotes a culture of business agility. By coordinating activity and facilitating communication, ALM provides real time transparency and traceability, proactive change management and error mitigation.

We hear a lot about cultural change in the discussions about DevOps. We also hear a lot about people. Not so much about enabling technology. There is an accepted notion that DevOps is about drawing together people in DEVelopment and people in OPerations with the goal of shortening delivery time through the elimination of constraints that naturally exist between functional silos.

DevOps is a culture that supports improvements in the software development lifecycle through automation, best practice and collaboration. DevOps is about changing culture and the responsibility for this lies with executive management. To realise a cultural change of automation, best practice and collaboration, is to expose the organisation to DevOps benefits,- agility and productivity. As a key enabler of DevOps, Continuous Delivery supports automation of software development, testing and deployment which are in turn supported by agile planning and execution tools.

sd times alm article madison mooreIn an article by Madison Martin, published recently in SD Times, the impact that DevOps and Agile are having on application lifecycle management (ALM). She states that “Those looking to refine their application life cycle are sifting through the marketplace to find the right tool—one that will give their company agile feature functionality and help them move toward a more continuous way of working. A business can no longer look at just the planning and the building of software; they have to monitor every step in between to make sure the software delivered meets the expectations of the user.”

ALM is accepted as the management of end to end software development and as a business process it promises benefits in terms of increased project success rates, improved quality of deliverables and reduced development timescales. Due to the absence of a common industry standard, ALM deployment is interpreted differently by different stakeholders.

The ALM tools market has seen a continuous evolution over the greater part of the last decade. The change is demonstrated by various benchmarks conducted by Gartner. As recently as July 2016 Gartner has announced their decision to retire “the ADLM MQ and focus on a new MQ for Agile planning and execution tools.” The leading reason cited for this decision is “Shifts in the market due to DevOps.”

Between 2012 and 2013 Gartner blogged that work had begun on the update to the Magic Quadrant for ALM stating “We are subtly shifting our terminology for the market from Application Lifecycle Management to Application Development Lifecycle Management. We feel this is a more accurate depiction of what the tools in this space are focused on.”

In 2008 Gartner published the “Marketscope for Application Lifecycle Management”. This document was described ALM as the practices, processes and tools that aid in the application management lifecycle, specifically the workflow of producing or maintaining an application. This document identified a number of key capabilities that an ALM offering should include. These capabilities have been listed later in this document.

 

Sparx Systems ALM

In 2015 Sparx Systems was named in the 2015 SD Times 100 for its excellence in the ALM and Development Tools category. When using separate tools in development, there can be a lack of integration between the tools used in each phase of the process and due to the absence of a common industry standard, ALM deployment is interpreted differently by different stakeholders.

However, when using Enterprise Architect, an integration of all the key features of ALM is provided in an “out of the box” tool set, which uses a single repository as the common data source. Within the integrated Enterprise Architect project workspace, you can view and update artifacts with version control, code review, and continuous integration tools. This is the level of functionality that defines Enterprise Architect as a leading ALM solution.


Key ALM Capabilities

  • Requirements definition and management
  • Change and configuration management
  • Agile project planning
  • Work item management
  • Quality management, including defect management
  • Reporting
  • Workflow
  • Integration to version management
  • Support for wikis and collaboration
  • Integration to other ALM tools

This is the first of a series of related articles on DevOps and ALM

Published in Sparx Insights

LOGO SDTimesSparx Systems' Enterprise Architect has been featured in a recently published SD Times article, Online and Social Media Editor Madison Moore identifies the emerging influence of DevOps and Agile within the ALM domain... and the software that is supporting Enterprises to master their future evolution.

 

"Market disruptions such as mobile and the Internet of Things (IoT), as well as the digital and omnichannel trend as a whole, have contributed to this evolution of ALM. Once these disruptions happen in areas like DevOps and agile, they change the way companies build their applications."

 

Enterprise Architect has been identified as a platform that is "... a comprehensive team-based modeling environment that helps organizations analyze, design and construct reliable, well-understood systems." The feature rich toolset supports project teams to communicate and capture essential business information, to transform the Enterprise into a standards compliant entity, therfore realizing the potential for interoperability and future agility.

 

To read the full article by Madison Moore, please visit the SD Times website 

Published in News