[Pro] HTML Code for comments?

What’s the HTML code for comments. I’m starting to make a lot of code modifications to my websites and I’m forever forgetting what the bits of code did. :slight_smile:


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

You do this:

<!-- comment here -->

And in Freeway, you can apply my Comments Action to any element. This adds a comment to either end of the output code for that element.

Walter

On May 18, 2012, at 11:40 AM, RavenManiac wrote:

What’s the HTML code for comments. I’m starting to make a lot of code modifications to my websites and I’m forever forgetting what the bits of code did. :slight_smile:


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

Is this the action you’re referring to?

http://actionsforge.com/actions/view/20-comment


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

Yup.

Walter

On May 18, 2012, at 12:48 PM, RavenManiac wrote:

Is this the action you’re referring to?

http://actionsforge.com/actions/view/20-comment


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

I know why you would add comments to HTML code, primarily because it’s cryptic, but why would you want to add a comment to an item?


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

Let’s say you have a reasonably complex Freeway page, and you need to use the generated HTML in another application, say to add some hand-coded script. You want to wrap your script around one element or another on the page, but you don’t want to go blind looking through all those angle-brackets for just the one little part you need. Try this: if you’re viewing this on the Web, use your browser’s View Source menu option and see what I’m talking about. Try to find just this one post, which will be in its own DIV somewhere in all that code. For extra credit, try to find the opening and closing tags of that DIV.

Adding comments is a time-honored way to figure out where you are in a document, particularly a deeply-nested one.

Walter

On May 18, 2012, at 1:01 PM, RavenManiac wrote:

I know why you would add comments to HTML code, primarily because it’s cryptic, but why would you want to add a comment to an item?


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

Yes, that is a challenge. Do you have an example of a heavily commented website?


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

http://www.apple.com or http://plone.org are two great examples.

Walter

On May 18, 2012, at 1:13 PM, RavenManiac wrote:

Yes, that is a challenge. Do you have an example of a heavily commented website?


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

So, then it is possible to take a FWP document, edit the code outside of FW, and be able to open the edited document back up with FWP?

On 18 May 2012, 5:06 pm, waltd wrote:

Let’s say you have a reasonably complex Freeway page, and you need to use the generated HTML in another application, say to add some hand-coded script. You want to wrap your script around one element or another on the page, but you don’t want to go blind looking through all those angle-brackets for just the one little part you need. Try this: if you’re viewing this on the Web, use your browser’s View Source menu option and see what I’m talking about. Try to find just this one post, which will be in its own DIV somewhere in all that code. For extra credit, try to find the opening and closing tags of that DIV.

Adding comments is a time-honored way to figure out where you are in a document, particularly a deeply-nested one.

Walter

On May 18, 2012, at 1:01 PM, RavenManiac wrote:

I know why you would add comments to HTML code, primarily because it’s cryptic, but why would you want to add a comment to an item?


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

Is this another example of a comment?

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/


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

No, Freeway doesn’t work that way. If you edit its generated code, it replaces those edits the next time you publish. What you can do is use the comments as flags to an external template-processing engine, telling it to replace a placeholder element you commented with some server-generated code.

Walter

On May 18, 2012, at 1:17 PM, Walter Lee Davis wrote:

http://www.apple.com or http://plone.org are two great examples.

Walter

On May 18, 2012, at 1:13 PM, RavenManiac wrote:

Yes, that is a challenge. Do you have an example of a heavily commented website?


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


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

Okay, you’re now over my head. Walter, you know so much about this stuff that it’s a little scary. :slight_smile:


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

Yes, that’s a JavaScript comment by the look of it. It would also work in PHP or C. Block-level comments like this can span multiple lines, so you could do this in JavaScript:

/* this is my comment
there are many like it
but this one is mine */

That whole block would be treated as a single comment. The single-line equivalent in JavaScript or PHP is two slashes at the beginning of the comment: //comment follows.

Walter

On May 18, 2012, at 1:22 PM, RavenManiac wrote:

Is this another example of a comment?

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/


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

I’ve been writing code for the Web since 1994 or so. Much of it by hand, in many different languages. Freeway is a real blessing to me, it’s taught me a lot about how to structure browser-proof layout code. But it’s a tiny part of the work I do day-to-day.

Walter

On May 18, 2012, at 1:26 PM, RavenManiac wrote:

Okay, you’re now over my head. Walter, you know so much about this stuff that it’s a little scary. :slight_smile:


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

Is it your primary HTML web development application?


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

In terms of pure percentages, probably no. TextMate and CSSEdit would have to take that crown. But I don’t write all that much HTML as a percentage of my work, mostly Ruby code these days, and the occasional dip back into PHP for legacy projects or little one-offs.

I work most of the time on large database-backed projects, and like the iceberg, the part you can’t see is quite a bit larger than the visible bit, so the percentage of HTML compared with other languages in what I do is quite low.

What I do use Freeway for is sketching interface ideas. Nothing is faster or more direct, and I can churn out a lot of variations on a theme very quickly. When it comes time to use that code, I may copy and paste, but often as not I write a more concise layout by hand.

Walter

On May 18, 2012, at 1:31 PM, RavenManiac wrote:

Is it your primary HTML web development application?


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

Comments to the html section are bracketed like /* this */

Comments in the html section are bracketed like

As Walter says, Freeway Pro generates new page code every time you publish,
so short of some action magic, any comments are written-over.


Ernie Simpson

On Fri, May 18, 2012 at 1:22 PM, RavenManiac email@hidden wrote:

Is this another example of a comment?

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/


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