5

For the backstory, I'm developing a GUI application in C#/WPF. I already had in my code quite many instances of

<ComboBox ItemsSource="{Binding Items}">
    <ComboBox.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding ItemName}"/>
        </DataTemplate>
    </ComboBox.ItemTemplate/>
</ComboBox>

when I accidentally stumbled upon DisplayMemberPath during a marginally related StackOverflow search, which makes the above

<ComboBox ItemsSource="{Binding Items}"
          DisplayMemberPath="ItemName"/>

Now ComboBox has 158 public properties, and I really doubt that I should read all of their descriptions before even starting to use a ComboBox. On the other hand I'm really afraid of encountering this problem on a larger scale, since this is my first WPF app and I sometimes get the feeling of doing it wrong.

Note that online tutorials apart from the official documentation are very unreliable, often wrong and/or poorly written; at least I found it hard to find a good one. On the other hand, any programming books I've encountered went into too much detail, taking whole chapters explaining things that were obvious to me after the first paragraph, so I skipped a lot of parts.

When using a complex framework or library, how can I avoid accidentally skipping a relevant part of the impenetrably huge documentation, therefore creating unnecessary work for myself?

I don't think this is a duplicate of What kind of process should I use to learn a big system? or How do you dive into large code bases?, because these are about learning a codebase that you have to understand/work on/modify/improve, also assuming that you have access to the code itself. My question is about being a user of a framework, and the task at hand is "given the huge official documentation and Google, efficiently find those parts of the framework that I can use to make my work easier".

6
  • There is no 100% failproof way. Look also inside free software coded with that framework. Ask on specialized forums. Jul 30, 2014 at 8:11
  • 1
    Use frameworks that don't expose 158 public properties for a ComboBox? Jul 30, 2014 at 8:51
  • @exizt That's worth another Programmers.SE question, but 1. in this case I have to use WPF, and 2. WPF is otherwise the best GUI framework I've seen, though I haven't used many of them.
    – marczellm
    Jul 30, 2014 at 9:05
  • possible duplicate of What kind of process should I use to learn a big system?
    – gnat
    Jul 30, 2014 at 9:22
  • @gnat I don't think so, because that's itself a duplicate of How do you dive into large code bases?, and that one's about learning a codebase, not a framework.
    – marczellm
    Jul 30, 2014 at 9:43

1 Answer 1

4

When using a complex framework or library, how can I avoid accidentally skipping a relevant part of the impenetrably huge documentation, therefore creating unnecessary work for myself?

You can never know everything yourself. By exposing your code to others, you will have other people with other knowledge seeing how things are done and correcting you.

Think of colleagues, but also things like open source projects or even https://codereview.stackexchange.com/ .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.