1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I have a profile creator ~ When I add new sites do I need to strip down to code?

Discussion in 'Visual Basic .NET' started by simpleonline1234, Jun 1, 2011.

  1. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    170
    Likes Received:
    13
    I have an app that creates profile accounts on several sites like social bookmarking, etc.

    Everytime I add a new site to the list will I have to whip out the code to add the new site and then update the app or is it possible to be able to do all this after the app have been compiled?

    What I'm looking to do is to add a new sub routine of the new site and then call that sub into the web document completed code.

    Any ideas on how I can get the code into that particular section via a button after the app has been compiled?

    Thanks
     
  2. smack

    smack Junior Member

    Joined:
    Feb 1, 2010
    Messages:
    182
    Likes Received:
    80
    Occupation:
    Software Engineer/Evil Genius
    Location:
    inside .NET
    unless the sites are based on the same template/code it will be extremely difficult to make your program site agnostic. generally speaking each site is unique in certain ways, and you need to create new code to account for the differences, be they subtle or large.

    one technique that i like to employ is your standard OOP principles of inheritance and abstraction. taking base methods and routines and reusing them where possible. setting up interfaces to implement in new class with public methods that are the same for all objects and allow your main cycle routines to interact with the site objects uniformly via the interface implementation, but allowing for the actual implementation details of the code to be distinct.

    this is a far cry from what you're asking for though and requires a high level of attention and some fairly deep knowledge of your software architecture. it pays off in the end though if you can implement it correctly.
     
  3. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    170
    Likes Received:
    13
    Hey thanks Smack...yeah that's kind of what I was thinking too when you were saying along the lines of using a class to setup the sites.

    What I was thinking about doing was to creating a sub routine that when called would open a file and run all the code in that file till end.

    The only issue that I was having with that is that it was throwing an error in my app when one site didn't work correctly. I guess I need to be more down with OOP to get around that issue.

    Using classes is a good idea and you gave me some great ideas with that.....I will see what I can pan out of that..else I will just run wit the whole updating method.....thanks again.