Hello AppSymphony – Revisited

In this post, I’m going to delve into the details of the “Content Publisher” Component I introduced in the Hello AppSymphony post.  I’m also going to show just how easy it is to take a specific solution and generalize it for a larger audience using the concept of App Parameters.

Content Publisher Details

The “Content Publisher” Component is an example of a Composite Component.  A Composite can contain one or more Components and is typically used to group bits of processing commonly done together into a single, reusable Component.  Once created, a Composite can be used across a number of Apps, allowing that single, well-tested solution to be reused countless times thereafter.

The “Content Publisher” Component abstracts the steps required to make the output from “Concatenate String” visible through the AppSymphony Composer.  By clicking on the “box” icon that appears after hovering over the “Content Publisher” Component, the contents of the composite are opened in a new tab.

As shown in the image above, there’s a lot going on within that one Component.  The Input Ports feed in the content from the outer diagram – in this case, the content to be uploaded.  The content is supplemented some additional inputs and fed into the “Upload String” Component.  “Upload String” uploads the content provided to an Amazon Web Services (AWS) Simple Storage Service (S3) bucket.   After “Upload String” has finished, the “Publish Results” component is activated.  This Component associates (i.e. publishes) the S3 bucket web address (URI) with a particular execution of this App.  In other words, it provides a link between the App and the content that was uploaded in the previous step of execution.  By doing this, a user will be able to see the App result through the App Composer – recall the “view” link from Hello World; that link was created by the “Publish Results” Component!

App Parameters

What makes a Hello World App even better?  Being able to easily configure the greeting and the entity addressed so I can customize a demo to the audience watching.  Starting with the existing Hello World App, select and drag two “String Parameter” Components onto the canvas.  In one String Parameter, provide a key of “greeting” and a value of “Hello, “.  In the other, provide a key of “entity” and a value of “World”.  Next, modify each String Constant to refer to a specific String Parameter by key.  The syntax for parameter references is “${<parameterkey>}”.  So, to reference the “greeting” parameter, my String Constant value would be “${greeting}”.

Now that the Hello World App has been parameterized, the Run menu includes some new configuration options.  As shown in the image below, both “greeting” and “entity” are now configurable on a per-execution basis.  I can execute the App using the defaults, resulting in “Hello, World”.  Or, I can modify greeting to “Wow,” and an entity of “this is awesome!” to get…”Wow, this is awesome!”.

Final Thoughts

In this post, you’ve seen how Composite Components can be leveraged to create higher-order (i.e. more complex) processing capabilities in a modular, reusable way.  You’ve also seen how an existing App can be parameterized and how that parameterization allows an App to be much more dynamic in the data it is executing against.  Composites and Parameters play an important role in creating complex Apps capable of doing very powerful things.  With these foundational elements now in place, the subsequent posts will demonstrate more involved Apps to show how AppSymphony is Powering Solutions across a number of complex domains.

Author:

Similar Posts

Leave A Comment

You must be logged in to post a comment.