An Introduction To ThriveSmart Apps
ThriveSmart Apps and Page Objects Overview
At the highest level, a ThriveSmart App is simply a web application that drives two views for the content it holds: (1) a 'show' view, which displays content, and (2) an 'edit' view which displays form fields that an end user can edit. These two views can also be accompanied by stylesheets and unobtrusive javascripts.
An individual instance of a ThriveSmart App we call a Page Object; others may be more familiar with the term "Widget", or "Gadget". These Page Objects/Widgets/Gadgets can be placed, by end-users, on any page on their ThriveSmart Site that they would like, in any order.
In other words, every Page on a ThriveSmart Site is made up of many Page Objects. Each Page Object, in turn, is driven by a ThriveSmart App, which has been created and hosted by a 3rd party developer.
ThriveSmart App API Overview
Each ThriveSmart App provides its views to ThriveSmart via a Restful XML API. Each time a Page Object view is requested by a ThriveSmart Site, the ThriveSmart App returns XML containing: HTML for the view, stylesheet URLs to include on the page, javascript URLs to include on the page, as well as some meta-data, like how this view can be cached.
Once the ThriveSmart App gets all the view information from the various ThriveSmart Apps for a single page, it renders all the stylesheet includes at the top of the page, all of the HTML returned by the Page Objects (displayed in the order defined by the end-user), and all of the javascript includes at the bottom of the page.
Although there are only two views, there are several actions that each ThriveSmart App must respond to for its Page Objects. These are: (1) create, which creates an empty instance of the Page Object, (2) edit, which returns the edit view information, (3) update, which accepts the form data requested from the end-user in the edit view, (4) duplicate, which takes one page object, and creates a new page object with the same data, and (5) destroy, which deletes a Page Object.
Creating a ThriveSmart App Overview
At launch, we've only made a comprehensive app-creation environment in Ruby on Rails. With this development environment, we strive to make App creation a second-nature activity to Ruby on Rails developers. Making a ThriveSmart App is very similar to how a developer would make a (very small) Ruby on Rails app.
To get started, you simply create a rails application on the command line, and install our rails plugin. Once the plugin is installed, you run a couple of generator commands to build out the controller, model, and views correctly. From there, you simply change the edit.html.erb and show.html.erb views to your liking. It's quick and easy to get up and running with your ThriveSmart App!
Of course, at some point, you'll want to start customizing your ThriveSmart App with stylesheets and javascripts, and probably utilize some of the more advanced features. We have a comprehensive list of all the features you'll want to use.
Finally, you'll want to find a host for your ThriveSmart App, and add it to the ThriveSmartHQ site. You can host it anywhere you want, but if you're looking for a place, we can recommend a few.