Forums

PHP

This topic is locked

UD / PHakt Newbie

Posted 25 Oct 2001 00:20:21
1
has voted
25 Oct 2001 00:20:21 andy dick posted:
OK, maybe this is a stupid question but I have been coding PHP for about 2 years now, and just now ran across UD and PHakt. I guess my simple questions are these:

1. PHakt is just for the development phase on a remote PC right? I do most of my dev on a local box with PHP Coder and upload it to my server to test it. (That is what I do now, I obviously want to use UltraDev)

2. If I use this with ADODBC and upload the sites, what do I need for them to work? I just started messing with it an hour or so ago , so I am still getting used to it. I guess I just want to makes sure that when I upload the sites it will work the same way as hand coding.

3. Since PHakt supports multiple databases, is the PHakt code essentially a database abstraction layer? Can the database type change fairly easily for the user if they want to go from MySQL to Postgres to Oracle?

Thanks,
Andy




Edited by - idevelopit on 10/25/2001 00:49:13

Replies

Replied 25 Oct 2001 08:59:16
25 Oct 2001 08:59:16 Bruno Mairlot replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
1. PHakt is just for the development phase on a remote PC right? I do most of my dev on a local box with PHP Coder and upload it to my server to test it. (That is what I do now, I obviously want to use UltraDev)
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
No, Phakt (as all Server Model) as two purpose : Getting Ultradev to knows about Database connection. It needs to have knowledge of two types : the local one, and the remote one. The second purpose is to give you ServerBehavior that would accelerate your developpment by using pre-defined code, for doing repetitive task like connecting to a database, fetching rows from a query and showing them on the page.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
2. If I use this with ADODBC and upload the sites, what do I need for them to work? I just started messing with it an hour or so ago , so I am still getting used to it. I guess I just want to makes sure that when I upload the sites it will work the same way as hand coding.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Normaly, nothing. The ADODB files are indeed an abstraction layer, just like ODBC is. It creates a class that will inherit the specific DB methods.

The difference between hand-coding, is that you will call native PHP function. Like mysql_connect, or oracle_connect.

Here, the ADODB will choose the right methods without changing a bit in your page. Hem, actually, it will just change the type of DB you want.

If you take a look at the ADODB files you get when creating a connection, you'll see that, basically the file included in your PHP file is adodb.inc.php, and all other files are DB specific.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
3. Since PHakt supports multiple databases, is the PHakt code essentially a database abstraction layer? Can the database type change fairly easily for the user if they want to go from MySQL to Postgres to Oracle?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Actually I've never tried to switch from a DB to another, but I guess you won't have a lot of things to do.

Phakt has been developped with exactly that things in mind, so I suppose it has been tested.

--- Better to die trying, than never try at all ---

Reply to this topic