Portability

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
When designing frameworks and libraries that shall be widely adopted it is important to increase [[portability]] as much as possible. If an [[API]] can be used on different systems, different configurations, the amount of users including such [[API]] in their applications grows.
When designing frameworks and libraries that shall be widely adopted it is important to increase [[portability]] as much as possible. If an [[API]] can be used on different systems, different configurations, the amount of users including such [[API]] in their applications grows.
-
The best way to hurt [[portability]] is to depend on a 3rd party [[API]] that isn't [[portability|portable]]. Depending on Win32 [[API]] is one such example. Of course, writing in [[Java]] (a [[language]] designed to ''write once and run everywhere'') greatly increases portability. However there is another axis hurting [[portability]] - the support JDK version. Of course, should a library be widely used, it has to support as oldest JDK as possible. These days it is [[JDK]]8 - the primary reason being that [[Android]] supports [[JDK]]8 - as such, should a library be used on [[Android]] (as well as regular [[Java]]), it needs to stick to version eight. Btw. not that many years ago,
+
The best way to hurt [[portability]] is to depend on a 3rd party [[API]] that isn't [[portability|portable]]. Depending on Win32 [[API]] is one such example. Of course, writing in [[Java]] (a [[language]] designed to ''write once and run everywhere'') greatly increases portability. However there is another axis hurting [[portability]] - the support JDK version. Of course, should a library be widely used, it has to support as oldest JDK as possible. These days it is [[JDK]]8 - the primary reason being that [[Android]] supports [[JDK]]8 - as such, should a library be used on [[Android]] (as well as regular [[Java]]), it needs to stick to version eight. Btw. not that many years ago, [[Android]] only supported [[JDK]]6 and many libraries had to stay with [[JDK]]6 [[API]]s and [[language]].
[[TBD]]
[[TBD]]
-
Of course, writing portable libraries is harder. It requires more work from the [[API]] author, more self-control, more suffering. However such suffering is justifiable. There is usually a single [[API]] writer, but there are [[3SidesToEveryAPI#Mine|many users]] to it. What matters is to simplify and improve experience of those [[API]] users - own author suffering doesn't matter that much.
+
Of course, writing portable libraries is harder. It requires more work from the [[API]] author, more self-control, more suffering. However such suffering is justifiable. There is usually a single [[API]] writer, but there are [[3SidesToEveryAPI#Mine|many users]] to it. What matters is to simplify and improve experience of those [[API]] users - own author suffering doesn't matter that much. On the other hand, there is no need to suffer needlessly. Even [[API]] writers shall have a decent life! What does that mean in [[Java]]? While an [[API]] writer wants to target the oldest [[JDK]] possible, there is no point in sticking with ancient [[Java]] syntax! Just use [[Frgaal]]!
 +
 
 +
What every non-masochist [[API]] writer wants is:
 +
* high portability with respect to supported range of [[JDK]]s
 +
* decent version of [[Java]] language
 +
* code against selected old [[JDK]] [[API]]s, but use the latest [[Java]] features
 +
 
 +
This all can easily be achieved with [[Frgaal]].
-
On the other hand, there is no need to suffer needlessly. Even [[API]] writers shall have a decent life! What does that mean in [[Java]]? While an [[API]] writer wants to target the oldest [[JDK]] possible, there is no point in sticking with ancient [[Java]] syntax! Just use [[Frgaal]]!
 
[[Frgaal]] is the [[Java]] compiler for framework and library authors!
[[Frgaal]] is the [[Java]] compiler for framework and library authors!

Revision as of 15:38, 29 October 2022

When designing frameworks and libraries that shall be widely adopted it is important to increase portability as much as possible. If an API can be used on different systems, different configurations, the amount of users including such API in their applications grows.

The best way to hurt portability is to depend on a 3rd party API that isn't portable. Depending on Win32 API is one such example. Of course, writing in Java (a language designed to write once and run everywhere) greatly increases portability. However there is another axis hurting portability - the support JDK version. Of course, should a library be widely used, it has to support as oldest JDK as possible. These days it is JDK8 - the primary reason being that Android supports JDK8 - as such, should a library be used on Android (as well as regular Java), it needs to stick to version eight. Btw. not that many years ago, Android only supported JDK6 and many libraries had to stay with JDK6 APIs and language.


TBD

Of course, writing portable libraries is harder. It requires more work from the API author, more self-control, more suffering. However such suffering is justifiable. There is usually a single API writer, but there are many users to it. What matters is to simplify and improve experience of those API users - own author suffering doesn't matter that much. On the other hand, there is no need to suffer needlessly. Even API writers shall have a decent life! What does that mean in Java? While an API writer wants to target the oldest JDK possible, there is no point in sticking with ancient Java syntax! Just use Frgaal!

What every non-masochist API writer wants is:

  • high portability with respect to supported range of JDKs
  • decent version of Java language
  • code against selected old JDK APIs, but use the latest Java features

This all can easily be achieved with Frgaal.


Frgaal is the Java compiler for framework and library authors!

Personal tools
buy