3

I have a question for the Web Components, React, and Angular communities. It is essentially the same question (of course the examples would be slightly different), but I recognize that the answer may be different for each tool.

Is it worth creating three different posts, one for each tool, or should I try to combine them into one post? If so, what can I do to avoid scaring away people who only know one of the tools mentioned? Obviously the best answer would be from someone who knows all three tools well, but I don't see anything wrong with an expert from each camp providing advice for that tool, except for the fact that I can't accept more than one answer.

For reference, the question is something along the lines of this:

From a semantic perspective, are ids legal in the html templates for React Components/Angular Directives/Web Components? From a full document perspective, the answer is probably no. If the component gets used more than once (and there is nothing preventing that from happening) then you wind up with a duplicate id problem. And yet, from a component perspective it makes so much more sense than a class. With the ShadowdDOM especially, each component/directive is like a miniature DOM where is makes more sense to say things like "This is THE left control," instead of "This is A left control."

Why am I asking this question? I'm giving a presentation to a book club on Web Components. Most of the attendees have some Angular experience, so drawing on the similarities and differences seems like a clear option. I'm trying to make sure that my code examples are well constructed, canonical, and clear. Throwing React in the mix is just for intellectual curiosity, since I haven't looked at it yet but I know many people that love it.

I'd love to hear a "We gave some thought to it back when..." or "It isn't really feasible in this case..." or "Actually, inside a you pretty much get a new DOM, so use any ids you need!" from each camp.

6
  • 10
    The fact that you're asking for so much would suggest that your question may be too broad for SO, depending on how you ask it. Would you like to give a summary of what it is that you want to ask?
    – user456814
    Commented Oct 5, 2015 at 5:47
  • 2
    I'd say that if you're about to ask a question which invites partial answers, or is pretty much tailored to only your needs with little chance of someone else having the exact same trilogy of tooling and asking the same question, then you're going to go the wrong path. In this situation I wonder: do you really need three questions or one question about three tools? Why not start with one question about one tool, and from there see if you can repeat the trick yourself?
    – Gimby
    Commented Oct 5, 2015 at 11:34
  • I just edited the question here to include the question I intend to ask. I don't see it as being a particularly broad question, it is actually a fairly specific question about a certain aspect of each technology.
    – Jwashton
    Commented Oct 5, 2015 at 11:58
  • I recognize that this might not be the best question for SO, despite it's technical nature. Code Review maybe? This is general enough that I don't have a specific example, though I could create or pick one.
    – Jwashton
    Commented Oct 5, 2015 at 12:00
  • Is the question something that someone who's an expert in one of the three frameworks, and only has a passing familiarity with the other two could answer? If yes, then do it in a single question. If no, it needs to be in three questions. That said, this seems like it may be a better fit for Programmers
    – theB
    Commented Oct 5, 2015 at 13:10
  • I don't see how the question is any different for each frameworks. The question is fundamentally a framework independent question, and could be asked in that light. That said, I'm not intimately familiar with those frameworks, so I don't know if some of them try and address this case.
    – Servy
    Commented Oct 5, 2015 at 13:38

1 Answer 1

1

Honestly, I don't think this question is a good fit for Stack Overflow no matter how you cut it. Depending on how you word it, it might be okay on Programmers.

First, I'm going to take a complete guess that most people who try to answer your question are not going to be experts in all three frameworks. Which means that you will probably end up with all the best information scattered across multiple answers. Which is less than ideal. You could create your own answer at the end that compiles all this information, but the fact that this is necessary should be a red flag that the question isn't well scoped. It feels like it is way too broad and would likely be closed as such.

Second, if you tag your question with all three frameworks, I feel like it is going to annoy the people that follow those tags. They are going to see a question in their favorite tag (and at least assume they have some chance of providing a satisfactory answer) only to find that they can only provide a partial answer. It feels like when I see a question that is tagged with someone's entire web stack (c#, sql, javascript, html, ...) but the question only really relates to one of those. Anyone that follows the sql tag would probably be at least a little annoyed that they got a javascript question in their feed. I would expect that to lead to downvotes and an overall poor reception of the question.

If you ask it as three separate questions, you avoid scoping issues and annoying people. However, without a specific coding problem it doesn't feel like a particularly good question for SO and is probably a better fit on Programmers. You may be able to ask it in a framework agnostic fashion, which would probably provide better long-lasting answers, but probably not address the concerns that you have as well as you might like.

Finally, three separate questions seem simple enough that they could almost be google-able. If it were me, I would probably ask the framework-agnostic question on Programmers to get an idea of what the challenges/issues of such a design choice would be. Then I would take that knowledge and start doing my own research for each framework to see what they do. And then you would probably be in a good place to ask new, more specific questions on either SO or Programmers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .