Feeds: Posts | Comments

PHPEclipse 1.1.9 and 1.2.0

Just been looking on the SourceForge page for PHPEclipse and found an announcement from 3 days ago that versions 1.1.9 and 1.2.0 have now been released.
free video poker how to play backgammon no deposit bonus online casino 888 no download casino play roulette craps game black jack download american roulette play video poker baccarat free casino game no download online casino free money on line casino wagering roulette online online casino betting free online casino slots free craps best casino roulette gambling internet casino gambling uk best casino online full pay video poker no deposit casino code best craps game black jack tournament best online casino site edfacraps online game newest online casino free slots no download play blackjack online free dueces wild video poker black jack gambling спални комплектиonline video poker game free casino cash no deposit video poker tutorial play free video poker how to win at black jack casino roulette casino guide how to win at roulette rules of craps casino game online real money backgammon baccarat casino online free video poker game play free video poker video poker odds video poker tournaments rent a car bulgariaonline casino
It is good to see that this project is still alive and kicking as from what I can remember it has been a while since the release of the last version (version 1.1.8)

A great resource for everything PHP is the site PHPDeveloper.org (which is why I have the RSS feed on the blog) and have found a lot (loads!) of interesting articles from the site. I bookmark a lot of them at my del.icio.us account and can be found here.

Sometimes it’s good to mention particular articles and there is one I came across recently that I think is worthy of specific note.

Security is a big talking point at the moment in all aspects of computers and the Internet and when it comes to Web Programming there are certain areas that need to be looked at even with basic scripts such as SQL Injections, Cross site scripting (XSS), Form Vaildation etc. What can happen though is that programmers can end up constantly re-inventing the wheel when it comes to these issues but there is something out there that can help at least with Form Validation anyway, Pear::HTML_QuickForm, and there is an article that I came across via PHPDeveloper.org from the Zend Developer Zone entitled Generating and Validating Web Forms With PEAR HTML_QuickForm that gives a good overview of this useful PEAR module.

PHP5 OOP

One of the great things that PHP 5 offers programmers is the ability to progam using Object Oriented Programming techniques (OOP) ie. Classes and Objects.

While the concept of OOP can be confusing when you first come across it, it is a powerful programming concept for writing tidy, ordered, reusable code.

Although OOP was introduced in PHP 4 it is generally accepted that this was an addition to PHP 4 whereas in PHP 5 it is a integral part of the original development of PHP 5.

For those looking to start using classes and objects in their PHP 5 code there are a couple of good articles I’ve come across introducing how to do this:

I’ve also found a couple of Webcasts on the subject on the site killerphp.com which can be accessed here.

There are also a couple of books available on the subjest including a book from No Starch Press simply called Object-Oriented PHP.

CSS on DevArticles

Over the last few weeks DevArticles have published a number of articles about CSS. To me, CSS is the styling glue that turns an otherwise ordinary and dull looking page into some that looks great. At the end of the day no matter how great your back-end code is, if the front end doesn’t look up to scratch people won’t visit your site.

Here is a list of some of the articles (including the one I’m reading at the moment - Create Great JavaScript and CSS Menus Simply):

I came across the following programming problem about 8 months ago and thought I’d give it a quick go.

Server-side Scripting

Using the server-side scripting language of your choice write a simple ‘dividing machine’. (Preferably use Embedded TCL, PHP, ASP (VBScript) or UNIX based CGI: PERL/BASH/TCLSH/etc.. - any other scripting language is also ok, but we won’t actually be able to test it.)

(a) The initial screen should be as follows:

screenshot one

(b) When the ‘=’ button is clicked the returning page should display the answer of the calculation.

e.g.

screenshot two

(c) Make sure the numbers selected in the drop downs are unchanged after the ‘=’ button is clicked.

So that’s the description, below is the code that I came up with to fix the problem:

<html>
        <head>
                <title>Interactive Data Test Part 3</title>
        </head>
        <body>
                <form action=“?” method=POST>
                <input type=“hidden” name=“_submit_check” value=“1″>
                        <table border=0 cellspacing=10>
                                <tr>
                                        <td>
<?php
$i = 0;
print ‘<select name="firstnum">’;
while ($i <= 100) {
        if ($i==$_POST[‘firstnum’]) {
                $numberone=$_POST[‘firstnum’];
                print “<option selected>$i</option>\n;
        }else{
    print “<option>$i</option>\n;
    }
    $i++;
}
print ‘</select>’;
?>
                                        </td>
                                        <td>
                                                <p>/</p>
                                        </td>
                                        <td>
