Beta website nearing completion
The o9software website beta is getting nearer and nearer to completion.
The o9software website beta is getting nearer and nearer to completion.
New update for OMORi is now active.
Current Version is now 2.0beta1.1
No action is required by users.
Update effects all users.
Release Announcement
Version 2.0Beta of our timesheet software will be released soon. Estimated time table is by the end of next week.
Version 2 will include the following new features/improvements:
PHP 5 adds some new features that make using the singleton pattern much easier. The problem was that PHP4 did not have static class variables. So you had to use a global function to act as the singleton creator. However PHP5 removed this problem and made singleton creation something that can be completely inside the class.
The following code show how to create a simple singleton:
( codeCollapse )
The output of this code will be:
$foo: Setting the example variable $bar: Setting the example variable They are identical
$foobar: This is a differance string $foo: Setting the example variable
I have just recently created a community for o9softwares development.
Anyone can become a member and post on the community, if you have questions regarding our work, our products, or just plain programming questions please feel free to post them.
The community:
o9soft
With the release of PHP5 I have been converting a lot of the code in the o9soft classlibs to php5, the changes mostly are in the OOP area. PHP5 adds full support for constructors and destructors which makes for much more powerful classlibs.
One very good example of this is in our mySQL library, now having support for a destructor we can remove the need for a call to mysql::close() at the end of a script using the mysql lib. now upon the completion of the script the mysql::__destruct() method calls mysql::close() automatically.
Current mySQL destructor:
( codeCollapse )
As you can see this is a very simple method, all it does is make a call to the debugger, and the close() method. In php4 having the automatic calling of a function was much more cumbersome.
Another very cool new feature in php5 is the ability to create abstract classes, if you do not know what that means... basically it means that a class defined as abstract can not have an object initiated directly, it must be extended. This feature has given us the ability to create a master abstract class that all of our classes are build from that gives all of the classes references to $_err, $_debug, $_db, and $_var. This removes the need for any global statements in any class methods, or having to setup the references in each class definition. Ok to be completely honest this feature wasn't really necessary to implement this master class idea, i just haven't thought of it till now. Previously i could have setup a master class that was not abstract and used that as the master. Having the abstract class removes any problems that might occur if somehow an instance of the master class was created.
Here is a scaled down version of our master class:
( CodeCollapse )
Not a whole lot to that. If an object were to be created from that class php would spit out an error like the one below.
Fatal error: Cannot instantiate abstract class std in /www/o9soft/dev/lib/std.php on line 4
And thats all for today