MP2 WebServer - Configure MP2, Browse, Edit & Play MediaLibrary, ... (1 Viewer)

Status
Not open for further replies.

MJGraf

Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    OK, completed my first thoughts thread above. Now please bash me if you think it's crap :D
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Read through your new post and had one comment come to mind:

    The difference between exposing our database via WCF Data Service and Asp.Net is this:

    Using Asp.Net you build a Website where almost all processing is done on the server - meaning you need to build a website as plugin inside the server which will deliver HTML - which can be run on any client with a browser.
    When only exposing via WCF, you have a lot less code on the server side, as you only expose the DB e.g. via Odata. Here you must (or can) build smarter clients. You are not limited to a browser as Client.

    It is also possible to combine the two approaches (Html generated on the server via Asp.net and Javacript executed at the client to access webservice).

    I can't really say what way is "better" as both are actually very valid and useable adn could be used along side with the UPNP way of accessing MP2 server. IMHO, it depends on what the developer planing to implement it has most experiance with - so that will be the fastest and easiest way.
     

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Home Country
    Australia Australia
    Based on the above, I'm leaning towards using ASP.Net WebAPI. I'm not talking about the way to implement it, for now I'm just interested in the following: Is there any kind of consuming application for which WCF would be the only (reasonable) Webservice (Linux? iOS?)? The reason for the question is: If we put so much effort into it, I don't want to realize later that "we cannot build an application for xy, because we used ASP.Net WebAPI instead of WCF" (of course, things are changing quickly in this respect, but the question is about the status as of now).

    The output can be JSON, BSON, XML. There won't be any issues with compatibility using WebAPI.

    Should we make the Webservice as one plugin containing all possibilities to access the MP2 server or should we make it expandable by plugins? What I want to avoid here is that every plugin developer adds its own way of searching for MIAs although it would make more sense to have one single defined Interface to access everything in the MP2 server one may need.

    Everyone will have to write there own project and bind it to the HttpServer. To do that they have to register there route. I'd say just offer a way for them to register with out HttpServer instance and document it as the recommended method.

    Is using WCF withough aspnetwebstack and our inbuilt http server for the website a realistic alternative? I.e., are my thoughts above overkill and we can achieve the same result with a much lighter plugin? Or shall we "make it right" and offer the flexibility of aspnetwebstack at the cost of having much more overhead in the beginning?

    I really don't there there's that much involved in changing over to the aspnetwebstack. The basic concepts on setting up and utilising the two servers should be relatively similar. You'll probably find most the changes are just changing the namespaces and a few minor tweaks to property names.
     

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Home Country
    Australia Australia
    As I mentioned before you can still use WCF with the aspnetwebstack so if that's the preferred method to use it would be no issue. I guess the benefit is that you can use the server for all your needs, html, webAPI, WCF, etc. (well not php without way to much effort).
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Thanks, guys, this is really very helpful.

    If I understand correctly what OffByOne wrote above then we could just use asp.net MVC and let the model provide the MIAs, which are then displayed by the respective view. But this means we don't have a Webservice being accessible by other applications.
    So bringing this together, we could use ASP.NET MVC to provide html pages generated on the serverside and additionally provide a pure WebService (either asp.net WebAPI or WCF). Now the model of ASP.NET MVC could Access the WebAPI to get and provide the MIAs.
    But is this a good design? Since the model of MVC is executed on the Server, it doesn't really Need a WebService on the same Server?!? It could Access the MIAs directly...
    What brings us the best user experience on our MP2 Server Website? Is it serverside generated html or is it executing JavaScript in the browser? Can you Point me to some Websites, on which I can see / feel the difference between the two approaches?
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    I have done an app with Sencha touch and used it on Android and iOS. It's a pretty nice Javascript Framework with build-in support for OData Webservice Access. The advantage was, that you can create one app and run it on any plattform while their framework will make it look like native. I think they have some samples on their site.
    The more you do dynamically with Javacript on the client side, the faster the website will feel to the user. Imagine long lists of media items - they need to load data and images on demand when shown - which is done with Javacript.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    That's awesome... I didn't know what's possible today with rich browser applications...

    So what I'm definitely heading for now is a rich browser application. This on the other hand means that we don't necessarily need a fully fledged asp.net webserver when we are using wcf. So I'm still thinking of whether or not we should include the aspnetwebstack (just because we are offering a platform, not just an application and someone else may make use of it) or whether we should keep it simple and use the inbuilt http server to transfer the few HTML and js files we need for a rich browser application...

    Now we need to make another decision...
    I've had a look at Sencha Touch as a framework and it is gorgeous (see e.g. This: http://cdn.sencha.io/touch/sencha-touch-2.2.0/examples/kitchensink/index.html) - but only if you are actually using a touch device. It is usable on a computer with ie10, but it's not really fun... Another advantage is it has inbuilt support for audio and video streaming (thinking WebMP2 here :) ).
    I've also had a look at Sencha ExtJS - unbelievable what's possible with it (see this!!! http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/desktop/desktop.html - I already see the MP2 WebDesktop in front of me being able to manage the whole MP2 system and streaming videos or music as well... :D ) - but only when you use it with a computer with a mouse. It is usable with my iPad, but it's not fun. It does not have audio / video streaming features, but supports embedding flow player - which uses flash and therefore doesn't work at all on iDevices...

    So what shall we do here? Does anyone know a framework that supports both, touch and mouse devices - at least at a more usable level? Shall we concentrate on one of them? Shall we provide support for both? My idea behind it is that we have some kind of menu on the left side of the screen managed by our main website plugin. The right side of the screen (content area) is managed by JS code, which is linked to the respective menu entry on the left. Other plugins may register menu items at our main plugin and of course also provide the JS code to be executed if the menu item is selected.

    Further thoughts?
    Michael
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    just an idea: wouldn't it be great to make an api and write a plugin for MPExtended? @Oxan mentioned that it would be very easy to write one for XBMC.
    The result would be that you have an application to manage all MP Versions. So we wouldn't have different systems.
    Also oxan mentioned somewhere that it would be possible to extend MPExtended to be accessible by DLNA and it has streaming options already on board. So why should be reinvent the wheel? Except the case MP2 wants to have something native, something out of the box, but maybe it i spossible to integrate MPExtended as a plugin into MP2 liek we did it with TVE?

    Just some ideas, maybe you find one good ;)
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Haven't read the topic, but if you mean writing an MPExtended plugin to access the MP2 databases, yes, that's probably quite easy. MPExtended doesn't support editing though.

    Regrading DLNA, I don't think I've said that will be easy, just that it is something I'd like to have.
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom