Freeway Pro 5 with MySQL / Postgres / Oracle

Hi,

I was just wondering what is involved in combinning FW with MySQL/Postgres/Oracle.

To start off with, MySQL - are there any good tutorials/docs for storing and retrieving data?

Any help would be much appreciated.

Thanks.

Tony.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tony,

These are not tutorials but more php and MySQL examples with Freeway
so some knowledge of PHP and MySQL if only fairly basic is needed. The
examples are available for download and there is a dump file included
for populating the database to use with the examples.

http://easibase.com/freeway/phpmysql.php

Mike

On May 23, 2008, at 10:01 AM, Tonsils wrote:

Hi,

I was just wondering what is involved in combinning FW with MySQL/
Postgres/Oracle.

To start off with, MySQL - are there any good tutorials/docs for
storing and retrieving data?

Any help would be much appreciated.

Thanks.

Tony.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks. Can FW Pro 5 hook in with Oracle / Postgres as well ?

Tony.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I am sure it can but I have no experience with those databases and
Freeway… just MySQL, maybe Walter will see the thread and pipe in as
I am sure I remember him talking about these on another thread ‘maybe
on the Dynamo’ a while back.

On May 23, 2008, at 10:13 AM, Tonsils wrote:

Thanks. Can FW Pro 5 hook in with Oracle / Postgres as well ?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Freeway by itself cannot do anything special with any database. If you can write a handler that talks to a database, you can use it along with Freeway. There are Actions to manage interaction with ColdFusion, PHP, ASP, and Lasso. Through those application servers, you can generally connect to any database on the planet.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for the responses. Apart from Mike’s example, are there any other examples/docs/web sites on using MySQL with FW?

Thanks.

Tony.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tony,

I’m not sure what your level of experience is from your original post.
But I will throw in my two cents worth.
Based on my recent (incomplete) adventure using FW with MYSQL, I found
it quite difficult.
It is probably like many things, it gets easier once you know how to
do it.
I decided it was a five part problem that needed to be solved.
The first three or four have nothing to do with FW.

  1. Build and get a MYSQL database onto my web serving host.
  2. Figure out how to access the info returned from a form selection
    using PHP (GET or POST)
  3. Develop the PHP code to query the MYSQL database to get the info to
    display.
  4. Develop the PHP code to write the HTML for displaying the
    information.
  5. Figure out how to get all that PHP code into FW.

In other words, I completely wrote a web page using an HTML editor to
develop what I wanted. Then figured out how to get it into FW.

To get the code into FW, there are “Actions” associated with PHP
available for FW. I ended up using two of the actions, “PHP Mark Up”
and “PHP Block”. Most of the FW actions I looked at made no sense at
all to me how to actually use them. Once again, they were probably of
great value, if you only knew how to use them.

Item 4 above is something I thought I should get some help with from
FW, but I couldn’t make it work. For example, I wanted to use some
check boxes. I could not figure how to get PHP to control whether the
FW check boxes were checked or not. This was an attribute in the
checkbox inspector and I didn’t seem to have any control over it from
PHP. In the end, I had my PHP generate all the HTML for my check boxes
and then put them in a FW table cell using the “PHP Block” action.

The bottom line is that it is not WYSIWYG easy and the first thing you
are going to need to do is learn PHP and SQL and building relational
databases. Then you can struggle with getting the stuff into FW.

Good Luck,
Lou

On May 24, 2008, at 10:30 AM, Tonsils wrote:

Thanks for the responses. Apart from Mike’s example, are there any
other examples/docs/web sites on using MySQL with FW?

Thanks.

Tony.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On May 24, 2008, at 9:54 PM, LLE Freeway wrote:

The bottom line is that it is not WYSIWYG easy and the first thing you
are going to need to do is learn PHP and SQL and building relational
databases. Then you can struggle with getting the stuff into FW.

Good Luck,
Lou

The difficult bit is learning how to use PHP and MySQL, getting it
into Freeway is not difficult, in fact it can be very easy…

I think the problem that makes it seem difficult is the way you look
at it, you might think, Freeway, database, scripts, print out data…
and then you think about going to the wee boys room! you need to try
and think about what is being done and then break it down.

Scripts
Print out data in Freeway

so yes, there are actions out there ‘nothing against the actions’
but… I personally find it better to create php script/s and just
include it ‘or them’ at the start of the page. In fact I have found it
can help ‘in most cases’ to simply include a ‘container’ script in the
Before HTML ‘for example’ and then add to that script any various
things like includes etc. that are needed for that relative page, so
each FW page has a relative container script (maybe think of it as a
dynamic engine for that page) which means if you are working on the
server you can adjust the code side without trying to find stuff
placed in the FW page and then editing and uploading every time you
make a change. Simply use an ftp client to open the script or scripts
on the server in BBEdit and you can make code changes and press save,
then reload the FW page in the browser to see the changes any
alterations to the script code makes.
Now with this you have the Freeway side and the scripting side and it
is all stitched together with the main container that includes any
scripts and the mark up items to print out the content.
In fact you may even find if you need a dynamic menu for example you
can just set a mark up item where you want the menu to be and set the
php code to include the menu (which is a script that builds the menu
from a database connection).

Now with the engine in place you can then return any data you need
simply by placing mark up items on your freeway page, these simply
echo out the contents of the contained variable, that content that
gets set using the script or scripts that are included in the
container script for that page.

So… this way you keep the FW side and the code side separate (as
much as possible), apart from the placement of output on the FW page.
This might not work with every scenario but I have found in general it
works well in most, as you find your feet working with the dynamic
side and FW then you will probably develop a system that suites you
and your way or working.

If you are wanting to use Freeway with a MySQL database then the:

4# Get data MySQL
5# Get data rows MySQL
6# Dynamic MySQL

examples from Easibase: PHP/MySQL With Freeway will help
you well on your way to understanding one way of using Freeway with
PHP and MySQL.

HTH

Mike


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 24/5/08 (at 10:30 -0400) Tonsils said:

Apart from Mike’s example, are there any other examples/docs/web
sites on using MySQL with FW?

PHP: PHP and MySQL Explained: lessons, script samples and book recommendations

MySQL: http://www.thehelpful.com/mysql/

These are general primers for learning how to do this stuff, and I
like to think they’re fairly helpful, but I’m afraid they’re not
specifically written for Freeway.

I put them together as part of the process of improving my own
understanding and also as preparation for a (slightly shorter) pair
of articles in MacUser helping readers get started with PHP and MySQL.

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 24/5/08 (at 15:54 -0400) LLE Freeway said:

Most of the FW actions I looked at made no sense at
all to me how to actually use them. Once again, they were probably of
great value, if you only knew how to use them.

Those can be useful, but I have to say that almost all of my
PHP/MySQL use in Freeway has been done with HTML markup added using
Freeay’s various built-in methods, not through additional actions.

As Mike says, a lot of the struggle (once you’ve learned PHP/MySQL in
the first place) lies in understanding the right ways to work. Once
you’ve understood how to reconcile Freeway’s code-generation approach
with the hand-rolled ways of making PHP, it really isn’t all that
hard!

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options