Book a Demo

Author Topic: Problems with VB.NET Code Generation  (Read 4001 times)

pzajac

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Problems with VB.NET Code Generation
« on: March 31, 2004, 11:42:52 am »
I am currently using EA on a VB.NET project and have enjoyed using it to model the design.  When I go to generate the code, I have a few pervasive problems

1.  All Associations must be expicitly shown on the model in order to get them to show up in the .vb files.  (If I use a class as a parameter for a function, I still need to model an association, even though the assoiation is implied in the parameter for a method call).

2.  The VB.NET generation returns Null instead of VBSystem.DBNull, or Nothing.  There does not seem to be a tweak to correct this.

3.  When I add comments to my generated code, and synchronize, the comments do not get lost.  This means that any commenting that I do is lost.

Am I missing somethings, or are these current short comings in the product?

I am using the .NET SDK 1.1, with EA 4.00 Build 723

robertsong

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Problems with VB.NET Code Generation
« Reply #1 on: May 05, 2004, 04:38:19 pm »
Hi pzajac,

Sorry I am not replying your question. Just want to discuss something regarding the VB.Net OO feature.

I am trying to use VB.Net and EA to convert a project form vb6 to vb.net. But lots of people still not agree that vb.net is a OO develop tool even if Microsoft say Vb.net is a full OO enviorment. Have some suggestion about that?

Robert Song

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Problems with VB.NET Code Generation
« Reply #2 on: May 05, 2004, 04:50:09 pm »
Robert,

Lots of people say lots of things - many of them should not say anything.

My advice to you is to understand why the system is being converted from VB6 to VB.Net and focus on achieving those goals.

IMO: Whether or not VB.net is OO is immaterial to anything anywhere anytime and continuing that pseudo-argument will improve nothing, nowhere, notime.

Please don't take this as a flame against you personally - its a flame against those people who say it to you.

rgrds
Bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

pzajac

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Problems with VB.NET Code Generation
« Reply #3 on: May 06, 2004, 07:19:51 am »
Robert

VB .NET is a true object oriented programming langauge.  Having said that, it is not without a few blemishes.  I have found that while VB .NET does support most OO concepts, it is not as rigorous about enforcing them as other langauges (The language can allow developers to code in whatever style they choose, in this sense it is no different than C++, you can write CTRAN, or VB.NET-TRAN if you want).  I have found that at times the compiler has compiled code that is non-sensical without complaining.  Finally, the VB .NET does not require that exceptions thrown by a method be included in a method signature.  This makes it more difficult for developers to understand what a method will do in exceptional circumstances.  I hope this answers your question.

Paul

robertsong

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Problems with VB.NET Code Generation
« Reply #4 on: May 06, 2004, 03:00:08 pm »
hi Bruce and Paul,

I agree with you that don't argue too much, just do it. Actually the person who said vb.net is not a OO language is a senior C++ insturctor. Of course he had his reason to say that.

The reason that we convert vb6 project to vb.net(maybe it is rewriting) , not directly using Java/C++, is -resource. using the vb's technology background and .net's OO feature.

Paul, thank you for response. I hope we can exchange experience about vb.net later on after I have gone deeper into it.

Thanks,

Robert