Blogs

Registering classes

In PHPDevShell classes can be registered into the framework, either manually (in a config file) or from the database (usually by a plugin installation).

A registered class can be instanciated with the built-in factory, allowing some nice features:
- auto instanciation
- singleton
- auto dependency injection
- class aliasing (i.e. class override)

Class aliasing means that you can provide a class which will be used instead of another class and still be a daughter of of this class ; for example let's say I want to override the default login mecanism:

Access to multiple database

I've been recently asked how you can connect to a database server different than the "master", that is the server where the PHPDS installation resides.

Actually it's very easy as long as the server is Mysql:

class test_connector extends PHPDS_legacyConnector
{
 protected function applyConfig($db_config = '')
 {
  $this->dbHost = "localhost";
  $this->dbName = "test";
  $this->dbUsername = "username";
  $this->dbPassword = "userpassword";
 }
}

class test_query extends PHPDS_query
{

 protected $connector = "test_connector";

10 Best jQuery Plugins Of January 2012

jQuery can be defined as a cross browser Java script that is basically used to design with a purpose of simplifying the scripts on the client side of HTML. It is used on many websites all across the globe and is the most popular java script today.

http://technotab.com/10-best-jquery-plugins-of-january-2012/

Happy Birthday Brother

photo.jpg

Today my older brother celebrates his 36th Birthday. He always was a guiding hand in my life and is one of the most unselfish people I know. Through our life as kids, playing together he became my best friend and was this ever since. His motivation was the reason I am a coder today, him being a brilliant and vastly experienced software developer, who supported me during my self taught career.

Amon: Lightweight, Open Source App and Server Monitoring

Amon (named after the Egyptian Sun god or a demon) is a self-hosted toolkit that allows you to monitor web apps with a small footprint (Amon can fit in 20MB of RAM) and all the information kept in one place. It's a nice open source tool (with good docs) that can run on the smallest VPS you have. If you don't trust similar cloud solutions (some of which are not free) and you want to be in full control of your logs and performance history, then Amon is probably worth a look, especially for you DevOps folks.

http://server.dzone.com/articles/amon-lightweight-open-source

13 Most Used Speedy Tools To Write CSS And HTML Code

HTML which stands for Hypertext mark-up language is supposed to be the main language for web pages. Hence the purpose of a web browser is to read the HTML documents and then compose them into either audible or visible websites.

http://technotab.com/13-most-used-speedy-tools-to-write-css-and-html-code/

PHPDevShell © 2010 - All rights reserved.