Jump to content


Photo

Handcoding vs. Using Dreamweaver


  • Please log in to reply
22 replies to this topic

#1 toro04

toro04
  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationMiami

Posted 02 December 2003 - 10:38 PM

I can understand the advantages of handcoding your web pages, especially with PHP, but how do you get past the visual layout perspective that Dreamweaver gives you? For me personally, I like to have a visual layout of my web page when I am designing it. But I am running into some trouble trying to insert PHP scripts into the HTML code using Dreamweaver. I think it has something to do with a template that Dreamweaver automatically creates when you choose to work on a PHP page. For example, I am trying to use includes for my Header, Side Menu, and Footer. When I insert the
<?php
require (\"header.php\")
?>
the rest of the page disappears in Design View and wont allow to me to add anything else. If I try to delete or add anything manually I get an error saying:
making this change would require changing code that is locked by a template or translator. The change will be discarded.

Any input or suggestions????? Please Help.


#2 Deadmeat

Deadmeat
  • Members
  • PipPip
  • Member
  • 20 posts
  • Locationva

Posted 02 December 2003 - 10:43 PM

i just use good ol\' notpad. I\'ll type all my code in, or what I know I want to change, then save the file. Then I refresh the browser page that shows the content locally.
Free Photoshop Tutorials[br]TutorialMan.com[br]---------------------------[br]Need Webspace thats cheap and reliable?[br]Quik-Online.org

#3 SWI03

SWI03
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 02 December 2003 - 11:14 PM

you have to make areas, editable in dreamweaver so you do not get that error message

open the template file up and in that area that you were wanting to make changes too, make it editable area.

#4 toro04

toro04
  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationMiami

Posted 05 December 2003 - 06:35 PM

When I try to make it an editable area it wants to automatically turn the page into a template. I kind of confused, does it have to be a template??

#5 gus

gus
  • New Members
  • Pip
  • Newbie
  • 1 posts
  • LocationWaco, TX

Posted 06 December 2003 - 05:40 PM

toro,

Dreamweaver doesn\'t have to use templates, but if you selected Dynamic Page-->PHP in the new dialog box, you shouldn\'t be in a template anyway. Is there any Dreamweaver template code in your header file (i.e. <!-- TemplateBeginEditable name=\"head\" -->)? You might try making a basic HTML new page - I don\'t think there\'s much difference in the way Dreamweaver handles the page (go to New-->Basic Page-->HTML). I don\'t know if I\'d expect to see the actual page outline that you have in the included file -- I don\'t know about the newer versions of Dreamweaver, but in MX 2002, I\'ve seen very limited processing of PHP code. Hope this helps! :wink:
-Gus
[br]
[br]Gus Welter
[br]Persnickety Tim\'s Coffee
[br]http://www.ptims.com

#6 gsv2com

gsv2com
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 04 April 2004 - 03:24 PM

If you use the code window, there's no need to go Flintstone style and use notepad. The new Dreamweaver does an excellent job making valid xhtml. Hit F12 anytime you want to preview your page in your browser.
GrooveSeeker - http://www.gsv2.com[br]JapanUpdate - http://www.japanupdate.com

#7 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 06 April 2004 - 10:23 AM

With regards the above Dreamweaver does a loust job of creating valid code. You can start any document and check validation for I.E and N.N and dreamweave automatically inserts its own invalid code. Its trash even with constant updates. Code in some extensions is also outdated. Macromedia appear to be somewhat lapse in their admin with ext's as they should by rights be removed from the database when code is invalid. Dont get me wrong Dreamweaver has a place in web design and if you understand its plus and negative points it will speed development times but if you dont learn it well it could hold you back. For most one off sections of scripting I hand code though I have made my own ext's for dreamweaver with my own favorite snippets.

#8 gsv2com

gsv2com
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 07 April 2004 - 01:48 AM

Which Dreamweaver are you using and what do you mean by invalid code? The new DW will even convert your nasty @$$ code into xhtml compliant code. The only thing I wish DW had is auto-complete for PHP built in. I've been a loyal user of DW for three years and have seen them really progress over the years. MX2004 is excellent software.

If you need to get a website quick and don't know what you're doing, use the design window even if it does make nasty code. After the design is done, go into the code window and analyze the tags. Learn what they do. After a while, you should be able to type all of your stuff from scratch.

One negative about writing your code by hand in a text editor: no auto-complete. This is a wicked feature in DW and will drastically cut your development times once you know the basics of html.

The new version also has great CSS support as well as limited PHP support. Notebook has neither.
GrooveSeeker - http://www.gsv2.com[br]JapanUpdate - http://www.japanupdate.com

#9 ksp

ksp
  • Members
  • Pip
  • Newbie
  • 5 posts
  • LocationEast Coast

Posted 07 April 2004 - 04:51 PM

We're using a templated ecommerce solution based on Dreamweaver and php. We use DWMX... even though I make changes to the editable region, it usually gives me the "making this change would require changing code that is locked by a template..." error. (Even when simply trying to insert a space or change a letter.)

Of course that concerned me, but when I checked with the template's creator I was told to just ignore that, the changes would be retained... and that's exactly what happened.

I don't understand why the error crops up when editing an editable region, but I've never had problems yet with the changes being discarded, so I just ignore the message. I never got the message in any of my websites before when I was not coding in php, so I don't know if it's related to using php or not...

Regards,
ksp



#10 azunoman

azunoman
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts

Posted 07 April 2004 - 06:26 PM

Just click, code view...holy!

#11 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 07 April 2004 - 08:24 PM

If you care to check your code validation it will probably be the same as that hashed up by my version 7 of MX2004. Try checking with latest online validation checkers and you will see it inserts quite a bit of outdated code. Further to this it also leaves plenty of spurious tags when altering attributes from the property inspector.

#12 gsv2com

gsv2com
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 April 2004 - 01:10 AM

So, clean up your code after the initial design is done. You shouldn't even be using the properties bar! Do everything with CSS! Even if DW inserts a bit of bad code, it's easy to clean up. I can't name any better software than DW in regards to the kind of code it produces.

Sure, notepad will give you perfect code! But it'll take you twice or three times as long to write it. Not to mention the new DW has excellent CSS support. IMHO the best feature of the latest version.
GrooveSeeker - http://www.gsv2.com[br]JapanUpdate - http://www.japanupdate.com

#13 cdorob

cdorob
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 09 April 2004 - 08:03 AM

I can understand the advantages of handcoding your web pages, especially with PHP, but how do you get past the visual layout perspective that Dreamweaver gives you? For me personally, I like to have a visual layout of my web page when I am designing it. But I am running into some trouble trying to insert PHP scripts into the HTML code using Dreamweaver. I think it has something to do with a template that Dreamweaver automatically creates when you choose to work on a PHP page. For example, I am trying to use includes for my Header, Side Menu, and Footer. When I insert the
<?php
require ("header.php")
?>
the rest of the page disappears in Design View and wont allow to me to add anything else. If I try to delete or add anything manually I get an error saying:
making this change would require changing code that is locked by a template or translator. The change will be discarded.

Any input or suggestions????? Please Help.

The code might disappear in design view because you probably have a problem in the page you are including: header.php.
When you require the header.php, the system actually replaces the <?php
require ("header.php") ?> with the code you have in ("header.php"). If the code here has a problem (a tag brooken or something) the overall design view can be destroyed.

Cristian


#14 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 09 April 2004 - 11:29 AM

With regards the above and gsv's comment regarding the property inspector. Its there for a purpose gsv thats why a muti million pound corporation of IT pro's put it there. As you are obviously a 100% css fan this doesnt automatically give you the right to tell other "they shouldnt be using it". I think you will find that everyone using DWMX2004 uses this item for its intended purpose.... altering attributes and quickly applying or changing your classes. If you press F1 at any time you can read the basic manual. Perhaps before demanding how people use their app you should double read the responses first as you appear to bite to my remark which in your own words you fully admitted were correct.

//*Even if DW inserts a bit of bad code, it's easy to clean up.*\\

Further to the above I wasnt knocking Dreamweaver. Im not into purchasing expensive software without knowing that it will be invaluable to me. It is a hell of an app and it speeds up my dev times by more than the quote you stated. It has its place, but you have to learn its strong points and its weaknesses as Im sure you will agree. Once it further supports php its going to be awsome however I am dubious this will ever happen as Im sure Macromedia realise that that if they made it so, then their own Coldfusion markup would in variably suffer as a result.

#15 brooky

brooky
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 12 April 2004 - 08:09 PM

Dreamweaver I use everyday at work with PHP & MySQL. The advantages are that you can knock something out VERY quickly and the code it produces may not be THAT efficient but it is suprisingly good. i.e. It will never build a mysql statement with MySQL Injection threats and it writes code with Register Globals Off. (Far more secure).

On the down side it is pretty limited and a good knowledge of php goes a long way. I started with hand code but now prefer a combination of hand code and dreamweaver code. As long as you can see its out put you can tidy it afterwards and make sure the result is perfect.

Thumbs up Dreamweaver rocks!! B)

