Apotomo Explained

Apotomo is a platform-specific widget framework for Ruby on Rails, designed to simplify the components and code of the view section of the MVC design pattern. Apotomo is built on, and was built by the same engineer as, the Cells Project.[1]

Design goals and overview

Apotomo assists developers by reducing the amount of dynamic code needed to build the view component of a Ruby on Rails project, as well as making the view component code re-usable.

View Code Reduction: Apotomo usage is based upon Apotomo widgets (which are Ruby classes), and all Apotomo widgets inherit from the Apotomo:Widget base class. Even though these Apotomo widgets are rendered in and utilized for the view components, Apotomo widgets move conventional view code into the Apotomo widget class, thus "clearing up" and reducing the code in the view component.

Code Re-usability: Apotomo widgets improve code re-usability by moving code from the view files into newly created "mini-controllers" for the Apotomo widgets. These "mini-controllers" can be used in an endless number of views in a website. For example, consider an implementation project for an E-Commerce site. Each page of the E-Commerce site would need a "# of items in shopping bag" widget on each page, with some dynamic elements or behaviors. Without Apotomo, a developer may need to have repeated code in all views for pages with the "# of items in shopping bag" widget. But, with Apotomo, the developer could simply create a Shoppingtrolly > Apotomo:Widget "mini-controller" class, and then reference the class repeatedly in endless number(s) of controller actions and views.

Configuration

Version history

Some of the important release versions have been listed below:

For details and packages, refer to releases page in the Apotomo website.[2]

Usage

Apotomo can be utilized to create modern rich application based widgets. It provides a component-based application on which widgets can be built. These widgets can directly respond to Ruby events and the development is hassle free. Just a small amount of code can give us a great deal of functionality with Apotomo, e.g. a small blog entry widget, tweeting from your website, status updates, etc.

A dummy of how your <>.rb file could look like:class <> < Apotomo::Widget responds_to_event :<> def <> ... endendThe text inside << >> can be replaced with the appropriate names and events as desired by the user and required as per the application. Do not use the << >> when replacing with the original text.

Licenses

Apotomo is an open source tool copyrighted to Nick Sutterer under MIT license. The source code is stored at the GitHub repository location.[3]

Notes and References

  1. Web site: GitHub - trailblazer/cells: View components for Ruby and Rails.. Jun 14, 2019. Jun 15, 2019. GitHub.
  2. Web site: GitHub - apotonick/apotomo: MVC Components for Rails.. Jun 13, 2019. Jun 15, 2019. GitHub.
  3. Web site: APOTOMO - a part of tomorrow - ein Teil von Morgen.