<?php
$j = 0;
print ‘<select name="secondnum">’;
while ($j <= 100) {
        if ($j==$_POST[’secondnum’]) {
                $numbertwo=$_POST[’secondnum’];
                print “<option selected>$j</option>\n;
        }else{
    print “<option>$j</option>\n;
    }
    $j++;
}
print ‘</select>’;
?>                                                           
                                        </td>
                                        <td>
                                                <input type=“submit” name=“test” value=“=”>
                                        </td>
                                        <td>
                                                <?php
                                                if ($_POST[‘_submit_check’]) {
                                                        if ($_POST[’secondnum’]==0) {
                                                                print ‘<input type=text size=10 value="Infinity" readonly>’;
                                                        }else{
                                                        $total_result=$numberone/$numbertwo;
                                                        print ‘<input type=text size=10 value=’.$total_result.‘ readonly>’;
                                                        }
                                                }else{
                                                print ‘<input type=text size=10 readonly />’;
                                                }
                                                ?>
                                        </td>
                                </tr>
                        </table>
                </form>
        </body>
</html>

Here are my initial thoughts on the tables needed in the database for the RSS Reader.

As there will ultimately be a login facility then there needs to be a table for account details, including username, password, email address (incase someone forgets their login details) and a unique ID so any other personal settings can be tracked.

Next would be a table that stores the list of RSS feeds that a user has and would need to contain at least the Name of the feed and the URL of the feed and if you are going to store them in folders or catagories you would need a column for the folder or catagory name.

Leading on from that you would need a table recording the heirarchy of folders or categories for each user and a similar setup for the offline folders plus a table of all the offline articles.

RSS Reader - Layout

One of the first things that struck me when thinking about creating an RSS reading was the layout possiblities. I have used a number of desktop and online rss readers before and there are some layouts that seems to be more popular that others.

The first layout if the classic 3 pane approach that is used in a similar way in a lot of email clients. With RSS Readers you have a list of RSS Feeds down the left hand side, in a lot a cases grouped together in folders, with the title of each feed item in the top pane to the right of this list and the contents of an individual item in the bottom pane again to the right of the list. A variety of RSS Readers using this layout including RSSOwl and RSSBandit.

RSS Layout 1

The second layout option is a 2 pane approach. Again the left hand pane displays a list of available RSS feeds but on the right hand side you only have one pane that displays all the items in a particular RSS feed. An example of a reader that uses this layout is the Bloglines online RSS Reader.

RSS Layout 2

The third layout I have come across is one where there are 2 panes on the left hand side and one on the right. The top one on the left has the list of RSS Feeds. The bottom one has a list of titles from the feed selected in the top pane. The right hand pane then either displays a full list of the articles from that feed or takes you to the webpage that a individual article refers to. An example of this layout is the Sage RSS Reader for Mozilla Firefox.

RSS Layout 3

From the three different layouts above the one I am intending to use is the first one, the ‘classic’ 3 pane layout. It appears to be the most popular one and it is the one that I personally prefer.

PHP and XSLT

The pastor of one of the churches I go to has several websites including the one for the church designed using a combination of PHP and XSLT. Personally I like the idea of combining these technologies as it helps keep presentation and code separate.

I did a quick Google to see what I could find in relation to understanding this a bit better and found the following links:

Zend PHP Certification

I have recently completed an online training course designed to bring you up to speed on the Zend PHP Certification Exam.

I don’t know how it compares with other online courses as this is the only one I have done so far, but found it a good way of covering the stuff that is needed for the exam (once I had sorted out a broadband connection :-( )

The training was with PHP Architect magazine and details of the course (which they seem to be running monthly at the moment) can be found at http://www.phparch.com/phptraining/course/cert

Programming Idea 1

Over a period of time I have had some ideas for programming projects for programs that I would personally find useful or fun to use but haven’t done anything about trying to actually come up with the programs themselves. I have now come to the conclusion that now it is time to pull my socks up and actually try to put some of these into action, so here goes.

The first idea that I want to try and tackle is to design a RSS Reader.

Ho, hum, some might say and yes the are a lot of RSS Readers out there, but there is a particular set of features that I cannot find in the ones I have tried.

The main features that I would want to include are a folder heirarchy for the actual RSS Feeds (stardard stuff), links to be able to add particular articles to del.icio.us and also to have the ability to store individual articles in offline folders so once they are no longer on the active RSS feed you can still access them for reference.

All this would initially be done as a Web app so would need some kind of authentication (usernames and passwords), a signup process and storage of data in a backend database (like MySQL or SQLite) but I would like to extend this so the data can also be accessed via a desktop client as well (not something that has been done before AFAIK).

My language of choice for this is PHP, using PHP-GTK if I manage to get round to building the desktop client.