Done MVC

Posted February 24th, 2010 in blog by admin

Today, I done my MVC framework raw, not include library file.

Just call Controller -> Model -> View

I told about my controller in yesterday. Here my view design

class simpleModel extends Model {

function simpleModel()
{
parent::Model();
}
function printit()
{
$data['a']=1;
$this->load->view("Test",$data);
}
}

Continue Reading »

load model look like CI

Posted February 23rd, 2010 in blog by admin

Abstract class Controller extends Loader {
public $load;
function Controller()
{
	$this->load=$this;
}
abstract function index();
}

So, I can call like this

class IndexController extends Controller {

    function IndexController()
    {
        parent::Controller();
    }

	function index()
	{
		$this->load->model("simple");
		print_r($this->simple);
	}
}

This is my first time setting look like this and I never thinking before

$this->load=$this ;

In the old, I calling like this

$this->load->simple->function();

hmm… How stupid it!!!
Cheer!!!!
Saturngod

Apiwork

Posted February 22nd, 2010 in blog by admin

I gave my framework name is apiwork because it just design for api. I made api library for Google,Twitter, Facebook and I hope i will add more in my framework. It’s my private framework and it just use in my work. In the previous two week, I tooke a time for Google API with oAuth. Now, I totally understand and I made my own class for Google API and gxml_parser class. Gxml parser class for retrive the data from atom and xml for google api. 

My framework totally look like CodeIgniter because I’m cary on CI. haha… it true… let check this code.

$this->load->model(“mymodel”);

I got this idea from CodeIgniter and I’m making MVC and totally base on CI frarmework design. So, syntax look like CI. By the way, today I new codaset git hosting. I can use private hosting in there. Codaset still beta and it will be charge for host. I host my apiwork code in there. Github is nice for Git Hosting but private hosting price is not cheap. I just use for personal and not for business. So, I can give money to github and I use codaset :)

I also think about should I release my MV framework Draft ? No library. Just framework. So, some begineer may learn how to make MVC framework. Another thing, my framework’s library should use in native PHP like Zend. So, my co-worker can use in other project easily. Imm… need to do many things in my apiwork.

 

Authsub vs oAuth

Posted February 12th, 2010 in blog by admin

AuthSub

Don’t need consumer key and secret

oAuth

Need consumer key and secret

AuthSub

Easy to use.

oAuth

need to knowledge about oAuth.

AuthSub

Session will expire.

oAuth

get the access token and secret and access all the time when untill user revoke the site.

Authsub

Use only in Google API. use for one time access.

oAuth

Use many in many API. Google, Twitter, etc. Use for grant access.

AuthSub


oAuth

Busy with oAuth

Posted February 10th, 2010 in blog by admin

In this days, I am so busy with oAuth. I host my mediatemple and trying oAuth playground. All are ok but post and put have been error. I try, try… but same error. So, I try to change in Google oAuth Playground and it’s working. It’s a problem or hosting or what that ? I lost 2 days with oAuth Playground in mediatemple. Now, trying oAuth in google code playground and I need to soultion in my hosting mediatemple.

Page 1 of 212