Results 1 to 8 of 8

Thread: Toggle project (enterprise software) features at build.

  1. #1

    Thread Starter
    Hyperactive Member DavesChillaxin's Avatar
    Join Date
    Mar 2011
    Location
    WNY
    Posts
    451

    Toggle project (enterprise software) features at build.

    So right to it. Is there a feature in Visual Studios (or one of it's project templates) that will allow me to build a single project that'll gives me the control of toggle certain features on and off? I'm reluctant to build the project with an initial method called before it starts that goes through and "hides" these feature (my only idea). But rather I'd like to remove them all together at the build/publishing step - which I can see being a prevention measure that stops the user from hacking my software and turning them on manually.



    I know it sounds terrible, but at the moment I actually have more than one of the same project going on. Each having identical core functionality, but differ only by specific functionality per requested.

    And yes. It's by far the most frustrating process to deal with day to day.



    I am in Visual Basic, but if you can suggest code in another language then that's fine. I'm positive I'll be able to understand it.
    Please rate if my post was helpful!
    Per favore e grazie!




    Code Bank:
    Advanced Algebra Class *Update | True Gradient Label Control *Dev | A Smarter TextBox *Update | Register Global HotKey *Update
    Media Library Beta *Dev | Mouse Tracker (Available in VB.net and C#.net) *New | On-Screen Numpad (VB.net) *New

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Toggle project (enterprise software) features at build.

    see if this is of any help....
    http://msdn.microsoft.com/en-us/library/tx6yas69.aspx

    Just be careful that if you block out something you aren't calling it from somewhere else...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Hyperactive Member DavesChillaxin's Avatar
    Join Date
    Mar 2011
    Location
    WNY
    Posts
    451

    Re: Toggle project (enterprise software) features at build.

    Hmm thanks techgnome! I using these quite often for debugging/developing vs release. But I haven't even once considered their use here.

    Another question, could there be issues wrapping them around entire objects? I wanted to extend this to forms, and maybe even the crystal reports - so that they're not included themselves in the packages they don't belong to.
    Please rate if my post was helpful!
    Per favore e grazie!




    Code Bank:
    Advanced Algebra Class *Update | True Gradient Label Control *Dev | A Smarter TextBox *Update | Register Global HotKey *Update
    Media Library Beta *Dev | Mouse Tracker (Available in VB.net and C#.net) *New | On-Screen Numpad (VB.net) *New

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Toggle project (enterprise software) features at build.

    There could be issues. If you have object Foo excluded from the project, then you must be sure you aren't referencing or creating an instance of Foo somewhere else, because the type will no longer be defined. It seems likely that if you have a type Foo, then at some point you are probably using type Foo, so it seems like it might be hard to disentangle a type out of a project, but you would know that better than anyone else.
    My usual boring signature: Nothing

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Toggle project (enterprise software) features at build.

    Seems to me it makes more sense to build the functionality into separate assemblies and use them in a plug-in style...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Hyperactive Member DavesChillaxin's Avatar
    Join Date
    Mar 2011
    Location
    WNY
    Posts
    451

    Re: Toggle project (enterprise software) features at build.

    Quote Originally Posted by Shaggy Hiker View Post
    There could be issues. If you have object Foo excluded from the project, then you must be sure you aren't referencing or creating an instance of Foo somewhere else, because the type will no longer be defined. It seems likely that if you have a type Foo, then at some point you are probably using type Foo, so it seems like it might be hard to disentangle a type out of a project, but you would know that better than anyone else.
    Exactly what I thought.. It's going to be impossible to judge now, but I can see it being an inevitably truth throughout the development life cycle of this project.


    Quote Originally Posted by techgnome View Post
    Seems to me it makes more sense to build the functionality into separate assemblies and use them in a plug-in style...

    -tg

    This sounds like a good idea, but I've never, ever attempted such a task. It's always been in thought, but always fell to the wayside after another solution. One that's usually much less complex.

    Where should I begin? I'm not even sure of that. I'll do some research myself while I wait for some responds, and if I get there first I'll post what I'm able to accurately gather.
    Please rate if my post was helpful!
    Per favore e grazie!




    Code Bank:
    Advanced Algebra Class *Update | True Gradient Label Control *Dev | A Smarter TextBox *Update | Register Global HotKey *Update
    Media Library Beta *Dev | Mouse Tracker (Available in VB.net and C#.net) *New | On-Screen Numpad (VB.net) *New

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Toggle project (enterprise software) features at build.

    I'm currently working on a plug in project. It takes a certain amount of thought starting up. I wouldn't go into it lightly, but I would go into it. Frankly, you will learn some simple and interesting things along the way.

    Making a plug-in system work by hand isn't difficult. I think that MS has also provided some kind of library, or something, that is supposed to make it easier, but it isn't hard to do the code anyways. What I did was think about what kind of functionality would be common to all the plugins. I put that functionality into an interface in a class library project. Every plugin, along with the main program, referenced this common class library. That way, every plugin could have whatever types it wanted, so long as it had at least one type that implemented the interface (or you can have many interfaces, as I have now ended up with). This works because every object that implements an interface can be used as that interface as if the interface was, itself, a type.

    In the main project, you use reflection to examine the objects in the plugin (which is also a class library), and create instances of any that implement the interface, as needed. I believe this might be a relatively slow process, in which case there are probably several ways to speed it up. In my case, the program makes one of every type of object it finds, but that's just because of how the design works.

    The only real code to it is that part about the reflection in the main project, and that's only a few lines, in practice. I've posted a couple examples of it around here at times. The difficulty is entirely in figuring out what belongs in the interface. That makes you think about general categories of interacting with the objects. Therefore, the bulk of the difficulty lies in design and not in execution, which is a bit unusual.
    My usual boring signature: Nothing

  8. #8
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Toggle project (enterprise software) features at build.

    Quote Originally Posted by DavesChillaxin View Post
    I know it sounds terrible, but at the moment I actually have more than one of the same project going on. Each having identical core functionality, but differ only by specific functionality per requested.
    Or, wrap up the "core functionality" into a library that you can share across multiple projects?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width