• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Dependency Injection - spaghetti atchitecture"

Collapse

  • farout117
    replied
    Originally posted by Gentile View Post
    Object Browser does list the methods in each class. The screen dump you quoted demonstrates it doing exactly that. And both Object Browser and the code view of Visual Studio can be used to find all occurrences of a given method being used; that was demonstrated in the previous screen-dump I provided - you just right-click and choose "Find All References" from the context menu that appears. It couldn't be easier.

    That's the thing I find with people that use add-ons to Visual Studio. They're always convinced that such tools enable the developer to do something that they couldn't otherwise do right out of the box, and they're always surprised when you point out there was a way to achieve what they're trying to do anyway that they just weren't aware of. What are you going to do if you need to contract somewhere that doesn't use your favourite gucci tools, and that for security reasons doesn't let you install your own software?
    Solution Navigator is an Add On that can be downloaded easily from Tools-> Extension Manager. I do not think I will ever find a client that will not allow downloading from the Extension Manager, however if I do, I will offer to bring in my own kit, and if they refuse, I will search for something else. Most probably if they do not allow the Extension Manager downloads, they will not even allow installing packages, which in my opinion is not acceptable. And I am sure you can convince the client that it will help in productivity.

    I much prefer the Solution Navigator to the Object Browser, but as I said, its a matter of taste and opinions. I do not like the "primitive" look of VS, I like to add Add Ons that improve my productivity.

    Re-Sharper is another one, its not free, but really worth the price of the licence. And I can tell you that it will improve your productivity a lot, at least from my experience, and I am sure lots of fellow contractors will agree.

    Leave a comment:


  • Willapp
    replied
    +10 Resharper.

    One of the few commercial add-ons I've ever purchased simply because it's so useful I do find it hard to live without now! Thank god current client uses it already.

    Leave a comment:


  • Gentile
    replied
    Originally posted by farout117 View Post
    Rachel what is not necessary for you may be necessary for me

    Basically the Object Browser cannot list the methods that you can find in the class, with the Solution Navigator you can. You can also search for a particular method, or parameter, in the search box and it will list all the occurrences.

    Full list of features here

    Announcing the Solution Navigator - The Visual Studio Blog - Site Home - MSDN Blogs

    I find it very useful
    Object Browser does list the methods in each class. The screen dump you quoted demonstrates it doing exactly that. And both Object Browser and the code view of Visual Studio can be used to find all occurrences of a given method being used; that was demonstrated in the previous screen-dump I provided - you just right-click and choose "Find All References" from the context menu that appears. It couldn't be easier.

    That's the thing I find with people that use add-ons to Visual Studio. They're always convinced that such tools enable the developer to do something that they couldn't otherwise do right out of the box, and they're always surprised when you point out there was a way to achieve what they're trying to do anyway that they just weren't aware of. What are you going to do if you need to contract somewhere that doesn't use your favourite gucci tools, and that for security reasons doesn't let you install your own software?

    Leave a comment:


  • farout117
    replied
    Originally posted by Gentile View Post
    What, you mean the way Object Browser already does right out of the box:



    I'm never sure why people feel the need to plough into unnecessary complications like third party software and UML diagrams, when all the tools to achieve the result asked for are already there right out of the box within Visual Studio itself.
    Rachel what is not necessary for you may be necessary for me

    Basically the Object Browser cannot list the methods that you can find in the class, with the Solution Navigator you can. You can also search for a particular method, or parameter, in the search box and it will list all the occurrences.

    Full list of features here

    Announcing the Solution Navigator - The Visual Studio Blog - Site Home - MSDN Blogs

    I find it very useful

    Leave a comment:


  • woohoo
    replied
    Try out resharper, if you put a little effort into it then you will find searching for classes, methods etc pretty fast and easy.

    The auto suggestions are pretty good and not intrusive in my opinion.

    I've found with resharper the more effort I put into it the more I get out of it. Though I respect that other people are more than happy to use vs out of the box.

    Leave a comment:


  • Gentile
    replied
    Originally posted by farout117 View Post
    I don't know if it helps you but I had downloaded the Solution Navigator from the Extension Manager (VS2010) and I find it very useful. Basically it will list all the references, properties, methods of all the classes you have in the particular project/solution. Worth giving it a try me thinks
    What, you mean the way Object Browser already does right out of the box:



    I'm never sure why people feel the need to plough into unnecessary complications like third party software and UML diagrams, when all the tools to achieve the result asked for are already there right out of the box within Visual Studio itself.

    Leave a comment:


  • farout117
    replied
    Originally posted by Malcolm Buggeridge View Post
    The project that I have the good fortune to have recently inherited is a right old can of worms.

    Now, I hear you say, the benefits of a loosely coupled architecture are boundless and, when properly done, conduce to an easily implemented testing framework.

    All well and good so far but, as a developer who has inherited a solution containing a gazillion factory classes, IoC container classes and interfaces I do have one small gripe.

    It's a complete mess. Whereas in the days of yore we'd complain of spaghetti code we now seem to have spaghetti architecture. Try looking for the class you're after that implements a particular interface (and herein lies my question). Visual Studio has no feature to allow one to find all classes that implement a particular interface in the same way as one can find all references to a particular type.Is there some kind of tool/add-on available for this purpose? I hope so because all this not being able to see the wood for the trees nonsense is likely to drive old Buggeridge doolally over the coming months.
    I don't know if it helps you but I had downloaded the Solution Navigator from the Extension Manager (VS2010) and I find it very useful. Basically it will list all the references, properties, methods of all the classes you have in the particular project/solution. Worth giving it a try me thinks

    Leave a comment:


  • Gentile
    replied
    Originally posted by Malcolm Buggeridge View Post
    Oh, Thankyou wery much Rachel. I shall give that a whirl in the morning. Incidentally, what's the menu command for this action?

    Edit: And thanks to those of you who recommended resparker. I'll download the trial tomorrow.
    You're welcome.



    And, FWIW, I'd give ReSharper a miss if I were you. As demonstrated, you don't need it to accomplish the task you actually asked about. More importantly, though, when you apply it to an existing project that hasn't utilised ReSharper during its development process, what you invariably find is that you get back a wall of 'error' messages, most of which are in fact merely opinions about things like naming conventions rather than actual problems.

    I'm not a fan of ReSharper even during development from scratch, but when applied to an existing project after the fact it can feel a bit like inviting that Harry Enfield character that continually says "you don't wanna do it like that!" over to tell you lots of things you didn't need or want to know that are 'wrong' with a solution that builds fine. This is particularly tiresome if you didn't even write the thing.

    Leave a comment:


  • Malcolm Buggeridge
    replied
    Originally posted by Gentile View Post
    Yes it does. You use exactly the same method that you use to find all references to a Type to find all references to an Interface:

    Oh, Thankyou wery much Rachel. I shall give that a whirl in the morning. Incidentally, what's the menu command for this action?

    Edit: And thanks to those of you who recommended resparker. I'll download the trial tomorrow.
    Last edited by Malcolm Buggeridge; 22 July 2012, 21:27.

    Leave a comment:


  • garethevans1986
    replied
    +1 for Resharper.

    ALT + F7 or CTRL+SHIFT+ALT+B to find all implementations.

    GE

    Leave a comment:


  • Gentile
    replied
    Originally posted by minestrone View Post
    There are a lot of people using these frameworks who do not have a clue how to design quality OO software.

    I am maintaining 3 very poorly written spring appilcations just now, each one contains a whole bunch of anti patterns. The thing is the people who write them do not have a clue how crap their work is. They have written bucket loads of meaningless tests and they think that makes it a well engineered solution.

    I don't help, I smile and tell them they are fantastic so they keep hiring a paying invoices every month.
    Yes, that's pretty much the problem. Too many people think that if Martin Fowler did it once, then it must be the right thing to do in every single situation. They don't realise that they're merely attempting to use somebody else's Golden Hammer.

    Regularly, you find that people go to all the trouble of implementing Dependency Injection, Inversion of Control, etc., etc., then they don't even do any of the unit testing all of ass-backwards Yoda code was meant to support! And, of course, their solution invariably doesn't work reliably or do what users actually needed, because they've been too busy trying to be too clever with the design instead of focusing on those more fundamental concerns.

    You're right that it is easier, and more lucrative, as a contractor just to nod, smile and play along whenever you get some misguided bob at a client that thinks their code is great whilst in fact it's just a mess. However, I prefer to at least try and explain that there's a better way, and to be professional but to walk away if they choose not to listen to good sense.

    It's not that I can't do things the hard way when and if I need to just to make a buck, or because somebody's ego can't take being told the truth about their misguided approach. I just find it's better for my sanity if I don't try to. I regularly find that the financial statements of organisations that make these mistakes tell a tale when you check them out some time later with Company Check. If they don't learn from speaking with outside developers about their approach, they certainly will learn from the effect on their bank balance and bottom line further down the line.

    Leave a comment:


  • minestrone
    replied
    There are a lot of people using these frameworks who do not have a clue how to design quality OO software.

    I am maintaining 3 very poorly written spring appilcations just now, each one contains a whole bunch of anti patterns. The thing is the people who write them do not have a clue how crap their work is. They have written bucket loads of meaningless tests and they think that makes it a well engineered solution.

    I don't help, I smile and tell them they are fantastic so they keep hiring a paying invoices every month.

    Leave a comment:


  • jmo21
    replied
    Originally posted by Malcolm Buggeridge View Post
    The project that I have the good fortune to have recently inherited is a right old can of worms.

    Now, I hear you say, the benefits of a loosely coupled architecture are boundless and, when properly done, conduce to an easily implemented testing framework.

    All well and good so far but, as a developer who has inherited a solution containing a gazillion factory classes, IoC container classes and interfaces I do have one small gripe.

    It's a complete mess. Whereas in the days of yore we'd complain of spaghetti code we now seem to have spaghetti architecture. Try looking for the class you're after that implements a particular interface (and herein lies my question). Visual Studio has no feature to allow one to find all classes that implement a particular interface in the same way as one can find all references to a particular type.Is there some kind of tool/add-on available for this purpose? I hope so because all this not being able to see the wood for the trees nonsense is likely to drive old Buggeridge doolally over the coming months.
    Download the Resharper 30 day free trial and it might help you unravel everything.

    It's a great tool and worth the license fee for the many features it has.

    Leave a comment:


  • Gentile
    replied
    Originally posted by insur View Post
    Is there any UML?
    Lets hope not. It's bad enough writing unreadable spaghetti code in the name of making it testable without bringing indecipherable cave paintings written by people who imagined they were doing something technical into the equation.

    Imagine the house you lived in had all its furniture glued to the walls, and then when somebody asked why you did that your only answer was that it made it easier to confirm that the floorspace was still what you thought it was when you built the room. Then when you asked the architect to explain why that was so beneficial, they showed you a diagram that looked like a set of particularly terse Ikea instructions, containing a little stick man standing in the centre of a square with boxes stuck to the edge of the square.

    That's what making architectural decisions purely in the name of testability, then trying to explain your decision using UML is like.

    Leave a comment:


  • Gentile
    replied
    Originally posted by Malcolm Buggeridge View Post
    ...Visual Studio has no feature to allow one to find all classes that implement a particular interface in the same way as one can find all references to a particular type.
    Yes it does. You use exactly the same method that you use to find all references to a Type to find all references to an Interface:

    Leave a comment:

Working...
X