Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Multi-word coding convention.

Multi-word coding convention.

Scheduled Pinned Locked Moved IT & Infrastructure
lounge
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    crewchill
    wrote on last edited by
    #1

    Trying to decide between Parser::parseHtmlTag or Parser::parseTagHtml parseHtmlTag sounds like natural English, but when we have more than 1 kind of parse, it becomes: Parser::parseHtmlTag Parser::parseBodyTag Parser::parseATag So far so good, but if we have Parser::parseSomethingElse, it's a little hard to group / sort them based on "Tag". Parser::parseCssElement Parser::parseRandomElement I made the last 2 up :) But you get the general idea. It's hard to group them, is it tag or element. My boss already dissed the idea of passing parameter to parseTag() saying it's not explicit enough what the method is doing. I love to hear your preference on this and the reason. I don't really care, I just want to know how people usually code it. And, yes I do have a life :) !!!

    R L 2 Replies Last reply
    0
    • C crewchill

      Trying to decide between Parser::parseHtmlTag or Parser::parseTagHtml parseHtmlTag sounds like natural English, but when we have more than 1 kind of parse, it becomes: Parser::parseHtmlTag Parser::parseBodyTag Parser::parseATag So far so good, but if we have Parser::parseSomethingElse, it's a little hard to group / sort them based on "Tag". Parser::parseCssElement Parser::parseRandomElement I made the last 2 up :) But you get the general idea. It's hard to group them, is it tag or element. My boss already dissed the idea of passing parameter to parseTag() saying it's not explicit enough what the method is doing. I love to hear your preference on this and the reason. I don't really care, I just want to know how people usually code it. And, yes I do have a life :) !!!

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      I generally like to do the following emthod naming: actionSubtype1Subtype2 With this you then get: Parser:ParseTagHtml Parser:ParseTagBody Parser:ParseTagA Parser:ParseElementCss Parser:ParseElementRandom


      My Blog[^]
      FFRF[^]


      1 Reply Last reply
      0
      • C crewchill

        Trying to decide between Parser::parseHtmlTag or Parser::parseTagHtml parseHtmlTag sounds like natural English, but when we have more than 1 kind of parse, it becomes: Parser::parseHtmlTag Parser::parseBodyTag Parser::parseATag So far so good, but if we have Parser::parseSomethingElse, it's a little hard to group / sort them based on "Tag". Parser::parseCssElement Parser::parseRandomElement I made the last 2 up :) But you get the general idea. It's hard to group them, is it tag or element. My boss already dissed the idea of passing parameter to parseTag() saying it's not explicit enough what the method is doing. I love to hear your preference on this and the reason. I don't really care, I just want to know how people usually code it. And, yes I do have a life :) !!!

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        If you are parsing HTML text why do you need a different method for different tags? :confused:

        "Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?"
        Colin Angus Mackay in the C# forum

        led mike

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups