• Hello
    • Table
    • DataGrid
    • Checks and Radios
    • TextBoxes
    • Nested
    • Markdown
    • Themes and language
  • Some cool features in `red.web`

    Server side events

    We allow you to write code on the server that executes whenever something happens in the client.

    Your user presses a button in their browser, your code runs on the server.

    Seperation of UI from logic

    From now on, you'll really be able to separate UI from logic. Every page will have a ui template and a class implementation. As an added bonus, all templates are fully localizable without disturbing the logic in the implementation.

    Safe, easy data access

    We provide PDO based connectors to mysql and sqlite databases. Making it simple to use prepared statements and prevent any possible attack vector for sql injection from ever existing in your code.

    You can ofcourse still opt to use your favorite orm tools

    Rich collection of built-in controls

    • Tables
    • Repeaters
    • Images
    • Textboxes
    • Buttons
    • Carousels
    • TabContainers

    And it's all themable.

    Speedy

    Most speed optimization is made to cut development time. Because it's cheaper to add a server than to add a developer, a simple fact of life that is not likely to ever change. But at runtime the framework is no slouch either. The template parser is built on top of DOMDocument which is built on libxml and it is fast.

    Support for your favorites

    Do you like using Markdown? Smarty? PHPTAL? you're in luck! red.web already supports Markdown and we'll be adding PHPTAL and Smarty support over the next few weeks.

    Hello, World!

    Hello and welcome to the demonstration page of the red.web framework for php.

    On these tabs you'll find a few widgets to play with that demonstrate the way this framework allows you to build web pages with hardly any code.

    In fact... the only code in this pages' class file is the event handling for the two buttons you see on this page and amounts to a mere handful of lines of code.

    The code does not change when you change the language, since that's just view information.



    • Clicking this button triggers the onBtnHello_Clicked handler. It does this without the need for glue code because autowiring of events is enabled.


    • This button triggers the onBtnCrash_Clicked handler which trows an exception so you can see what kind of information you can expect to see on a developers error page.

  • Table

    This table manages its own state as do all the controls, and it allows pagind when necesary.

    Type Name SQL
    0 table Page CREATE TABLE "Page" ( "ID" integer NOT NULL PRIMARY KEY ON CONFLICT FAIL AUTOINCREMENT, "ParentID" integer, "UrlPart" text(64,0) NOT NULL ON CONFLICT FAIL, "Title" text(96,0) NOT NULL ON CONFLICT FAIL, "Content" text NOT NULL ON CONFLICT FAIL, "Author" integer NOT NULL ON CONFLICT FAIL, "Created" text NOT NULL ON CONFLICT FAIL, "Version" integer NOT NULL ON CONFLICT FAIL, CONSTRAINT "fk_Page_ParentPage" FOREIGN KEY ("ParentID") REFERENCES "Page" ("ID") ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT "ux_Page_UrlPart_within_ParentID" UNIQUE (ParentID ASC, UrlPart COLLATE NOCASE ASC) )
    1 index sqlite_autoindex_Page_1 null
    2 table sqlite_sequence CREATE TABLE sqlite_sequence(name,seq)
    3 table Member CREATE TABLE "Member" ( "ID" integer NOT NULL, "Username" text(32,0) NOT NULL, "Password" text(128,0) NOT NULL, "Email" text NOT NULL, "DisplayName" text NOT NULL, PRIMARY KEY("ID") )
    4 table Person CREATE TABLE "Person" ( "ID" integer NOT NULL, "Lastname" text NOT NULL, "Firstname" text NOT NULL, "Middlename" text NOT NULL, "Maidenname" text NOT NULL, "Gender" text NOT NULL, "Birthdate" text NOT NULL, "Email" text NOT NULL, "MobilePhone" text NOT NULL, PRIMARY KEY("ID") )
    SQLITE_MASTER
  • DataGrid

    This DataGrid is very similar to the Table on the previous tab, but it is also sortable and able to generate some events. Markup is otherwise identical to the Table.

    Type Name SQL
    0 table Page CREATE TABLE "Page" ( "ID" integer NOT NULL PRIMARY KEY ON CONFLICT FAIL AUTOINCREMENT, "ParentID" integer, "UrlPart" text(64,0) NOT NULL ON CONFLICT FAIL, "Title" text(96,0) NOT NULL ON CONFLICT FAIL, "Content" text NOT NULL ON CONFLICT FAIL, "Author" integer NOT NULL ON CONFLICT FAIL, "Created" text NOT NULL ON CONFLICT FAIL, "Version" integer NOT NULL ON CONFLICT FAIL, CONSTRAINT "fk_Page_ParentPage" FOREIGN KEY ("ParentID") REFERENCES "Page" ("ID") ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT "ux_Page_UrlPart_within_ParentID" UNIQUE (ParentID ASC, UrlPart COLLATE NOCASE ASC) )
    1 index sqlite_autoindex_Page_1 null
    2 table sqlite_sequence CREATE TABLE sqlite_sequence(name,seq)
    3 table Member CREATE TABLE "Member" ( "ID" integer NOT NULL, "Username" text(32,0) NOT NULL, "Password" text(128,0) NOT NULL, "Email" text NOT NULL, "DisplayName" text NOT NULL, PRIMARY KEY("ID") )
    4 table Person CREATE TABLE "Person" ( "ID" integer NOT NULL, "Lastname" text NOT NULL, "Firstname" text NOT NULL, "Middlename" text NOT NULL, "Maidenname" text NOT NULL, "Gender" text NOT NULL, "Birthdate" text NOT NULL, "Email" text NOT NULL, "MobilePhone" text NOT NULL, PRIMARY KEY("ID") )
    SQLITE_MASTER
  • A table with checkboxes

    Just here to prove that state is maintained for checkboxes as well.

    Some radio buttons
    More radio buttons
  • Textboxes

    This page shows some different types of primitive textboxes.

    Textbox
    Multiple lines
    Password textbox
  • Yes...

      • You can
      • Another nested page
    • Indeed

      Since everything is a distinct object, from basic html tags to intricate controls, There is nothing stopping you from nesting multiple TabContainers.

    • Although..

      I wouldn't recommend it in most cases.

        • You can
        • Another nested page
      • Indeed

        Since everything is a distinct object, from basic html tags to intricate controls, There is nothing stopping you from nesting multiple TabContainers.

      • Although..

        I wouldn't recommend it in most cases.

          • You can
          • Another nested page
        • Indeed

          Since everything is a distinct object, from basic html tags to intricate controls, There is nothing stopping you from nesting multiple TabContainers.

        • Really?...

          It's getting silly.

  • This is a page containing John GruberMarkdown

    Markdown is a neat way for writer types (as opposed to developer types) to "markup" content. Originally implemented in (i believe) perl by John Gruber of daringfireball fame.

    I hardly know enough about markdown to write something useful about it, but I know enough to realize you can't really have a framework that doesn't support it.

    Rather than reinvent the wheel, I opted to use a particularly good third party implementation of the parser/transformer, by Michel Fortin to integrate.

    This TabPage contains a single red.web.ui.controls.StaticText control with the isMarkDown flag set to true.

  • Theme
    Language