Forum Moderators: coopster

Message Too Old, No Replies

PHP MySQL Design software?

Which is the best?

         

zulu_dude

1:12 pm on Jul 20, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



At the moment, all my PHP and MySQL sites are hand-coded in the code view of Dreamweaver MX04.

This works, and has allowed me to learn a heckuva lot more about PHP programming than if I had just plugged my requirements into software, turned the handle and produced the solution.

Fantastic. However, now that things are getting a little more hectic and intense and the sites I'm doing are getting more complicated, I would really like some software to help with the workflow.

It wouldn't have to be complicated at all... it would just take a form that I've laid out in DW and create a new page to get the variables from $_POST, do basic error checking (e.g. check that numbers are numbers, stripslashes, etc) and then present the nice clean variables for me to work with as I please. It seems that I spend an awful lot of time just getting to this stage, before I can even do anything interesting with the data.

If it has other nice features related to DB design, that would just be the icing on the banana.

The million dollar question... does anyone know of/use software like this? Is it going to cost me a million dollars?

Angelis

1:16 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



Dreamweaver has a PHP site build function built into the software. You can link it through to a MySql database and add varables on the fly.

1 Minor problem, the coding in DW is not too special and it adds so much more than you usually need.

chrisjoha

1:20 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



Write yourself a reusable library instead so you don't need to write the same stuff over and over.

How is DW on php editing? I have until recently used Emacs to edit my PHP, but I haven't looked back a single time since I started using phpeclipse :)

coopster

1:40 pm on Jul 20, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, zulu_dude.

I don't trust any editor to scrub my user-supplied data for me. Although it can be time-consuming, it is part of the job and a very critical part at that. I'm not saying there are or aren't decent editors out there, but just keep in mind if you do find something that you should always review the variables with a security-conscious approach anyway. Double-check everything ;-)

zulu_dude

1:50 pm on Jul 20, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks for the welcome coopster!

>>How is DW on php editing?
Well, the way I use it, only slightly better than notepad (DW has colour-coding)! But then I don't claim to use it to it's full potential at all.

I have experimented a little bit with using dreamweaver's php support, but it's a little bit over-the-top for what I need. I like to have code as simple as possible, bare bones on which I can elaborate if I need.

PHPeclipse looks pretty cool, I'll have to look into that a bit further.

I'm thinking more along the lines of a form-and-processing-page generator:
i.e. I slap together my form (say name, tel, address) and feed it into the jaws of this mythical software. It picks up what types of entries are on the form, gives me options for the error-checking processing of the variables (eg, is it a number, email address, text) and then generates the correct PHP code to get variables from $_POST and do the error checking.

The re-usable library idea sounds like it could work, but what I need from the library would change with every page and site. I suppose then (just like a real library), I could take out just the books I want from the collection. I will probably have to do this, but was hoping that someone had done all this before and stuck it together into a pretty little piece of software!

coopster, you're right, I would always need to review the code anyway. In light of that, I suppose it's cheaper and quicker to write the code properly, myself, rather than patching up security holes at a later date!

zulu_dude

2:30 pm on Jul 20, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



Just some quick results of some of the research I've done into this topic over the last 10 minutes.

Had a look at BlueShoes CMS, seems like they have quite a good forms section. Not sure if I'm keen to spring for the whole CMS when all I need is form generation. To be fair, there is a freeware version available.

Also along the CMS route, I have also tried the forms plugin for Mambo before, but it was also super confusing and I ended up just wasting a week trying to get it to do what I want.

Also remembered that I tried Code Genie a while back. It looks like exactly what I'm after, but I remember that it wasn't as great as I thought it would be. Can't remember exactly what I didn't like about it, just that I didn't. Not necessarily a reflection on the software, more just a reflection of the fact that I couldn't get it to work properly.

Seems like if you need something done well, just the way you want, there is no other way than to hand-craft it yourself!

What is that about '1% inspiration, 99% perspiration'!?!

chrisjoha

2:31 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



Well, I was thinking more of a library to validate forms and process the most common types - NOT to generate code for you. With a framework like this you'll need to write alot less code than before. And you should of course do it the OO way ;)

zulu_dude

2:42 pm on Jul 20, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



OO? I think I vaguely remember something some lecturer said about this at university. It was after lunch, so I was sleepy :-)

Just kidding, I think that could be a good solution to the problem. Or I could write a 'validation' php file, include it in my page and then just call (for example) validate_number($_POST('number from form')).

It just means that every time I have a new type of form input (i.e. checking a postcode), I have to write a new section for the validation file. Although there are a finite number of possible form input types, so eventually I would have covered all of them in the file.

This is more-or-less what I've been doing, and it does work nicely. I'm always looking for the easier option though, thought maybe everyone else had a way of doing it that took 5 minutes and 3 brain-cells.

It seems like I'll have to continue using all 6 of my brain-cells at the same time.

mgm_03

6:07 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



There are a few topics within this thread...

1) I use DWMX in code view but use NONE of its coding capabilities. What I like is the color coding and auto-fill but that's it. I have StudioMX so there is some benefit there as well.

2.) Check out (google) HTML Quick Form if you want a "tool" for form handling.

3). I just finished creating my first CMS from scratch. Was it a b**ch? Yup. Am I glad I did it? Yup. Here's why:

-- I know the code thoroughly
-- The code is modularized. I can quickly add an FAQ module to a future CMS project.
-- I have certain features "turned off" meaning commented-out. If the client feels it's worth knowing which FAQ are being clicked (for example) , then there is a premium charged for that value-added service.... and I just un-comment the code. That would not be feasible with off-the-shelf scripts.
-- The back-end looks like it all came from the same source (me). If I cobbled together a statistics reporting script with a Link management script with an RSS admin too .....all from different sources... would they all have a common look and consistent user interface behaviors such as error messages.

ergophobe

7:57 pm on Jul 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



PEAR has a validation package and also something called HTML_Quickform

[pear.php.net...]

[pear.php.net...]

Those might help