Location: PHPKode > projects > Aukyla Document Management System > doc/html/gettingstarted.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Aukyla PHP Framework</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="StyleSheet" href="auton.css" type="text/css" media="screen">
  </head>

  <body>
    <div id="mainmenu">
      <a href="http://www.auton.nl/" class="home">Home</a>
    </div>
    <div id="submenu">
      <a class="logo" href="http://www.auton.nl/"></a>

      <div class="head">Ads</div>
      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=116358&amp;type=1" alt="SourceForge.net Logo" style="padding: 2px 4px; width: 88px; height: 31px; border: 0px"></a>
      <a href="http://getfirefox.com/" title="Get Firefox - The Browser, Reloaded."><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox" style="width: 110px; height: 32px; border: 0px"></a>
    </div>
    <div id="main">
      <div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
      <h1>Getting started with Aukyla programming</h1>

      <p>The first thing you should try to become familiar with when you want
        to start programming with Aukyla are frontends. I suppose you have
        downloaded and installed the Aukyla PHP Framework at this point.</p>

      <h2>Analyzing the Dummy frontend</h2>

      <p>In your Aukyla root, go to the plugins/Frontends directory. By
        default, there's a file named DummyFrontend.php in there, this
        represents the Dummy frontend. Open the file to see how it looks
        like.</p>

      <p>The file starts with a list of includes through the require_once()
        function. The require_once() statements are required to make available
        Aukyla's classes and functions to your script. In the API documentation
        of Aukyla you will see mentioned in which file a class or function is
        defined. This is the file you will need to include to be able to use
        the class or function.</p>

      <p>After this you will find the definition of the DummyFrontend class.
        The DummyFrontend class implements the Frontend interface, which all
        frontends should do. The Frontend interface specifies two functions,
        namely buildGUI() and showGUI(), which are implemented by the Dummy
        frontend.</p>

      <p>The first two important things which you will see in the buildGUI()
        function are the Locale::init() call and the creation of the
        WindowManager and MainWindow objects. The Locale::init() call is
        important and is used to let the localization module know for which
        module (in this case the Frontends module) it should load translations.
        Without this call, translations will not work for your module.</p>

      <p>The creation of a WindowManager object is only necessary if you want
        to support multiple windows, this is not actively taken advantage of by
        the Dummy frontend. The creation of the MainWindow is the start of
        creating a user interface. After this, the real building of the
        interface can start. New widgets can be created. With every new widget
        the parent widget is specified in the first argument to the
        constructor. Right after the MainWindow is created, widgets are added
        which use the MainWindow as their parent. Then if those added widgets
        are so called Container widgets, they can contain new widgets
        themselves and these widgets can be used as parent for other widgets.
        You can see in the API docs whether a widget is a Container widget by
        checking whether it inherits the Container class.</p>

      <p>Then a menu is created. Note that when the menu is created and entries
        have been added, the menu is still open for changes. For example, an
        application which is called by the frontend could still add its own
        entries to this menu. Applications can get access to menus through the
        MainWindow::mainMenu() and MainWindow::menu() functions. You can also
        see that the frontend builds the menu differently for anonymous and
        logged in users.</p>

      <p>When the menu is built, multiple views are defined. A login view, a
        ConfigEditor view and a simple default view are provided.</p>

      <p>Finally, the MainWindow is stored and in the showGUI() function, the
        window is shown.</p>

      <h2>Creating your own frontend</h2>

      <p>Now we've been through the Dummy frontend, you should know most about
        how a frontend should work. To create your own frontend, just create a
        new file in plugins/Frontends directory and create a file in it ending
        in "Frontend.php". Something like plugins/Frontends/My/Frontend.php will
        do. Make sure you define a class My_Frontend then and that it implements
        the Frontend interface (that also requires including Frontend.php).
        Implement the two functions buildGUI() and showGUI() and you have your
        own frontend. You can then activate it by setting the value of the
        "frontend" variable in the file config/global.conf from "Dummy" to
        "My/". Notice the directory seperator, by putting your frontend in a
        seperate directory you will be able to easily localize your frontend.</p>

      <p>To make your frontend a bit more interesting, you can add some
        features to it and let it incorporate some application(s). For a good
        example to see how this is done (and how writing an actual application
        is done), take a look at the
        <a href="http://www.auton.nl/software/apps/adms/en/">Auton Document
        Management System</a>.</p>
    </div>
  </body>
</html>
Return current item: Aukyla Document Management System