Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

modification of Server Behaviours

Community Beginner ,
Oct 26, 2006 Oct 26, 2006
First I will start with the problem.
I frequently have to modify the Generated code or Server Behaviour to perform some function that the supplied behaviour doesn't support like modification of SQL . So to improve efficiency I try to update behaviours so DW8 will respect it so later I can still use the DW wizards and dialogs to modify code.
Is there a standard way I can change code without DW8 losing my server behaviours?

Second part is a suggestion to Developers:
Can they write the Server Behaviours in such a way they leave "hook points" for use modification eg exit points so it can call user code but leave std behaviour intact?
Why doesnt DW use more "included" functions rather than bloating our pages with the same code
eg cant they have a more robust function library which is "included" which users can leverage off the Functions can then have more parameters and more options
eg the Data validation basically is way too simple for modern day websites and the SQL blocks doesnt allow much dynamic insertion of fields etc...
my $2 worth
TOPICS
Server side applications
491
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 27, 2006 Oct 27, 2006
ptrax wrote:
> Is there a standard way I can change code without DW8 losing my server
> behaviours?

You don't say which server model you're using, but the key to
modification is to make the changes *outside* the code blocks inserted
by Dreamweaver. For instance, if you want to encrypt a password in a PHP
page, do this:

<?php if (isset($_POST['password'])) {
$_POST['password'] = sha1($_POST['password']); } ?>
<?php // Dreamweaver generated code here ?>

> Second part is a suggestion to Developers:
> Can they write the Server Behaviours in such a way they leave "hook points"
> for use modification eg exit points so it can call user code but leave std
> behaviour intact?
> Why doesnt DW use more "included" functions rather than bloating our pages
> with the same code
> eg cant they have a more robust function library which is "included" which
> users can leverage off the Functions can then have more parameters and more
> options
> eg the Data validation basically is way too simple for modern day websites and
> the SQL blocks doesnt allow much dynamic insertion of fields etc...

They are all good points, and are views shared by several well-known
third-party extension developers. If you have particular suggestions,
why not submit them directly to Adobe?

http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 29, 2006 Oct 29, 2006
I am using ASP / VBscript model.

Note I have submitted Feature request , not that I'm holding my breath...
In some instance I need to make changes inside the code blocks, mainly for modifiation of SQL input as I need to put SQL code (optionally) in between current code. ie the DW code doesn't allow for parameters which exists sometimes and others it does eg search pages (I know I can use LIKE for text) but difficult to provide a wildcard for numbers but the REAL problem is I shouldn't need to workaround this it should allow for more flexibility in there generated code.
I mean if this breaks the DW code scanner I will then be force to manage code by handcoding etc.. and for that DW is a waste of money.
But thanks I'm hearing that there is no standard way of code mods and I will have to make do for DW9??
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 30, 2006 Oct 30, 2006
ptrax wrote:
> I am using ASP / VBscript model.

It's several years since I last used ASP, so I can't make any direct
comparisons.

> the DW code doesn't allow for parameters which exists
> sometimes and others it does eg search pages (I know I can use LIKE for text)
> but difficult to provide a wildcard for numbers but the REAL problem is I
> shouldn't need to workaround this

I discussed this at length with Adobe engineers because many people had
reported the same problem with PHP. The answer was disarmingly simple.
The SQL specification says that LIKE is used to compare *strings*, not
numbers. The way that Dreamweaver handles data types is to enclose
strings in quotes, and leave numbers without quotes. Therefore, if you
want to use a wildcard with a number, you *must* first convert it to a
string. In other words, if you're using LIKE with numbers, you must
select the text data type. It sounds counter-intuitive, but Dreamweaver
is actually handling this aspect of SQL correctly.

> But thanks I'm hearing that there is no standard way of code mods and I will
> have to make do for DW9??

We'll have to wait until it's released to find out if DW9 handles server
behaviors in a different way. The response that I have always got when
inquiring about improvements to server behaviors is that the intention
is to provide basic functionality. Anything beyond that needs to be
either hand-coded or supplemented by third-party extensions. Of course,
if sufficient numbers of people request a particular feature, Adobe
would be foolish not to take any notice.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 05, 2006 Nov 05, 2006
LATEST
just posted a problem case where I want to modify the Update Behaviour to force Data format to YYYYMMDD as SQL or ODBC or somewhere I'm geting my dd/mm/yyyy interpreted as mm/dd/yyyy ie month and day is being switched
but the Update behaviour get field directly from the Posted Form variable so I can't intercept with someother var. it would be good if DW could have a function to format into a ISO format or use a local variable before this.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines