Making VB.NET OOP via Observer paradigm and easily adaptable to Test Driven Development

mvc , vb.net , tdd Calgary, Canada
  • 8 years ago
    Wondering if someone could show me how to implement an observer pattern in VB.NET? Currently I have a lot of working code in VB6 which the company wants me to migrate to VB.NET. Well, that would normally be straightforward ... yes? Unfortunately, not so in our case.... recently, our company decided that I need to modify it to implement the MVC (Model View Controller) paradigm to make it truly OOP and adaptable to TDD (Test Driven Development). Currently, my move was to start with a simple one, opening a form and then grabbing a piece of text from a textfile and putting it as the caption of the form... now, that is easy. The problem lies in trying to implement observer patterns ... in the observer pattern I cannot simply call the usual me.caption = mytextstream.ReadLine from the form_load event instead, I need to use objects that would use an interface to register themselves as observers as the form loads but not necessary having to be residing in the form_load event... in fact ... if there is somehow a way for me to make such a thing happen before the code goes through the form_load event then that would more completely separate the View layer from the controller layer which gets implemented through the use of observers and observer related patterns. I did a search for MVC but got nothing returned but Im hoping that someone viewing this new thread might have come across it and please give me a clue how it can be done in VB.NET ... thank you so much for all the kind help you could give ... all suggestions welcome Gratefully, Matt

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves” - Alan Kay