Showing posts with label BX. Show all posts
Showing posts with label BX. Show all posts

Morfik Basic is one of the language syntaxes which are supported by Morfik AppsBuilder 2.0. More specifically it is the language syntax used by Morfik BX which is one of the versions of AppsBuilder 2.0 released last month.

If you are a Basic user, this is good news for you. Morfik Basic was created to allow Basic developers to have easy access to the advanced Ajax application building capabilities of Morfik AppsBuilder. A lot of effort went into making sure that the extensions necessary so that the Basic language could reflect all the capabilities of the underlying Morfik semantics did not seem "foreign" to the Basic developer.

For example, in order to implement in-code documentation, Morfik relies on multi-line comments which are not available in traditional Basic. In adding this feature to Morfik Basic it was tapped from the C family of languages as Microsoft is currently the primary developer of a Basic language and it was reasoned that if they were to add such a feature to the language they would probably use their C# syntax.

For adding pointer support, on the other hand, it was decided that since C# has no such support, falling back to C++ or C would not be a good idea. In that respect it was decided to base the syntax in the ByRef and ByVal keywords that are used to specify how parameters are passed to Functions and Subs in Visual Basic. Reference parameters are, in essence, pointers and this seemed like a logical way of doing it, even if a bit verbose. The following is an example of a common declaration of a variable of the Integer type followed by a declaration of a variable that is a pointer to an Integer.


Dim I As Integer
Dim newX As Ref Integer

In order to actually the use the integer value that is referenced by this pointer you need to dereference the variable which is done using the syntax you can see in the following line:

newY = DeRef newX +5

Though it seems a bit on the lengthy side, it seems to fit in with the Basic language practice and is actually pretty clear about what the code is doing. Considering that at application level there is very little pointer usage in Morfik and since there are no pointers in Basic it seemed better to write a few characters more every once in a while than to add a cryptic operator for the sake of saving some keystrokes.

In general I believe that Basic developers should feel right at home with the language, though like everybody else, they will still need to learn the Morfik Framework.

Morfik AppsBuilder 2.0 comes in two flavors: BX for developers used to working with the Basic languages and FX for users used to working Object Pascal.

Differently from Morfik 1.x, where a single product allowed you to create projects in any supported language, Morfik 2 has a different version for each language. While this might seem like a step back from the previous version it has been my experience that people seldonly alternate between languages.

It is important to highlight that in my first tests the BX version was quite capable of opening a project created with FX and vice versa. You can open, compile and run a project created in a language different from the one which is the standard for that specific edition.

The only restriction in this new language scheme seems to be regarding project creation. You can even create new modules for projects in the other language and they will be created in the default language of the project even if it is different from the standard for your edition of Morfik 2.

One other important aspect of the newly announced Morfik AppsBuilder, which might be related to this change, is that the cost of joining the party is now significantly lower. You can get Morfik AppsBuilder 2.0, either BX or FX, for only $499.00.

Older Posts Home