MIMOIRE
MIMOIRE
Chapter 01
General
information on
cross-platform
technologies
I) Introduction
Currently, the development of information and communication
technology, especially web-based internet applications, is happening
quite rapidly [1]. One example of this application is a multi-platform
1
Chapter 01 General information on cross-platform technologies
Definition:
Cross-platform technologies refer to development tools and frameworks
that allow developers to create applications capable of running on
multiple operating systems (such as Windows, macOS, Android, and iOS)
with a single codebase. Instead of building separate applications for each
platform, cross-platform technologies enable code reuse and streamline
the development process. This leads to reduced development time, lower
costs, and a consistent user experience across different devices.
Cross-platform technology(.NET) :
Definition:
2
Chapter 01 General information on cross-platform technologies
.NET is a developer platform made up of tools, programming languages, and libraries for
building many different types of applications. There are various implementations of .NET.
Each implementation allows .NET code to execute in different places—Linux, macOS,
Windows, iOS, Android, and many more. .NET Framework is the original implementation of
.NET. It supports running websites, services, desktop apps, and more on Windows..NET is a
cross-platform implementation for running websites, services, and console apps on
Windows, Linux, and macOS. .NET is open source on GitHub. .NET was previously
called .NET Core. Xamarin/Mono is a .NET implementation for running apps on all the
major mobile operating systems, including iOS and Android..NET Standard is a formal
specification of the APIs that are common across .NET implementations. This allows the
same code and libraries to run on different implementations.
Components of .Net Framework:
Net Framework is a platform that provides tools and technologies to develop Windows, Web
and Enterprise applications. It mainly contains two components: (Common Language
Runtime (CLR) and .Net Framework Class Library)
1.3.1Common Language Runtime (CLR):
.Net Framework provides runtime environment called Common Language Runtime (CLR).
It provides an environment to run all the .Net Programs. The code which runs under the CLR
is called as Managed Code. Programmers need not to worry on managing the memory if the
programs are running under the CLR as it provides memory management and thread
management. Programmatically, when our program needs memory, CLR allocates the
memory for scope and de-allocates the memory if the scope is completed. Language
Compilers (e.g.#, VB.Net, J#) will convert the Code/Program to Microsoft Intermediate
Language (MSIL) intern this will be converted to Native Code by CLR. See the below Fig.
figure 01
There are currently over 15 language compilers being built by Microsoft and other
companies also producing the code that will execute under CLR.
.Net Framework Class Library (FCL)
3
Chapter 01 General information on cross-platform technologies
This is also called as Base Class Library and it is common for all types of applications i.e.
the way you access the Library Classes and Methods in VB.NET will be the same in C#, and
it is common for all other languages in .NET.
The following are different types of applications that can make use of .net class library.
Windows Application.
Console Application
Web Application.
XML Web Services.
Windows Services.
In short, developers just need to import the BCL in their language code and use its
predefined methods and properties to implement common and complex functions like
reading and writing to file, graphic rendering, database interaction, and XML document
manipulation.
Common Type System (CTS)
It describes set of data types that can be used in different .Net languages in common.
(i.e.), CTS ensures that objects written in different .Net languages can interact with each
other.
For Communicating between programs written in any .NET complaint language, the
types have to be compatible on the basic level.
The common type system supports two general categories of types:
Value types:
Value types directly contain their data, and instances of value types are either allocated on
the stack or allocated inline in a structure. Value types can be built-in (implemented by
the runtime), user-defined, or enumerations.
Reference types:
Reference types store a reference to the value's memory address, and are allocated on the
heap. Reference types can be self-describing types, pointer types, or interface types. The
type of a reference type can be determined from values of self-describing types. Self-
describing types are further split into arrays and class types. The class types are user-
defined classes, boxed value types, and delegates.
Common Language Specification (CLS)
It is a sub set of CTSS and it specifies a set of rules that needs to be adhered or satisfied
by all language compilers targeting CLR. It helps in cross language inheritance and cross
language debugging.
Common language specification Rules:
It describes the minimal and complete set of features to produce code that can be hosted
by CLR. It ensures that products of compilers will work properly in .NET environment.
Sample Rules:
4
Chapter 01 General information on cross-platform technologies
.NET Framework Class Library is the collection of classes, namespaces, interfaces and value
types that are used for .NET applications.
5
Chapter 01 General information on cross-platform technologies
6
Chapter 01 General information on cross-platform technologies
System.Xml,System.Xml.Schema,
These namespaces are used to create and access
System.Xml.Serialization, System.Xml.XPath,
XML files.
System.Xml.Xsl
1.5.1.C# :
Its roots in the C family of languages makes C# immediately familiar to C, C++, Java, and
JavaScript programmers.
7
Chapter 01 General information on cross-platform technologies
1.5.2. F# :
F# (pronounced "F sharp") is a programming language that makes it easy to write succinct,
robust, and performant code.
Visual Basic is an approachable language with a simple syntax for building type-safe, object-
oriented apps.
The two major components of .NET Framework are the Common Language Runtime and the
.NET Framework Class Library.
8
Chapter 01 General information on cross-platform technologies
The Common Language Runtime (CLR) is the execution engine that handles running
applications. It provides services like thread management, garbage collection, type-safety,
exception handling, and more.
The Class Library provides a set of APIs and types for common functionality. It provides
types for strings, dates, numbers, etc. The Class Library includes APIs for reading and
writing files, connecting to databases, drawing, and more.
.NET applications are written in the C#, F#, or Visual Basic programming language. Code is
compiled into a language-agnostic Common Intermediate Language (CIL). Compiled code is
stored in assemblies—files with a .dell or .exe file extension.
When an app runs, the CLR takes the assembly and uses a just-in-time compiler (JIT) to turn
it into machine code that can execute on the specific architecture of the computer it is
running on.
ASP.NET is an open. Source. Source web framework, created by Microsoft, for building
modern web apps and services with .NET.
ASP.NET is cross platform and runs on Windows, Linux, macOS, and Docker.
9
Chapter 01 General information on cross-platform technologies
ASP.NET extends the .NET platform with tools and libraries specifically for building web
apps.
These are some things that ASP.NET adds to the .NET platform:
Libraries for common web patterns, such as Model View Controller (MVC)
Authentication system that includes libraries, a database, and template pages for handling
logins, including multi-factor authentication and external authentication with Google, X, and
more.
Editor extensions to provide syntax highlighting, code completion, and other functionality
specifically for developing web pages
When using ASP.NET your back-end code, such as business logic and data access, is written
using C#, F#, or Visual Basic.
Because ASP.NET extends .NET, you can use the large ecosystem of packages and libraries
available to all .NET developers. You can also author your own libraries that are shared
between any applications written on the .NET platform.
Razor provides a syntax for creating dynamic web pages using HTML and C#. Your C#
code is evaluated on the server and the resulting HTML content is sent to the user.
Code that executes client-side is written in JavaScript. ASP.NET integrates with JavaScript
frameworks and includes pre-configured templates for single page app (SPA) frameworks
like React and Angular.
1.7.4. Open-source:
Like the rest of .NET, ASP.NET is open source on GitHub. .NET has over 100,000
contributions and 3,700 companies have already contributed.
Java is a programming language and a platform. Java is a high level, robust, object-oriented
and secure programming language.
10
Chapter 01 General information on cross-platform technologies
Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the
year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak.
Since Oak was already a registered company, so James Gosling and his team changed the
name from Oak to Java. Platform: Any hardware or software environment in which a
program runs, is known as a platform. Since Java has a runtime environment (JRE) and API,
it is called a platform.
The main feature of Java is WORA. WORA stands for Write Once Run Anywhere. The
feature states that we can write our code once and use it anywhere or on any operating
system. Our Java program can run any of the platforms only because of the Java Virtual
Machine. It is a Java platform component that gives us an environment to execute java
programs. JVM's main task is to convert byte code into machine code.
JVM, first of all, loads the code into memory and verifies it. After that, it executes the code
and provides a runtime environment. Java Virtual Machine (JVM) has
its own architecture, which is given below:
JVM Architecture
11
Chapter 01 General information on cross-platform technologies
class Loader is a subsystem used to load class files. class Loader first loads the Java code
whenever we run it.
In the memory, there is an area where the class data is stored during the code's execution.
Class method area holds the information of static variables, static methods, static blocks, and
instance methods.
1.9.1.3 Heap:
The heap area is a part of the JVM memory and is created when the JVM starts up. Its size
cannot be static because it increases or decrease during the application runs.
1.9.1.4 Stack:
It is also referred to as thread stack. It is created for a single execution thread. The thread
uses this area to store the elements like the partial result, local variable, data used for calling
method and returns etc.
It contains the information of all the native methods used in our application.
It is the central part of the JVM. Its main task is to execute the byte code and execute the
Java classes. The execution engine has three main components used for executing Java
classes.
Interpreter: It converts the byte code into native code and executes. It sequentially
executes the code. The interpreter interprets continuously and even the same
12
Chapter 01 General information on cross-platform technologies
method multiple times. This reduces the performance of the system, and to solve
this, the JIT compiler is introduced.
JIT Compiler: JIT compiler is introduced to remove the drawback of the
interpreter. It increases the speed of execution and improves performance.
Garbage Collector: The garbage collector is used to manage the memory, and it is
a program written in Java. It works in two phases, i.e., Mark and Sweep. Mark is
an area where the garbage collector identifies the used and unused chunks of
memory. The Sweep removes the identified object from the Mark
1.9.1.7 Java Native Interface: Java Native Interface works as a mediator between Java
method calls and native libraries.
Java is one of the most popular programming languages. Java provides a rich set of libraries,
and its standard Java library is a very powerful that contains libraries such as java. Lang,
java.util, and java. Math, etc. Java provides more than thousands of libraries except standard
libraries. Some of the most useful and popular libraries are as follows:
Apache Commons
Jackson
Maven
Google-Json
JUnit
Google Guava
JAXB
HTTP Libraries
Java program. Java Architecture explains each and every step of how a program is compiled
and executed.
Java Architecture can be explained by using the following steps:
1.13. 4) JavaFX
It is used to develop rich internet applications. It uses a lightweight user interface API.
17
Chapter 01 General information on cross-platform technologies
1.16.1. Composer
Description: A dependency manager for PHP that allows you to manage libraries and
packages for your projects.
1.16. 2. Guzzle
Description: A powerful HTTP client for making API requests and handling responses.
1.16.3. PHPMailer:
Description: A popular library for sending emails using PHP with support for SMTP.
1.16.4. Faker
Description: A library for generating fake data such as names, addresses, and phone
numbers, useful for testing.
1.17. PHP languages:
PHP (Hypertext Preprocessor) is a widely used server-side scripting language designed for
web development but also used as a general-purpose programming language. Here are some
key aspects of PHP:
1. Overview
Type: Server-side scripting language
Syntax: C-like syntax
Paradigms: Object-oriented, procedural, functional
2. Features
Cross-Platform: Works on various operating systems, including Windows, Linux, and
macOS.
Database Support: Easily connects with various databases like MySQL, PostgreSQL,
SQLite, and others.
Web Integration: Embedded in HTML and easily interacts with web technologies.
Rich Libraries: Extensive built-in functions and a large ecosystem of libraries and
frameworks (e.g., Laravel, Symfony).
18
Chapter 01 General information on cross-platform technologies
1.17.1 DBMS
A Database Management System (DBMS) is a software (or a set of
software) that allows you to manipulate the data in a database. Manipulate, that is, select and
display information from this database, modify data, add or delete
data (this group of four operations is often called "CRUD", for
Create, Read, Update, Delete). MySQL is a database management system.
1.17. 2 SQL language
SQL (Structured Query Language) is a computer language that allows you to interact
with relational databases. It is the most widely used database language,
for the ISO standard). It is still regularly improved.
1.17.3 Brief presentation of MySQL...
MySQL is therefore a Relational Database Management System, which uses the
SQL language. It is one of the most widely used RDBMS. Its popularity is largely due to the
fact
that it is an Open Source software, which means that its source code is freely available
and that anyone who feels the desire and/or the need can modify MySQL to improve
it or adapt it to their needs. A free version of MySQL is therefore available. Note that a
commercial paid version also exists.
The MySQL logo is a dolphin, named Sakila following the Name the dolphin contest.
20
Chapter 01 General information on cross-platform technologies
21
Chapter 01 General information on cross-platform technologies
22
Chapter 01 General information on cross-platform technologies
1.18 .3OLE DB
was designed as a high-level replacement for ODBC; it supports a wide variety of non-
relational databases that do not necessarily involve implementing SQL (e.g., spreadsheets
and object databases). OLE is based on a client-provider model, in which clients request
access to data and providers, through software component interfaces, grant that access.
Conclusion:
Cross-platform technologies have become an essential part of modern software development,
enabling developers to create applications that can run on multiple operating systems and
devices with a single codebase. This chapter provided an overview of key cross-platform
frameworks and technologies including:
- .NET - Microsoft's cross-platform development framework that includes languages like C#
and F#, as well as ASP.NET for web development.
- Java - A widely used cross-platform programming language and platform with editions for
different use cases like Java SE, Java EE, and Java ME.
- PHP - A popular server-side scripting language for web development that works across
different operating systems and web servers.
- Cross-platform database systems like MySQL, Oracle, and Microsoft SQL Server that can
be used on various platforms.
- Cross-database connectivity standards like ODBC, JDBC and OLE DB that allow
applications to interface with different database systems.
The key benefits of cross-platform technologies include:
- Code reuse across multiple platforms
- Reduced development time and costs
- Consistent user experience across devices
- Ability to target a wider range of users/devices
However, cross-platform development also comes with challenges like performance
optimization and adapting to platform-specific features. As technologies continue to evolve,
cross-platform frameworks are becoming increasingly sophisticated in addressing these
challenges.
23
Chapter 01 General information on cross-platform technologies
brick/math: Arbitrary-precision arithmetic library for PHP
openspout/openspout: Read and write spreadsheet files (CSV, XLSX and ODS), in a
fast and scalable way
thecodingmachine/safe: All PHP functions, rewritten to throw exceptions instead of
returning false
azjezz/psl: PHP Standard Library - a modern, consistent, centralized, well-typed, non-
blocking set of APIs for PHP programmers
particle/validator: Particle\Validator is a validation library with an extremely clean
API which makes validation fun!
league/tactician: A small, flexible command bus.
league/flysystem: Abstraction for local and remote filesystems
golem-ai/messenger-kit: This command simulates consumer failures and prints a
timeline of the events. It lets you check whether your retry strategy configuration does
what you expect it to.
swarrot/swarrot: A lib to consume message from any Broker
ronanguilloux/isocodes: PHP library - Validators for standards from ISO, International
Finance, Public Administrations, GS1, Manufacturing Industry, Phone numbers & Zip
codes for many countries
php-units-of-measure/php-units-of-measure: A library for handling physical quantities
and the units of measure in which they're represented.
rawr/t-regx: PHP regular expression brought up to modern standards.
mpratt/embera: A Oembed consumer library, that gives you information about URLs.
It helps you replace URLs to YouTube or Vimeo for example, with their html embed
code. It has advanced features like offline support, responsive embeds and caching
support.
spatie/geocoder: Geocode addresses to coordinates
php-soap/wsdl-reader: A pure PHP wsdl metadata provider
phpro/soap-client: A general purpose SOAP client for PHP
eventsauce/backoff: Sophisticated back-off strategies for retrying operations.
pontedilana/php-weasyprint: PHP library allowing PDF generation or snapshot from an
URL or an HTML page. Wrapper for Kozea/WeasyPrint.
25