...

View Full Version : Testers required



Mhtml
02-06-2007, 03:48 PM
I've been writing up a nice AJAX/PHP5 database utility (think phpmyadmin on steroids) and it's starting to actually look like something and I've squashed all the major bugs I've managed to find.

This is my first PHP5 application (decided it's been long enough since apache2 and php5 first hit the streets to upgrade) so I'm hoping I've done things the right way, and not missed any new facilities provided in substitute for old.

So if you have a sound knowledge of PHP5, especially objects and OOP design principles (this entire application roles out from a singleton style class directly from entry point- just to confuse you youngsters) reply here and I'll get in contact with you with more information.

Thanks.

[edit:] Didn't specifically state that I'm looking for people to go through my code not just play with the application.

Spookster
02-07-2007, 03:24 AM
I'm having flashbacks of the shoutbox incident. :D

Mhtml
02-07-2007, 04:27 AM
lol I've learnt my lesson from that incident my lord. But just to be sure I'm going to go back over the relevant code, don't want you running around spoofing and injecting stuff again.

ralph l mayo
02-07-2007, 06:29 PM
I'll look at the code if you want. My primary experience is in MVC, but I get the gist of major patterns. The singleton sounds kind of sketchy ;)

Mhtml
02-07-2007, 06:51 PM
Great! I'll PM you within the next few days with a bit more info, just sorting out a few glitches I found and writing an installer. I'm thinking about moving the database abstraction class to mysql 4.1+ specific code, hope this is fine for you? I may just write a separate abstraction class and it can be changed with a factory based on configuration settings...

Any thoughts?

marek_mar
02-07-2007, 06:51 PM
This sounds interesting.

GJay
02-07-2007, 07:46 PM
how well abstracted is the db layer? Would swapping in a replacement class for postgres 'just work' do you think, or would it be a big task? I'd be interested to see how easy that would be (and I'd make such a replacement if it proved to fit in easily...), as a decent postgres admin app is appealing...

Mhtml
02-07-2007, 07:55 PM
how well abstracted is the db layer? Would swapping in a replacement class for postgres 'just work' do you think, or would it be a big task? I'd be interested to see how easy that would be (and I'd make such a replacement if it proved to fit in easily...), as a decent postgres admin app is appealing...

I was just writing about that in the testers documentation just this minute.. Weird timing.

It is abstracted completely, plugging in a new class would "'just work'". At first I wasn't planning to support more than MySQL, but after writing my last post I decided I wouldn't limit the application and, will write several database adapters (MySQL for 4, MySQLi for 4.1+, PostgreSQL (not sure what version minimum yet) and possibly MSSQL (if I get time, I don't care for MSSQL at all)).

[edit:]

I'd make such a replacement if it proved to fit in easily
Well if you would like to take a peek at the code when I release it to test I'll contact you and you can have a go at implementing it if you would like. A bit of collaboration never hurt anyone. :)

Brandoe85
02-07-2007, 08:10 PM
marek could try to put in his database class to see if that works :)

Mhtml
02-07-2007, 08:23 PM
Well it's not just a matter of plugging in a new class. You'll have to write a new class based on my pattern.

My pattern is such that there is a database class which handles the connection and produces query objects. Query objects, query the database (obviously) and handle result data sets.

These query objects are passed around and deleted when they go out of scope unless otherwise specified, in which case they're tagged and stored till either the database class is destroyed or they are explicitly destroyed.

[edit:] I'm also thinking of serializing and storing query objects as sort of a timed cache for subsequent access.

gsnedders
02-07-2007, 08:29 PM
How large is the source base? If you want people to look over the code that's kinda important :p

marek_mar
02-07-2007, 08:49 PM
marek could try to put in his database class to see if that works :)
I could tweak it for the occasion. ;)

Show us the code!

Mhtml
02-07-2007, 08:51 PM
How large is the source base? If you want people to look over the code that's kinda important
How so? It's of no relevance. I doubt anyone who is serious in contributing to a decent project would really care... It's not like I'm giving an hour to do it or anything.

However, as it stands:

The basic API I'll be releasing to run through (in this release) consists of probably a touch over 1500 odd lines of OO PHP. The meat of this application lies in the client side, the PHP is just a interface between the database and the Javascript. This application is designed to be a visually interactive one. Web 2.0 and all that jargon. I am only releasing the development version of the client side in this test though, there are several *top secret* ideas relating to the interactive side that I'm not releasing until they're perfected and licensed appropriately.


