PDA

View Full Version : Info on auto-built DW code for MySQL


tc4racer
01-30-2009, 01:25 PM
I can't find any reference to the code that DW auto generates when you let it build PHP connections for SQL. It seems to put some bizarre function with case statements at the top (I realize this is something to with escaping the code for security), but would like it clearly explained and its not in the reference guide.

Any good site/hints to learn more about it?

Thanks

davidj
01-30-2009, 01:55 PM
fancy learning to code

then you will understand it easier

tc4racer
01-30-2009, 02:26 PM
A little background:

I've been in IT for 30 years. I have programmed in mainframe assembler, Cobol, Fortran, PL/I, JCL, DB2 and IDMS SQL, MS SQL Server, VB, .Net, HTML and more I have probably forgot. And before I retired, I was doing purely management, so my tech skills were a little rusty.

So, being from a "production background" and not a PC tech weenie, when I embarked on rebuilding a church web site for free, I spent weeks learning CSS and relearning HTML. Bought (and read) 5 books on CSS, PHP, MySQL, trained on Lynda.com, surfed the web for best practices for hours. Installed my dev and test servers. Had a fully functioning CSS enabled web site up, from zero, in a few weeks, including some PHP and MySQL.

So, do you think I have put in enough effort to justify asking my question on how exactly Dreamweaver works when it is auto generating code? Yes, I could figure it out line by line, but I'd like to know the theory behind what they are trying to do, and any pitfalls with this particular aspect of the tool, especially when I need to make changes down the line.

Since the Adobe doc that I could find seems to be thin on the topic, I thought I'd ask the experts where I can get started to LEARN more, not just tell me the answer.

davidj
01-30-2009, 02:30 PM
So, do you think I have put in enough effort to justify asking my question on how exactly Dreamweaver works when it is auto generating code?


nope

need to have read 6 books

davidj
01-30-2009, 02:34 PM
honestly mate with that exposure to programming i cant understand why you would want to use dreamweaver to write code for you

Dreamweaver writes allot of ballast in that blocks of code and options are switched on and off depending on what buttons or check boxes have been selected

dreamweaver tends to write 10 lines of code to every 2-3 hand coded lines

it includes code which you may not require but instead of omitting it from your script it just switches it off

tc4racer
01-30-2009, 02:37 PM
I agree in general, but I may have to "pass the baton" to the next volunteer someday, and do want it all easy to maintain.

But that is the sort of comment I am looking for. In other words, use DW for the of the simple stuff that reduces typing with point and click, but drop back into the code for any PHP/MySQL?

Thanks

davidj
01-30-2009, 02:41 PM
have you thought of using a CMS

edbr
01-31-2009, 12:13 AM
But that is the sort of comment I am looking for. In other words, use DW for the of the simple stuff that reduces typing with point and click, but drop back into the code for any PHP/MySQL?
yes. dw iMO ofers a good way of prviding a simple solution to providing dynamic sites without learning.
they have coded in a way to enable all the (limited) tricks the DW wizard has in its bag. verbose and difficult to adapt if you want to achieve anything else.
DW artracts many people who jusytwant to create a site for their clucb church scout group or business without getting any deeper. But as with all wizards there are limitations.
welcome to the forum bTW it sounds like you could be a real bonus with your background

domedia
01-31-2009, 04:20 AM
A little background:
Welcome to the forums tc4racer!

tc4racer
01-31-2009, 12:57 PM
Thanks, but I have a long way to go to catch up here.

As far as the CMS, I have not considered it yet. There is not that much content to maintain, and whatever it is has to be zero to low cost.

domedia
01-31-2009, 02:46 PM
I can't really answer your question, but it seems that if you let DW write the PHP for you, you have to leave it alone.

davidj
01-31-2009, 02:50 PM
thats correct

you can extend it if you have the skill but the chances are the code will be ignored by dreamweaver once you change the original so you cant use any of the panels or wizards after the change