Quick Start

Current Status

In its final form IntraWeb 17 will be fully integrated into Delphi (and later other) platforms and function in a very similar fashion as IntraWeb 14 does now. See here for instructions on installing and using the Delphi Beta release.

IntraWeb 14 uses JavaScript for its client side libraries, but IntraWeb 17 uses TypeScript instead of JavaScript for the client side libraries. IntraWeb 17’s client side libraries are also far more extensive to allow more features. Using TypeScript instead of JavaScript allows us to develop more complex code effectively.

Good Riddance JavaScript, Say Hello to TypeScript

While we will be integrating fully into Delphi, we are not there yet and are focusing on the TypeScript libraries and in fact you can build whole applications using TypeScript combined with REST or other services provided by Delphi or other.

Because of this, to test IntraWeb 17 at this early stage one must be able to code in basic TypeScript. However Delphi and TypeScript (and C# which TypeScript is largely modeled after) are all creations of Anders Hejlsberg. This means TypeScript is very easy for Delphi developers.

TypeScript unlike other languages which transpile to JavaScript is a JavaScript super set. JavaScript code can be cut and pasted into TypeScript unchanged and makes integration with JavaScript libraries far easier than with other transpiled languages. TypeScript is a kind of JavaScript++.

Below is some sample TypeScript code from an IntraWeb 17 test application:

namespace TestApp {
  export class DataSimple extends DataSimpleGen {
    public Page_AfterLoad(): void {
      this.CodeStatusText.Text.Value = "Code is now loaded.";
    }
    public Page_BeforeRender(): void {
      const xCursor = this.dsUsers.Cursor;
      this.NameText.Text.Value = xCursor.Row.name;
      this.UserCountText.Text.Value = (xCursor.GetRowIdx() + 1) + " of " + this.dsUsers.Data.length + " users.";
    }

    public Event_PrevButton_Click(): void {
      this.dsUsers.Cursor.MovePrior();
    }
    public Event_NextButton_Click(): void {
      this.dsUsers.Cursor.MoveNext();
    }

    public Event_AddButton_Click(): void {
      const x = this.dsUsers.Cursor.CloneRow();
      x.name = "John Jones";
      x.username = "JJones";
      this.dsUsers.Cursor.Insert(x);
    }

    public Event_DeleteButton_Click(): void {
      const xRow = this.dsUsers.Cursor.Row;
      IntraWeb.Dialogs.YesNo("Are you sure you want to delete " + xRow.name + "?", IntraWeb.Dialog.YesNoResult.No,
      (aSender: IntraWeb.Dialog.YesNo) => {
        if (aSender.Result === IntraWeb.Dialog.YesNoResult.Yes) {
          this.dsUsers.Cursor.Delete();
        }
      });
    }
  }
}

Next Steps

  1. Install
  2. Run
  3. Develop