I could tweak it for the occasion.

Show us the code!
In good time, I have to finish writing up these docs otherwise you'll have no idea where to start and what I'm wanting of you exactly.

gsnedders
02-07-2007, 10:30 PM
How so? It's of no relevance. I doubt anyone who is serious in contributing to a decent project would really care... It's not like I'm giving an hour to do it or anything.

Nobody, no matter how good a project is, has infinite time to contribute.

Mhtml
02-08-2007, 05:13 AM
Well duh, this is a database administration tool not a genetic sequence analysis program. I'm not even releasing the entire source base just a small piece of it that I want double checked because that is where bottlenecks, if any, will appear...

Even so vbulletin can be read through in a day if you wanted! Honestly, what are you thinking?! Your remarks are completely redundant, they usually are.

Are you on crack or something? Stop trying to be so damn analytic and critical of something when the answer is already so damn obvious.

This is what I do in my free time, I don't have the luxury of being 14 and my parents doing everything for me with absolutely no responsibilities at all weighing me down. Ridiculously redundant posts like that are a waste of my free time.

If you are not fluent in PHP5 and accomplished in OOP design and practices then there is no real reason to be posting in this thread. I don't have the time to baby sit you.

If you have absolutely nothing useful to contribute, don't post in here again please. It's a fair enough request.

Brandoe85
02-08-2007, 06:38 AM
It'll be interesting to peek at how you construct your query objects and how they are applied in the application.

And c'mon, no support for access or heck...firebird?? lol :D But on a serious note, I could probably see a use for it to be compatible with MSSQL and Oracle.

Mhtml
02-08-2007, 07:01 AM
[edit:] Database related code is now available, all those wanting to run through it just post here or PM me. I'm wanting to sort of control this so I know what to expect and from whom so I'm not just posting it for download.

marek_mar
02-08-2007, 10:32 AM
Yes, please.

Brandoe85
02-08-2007, 03:34 PM
+1 to that.

aedrin
02-08-2007, 04:50 PM
I wouldn't mind taking a look through the source code.

Mhtml
02-09-2007, 06:37 PM
Sorry guys, I have a little update to perform on the code based on comments from marek_mar.

I would have had it done by now but I've spent probably well over 14 hours fighting with Apache. All of a sudden it just stopped working and started crashing on start up of the service. I reinstalled, re-downloaded, recompiled and repaired Apache and restarted my computer so many times by now I can do it with my eyes closed and one arm behind my back. Not sure why, but turns out ownership and permissions had been destroyed on system level access to my document root which although the path was valid was returning a null handler in libapr which for some reason didn't catch the exception and so it caused a segmentation fault.

It's 4:30 in the AM here. And after all that frustration I'm so worn out I have to go to sleep. It's a Saturday so I'll be out to party tonight, if I don't manage to update the code in time you'll probably have to wait till Sunday night sometime (GMT+10).

Mhtml
02-14-2007, 08:31 PM
Alrighty, well I rewrote a few things here and there added in exceptions etc. It needs a little improvement (especially on the exceptions side of things) but it's a lot more light weight and logical now.

At the moment it works under the assumption that the records returned from a query are all to be used. This mightn't always be the case though (granted if it's not you have to rethink what the heck you're doing), in which case I'm thinking of implementing a on-requested row retrieval and caching system. Probably more trouble than its worth though.

Also, the result object needs to be extended.. It's very lightweight as now, just bare essentials.

NB: As for VISX, no meaning just random letters.

http://mhtml.ithium.net/visx/visxdb.rar

GJay
02-14-2007, 09:45 PM
How are you planning on licensing the full thing?
The underlying bits don't interest me nearly as much as the application itself.

A few things:
- making resultClass implement Iterator and Countable would be useful
- any of the driver methods that are called from the resultClass should really be prescribed in the abstract class
- you're probably going to need methods to abstract SQL-function syntax. For example mysql uses concat() but postgres (and everything else?) uses ||. Date/time operators are different as well. (looking at the functions ADODB or something similar might be useful)

Mhtml
02-14-2007, 09:58 PM
How are you planning on licensing the full thing?
The underlying bits don't interest me nearly as much as the application itself.
Well as for a specific license, I'm unsure. But I've decided to just release it open source.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum