Personal tools

Talk:GuestBlox

From OpenLaszlo

Andrew: perhaps you should post a working version of this on mylaszlo...

Lyndon: Hi Andrew, as you wish! http://guestblox.blogspot.com


Anon: This is a great tutorial, but what would be useful would be to do a similar example with an application where records are not just added, but are being changed and update in and XML file. This would be an excellent addition to the many directory examples in the Laszlo documentation, and it does bring up some issues that are not present when simply adding sequential records without changing existing records.

Rolf: To do updates you need to make it database driven. That after all is what databases do best.

GuestBlox with PHP and MySQL

Any chance that the simple example can be extended to have the data store which is currently the file GuestBlox_log replaced with a call to a MySQL database?

I have recently installed the combination of MySQL 5.0.1 PHP5.0.2 and PHP PEAR with the extension for XMLTree. All is working well. I can now make a query on MySQL and format the results into a XML document.

It would be cool to replace the XML file (as above) with a the MySQL equivalent.

Regards Rolf Pfotenhauer email: rolfpf@yahoo.com.au


Handling record update and retrieval

Hi Rolf, and Anon - both of your suggestions are excellent ones. I regret lacking the time to develop additional examples, but I certainly encourage others to do so. On the notion of updating a list rather than merely appending it... it takes some additional logic in the PHP script. I find Python well-suited for a simple 'ToDo List' app, because it has some convenient language constructs to create and manipulate data arrays. A step up from there would be using a SQL database to store, retrieve and update records, as Rolf suggests. PHP has excellent support for MySQL. In return for the added complexity, the database approach would better handle large volumes of ToDo items.

If either of you develop such examples, please consider sharing them on the OpenLaszlo.org Wiki.

Best,

Lyndon

Hi Lyndon. This looks great. I am building a blogging LAMP application myself and have been struggling to maintain the style, program and data elements separate. Thats when I stumbled on OpenLazlo and was bowled over by the presentation layer. Could you please help me answer a couple of simple questions?
(1) I use the Apache webserver and LZX uses Tomcat. Can I use Apache for LZX as well?
(2) Depending on the answer of (1), how do I ensure that the PHP script gets executed BEFORE the LZX?
Many thanks.