In this document you will guided step by step to create your first page with the Phi framework. Artephis is the editor you design and add functionality to your dynamic web pages in Phi.
Start Artephis from the Start-menu (Phisketeer folder) or from the binary path, usually C:\Program files (x86)\Phisketeer\bin\Artephis.exe
Mac OS X
Open Finder and start Artephis from the Applications folder or from the Launchpad.
Unix / Linux
Untar the downloaded archive
$ tar -zxf Phisketeer-Linux64-2_x_y.tar.gz
Check phisketeer-2.x.y/bin/Artephis for missing libraries on your system
$ cd phisketeer-2_x_y/bin $ ldd Artephis
In Ubuntu for example you can install depended libraries with
$ sudo apt-get x11-common libxfixes3 libxcb-dri2-0 libxcb-glx0 libxdamage1 libglapi-mesa libgstreamer0.10-0 libxslt1.1
If all libs can be resolved start the Artephis IDE
Now use the Settings menu from Artephis and start the Phis server.
Setting up the page
First we need to define some setting for our new page.
- Click on the Settings icon to open the page dialog (or open the context menu by clicking the right mouse button in a free page area and select Page settings). In the Info tab you find the Page ID. You can overwrite this page ID, however it must be unique through all pages in one domain (Phis, the web service caches pages for faster access).
- Enter a title for your page.
- Change to the Page tab and click on the background color button. Choose a light gray color.
- Accept the settings by clicking on Ok.
Adding items to the page
In the element box you find all items Phi provides for your page.
- Drag an Ellipse item and drop it in the center of your page.
- Enable the Grid for snapping positions.
- Use the red boxes to change the size.
- Double click the ellipse to open the property dialog (you can also click on the tools icon in the menu bar, or use the context menu by right clicking on the item).
- The Id is the unique item id for this page. The Parent is the container item for layouted items. You may ignore this yet. Change the Id to ellipse_1.
- Enter 1440 in the span angle (spans a 90° angle counter clockwise from the horizontal: 1=1/16th degree).
- Change to the Gradient tab and play around with some gradient settings. You can also save your newly own created pattern.
- Click on the Effects tab and choose Graphical. Select Shadow.
- Close the dialog by pressing Ok.
- Press Ctrl-C and than Ctrl-V to get a copy.
- Open the second ellipse_2 property dialog and enter 1440 in the start angle.
Saving the page
Now we need to save the page and view it via an external browser or Amphibia.
- Select Save as from the menu and save your page in the document root of the server, located usually in:
- Windows: C:\Program files (x86)\Phisketeer\data\default\localhost
- Mac OS X: ~/Library/Artephis/phis/default/localhost
- Unix / Linux: /var/phis/default/localhost
- Apache module: See Apache document root
- Ensure you have write permissions to the location.
- Save it as mypage.phis (*.phis is the ending for Phi server pages).
- Verify the location: usually after installation of the PhiSuite you find already two pages phitest.phis and phitestpost.phis in that location.
Since PhiApp directly from the tool menu viewing the current edited page.you can start the standard browser or
Testing your page in a browser
After saving you can directly test your page in a browser.
Or open the URL manually in your favorite browser:
- Open a browser of your wish (like Firefox, IE, Opera).
- Enter the URL (per default Phis serves the pages on port 8080): http://localhost:8080/mypage.phis.
- You should now be able to view the two created pies with a shadow.
- Examine the source code (HTML output) which Phi created for your page.
Phi creates PNG images for all your graphics, slide shows, rollovers, etc. automatically and generates special code for every browser type to optain the best supported results by each browser and version, ie. a SVG (scaleable vector graphics) item will be rendered as an image on server side if the browser does not support it natively. This frees a developer completely from implementing browser specific details and he can concentrate on the functionality.
You can see which browser code is used if you examine the HTML header, for example: <meta name="generator" content="Phis 1.4.0/Gecko 19">
See also: Supported browser engines.
Note: Since PhiPlugin is obsolete and not longer supported.the
- Each page needs its own page ID within the same domain.
- You may use a grid to arrange your items.
- Gradients are a powerful effect for some display items.
- Items have a unique ID within the same page.
- Phi server pages have the file ending *.phis.
- Embeded images in the page are created as PNGs sent to the browser.
- Phi creates different HTML code for several browsers.
- You can copy items between pages or the same page by pressing Ctrl-C and Ctrl-V (Cmd in Mac OS X).