Cross-platform support middleware: Difference between revisions

Content deleted Content added
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(20 intermediate revisions by 16 users not shown)
Line 1:
{{short description|Software abstraction layer}}
{{AFC submission|ts=20081119145347|a=[[User:Upperaside1|Upperaside1]] ([[User talk:Upperaside1|talk]])}} <!--- Important, do not remove this line before article has been created. --->
{{refimprove|date=July 2010}}{{One source
| date = November 2020
}}
 
A '''Crosscross-Platformplatform Supportsupport Middlewaremiddleware''' (CPSM) is a software [[abstraction layer]] that guarantees the existence, and correct implementation, of a set of services on top a set of [[Platform_Platform (computing)|platforms]].<ref>{{cite web|first=Patricio|last=Zavolinsky|url=http://materias.fi.uba.ar/7500/zavolinsky-tesisdegradoingenieriainformatica.pdf|title=Abstracción en el desarrollo de software independiente de la plataforma: Análisis del proceso de desarrollo de Cross-Platform Support Middlewares (spanish)|accessdate=2008-09-25|publisher=Universidad de Buenos Aires, Argentina|archive-date=2009-04-11|archive-url=https://web.archive.org/web/20090411100126/http://materias.fi.uba.ar/7500/zavolinsky-tesisdegradoingenieriainformatica.pdf|url-status=dead}}</ref>
 
==Formal Model==
Formally, a CPSM can be represented by the following model:
* Let <math>S</math> be the set of provided services, and <math>s_m</math> the <math>M+1</math> elements of that set, with <math>m \in [0,M]</math>.
* Let <math>P</math> be the set of supported platforms, and <math>p^n</math> the <math>N</math> elements of that set, with <math>n \in [1,N]</math>.
* The special service <math>s_0</math> denotes the set of trivially cross-platform services provided (e.g. programming language, buffered I/O, etc).
* Thus, a CPSM can be defined as: <blockquote><math>A = CPSM(S, P)</math></blockquote> Where the strong condition for the existence of <math>A</math> is that every service in <math>S</math> is available in every platform in <math>P</math>.
 
The formal model may be extended to account for the abstract and concrete (native) interfaces of the services provided:
* Let <math>i_m^n</math> be the concrete (native) interface for service <math>s_m</math> in platform <math>p^n</math>.
* Let <math>I_d(S,P)</math> be the set concrete (native) interfaces (i.e. <math>i_m^n</math>).
* Let <math>i_m</math> be the abstract interface for service <math>s_m</math>, provided by the CPSM regardless of the underlying platform</math>.
* Let <math>I(S)</math> be the set abstract interfaces (i.e. <math>i_m</math>).
 
Formally, the strong condition for the existence of a CPSM can be expressed as:
<blockquote><math>
\forall s_m \in I(S), \forall p^n \in P \rightarrow \exists s_m^n.
</math></blockquote>
 
==Trivial CPSM==
There are two trivial cases of a CPSM: the single-platform CPSM and the inherently compatible CPSM.
 
A single-platform CPSM is compatible with one, and only one platform. Formally, <math>|P| = 1</math>, or, equivalently, <math> P = \{ p^1 \} </math>. In broad terms, an [[operating system]] might be considered a single-platform CPSM.
 
An inherently compatible CPSM is an abstraction layer that only provides services trivially compatible in every compatible platform. Formally, <math> |S| = 1 </math>, or, equivalently, <math> S = \{ s_0 \} </math>.
 
==Non-trivial CPSM==
A non-trivial CPSM must verify two conditions:
* The compatible platform set must contain at least two platforms.
* The provided services set must contain at least one non-trivial service.
 
Formally:
* <math>|P| > 1</math>
* <math>|S| > 1</math>
 
==Abstraction method==
Line 45 ⟶ 14:
The second method takes advantage of the [[filesystem]] organization to divide the source code in different folders, one for each incompatible platform. Thus delegating the selection problem to the [[build system]].
 
Some distributions like [[MSYS]] and [[cygwinCygwin]] may help build the cross-platform code in a unix[[Unix-like]] environment even on Microsoft Windows. Both distributions provide a decent version of [[GNU Make]] that can direct the build process in a cross-platform fashion.
 
==See Alsoalso==
* [[Adaptive Communication Environment]]
* [[Boost C++ Librarieslibraries]]
* [[GTK+]]
* [[Netscape Portable Runtime]]
* [[Simple DirectMedia Layer]]
* [[wxWidgets]]
* [[Boost C++ Libraries]]
 
==References==
{{reflist}}
 
[[Category:Middleware]]