Modularization and Refactoring

Streamline App Development, Testing, & Maintenance

  • Control Templates for reusable UI behavior
  • Group design components in reusable modules
  • Apply design properties across a module
  • Support for automatic module naming conventions
  • Color-coded modules for easy identification
  • Server Action libraries for reuse across projects
  • Comprehensive refactoring tools
  • Sub-projects allow efficent project management
  • Deploy updates without compiling via Server Libraries

Modularization in App Development

Modularization in app development is an efficient way of organizing app components and enabling collaboration within development teams. A modular approach also helps make testing, debugging, and maintenance of the app or enterprise solution easier and more straightforward.

MobileTogether implements modular development tools in a variety of ways that enhance both efficiency and collaboration. Well-organized modules improve communication by making the app’s configuration easier to understand for development teams, including those working on inherited projects. Reusing components across multiple projects saves time and reduces the risk of errors, since you don’t need to rewrite the same functionality for each new project.

Modular app development features are also important for scalability. Breaking apps into smaller, manageable pieces reduces complexity and makes it easier to expand or modify the app as needed.

Reusable Control Templates

MobileTogether supports software design components called Control Templates, which allow you to specify and group user controls in a way that makes them easily reusable. These templates encapsulate design elements and their associated actions, making it easy to maintain consistency throughout a project. Control Templates support parameters, and each template can be customized based on parameter values at runtime.

MobileTogether Control Templates streamline app development by allowing you to define reusable UI components that can be applied across multiple pages — or multiple projects. Using a template also simplifies revisions and upgrades when a change to the template can roll through an entire project.

Reusable control templates for app development

Control Templates are designed by defining a set of controls and their behavior inside a template container. Then, you can reuse the Control Template in different parts of project(s). Each instance of a template is inserted on a page using a placeholder control, which ensures that that the templates can be easily customized for different contexts while retaining the underlying structure and behavior.

While the default behavior of a Control Template can be defined globally, you can override specific events for individual instances where the template is used, providing flexibility for unique scenarios.

Working with Modules

Modules in MobileTogether allow you to group design components and apply common properties across them.

 

Once you name a module, any components associated with that module will be grouped automatically with it by virtue of its name according to the defined naming convention (module.submodule.component). MobileTogether automatically groups all those items related by name in the modules pane, and you can even specify a background color for each module. This makes it easy to understand associations and functionality.

 

Items can be moved between modules either by dragging and dropping or renaming them. You can also move items via the right-click context menu, and this menu will also provide a list of all the usages of an item across the project. Double-clicking any item will navigate to its definition in the project.

 

Like Control Templates, modules can be exported and reused across different projects.

Modules for streamlining app development

Refactoring

Refactoring is the process of restructuring an existing app codebase without changing its external behavior. Refactoring tools are important for improving the internal structure of a codebase, enhancing its efficiency, maintainability, and extensibility while preserving its functionality. Refactoring is often driven by the need to simplify complex code, reduce technical debt, and prepare the codebase for future enhancements or changes.

MobileTogether Designer has extensive refactoring tools that help you identify and manage unused resources, rename components, and extract portions of your project into reusable sub projects or modules. For instance, you can use the Refactor menu to list usages of global variables across a project to manage dependencies and avoid conflicts. You can also list unused variables, functions, and other components to keep your project lean. You can even use the Refactor menu to replace database sources instantly across your project.

Sub projects

The MobileTogether Refactor menu also includes functionality for working with sub projects, which are another important aspect of modular app development that allow you to break large projects into smaller, more manageable units. Options include extracting part of an existing project as a new sub project, inserting a sub project in the current design, and opening a sub project itself. This makes it possible for a wide range of components that are defined in a project to be re-used across multiple projects.

 

You can include other MobileTogether projects as sub projects of the current project. The current project can then use components of the included sub projects. Conversely, the components of a sub project can be reused across multiple (parent) projects, removing the need to redefine the functionality in multiple projects. And, a sub project can contain other sub projects.

 

MobileTogether displays sub projects included in the current app design in the Files pane, which acts as the control panel for displaying, including, importing, and removing them. Managing dependencies between sub projects ensures that changes in one do not unintentionally affect others.

App sub project in MobileTogether

Server Libraries

Another tool for efficient modularization in MobileTogether solutions is Server Libraries. Server Libraries are collections of server-side actions that can be reused across multiple projects. Types of functionality well suited for Server Libraries include database operations, email notifications, or user authentication processes, which can be called from any project. These can be updated and exchanged at any time on the MobileTogether Server that hosts your app – without needing to redeploy the app itself.

This unique approach allows for much quicker roll-out of app updates and changes, especially for complied apps, which no longer need to be recompiled and sent through the app store approval process.

 

Server library in MobileTogether

 

A Server Library is a MobileTogether design file that contains one or more Action Groups, and its functionality is limited to processing these Action Groups. At runtime, an app can send a call to a Server Library with or without parameters. The Server Library processes the specified Action Group and returns the result to the calling mobile app or enterprise solution.

MobileTogether Feature List

MobileTogether FAQ

MobileTogether Video Demos