
reference.language.overview.html Maven / Gradle / Ivy
Overview
Overview
The Prompto language is designed to create business applications in the cloud.
Business applications are applications which focus on business logic and user interaction,
as opposed to middleware applications which focus on technical tasks such as data storage,
message broadcasting, or web pages distribution.
Business applications typically make heavy use of a data store, and span across multiple components: data store, back end and front end.
Prompto is designed to help organizations be more effective in building business applications.
It achieves this by focusing on business logic, integration and presentation, while still relying for technical tasks
on the exceptional ecosystems available from traditional platforms.
Run everywhere
Business applications often involve UI, server-side business logic and data storage. This currently requires developing
in multiple languages. Prompto removes this requirement and greatly simplifies development by providing a single language
for UI, server-side logic and data modelling.
This is achieved by extending existing languages rather than replace them. There is a Prompto runtime for Java,
C#, Python, JavaScript and Swift. Prompto does not compete with these languages, but rather complements them with a specific focus
on business data modeling and storage.
Build and run in the cloud
The Prompto language is designed for cloud deployment. A strong requirement of cloud deployment
is that any piece of code or configuration must be easily accessible, regardless of the physical or virtual box
on which an application is running. Prompto achieves this by relying on a distributed code store, thus removing the
risk inherent to file based deployment.
Another strong requirement of cloud deployment is that applications must be able to run on somewhat heterogeneous
operating systems, simply because you can't instantaneously upgrade or migrate the OS on thousands of boxes.
This ranges from minor OS patches to different OS (Linux, Windows, MacOSX). Prompto achieves this by distributing source code
rather than machine code, and compiling/transpiling it on demand based on the environment.
Easy integration
Existing business applications are often built using languages such as Java, C#, Python, JavaScript or Swift.
There is a Prompto runtime for each of the above host languages, and they are 100% compatible with each other.
Prompto natively integrates with any web browser, any back end infrastucture, and rich clients such as Java RCP, .Net RCP
and native iOS applications (Swift runtime not available yet).
Interpreted and compiled
Prompto runs in both interpreted and compiled mode.
There are good reasons for supporting both interpreted and compiled mode:
- In scripting mode, and in the REPL, code is executed line by line, it cannot be compiled.
- Interpreted code can be modified without restarting the application, which makes development very productive.
- The interpreter is able to run incorrect code, notably tests, which can be useful during development, while incorrect code will fail to compile.
- Transpiled code (in Python and JavaScript) is sometimes hard to debug because it does not always map exactly to Prompto code.
The Java runtime comes with an interpreter and a compiler which is able to compile Prompto code to JVM byte code.
The C# runtime comes with an interpreter and a compiler which is able to compile Prompto code to CLR byte code (compiler not available yet).
The Python 2 and Python 3 runtimes come with an interpreter and a transpiler which is able to transpile Prompto code to Python byte code (transpiler not available yet).
The JavaScript runtime come withs an interpreter and a transpiler which is able to transpile Prompto code to JavaScript code (transpiler not available yet).
The Swift runtime is planned but not available yet.
Statically inferred types
Prompto uses static typing, like Java or C# do. This ensures best performance on all platforms.
Prompto implements type inference, thus freeing the developer from having to declare obvious types:
When writing a = 123
code, it is obvious that a
is an integer, so there is no need to declare it.
Method parameter types still need to be declared though, because they cannot be inferred.
Reified attributes
Prompto introduces reified attributes, a simple and effective way to model business data.
Attributes are also known as fields, properties or columns.
In most data models (relational, object, noSql), they have limited scope: table or object definition.
Reified attributes are attributes defined globally. Being global, they become shared by all tables and object definitions.
Amongst other benefits, reified attributes:
- enable new search capabilities
- enable a single data model across all application tiers
- enable enterprise level controlled vocabularies
- enable semantic types, as opposed to technical types
- eliminate the deadly diamond problem
- eliminate the impedance mismatch problem
Global names
Prompto names are global i.e. there is no concept of namespace in Prompto.
At Prompto, we believe namespaces make sense for technical components, but not for business domains.
If a given name has a different meaning in 2 departments of the same business, then it is likely to create business issues, unrelated to IT.
That problem should be solved by adopting common terminology across departments, not through IT islands.
A side-effect of having global names is that names need to be chosen carefully.
At Prompto, we believe this is a feature: it encourages high quality of naming.
Global and dynamic polymorphic methods
Prompto methods can either be attached to object definitions or be global, like in Python or JavaScript.
Prompto methods are polymorphic i.e. 2 methods with the same name can coexist if they accept a different set of parameters, like in Java or C#.
However Prompto goes a step further by selecting the most appropriate method at execution time rather than compile time.
This feature greatly simplifies development and data modeling, by eliminating the need for double dispatch.
Prompto dialects: syntax is a detail
To facilitate the conversation between all breeds of developers, Prompto comes with not one "language" but three.
Prompto calls these dialects, as they are not independant languages, but rather 3 syntactic variations of the same language concepts.
They make it very easy for any developer to adopt the Prompto platform, whatever his/her technical background.
Prompto dialects seamlessly translate to one another.
By doing so, they eliminate the barrier of having to learn a formal grammar only to read code.
Prompto dialects are collaborative tools which help technologists work together.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy