someone’s getting a ring.

“Hey bro! Need help!”

“Tomorrow’s our 1st anniversary and I wanted to give her a ring. ”

“Could you also help me find a nice venue to spend some few days with here.”

Waaaaaaaaaaaaaaaaaaaaaaaaa! Oh this is serious. hehehe. Anyway, God Bless to you guys and hope you have many more anniversaries to celebrate. :)

Happy 1st Aniv.



creating a clade model

Basically, models are classes that represents a certain object. Clade Models extends the ActiveRecord class. The ActiveRecord class contains finders and other methods to manage the database. Since Clade is an MVC Framework, we will then discuss the basics in creating a model. Models must be located under app/models/ directory. The filename of the model to be created must be also the class name of the model.

Now, let’s try creating a model called User. The following code is a template of a model class.

class User extends ActiveRecord{

public function __construct($post = ”)

{

$this->tablename = ‘users’;

$this->property = $post;

parent::__construct();

}

}

Now we’ll create a model called User. Create a class called User and extend ActiveRecord.

class User extends ActiveRecord{

Models have constructors that is executed when the model is instantiated. The method __construct is a reserved keyword in PHP5 that serves as a constructor of a class. A default argument post is optional and can be used to pass any variable when the model is instantiated.

public function __construct($post = ”)

Models are basically a representation of an object. We need to specify the name of the table that this object will interact with. This example interacts with the “users” table, we will then assign the name of the table that we are going to use to this variable.

$this->tablename = ‘users’;

The assignment below assigns all posted variables to class attribute “property” if POST variable is passed in to the constructor of this model.

$this->property = $post;

We will then call the constructor of this model which is the ActiveRecord class.

parent::__construct();

Now, we’re done creating a model.



clade db config

All configuration files are located at config/ directory. By default, the database configuration is located in database.php under the config/ directory. Below is the detailed description of the database configuration.

Set the host name where the database is hosted. By default, the database host is located in the same machine of the web server, therefore, we use localhost.

$config[’HOST’] = ‘localhost’;

Set the user name authorized to access the database that will be used.

$config[’USER’] = ‘username;

Set the password of the user.

$config[’PASS’] = ‘password’;

Set the name of the database that will be used.

$config[’DB’] = ‘noypi’;



Clade Framework (Introduction)

Another MVC Framework? Yes, another MVC Framework, a filipino written MVC Framework. Evolving into a very dynamic framework, and despite of the hectic schedule, I’m getting this baby done. Still very immature and young but hopeful.

Stay tuned for more updates.

A Filipino MVC Framework by iyanski. If you want to contribute to Clade whether financially or technically(contribute code), please feel free to email me. I would appreciate it a lot.



let’s cross the bridge when we get there

i used to say this phrase when someone asks me and i can’t find answers to say.

“let’s cross the bridge when we get there.”

there are just instances when you loose control over things and it just screws up. at first, things seems like a dream and nothing undesirable is about to come, the next thing you knew, you ended up over the edge.

“let’s just do it, okay”

“it’s not that easy…”

why do we say no to things we haven’t even tried?



stumbled upon a blog

I decided to have my own hosted blog since people are getting their own. I do have a blog in blogspot and friendster but I think I’ll settle for this one.

Pinoyfreelancers by the way is a pet project of mine. Aiming to provide a venue for freelancers and clients to meet online. I’ve been busy with some projects lately and I’m still organizing things out.