<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using observer paradigm to make my AutoCAD VB.NET program truly OOP in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/using-observer-paradigm-to-make-my-autocad-vb-net-program-truly/m-p/2475695#M70846</link>
    <description>Wondering if someone could show me how to implement an observer pattern for AutoCAD programming in VB.NET?&lt;BR /&gt;
&lt;BR /&gt;
Currently I have a lot of working Autocad code in VB6 which the company wants me to migrate to VB.NET. Well, that would&lt;BR /&gt;
normally be straightforward ... yes?  Unfortunately, not so in our case.... recently, our company decided that I need &lt;BR /&gt;
to modify it to implement the MVC (Model View Controller) paradigm to make it truly OOP.&lt;BR /&gt;
&lt;BR /&gt;
Currently, my move was to start with a simple one, opening a form and then grabbing the name of the drawing and putting &lt;BR /&gt;
it as the caption of the form... now, that is easy... I simply put in the form_load event the .getvariable("dwgname") and I am done....&lt;BR /&gt;
&lt;BR /&gt;
The problem lies in trying to implement observer patterns ... in the observer pattern I cannot simply call .getvariable("dwgname")&lt;BR /&gt;
from the form_load event instead, I need to use objects that would use an interface to register themselves as observers as&lt;BR /&gt;
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 &lt;BR /&gt;
to make such a thing happen before the code goes through the form_load event then that would more completely separate&lt;BR /&gt;
the View layer from the controller layer which gets implemented through the use of observers and observer related patterns.&lt;BR /&gt;
&lt;BR /&gt;
I did a search for MVC but got nothing returned but Im hoping that someone viewing this new thread might have come across it&lt;BR /&gt;
and please give me a clue how it can be done... thank you so much for all the kind help you could give ... all suggestions welcome&lt;BR /&gt;
&lt;BR /&gt;
Gratefully,&lt;BR /&gt;
Matt</description>
    <pubDate>Sat, 25 Apr 2009 17:58:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-04-25T17:58:03Z</dc:date>
    <item>
      <title>Using observer paradigm to make my AutoCAD VB.NET program truly OOP</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-observer-paradigm-to-make-my-autocad-vb-net-program-truly/m-p/2475695#M70846</link>
      <description>Wondering if someone could show me how to implement an observer pattern for AutoCAD programming in VB.NET?&lt;BR /&gt;
&lt;BR /&gt;
Currently I have a lot of working Autocad code in VB6 which the company wants me to migrate to VB.NET. Well, that would&lt;BR /&gt;
normally be straightforward ... yes?  Unfortunately, not so in our case.... recently, our company decided that I need &lt;BR /&gt;
to modify it to implement the MVC (Model View Controller) paradigm to make it truly OOP.&lt;BR /&gt;
&lt;BR /&gt;
Currently, my move was to start with a simple one, opening a form and then grabbing the name of the drawing and putting &lt;BR /&gt;
it as the caption of the form... now, that is easy... I simply put in the form_load event the .getvariable("dwgname") and I am done....&lt;BR /&gt;
&lt;BR /&gt;
The problem lies in trying to implement observer patterns ... in the observer pattern I cannot simply call .getvariable("dwgname")&lt;BR /&gt;
from the form_load event instead, I need to use objects that would use an interface to register themselves as observers as&lt;BR /&gt;
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 &lt;BR /&gt;
to make such a thing happen before the code goes through the form_load event then that would more completely separate&lt;BR /&gt;
the View layer from the controller layer which gets implemented through the use of observers and observer related patterns.&lt;BR /&gt;
&lt;BR /&gt;
I did a search for MVC but got nothing returned but Im hoping that someone viewing this new thread might have come across it&lt;BR /&gt;
and please give me a clue how it can be done... thank you so much for all the kind help you could give ... all suggestions welcome&lt;BR /&gt;
&lt;BR /&gt;
Gratefully,&lt;BR /&gt;
Matt</description>
      <pubDate>Sat, 25 Apr 2009 17:58:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-observer-paradigm-to-make-my-autocad-vb-net-program-truly/m-p/2475695#M70846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-25T17:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using observer paradigm to make my AutoCAD VB.NET program truly OOP</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-observer-paradigm-to-make-my-autocad-vb-net-program-truly/m-p/2475696#M70847</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I would like to help, but I don't find it really clear what you are trying to explain...&lt;BR /&gt;
&lt;BR /&gt;
1. You should not do anything in the Form Load, instead for maybe calling Controller.ModelToView or something like that.&lt;BR /&gt;
2. Readiing out your variable and placing it on the View needs to happen in the Controller&lt;BR /&gt;
3. If you want anything done before the Form Load, you can do that in the constructor&lt;BR /&gt;
&lt;BR /&gt;
What you are trying to do with the observers, I don't understand. Perhaps you should be a bit more clear, or post a simple code sample...&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
&lt;BR /&gt;
http://cupocadnet.blogspot.com

Edited by: bert.vanpeteghem@dolmen.be on May 11, 2009 12:35 PM</description>
      <pubDate>Mon, 11 May 2009 12:34:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-observer-paradigm-to-make-my-autocad-vb-net-program-truly/m-p/2475696#M70847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-11T12:34:57Z</dc:date>
    </item>
  </channel>
</rss>