#16 darkcarnival

darkcarnival
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 12 April 2004 - 08:20 PM

hi,

i prefer hand coding 100% :) and many reasons:

1. you will remeber the code, if your just getting the answer you wont be able to do it alone.

2. i think dreamweaver makes it harder than it should be, im in a web class and we had to use that, i was stuck and said sccrew this and switched it to code mode ;)

3.my mind is my visual. and also i often create html pages to help me visualze what i want so i can either make it better or copy-paste ;)

but it is good for beginners but i use notepad and at times highlighted editors when i get stuck on something.

#17 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 13 April 2004 - 12:21 AM

I design my page layouts using pencil and paper. Then when I think I have a good idea of what I want, I use Photoshop to create the visual layout. Then, when I'm satisfied that I have the look I want I can easily crop and create any of the graphic elements I need for the page ..... and then I code the page (using a souped-up text editor that includes a live page view that I leave turned off, plus a whole load of other bells and whistles).

Strange how nobody mentioned that design is a completely different exercise from coding, regardless of what tool you use to generate the code.
Legend has it that reading the manual never killed anyone.
My site

#18 gsv2com

gsv2com
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 13 April 2004 - 03:20 AM

Morpheous.... touche!

Does anybody even use cold fusion?!!! J/K. :P
GrooveSeeker - http://www.gsv2.com[br]JapanUpdate - http://www.japanupdate.com

