General Plug-In Framework? (1 Viewer)

Are you interested in a generalized MediaPortal plug-in framework?

  • Maybe, I'd like more details first.

    Votes: 0 0.0%
  • Not really interested, but whatever.

    Votes: 0 0.0%

  • Total voters
    17
  • Poll closed .

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
43
Texas
Home Country
United States of America United States of America
To begin with, this is mainly targeted at other current or potential plug-in developers.

You may be aware I started and am the main developer for the Moving Pictures movie plug-in project (see my sig for details). A lot of the code for the foundation of the project is pretty flexible though. i.e. It would be very easy to reuse the database layer, settings management system, and the upcoming scriptable scraping engine for other plug-ins. So my question is how much interest is there in the distribution and reuse of this foundation layer? I will eventually make this framework available regardless of the response here, but if other people would use it right away, the process might be expedited.

So high level details, the framework would provide an easy to use and maintain database layer (creating a C# class equals creating a table), along with pre-built GUI controls to manipulate database elements (think the Movie Manager screen on the Moving Pictures config dialog). You'd also get a settings management system (tied to the previously mentioned database layer) along with a GUI control for "advanced configuration options". Basically a tree view that allows the user to tweak everything configurable, even if you have not setup formal controls on the config screen for it yet. Plus it would include a scriptable scraping engine that could pull data from pretty much wherever and stick it into pretty much any class you like. Currently it's being developed to pull movie data from sites like IMDb, but I am specifically designing it to work for anything. You could pull weather data from weather.com. Artist details from MTV.com. Heck I am even planning on setting up a "new version is available" feature with Moving Picture by scraping the latest download available from the Google Code page.

My main goal here is to drive new development for Media Portal plug-ins, so how much interest is there here? You developers out there, is this something you could see yourself using as the foundation for a new idea you have stewing up in your head?
 

chefkoch

Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    After some time i want to have a look at the myprograms alternative plugin again.
    I will give cornerstone a try and see how it will work.

    Nevertheless, even if i think your talent should be used for MP2 where you would be a great benefit for the team, i also would like to see further enhancements and development on such a general framework for MP1.

    kind regards
    chefkoch
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    I started to use Cornerstone.

    I also used your DBTextBox controls. The DBComboBox does not seem to work like i excpected it. Do you plan to enhance that one?
    The VisualStudio's own SettingDesigner for example use most time the ComboBoxes. If you define a enumerator it fills in the possible Values. for bool it fills in true and false.
    That would be cool but it not my Problem at the moment.

    Are you planning to move those controls to Cornerstone namespace? So it is possible to use them without copying and renaming them for other projects.

    And my biggest issueis VS crashes very often, when setting the Properties for the DBTextbox control.
    It crashes when you try to set DatabaseFieldName without setting Table before. If table is not set, DBFieldname should be empty but not crash VS.
    Also setting tabel crashes VS now, don't know why.

    The RootTreeNode for the settings file is hardcoded "MoviesPluginSettings". Maybe it should be configurable or parsed by the settings class name, or whatever, that's only a minor thing i noticed.

    Nevertheless,

    BIG :D for the db stuff, it cleaned up the code used before massively, and is really is to use. So you don't need to know the sql commands for using a db in application setting.

    kind regards
    chefkoch
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    • Thread starter
    • Moderator
    • #4
    Wow, thanks for the feedback chefkoch! Yes the GUI Controls most definitely will be moved to the Cornerstone project, I just haven't gotten time to get everything moved over yet. I will most likely be migrating it to it's own Google Code project as well so it can be versioned seperate from Moving Pictures, and so it can have it's own issue tracker.

    As for the combo box, I don't think I have fully implemented that yet, I think I might have partially stubbed it out? The behavior you describe is the desired behavior though, so I will try to get that smoothed out as soon as I can. And sorry about the bit with Visual Studio crashing. :eek: I guess I did not test that logic thoroughly enough. I will look at that as well. In fact I will investigate all your comments. :p

    I will try to get the crashing bugs fixed and everything moved, plus migrated to a new Google Code project within a week or two, then I'll start populating the issue tracker with the remaining issues and we try to get some things scheduled.
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    Hi John,

    I have seen that the guicontrols were moved to Cornerstone. :D for that, so i could remove them in my plugin, too ;)

    Yet another request: You already commented most of your code, to get the comments more user, could you please move them into ///<summary> tags?
    This way the description will be displayed while writing some code in VisualStudio.

    :D for all your efforts

    kind regards
    chefkoch

    EDIT: I noticed that some of them are already in the summary tags. So it seems you are already working on it ;)
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    I had a closer look at the VisualStudio crashes, when you try to set a dbfield for a dbtextbox in property editor, but did not set dbtable before.

    to fix it, DBField.GetFieldList(control.Table) could return 'new ReadOnlyCollection<DBField>();' instead of null or
    in DBFieldTypeConverter.cs the following method needs to be changed
    Code:
            private List<string> getTypeList(IDBBackedControl control)
            {
              List<string> fieldNameList = new List<string>();
              System.Collections.ObjectModel.ReadOnlyCollection<DBField> dbList = DBField.GetFieldList(control.Table);
              if (dbList != null)
                foreach (DBField currField in dbList)
                {
                  fieldNameList.Add(currField.Name);
                }
    
              return fieldNameList;
            }
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    • Thread starter
    • Moderator
    • #8
    Thanks! :) I actually was looking at that yesterday when moving things over. I guess I got side tracked because I remember seeing that it was returning null sometimes, but I guess I didn't fix it. >< I will commit the change this evening.
     

    Users who are viewing this thread

    Top Bottom