logo

psx framework

because it is the logical conclusion


Home

Welcome,

psx is a framework for developing dynamic Web sites in PHP. It is completely object-oriented programmed and designed in a modular fashion. All classes in the psx library are independently usable because of dependency injection. It has a focus on social technologies and provides classes to use and implement OAuth, OpenID, OpenSocial, PubSubHubbub, Atom, and RSS. It has a strict separation between code logic and design. The template engine is based on pure PHP, which means speed and flexibility.

 

What makes psx unique?

There are three things first the library wich provides innovative classes for accessing and building social web services, second the routing mechanism and third the action oriented methods. psx has a library wich uses dependency injections so that you can use any class independently from psx. In psx you can access every public method of the controller i.e. with index.php/[class]/[method] this is relative common but in psx you can also access static methods with index.php/[class]::[method] therefor no instance of the module is created and only the method is called. You can implement the interface psx_module_private if you dont want that anybody can access the methods of a class. Note public static methods can always be accessed. In psx every module can use the following action oriented methods: on_load, on_get, on_post, on_put and on_delete. The on_load method is called when the modules starts the other methods depends on the request method. Enough of talking here an example to show you how beautiful the code of psx is:

   1 <?php
   2 
   3 class yoda extends psx_module
   4 {
   5         public function on_load()
   6         {
   7                 $sql = new psx_sql(new psx_sql_driver_pdo(), $this->config);
   8 
   9                 $abilities = array();
  10 
  11                 if(($result = $sql->assoc('SELECT ability FROM force')))
  12                 {
  13                         foreach($result as $row)
  14                         {
  15                                 $abilities[] = $row['ability'];
  16                         }
  17                 }
  18 
  19 
  20                 $this->registry['template']->assign('abilities', $abilities);
  21 
  22                 $this->registry['template']->set('home.tpl');
  23         }
  24 }

 

Why another framework?

I start developing on psx to learn OOP with php and to have a base from which I develop other projects but the developing has evolved to a passion. Because of that it is not my intention to gain popularity. I want to share this (from my opinion) piece of art with the world because of that I offer this here as open source (GPLv3). You can do with psx anything you like but Iam pleased if you mention me when you use it for your project.

 

How can I start?

To start developing with psx you should read first the manual. If you have any questions you can write an email to the mailinglist. Also a good learning resources is the example and API page. If you want support this project just write me an email with new ideas or improvement proposal. I appreciate any kind of constructive criticism because thats the only way to develop extraordinary software).

 

 

best regards

k42b3

created by k42b3 last modified on Mon, 12 Apr 2010 10:47:12 +0200