SartajPHP ( PHP Framework )


Introduction SartajPHP Framework

Introduction About SartajPHP Framework

SartajPHP (SPHP) is a PHP Framework which provides us all essential tools for development rapidly.It is very flexible framework which gives option to choose techniques and methods of development like if you are desktop software developer you like to code with logic but if you are a front designer you like to work with front end techniques without any Java or PHP coding. This provides varies tools which help you in web development. Assume if You want to develop an web application in SartajPHP then you are required to knowledge of below Steps.

  1. Project Settings
  2. Create a Master Design
  3. Create a SartajPHP Application
  4. Register An Application
  5. Create Temp File Objects (Also Called Front Design File)

First We need to understand the working model of SartajPHP Application--

  1. First Browser Send Request to Server and Request handle by Start App Engine. It find the controller application from registry file. If Controller is registered which is requested by browser then it pass the request to that application.
  2. A SartajPHP Application Check for Event Handler and process that event handler.
  3. SartajPHP Application can use various type of object for processing and return output to Application Engine.
  4. Application Engine Return HTML Output to browser.

Rules:  

  1. Never use any HTML Tag in an Application.
  2. Never use Head Tag Section in Temp File.

Look Event Handler of Application

public function page_event_myhandler($evtp){

    echo "Hello SartajPHP Application";

}

Look Temp File Code View


<form id="form2" class="form-horizontal form-striped" runat="server" funsetAJAX="" 
action="##{ getAppURL('orders'); }#"><br /> 
<label id="lbl1" path="libpath/comp/bundle/bootstrap/HLabel.php" 
fursetLabel="Customer Id,|sltcustomer_id" runat="server" 
funsetSize="col-md-4,|col-md-8"><br /> 
<select id="sltcustomer_id" runat="server" dfield="sltcustomer_id" 
class="form-control" funsetForm="form2" funsetMsgName="Customer Id" 
funsetOptionsFromTable="id,|aname,|tblcustomer,|WHERE id='1'" 
></select><br /> </label><br /> 
<label id="lbl1" fursetLabel="Po,|txtpo" runat="server" 
><br /> 
<input id="txtpo" runat="server" type="text" dfield="txtpo" class="form-control" 
funsetForm="form2" funsetMsgName="Po" funsetMaxLen="20" /><br /> 
</label><br /> <label id="lbl1" fursetLabel="Due,|datdue" 
runat="server" ><br /> <input id="datdue" runat="server" type="date" 
dfield="datdue" class="form-control" funsetForm="form2" funsetMsgName="Due" />
<br /> </label><br /> 
<label id="lbl1" fursetLabel="Status,|sltstatus" runat="server" ><br /> 
<select id="sltstatus" runat="server" dfield="sltstatus" class="form-control" funsetForm="form2" 
funsetMsgName="Status" funsetOptions="Ready,Work" ></select><br /> </label><br /> 
<label id="lbl1" fursetLabel="Des,|txades" runat="server" ><br /> 
<textarea id="txades"
runat="server" dfield="txades" class="form-control" funsetForm="form2" funsetMsgName="Des"
funsetMaxLen="1024" ></textarea><br /> </label><br /> 
<div class="align-center"><br /><input type="submit" value="Save" 
class="btn btn-primary btn-small" /><br /> </div><br />