#19 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 14 April 2004 - 12:53 PM

Im with brooky on his comments. he's learn dreamweavers limitations well as did I. An easy work around to some of DW MX2004 quirks is to use some of your best code snippets and make your own extensions. Its a pain making them but once you got them working well you got quality reusable code fired in within seconds. Ive now made 14 of my own php extensions that work really well, one of which is knocked up out of some modified code from one of the freaks tutorials. Further to the above comments there is now an newer free version of a great coding tool on the maguma site. If you get the paid version it comes with sql bundled but the free one works just fine. One tip tho, if you are using an installer bundle like phpdev etc do not install this item as it overwrites many key files. Get the freebie at
http://www.maguma.com

#20 Bogart

Bogart
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 April 2004 - 03:38 PM

I'm just learning PHP now. For a month or so I wondered if there would be a program that would write the code for me so I shouldn't learn it. In the same way you can build up a whole HTML site without knowing a single line of HTML using Dreamweaver, I wondered if there would be a program that could do the same with PHP. And as far as I know, the answer is no. That's why I'm learning finally to code myself.

About Dreamweaver, as far as I know, it can do a few useful things, but you won't get very far unless you know PHP yourself. Too bad, I love Dreamweaver and would prefer 100 times to just tell it what I want I it will code for me the entire site as it does with HTML.

To write my code I'm useing Zend Studio. The debug feature is very useful for me. I know there are other cool editors like PHP Edit, which is free. Nobody mentioned them here, while I'm hearing "wordpad" lots of times. Why? A PHP editor can help very much in writng your code (autocomplete, debug, support, etc...)

However, I'm just a newbie, as I said. Just writing my own first conclusions on the subject...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users