M&P H5J Concepts and Facilities
Posted on March 4, 2013 by Herman Dolder
Last modified on May 25, 2015
M&P is a Framework for the development of high complexity applications
optimal users interaction
maximum cross-platform portability
distributed processing on Internet
the use of mobile devices
maximum adaptability to changing requirements
M&P provides a modular dynamic dataflow architecture that uses
M&P is implemented in two platforms: H5J (HTML5 TypeScript) and .NET.
In this article we describe the main concepts and facilities of the H5J
platform but those of the .NET are
M&P TBW (The BLOCKS World)
"M&P" means "Modular and Parallel", and also "Modular and Portable".
The term "Modular" refers to the fact that the development is done using
interchangeable plug-and-play components, which we call BLOCKS.
The H5J platform enables us to develop "ultraportable" modular
applications based in HTML5 (see).
The basic architecture of H5J is, by design, similar to that of MS
Silverlight including an XAML processor coded in TypeScript
Silverlight in HTML5
In M&P we seek to implement a paradigm, similar to the well known
"LEGO® bricks", in which applications are built by connecting BLOCKS,
creating networks of BLOCKS.
M&P provides a set of "native" BLOCKS as well as the means for the rapid
creation of "custom" BLOCKS.
The M&P XAML Processor named BXaml can instantiate BLOCKS, HTML5
Elements and SVG Elements allowing the declarative composition of
BXaml supports all aspects of an application, not only those related
to the User Interface.
M&P Runtime Library
Basically a BLOCK is an instance of a TypeScript class that
implements interfaces that allows the BLOCK to automatically integrate
and interoperate with the M&P Runtime Library (MPRTL).
The BXaml processor is part of the MPRTL and the BLOCK components are
interconnected by means of the databinding facilities of the MPRTL.
The concept of
central in the M&P architecture and the MPRTL operation is parallel by
M&P supports the paradigm "all asynchronous - all parallel" by means of
a component called "Task Parallel Engine" (TPE).
The TPE considers the traditional synchronous processing a particular
case of parallel processing.
M&P uses the facilities of the TPE engine to implement a Concurrent
Dataflow Platform (TPEDF).
The TPEDF define Dataflow BLOCKS that are instantiated in BXaml
allowing declarative composition.
Also TPEDF uses the databinding facilities of the MPRTL.
BLOCKS inside BLOCKS
A BLOCK may contain (nest) a set of BLOCKS, HTML5 Elements and SVG
Elements. This facility allows to implement multiple levels of
abstraction (as many as appropriate).
The BLOCKS inside BLOCKS facility is the main facility in M&P for
organizing (and reorganizing) code to manage complexity.
The BLOCKS inside BLOCKS facility allows to implement the concepts of
Information-hiding and Complexity-hiding. This facility also allows to
create custom visual controls (User Controls) for the User Interface.
An M&P application is a BLOCK containing BLOCKS in multiple levels. We
call this top BLOCK "TopBoard".
The MPRTL is also composed of BLOCKS.
Dynamic Loading BLOCKS (Plugins)
In an M&P application some (as many as appropriate) BLOCKS can be
loaded dynamically on demand. The dynamically loadable BLOCKS are of two
types: XPlugins (non-visual BLOCKS) and XViews (visual BLOCKS).
H5J Parallel Processing - Multicoring
available (currently WebWorkers are not available in Android, and are
not native in Node.js).
When WebWorkers are not available the TPE can emulate parallelism.
M&P provides peer-to-peer (P2P) channels for communication over
Internet. M&P channels are BLOCKS
that encapsulate "WebSockets".
Interface Based Programming
M&P architecture is fully based on well-defined interfaces.
In the interoperation between them BLOCKS reference only interfaces and
If several BLOCKS implement the same interface they are considered to
be functionally interchangeable (polymorphic behaviour).
The availability of interchangeable BLOCKS allows to easily and quickly
reconfigure an application to adapt to different circumstances.
The interchangeability of BLOCKS allows the "ahead-of-Time" adaptation
of the applications.
M&P provides an Scripting language called BScript whose syntax and
semantics is similar to that of the LISP language.
The BScript expressions are executed by the ultraportable BScript
interpreter of M&P.
The BScript expressions can be created dynamically.
M&P includes a data type called BSX to contain the internal
representation of an BScript expression.
BScript provides a native set of functions which is normally extended by
the application designer.
BScript is the dynamic and interactive language of M&P and provides a
simple mechanism for interactive unit tests using the BScript
Scripting is a very important facility for application adaptability.
BSX objects play a fundamental role in the architecture of
distributed processing of M&P which is based on the remote
BSXs are serializable/deserializable very fast to a format that ensures
maximum communication end storage performance.
The serialized BSXs can be stored in Files and Data Bases.
H5J Windowing system
To build the user interface H5J provides a windowing system based on
"stacked" popup windows that allows multitasking.
An H5J application uses a single web static page which allows the login
and whose content is then changed (by dynamically loading and displaying
XView BLOCKS) by the application using the facilities of the windowing
See some BXaml H5J images ...
Networks of Servers
M&P allows to organize "networks of servers" that communicate between them
and with the clients through P2P channels. M&P introduces the concept of
Servers as BLOCKS" (SaB).