New Webinterface (2 Viewers)

Chris84

Portal Pro
December 4, 2005
116
0
Framework for the new webinterface

Good evening out there. I'm very happy with MP, but the actual Webinterface is not as perfect as it could be. Now i'm reflecting about writing a new one, template based and so on, but due to the fact MP 0.2 is getting old and 0.3 will be released in some month, i'm not sure this will be a worthwhile job. When it is totally incompatible with the new engine, i'll have to start up new when 0.3 is out.
So i'd be glad, one of the developers could tell me about the new structure or simply if it'll be possible to use an WI for 0.2 also under 0.3.
 

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
Most of the code would be reusable anyway, wouldn't it? You might just need to change how you hook in to get the data, but it should be portable enough if you keep that stuff decoupled from the rest of the webinterface?
 

tkortell

Portal Pro
April 13, 2005
320
0
43
Vaasa / Sulva
Home Country
Finland Finland
I think the MPW Team are already working on a new version that will work with the new MediaPortal

Could Machine or LordMessi pleas confirm this?

Regards / Tomas
 

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
Maybe you should consider working on MPW instead of writing your own from scratch? It is usually best to not just throw code away and start again but to improve what you have currently. If you have ideas on how to improve the web interface experience then I am sure those working on MPW would be glad to hear them.
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Yes, the plugin that handles the underlying connection between MPW and MP will be updated with MP 0.3 (the ECP2 plugin). However, as there is no server plugins as yet, although the TV controlling part will be centralised, the ECP2 plugin will have to be installed on each client for the web interface to be able to control each client.

I'm not in charge of the web interface side of things, only the underlying connection between the web interface and MP, so we'll have to wait for Maschine to respond.

As for working on the web interface itself, there has been an SF site created for this purpose - http://www.sf.net/projects/mp-webinterface. I would encourage those who can code to contribute to that project rather than start again. Outside help is much needed, as both me and Maschine are uni students so we're often bogged down with work/keeping up our social lives (yes, uni life is a lot harder that most people think :p). My big break is coming up in a couple of weeks, so I'll update the ECP2 plugin then, but the web interface is not my speciality.

FYI, the web interface is currently programmed in PHP 5. It communicates with MP through the ECP2 plugin, which exposes MP methods and data through XML web services. So it should be pretty easy for most people to contribute and further develop the web interface - there are many features in the web service that aren't implemented in the web interface.

All the code for both the plugin and the web interface is available at the above SF site, so feel free to check it out and contact either of us either via PM or in the forums if you have any questions (I'll pass it on to Maschine if needs be).

Sam
 

Chris84

Portal Pro
December 4, 2005
116
0
I did a look into the actual Webinterface, you are right, most times it should be better to optimize something existing, then writing a new one. But in this case from my point of view, the php5 code is very dirty und unstructured. When you try to use the WI on a Apache configured a bit more optimized for security, most of the scripts will stop working.
My time is also short, so i'm note sure i'll be have enough time for developing.

Something i'm very unhappy about is the missing templateengine, the other thing is, the memoryusage of the server ~140MB plus 140MB Swap, there seems to be a misconfiguration of the apache or php.
 

thechad

Portal Pro
February 5, 2005
187
0
Geelong, Australia
Home Country
I was also thinking of creating a new web interface as I wanted to sync my teeth into some ASP.Net. Was planning on running the webserver based off Cassini as part of the plugin and not servce based.

I figured this way I could use the internal libraries of MP which do not change to often instead of dealing directly with the database. Not sure what performance would be like though but at least the web services part would be skipped for some parts. This would also allow the interface to be seperated from the code and use skins etc.

However I never got around to starting as I was also going to include a proxy webservice for controlling the new TV server so that i could extend my XBMC scripts. But the server does not support plugins yet so I will just wait and see how that pans out :oops:
 

Chris84

Portal Pro
December 4, 2005
116
0
I was also thinking of creating a new web interface as I wanted to sync my teeth into some ASP.Net. Was planning on running the webserver based off Cassini as part of the plugin and not servce based.

I figured this way I could use the internal libraries of MP which do not change to often instead of dealing directly with the database. Not sure what performance would be like though but at least the web services part would be skipped for some parts. This would also allow the interface to be seperated from the code and use skins etc.

However I never got around to starting as I was also going to include a proxy webservice for controlling the new TV server so that i could extend my XBMC scripts. But the server does not support plugins yet so I will just wait and see how that pans out :oops:

I never used cassini, so i can't discuss about performance, but you're cause the performance and ressourceusage of the actual WI is much to high. I'll try to get it down by editing the apache and php confs. There can't be a reason in the php scripts to let apache use so much mem.
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
I'll admit that neither of us are experts in Apache or PHP. We can get it working, but the innards we're not familiar with. So the more help the better.

I'm more of a .NET (windows forms, bit of web services and remoting, not much ASP.NET) person so I tend to leave the apache/PHP side of things alone.

As for using cassini and direct communication with MP (i.e. bypassing the web service) - this has been attempted before and code has been posted should you want to make use of it - search for 'webplaylistmanager'.

As for creating a proxy web service to control the tv server - as the tv server is controlled by a .NET remoting DLL, you could just create your own windows service/app that runs in the background, exposing a web service and translating those web service calls to the remoting DLL. Therefore you can control the tv server without having to be run within the tv server domain/thread, i.e. a server plugin.

This dialog is all good I reckon, because there hasn't been much talk about web interface development for a long while (a lot of user requests, but not many people who actually know how to code it) - keep it up and hopefully we can get something going that meets the needs of next-gen MP :D.

Sam
 

Chris84

Portal Pro
December 4, 2005
116
0
I had a little time to try to optimize the apache conf, but failed. Instead i found the part of apache taking so much memory. (After a small usage more than 300MB combined memory and swap.)
The dotnet module for apache or the things it's executing seem to be the problem. Due to limited time i was unable to follow up all the exececuted files, when surfing around the WI, also i'm new to soap and dotnet so it'll take time for me to understand all jobs done by the webinterface.

To make it easier for me, it would be nice, if there is a documentation about all the function calls in the WI, i found out files in php/pear get called, without knowing directly what they are doing (Ok they are used for SOAP, but what data is exchanged here) . Also the names of the function files don't give a clue to me, what kind of functions they contain.

Most exciting for me is the data exchange between MP und the php files, would be glad to have a description about the used interfaces to get an overview about the hole thing.

Also my time is short, maybe we can find a better way of data exchange.
 

Users who are viewing this thread

Top Bottom