move to classes

Last post 07-03-2009 11:38 AM by cmt9000. 5 replies.

Sort Posts:

  • move to classes

    07-02-2009, 2:28 PM
    • Member
      149 point Member
    • cmt9000
    • Member since 01-24-2008, 2:50 PM
    • Posts 193

    I have a VB.NET web app that is about 2000 lines of code, contains about 20 different subroutines, and about 50 different functions.


    Is there an easy way to "rewrite" this to take advantage of classes and objects?

    Thanks!




    Wannabe .NET Developer
  • Re: move to classes

    07-02-2009, 4:48 PM
    Answer

    There's no automated tool, if that's what you mean.  "Easy" way?  Depends on how complicated the app is, but 2000 lines of code is pretty small.  I've sen samples of code for a single page that run to 500+ lines posted here.  Shouldn't take you long to rewrite starting from scratch.


    Regards Mike
    [MVP - ASP/ASP.NET]
    My site
  • Re: move to classes

    07-02-2009, 8:14 PM
    • Member
      149 point Member
    • cmt9000
    • Member since 01-24-2008, 2:50 PM
    • Posts 193

     I'm not looking for an automated way....but I was hoping I wouldn't have to re-write the whole thing.  2000 lines may not be a lot, but it took me a good month to write it all and get it working.  However, looking at it now, I am thinking I should've learned about classes and objects.  I guess I just programmed it the old-fashioned way using subs and functions.  I was hoping I could take my existing code, and maybe just restructure or rewrite parts of it to take advantage of classes.

     

    Thanks

     

    Wannabe .NET Developer
  • Re: move to classes

    07-03-2009, 12:11 AM

    Maybe you can.  But it is impossible to provide you with a sensible answer on how easy it would be for you without seeing the code, knowing your skill level etc etc.



    Regards Mike
    [MVP - ASP/ASP.NET]
    My site
  • Re: move to classes

    07-03-2009, 2:27 AM
    Answer

    There is another thing, of course.  Rewriting the application to be more OOP is not always a good thing.  It adds complexity, which may not be necessary if the application is small and unlikely to grow.


    Regards Mike
    [MVP - ASP/ASP.NET]
    My site
  • Re: move to classes

    07-03-2009, 11:38 AM
    • Member
      149 point Member
    • cmt9000
    • Member since 01-24-2008, 2:50 PM
    • Posts 193

     Oh ok, I just wanted to know if it was possible to do without a complete re-write. 

     

    Thanks

    Wannabe .NET Developer
Page 1 of 1 (6 items)