noloh Logo SmallDeveloper Zone
Username:
Password:
remember meforgot password?Login
twitterfacebookirc
plusfolder closePrinciples
plusdocumentWhat is NOLOH?
plusdocumentWhat's so Bad About Markup?
plusdocumentDevelopment and Philosophy
plusfolder closeFeatures
plusdocumentSyntactical Sugars
plusdocumentMultiple Inheritance
plusdocumentBookmarks and NOLOH
plusdocumentUser State Management
plusdocumentSearch Engine Friendly
plusfolder closeGetting Started
plusdocumentPHP and NOLOH Syntax
plusdocumentHello World
plusdocumentConstructors
plusdocumentInstalling NOLOH
plusfolder closeCrash Course
plusdocumentNOLOH and CSS
plusdocumentLayout in NOLOH
plusdocumentDatabases
plusdocumentData::$Links
plusdocumentEvents in NOLOH
plusdocumentMoving and Resizing Your Objects
plusdocumentMultiple Inheritance
plusdocumentBookmarks and NOLOH
plusdocumentData Binding
plusfolder closeAdvanced Topics
plusdocumentCustom Events
plusdocumentClientside Functions
plusfolder closeSyntactic Sugars
plusdocumentSyntactical Sugars
plusdocumentCascading
plusfolder closeCoding Guidelines
plusdocumentBest Practices
plusdocumentNOLOH Naming Conventions
Hello World
Hello Worldoverviewdiscussion

Most books on programming start out with an example of how to display a string, "Hello World." We wanted to do the same thing in NOLOH to give you an idea just how concise NOLOH programs can be and still be completely understandable.

We've included two versions of a Hello World application. The first version is uncommented so you can read through it without anything getting in your way. The second version is commented so you can get a clearer idea of how NOLOH programs are constructed.

Uncommented Version

<?php
require_once("NOLOH/NOLOH.php"); 
 
class HelloWorld extends WebPage
{
    function HelloWorld()
    {
        parent::WebPage('My First NOLOH Application');
        System::Alert('Hello World');
    }
}
?>

Commented Version

<?php
//Path to the NOLOH kernel
require_once("NOLOH/NOLOH.php"); 
//Declare a HelloWorld class that extends the built-in NOLOH WebPage class
class HelloWorld extends WebPage
{
    //Declare a Constructor for the HelloWorld class
    function HelloWorld()
    {
        //Call the parent WebPage Constructor passing the title of the web page
        parent::WebPage('My First NOLOH Application');
        //Call NOLOH's built-in Alert function and pass it a string to display
        System::Alert('Hello World');
    }
}
?>
smallarrow
explanation arrowtool tip
8
handlebgexpand left
Right Up Outer CornerRight Down Outer CornerLeft Up Outer CornerLeft Down Outer Cornersearch-bottomclassconstantpropertymethodarticle
controltabsearchbig