Slashdot Mirror


Developer Hacks Together Object-Oriented HTML (github.com)

An anonymous reader writes: Ever since I started coding, I have always loved object-oriented design patterns. I built an HTML preprocessor that adds inheritance, polymorphism, and public methods to this venerable language. It offers more freedom than a templating engine and has a wider variety of use cases. Pull requests appreciated!

7 of 184 comments (clear)

  1. Spare us. by HornWumpus · · Score: 4, Insightful

    Another genius, building his own framework, just what the world needs.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    1. Re:Spare us. by jellomizer · · Score: 2, Insightful

      Object oriented is very overblown methodology. It has its advantages but overall it just gets in the way, because it takes the effort away from logic and workflow and more towards design. So you often end up with a well designed product that doesn't do what it needs to do.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Spare us. by Anonymous Coward · · Score: 2, Insightful

      Your response is about as short-sighted as possible. I'm sure you would prefer to have been spared all of the other many geniuses that have tinkered and built across the many generations. Sure, many of those creations have been left on the scrapheap of time, but the remaining ones facilitate and amplify our abilities.

      Go move into a cave in the deep wilderness where you can spare yourself.

    3. Re:Spare us. by Dutch+Gun · · Score: 4, Insightful

      You know, I disagree vehemently with those who proclaim OO an abject failure. But I'm always a bit bemused with people who feel the need to build OO into everything, whether it needs it or not. The trick, of course, is to use it as it makes sense.

      One of the problems with OO is that poorly designed programs can be much worse to grok the logic and flow of than poorly designed procedural programs, mostly because of how scattered the logic can be throughout an object hierarchy.

      A much more modern* trend is to avoid deep class hierarchies whenever practical, preferring instead to try to use smaller, more reusable objects that are only responsible for a single task, and use composition of objects. This allows you to more easily test each individual component and assure correctness of behavior, and then build on that behavior. These days, a lot of my classes are very shallow, either a single class, or perhaps derived from an interface class to hide implementation details when necessary.

      Class hierarchies still have their place on occasion. There are still cases when you must manage a number of types of related-but-different objects with a lot of common properties. But if you keep this paradigm to a minimum, you'll be a lot happier with OOP, and keep your code more manageable.

      * If you consider the last 15 years or so "modern"

      --
      Irony: Agile development has too much intertia to be abandoned now.
  2. Stale project, new news? by Anonymous Coward · · Score: 5, Insightful

    This repo hasn't had a commit in 2 years, why is this interesting now?

    1. Re: Stale project, new news? by Anonymous Coward · · Score: 4, Insightful

      That's just how late Slashdot is. When he submitted it, it was brand new.

  3. Java? KILL IT! by Anonymous Coward · · Score: 1, Insightful

    Made in Java? Born dead, hahahaha!