Quick Start

How a project's development starts basically depends on the demands of the requirements, but typically it is either front end of the website or in the admin panel.

First, log in to the admin panel (see the link in the footer) and go to "Preferences > Admin Settings," where you can change basic information. Moreover, check all the other menus under "Preferences" to explore other options. Among them, theme is one of the options that helps to change the installed themes.

Note: Two basic themes have been released as samples with the installation of version 4.0.5. These themes have been given as a sample, but other themes may vary depending on the theme developer. How to develop a theme has been described in the Theme Development Section.

Customize website content

Login to the admin panel and activate the theme "White Cloud" from the below location

Preferences > Theme.

We can use Page Manager to modify the content of the website. Go to the below location to modify website page content.

Page Manager > Static Pages > Manage Pages

For this theme, Page Manager will help modify the HTML content as well. Go to the dynamic pages section to modify the content from the below location.

Page Manager > Dynamic Pages > Manage Pages

White Cloud is a special theme that saves all HTML content to the database and allows modification from the admin panel. However, because HTML is generally saved in the file system, you should find it in the below folder. To simulate this, you can use the Rainy Day theme.

development/view/rainyday

Note: Dynamic pages allow HTML and PHP to be executed, and it is recommended that Apprain Factory be used to access all internal resources.

Create your first controller and page:

Creating a controller and a page is generally the first step of a project to create a webpage and process data. More detail will be in the documentation, but we will see a simple simulation here. A controller is a class containing a set of methods; a method is called an action method when we add the word "Action" at the end of the function name. As a result, it gains the ability to display a page and interact with external calls. Create the below class in the "development/controllers" folder with the name helloworld.php.

class helloworldController extends appRain_Base_Core
{
  public $name = 'helloworld';
  public function mypageAction(){}
}

Now create a folder called "helloworld" in your theme directory; for example, if the theme name is White Cloud, then the location will be

/development/view/whitecloud/

Inside the folder, create a file with the name "mypage.phtml," which is basically the name of the action method, and put some content there. 

Now you can browse the page with the below convention:

[domain name]/[controller name]/[action method name]
For example www.example.com/helloworld/mypage

This is a minimal example of a controller, and there are many more things to do, which can be found in the documentation.

Page in Admin Panel:

After creating a page to render in the admin panel with user authentication, it is widely used in enterprise projects. To render a page in admin panel simple add a tab name in action method

public function mypageAction()
{
   $this->setAdminTab('page_manager');
}

Now if you browse the same page, it will be rendered in the admin panel. For further development, see the documentation.

More Quick Points

  • Log in to the Admin Panel, then Preferences > Theme. You can edit Header, Footer and default css throught App Editor. Evaltually, you can edit files across the project.
  • Visit the Applications page in the admin panel to install and test all of the available components. A popular tool for creating reports is called Appreport.
  • Database Expert in the Preferences tab helps to import, export, and backup databases.
  • Read the user manual for more help

Apprain 4.0.5

Version 4.0.5 has come up with many fixes with the new version of PHP.This release includes two components: ethincal and messenger, which play a significant role in development.