Pak Jiddat

Read: In the name of thy Lord Who createth, Createth man from a clot. Read: And thy Lord is the Most Bounteous, Who teacheth by the pen, Teacheth man that which he knew not. Nay, but verily man is rebellious That he thinketh himself independent!. Lo! unto thy Lord is the return. (Sura Alalaq 96:8)

Managing Php scripts using the Pak Php Framework Admin Tool

Created On: 09 Jul, 2016: 09:27:32 - Tags : pak php framework

Introduction

Pak Php framework is a Php micro framework for developing general purpose Php applications. This article is about Pak Php Admin, an application based on the Pak Php framework, that allows managing Web Development activities. Php developers usually have to work with several tools while developing their application. Apart from developing the application, the Php developer also needs to manage his work. For example he needs to keep track of his invoices, expenses, customers, goals, tasks etc. Not only that but he also needs to organize his life. For example keep track of personal goals, daily activities, loans etc. The Admin tool allows the developer to manage his Php scripts and daily tasks from one place.

Installation

To use the Admin tool you have to download the Pak Php framework package from phpclasses.org. After downloading the package extract the file in your web directory and import the file dev_pakphp_com.sql located in framework/utilities/data folder. After that visit the web directory from your browser. You should see the following login page:

Pak Php Admin login page

You can login with the following credentials: user name: admin. password: admin.

Working with forms

The Pak Php framework Admin tool allows the user to create simple forms and list pages. These can be used to carry out simple tasks such as time tracking and goal management. The user of the Admin tool can create his own forms and fields. The following screenshot shows list of default forms:

Pak Php Admin form list page
The Admin tool includes several default forms. These are:
  1. Customers

    The Customers page allows the user to keep track of his customers. For each customer the user can enter the customer name, website, payment rate, email and information about accounts related to the customer.FTP, SSH or website user name and passwords can be entered under account information
  2. Projects

    The Projects page allows the user to manage his projects. For each projects, the user can enter the project name, project url, project description and project scripts
  3. Script

    The scripts form allows users to keep track of Php scripts. It allows the user to enter the name, project and description of the script. The Run option on the script list page allows the user to run the script. See following screenshot:
    Pak Php Admin scripts list page
  4. Commands

    The commands page allows the user to enter the script commands. For each command the user can enter the command name, command host, user input required by the command. e.g commit message and the estimated running time for the command. The following screenshot shows the command edit page:

    Pak Php Admin edit command page
  • Tools

    The tools form gives the user access to tools that are commonly used. e.g base64 encode/decoder. This tool is currently under development.
  • Tasks

    The tasks form allows the user to manage his development tasks. For each task, the user can add the time spent on the tasks, the earnings from the task, the contributions from the task and the learnings from the task.The idea behind the tasks form is that the php developer should make the most out of a task.For each task the developer can contribute source code, participate in online forums or write articles related to his task.The user can also record his earnings for the task. For example he can earn money, food, downloads of code related to the task and feedback.The user can also record his learnings for the task. For example he can write short notes about what he learned from the task. He can later combine his notes into an article. The following screenshot shows the task list page:

    Pak Php Admin task list page
  • Income

    The Income page allows the user to keep track of his overall monetary income. For each income earned, the developer can enter the customer name, amount, date and notes
  • Expenses

    The Expenses page allows the user to keep track of his expenses. For each expense he can enter the item name, amount and date
  • Goals

    The Goals page allows the user to keep track of his goals. For each goal the user can enter the goal name and goal notes
  • Loans

    The Loans page allows the user to keep track of his loans. For each loan the user can enter the name of the borrower, the amount and notes
  • Diary

    The Diary page allows the user to keep track of his daily activities. The user can enter the name of the activity, the date/time of the activity and the activity description.
  • Forms

    The Forms page allows the user to manage his forms. For each form the user can enter the form name, form fields, category and description. The user can also choose if he wants the form to show on the main menu. The category selectbox option on the form add/edit pages allows one form to be included as a sub form of another form. For example the Time Tracking form is a sub form of the Tasks form

Customizing pages

The admin tool automatically creates form and list pages. Sometimes we may want to customize a list page or a form page. For example we may want to add or remove columns from the list page or hide certain form fields. To customize a page, we first need to create the page from the Manage forms page. Once the page is created we need to create a php file for the page. See the files under the examples\admin\pages folder. For examples Customers.php. The name of this file should be in camel case and should be same as the name given on the forms page The new class should extend the UnstructuredUiData class and should implement the ListPageInterface and FormPageInterface. To add or remove a column from the list page, the class should implement a method called GetPresentationData. See Tasks.php file for an example of how to add or remove a column from the list page

Conclusion

The Pak Php Framework admin tool can be used to manage Php scripts. The admin tool is under development and more features are planned

Related Articles

  1. Developing WordPress plugins using Pak Php framework - Part 2
  2. How to test Pak Php applications
  3. Writing command line scripts using Pak Php framework
  4. Pak Php framework
  5. Developing WordPress plugins using Pak Php framework - Part 1
  6. Developing your own Php Utilities Framework