slash2009 / XWMM

XBMC Web Media Manager
Other
56 stars 20 forks source link

A possible re-write using angularjs #54

Closed ghost closed 10 years ago

ghost commented 10 years ago

I had a play around with AngularJS and Bootstrap as a possible alternative to ExtJS for powering XWMM.

For those that want to see it NOW I've created a demo release which has a pre-built XBMC add-on attached for anyone that wants to try it out, all feedback is welcome.

I've taken a slightly different approach with this re-write, rather than trying to duplicate what we've got at the moment I started with a clean slate. The big difference between the [ExtJS4 re-write]() and this one is I've been able to use WebSockets. This allows real 2 way communication between XBMC and XWMM. So if XBMC makes a change to the library (e.g. adds a movie during a library update) it will send out a notification which XWMM can listen for and update the web page accordingly. It also means XWMM gets confirmation a change was successful when it saves changes, currently we just hope for the best when saving changes.

To see the 2 way communication in action:

  1. Open up XWMM in a browser
  2. On XBMC delete a movie from your library
  3. Notice it's been removed in XWMM
  4. On XWMM select Library > Update
  5. Notice a library update is triggered on XWMM, the deleted movie should be re-added
  6. Notice it's been added back to XWMM

If you open the developer console in your browser you can also see the communication between XBMC and XWMM.

As far as how it looks, I've just thrown something together at the moment I've not had much of a chance to dive into Bootstrap to see what's possible. This was the one big upside of ExtJS, it provided a good library of conventional UI components. The downside was it could be very difficult to get them to work the way we wanted them to work.

Other highlights:

As a side note this pull request is more a request for feedback than a request for this to be merged at the moment.

53

un1versal commented 10 years ago

I cant comment on development side, except I heard good things about websockets. Will test and see how it goes on my fake xbmc vm setup.

Fantastic to see you in action :)

un1versal commented 10 years ago

Its responsive, and can definitely see potential in this, the websockets made the only change possible in demo, almost instant xwmm and xbmc, have you considered jquery? or something else to make it websocket friendlier?

@fyfe.

I was having a look at jquery + grunt + websockets this guy on this repo is great with jquery and one day along time ago he wrote a demo web interface for xbmc but noone was interested in helping him. see him at https://github.com/fearphage