BCS Eclipse Juno

Today I had the opportunity to download and install Eclipse Juno (SDK 4.2.0). I was pleasantly surprised at the improvements made with Eclipse.

Of course for all my PhP and Java development I use the 64 bit version. There are some major development tools I use that do not support the 64 bit environment so I also installed the 32 bit version of Juno to support those efforts.

I am now programming multiple languages and dialects within the Eclipse environment. I recommend the Eclipse environment for your development efforts.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems authored this article.

Read File Contents YII PhP

There are those occasions when an entire file (text or HTML) must be read from a file and stored in a variable for subsequent use. The following code snippet outlines a function to accomplish the aforementioned premise.  Notice the “$fna” parameter.  This parameter  would contain the file name of the file to be processed.  The function returns a variable that contains the entire contents of the file.

function ReadHtml($fna)
		{
			$fh = fopen($fna, 'r');
			$theData = fread($fh, filesize($fna));
			fclose($fh);
			return $theData;
		}

The calling sequence would resemble the following:

$bod = ReadHtml(Yii::app()->basepath . ‘/views/sig.html’);

The HTML file “sig.html” is located in the “views” sub directory.  The “$bod” variable now contains the file contents entirely.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems authored this article.

BCS Yii’s Pear Considerations For Test Driven Development (TDD)

Verify correct installation of pear by invoking a command prompt and typing pear and the following output should appear in the command.

Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
channel-alias          Specify an alias to a channel name
channel-delete         Remove a Channel From the List
channel-discover       Initialize a Channel from its server
channel-info           Retrieve Information on a Channel
channel-login          Connects and authenticates to remote channel server
channel-logout         Logs out from the remote channel server
channel-update         Update an Existing Channel
clear-cache            Clear Web Services Cache
config-create          Create a Default configuration file
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Settings
convert                Convert a package.xml 1.0 to package.xml 2.0 format
cvsdiff                Run a "cvs diff" for all files in a package
cvstag                 Set CVS Release Tag
download               Download Package
download-all           Downloads each available package from the default channel
info                   Display information about a package
install                Install Package
list                   List Installed Packages In The Default Channel
list-all               List All Packages
list-channels          List Available Channels
list-files             List Files In Installed Package
list-upgrades          List Available Upgrades
login                  Connects and authenticates to remote server [Deprecated in favor of channel-login]
logout                 Logs out from the remote server [Deprecated in favor of channel-logout]
makerpm                Builds an RPM spec file from a PEAR package
package                Build Package
package-dependencies   Show package dependencies
package-validate       Validate Package Consistency
pickle                 Build PECL Package
remote-info            Information About Remote Packages
remote-list            List Remote Packages
run-scripts            Run Post-Install Scripts bundled with a package
run-tests              Run Regression Tests
search                 Search remote package database
shell-test             Shell Script Test
sign                   Sign a package distribution file
svntag                 Set SVN Release Tag
uninstall              Un-install Package
update-channels        Update the Channel List
upgrade                Upgrade Package
upgrade-all            Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]
Usage: pear [options] command [command-options] <parameters>
Type "pear help options" to list all options.
Type "pear help shortcuts" to list all command shortcuts.
Type "pear help <command>" to get the help for the specified command.

If you encounter problems getting the above information to appear you will have to begin debugging to determine why the application is improperly configured.

One place to start is Google for installation of your version of PhP.

After the pear installation is verified traverse to the Yii installation where pear is installed and key in the phpunit command. The following output should appear in the command session.

PHPUnit 3.6.4 by Sebastian Bergmann.
 
Usage: phpunit [switches] UnitTest [UnitTest.php]
       phpunit [switches] <directory>
 
  --log-junit <file>        Log test execution in JUnit XML format to file.
  --log-tap <file>          Log test execution in TAP format to file.
  --log-json <file>         Log test execution in JSON format.
 
  --coverage-clover <file>  Generate code coverage report in Clover XML format.
  --coverage-html <dir>     Generate code coverage report in HTML format.
  --coverage-php <file>     Serialize PHP_CodeCoverage object to file.
  --coverage-text=<file>    Generate code coverage report in text format.
                            Default to writing to the standard output.
 
  --testdox-html <file>     Write agile documentation in HTML format to file.
  --testdox-text <file>     Write agile documentation in Text format to file.
 
  --filter <pattern>        Filter which tests to run.
  --group ...               Only runs tests from the specified group(s).
  --exclude-group ...       Exclude tests from the specified group(s).
  --list-groups             List available test groups.
 
  --loader <loader>         TestSuiteLoader implementation to use.
  --printer <printer>       TestSuiteListener implementation to use.
  --repeat <times>          Runs the test(s) repeatedly.
 
  --tap                     Report test execution progress in TAP format.
  --testdox                 Report test execution progress in TestDox format.
 
  --colors                  Use colors in output.
  --stderr                  Write to STDERR instead of STDOUT.
  --stop-on-error           Stop execution upon first error.
  --stop-on-failure         Stop execution upon first error or failure.
  --stop-on-skipped         Stop execution upon first skipped test.
  --stop-on-incomplete      Stop execution upon first incomplete test.
  --strict                  Run tests in strict mode.
  -v|--verbose              Output more verbose information.
 
  --skeleton-class          Generate Unit class for UnitTest in UnitTest.php.
  --skeleton-test           Generate UnitTest class for Unit in Unit.php.
 
  --process-isolation       Run each test in a separate PHP process.
  --no-globals-backup       Do not backup and restore $GLOBALS for each test.
  --static-backup           Backup and restore static attributes for each test.
 
  --bootstrap <file>        A "bootstrap" PHP file that is run before the tests.
  -c|--configuration <file> Read configuration from XML file.
  --no-configuration        Ignore default configuration file (phpunit.xml).
  --include-path <path(s)>  Prepend PHP's include_path with given path(s).
  -d key[=value]            Sets a php.ini value.
 
  -h|--help                 Prints this usage information.
  --version                 Prints the version and exits.
 
  --debug                   Output debugging information.

If there is difficult reaching this screen debugging should begin with Google for the version of Pear installed.

Once you are successful displaying these  your installation is properly configured to continue Test Driven Development (TDD) with Yii.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems authored this article.

IT Paradigm Technology Shift


 
Make no mistake about my premise. I love Delphi couldn’t have used it for decades if I did not love it (I started with single digit Turbo Pascal series).

With Agile tools I go from zero to production with six tables and scaffolds with unit tests (three for authentication and three for problem solving) many to one, many to many relationships and Jasper Reports. Jasper supports all major report formats like PDF. Time to production fifteen minutes with zero errors and zero defects. I coded less than one hundred lines of code to accomplish this. Simple changes updating production are accomplished by modifying the model and creating a new delivery package. Ftp to server then get a fresh cup of coffee!

This arena is Delphi, Visual Studio, Flex, PhP, COBOL, FORTRAN and every other software development platforms gold standard. If the results are not absolutely correct the selected programming language for coding means nothing.

The cost for the upgrade to the Enterprise Edition $0.00. The price for the Compete Enterprise Edition $0.00.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems authored this article.

BCS Eclipse Plugins For Multiple Distributions.

If you already have Eclipse Plug-ins installed, you can simply copy the link file from the dropins folder of the bundled copy of Eclipse, and paste it into the dropins folder of the target distributions.

Employing this technique will conserve multiple hours of downloading, setup and configuration of the target distribution.