.Net people

From: Mikee13 Apr 2010 12:02
To: ALL1 of 3
I've been thinking about Spoffice and how it currently works, and I realise that I'm not using best practices - I'm doing it as I'd do it in a language like PHP or something.

I'd like to change it so that it's the Correct way of doing things, so some advice would be lovely.

Currently it's basically just an MVC website which has a static property (music service) which runs different objects (music downloaders, music players, whatever) in threads, with events/callbacks to say when things are finished.

My brain says that ideally, the whole music service should be an entirely different thing and not connected to the website. The website should just be a front-end which can talk to it. This is because the music service is running constantly.

So is that probably the best way of doing it? and if so, what'd be the nicest way of doing it? I feel like I should be running the "MusicService" as an actual windows service. How easy is it for my website to talk to this service? Can I pass objects between the two? Can my website detect if it's running and start/stop it? What would it use to communicate? What is the meaning of life?

This'd be soooo simple in PHP (if it was possible in PHP......)
EDITED: 13 Apr 2010 12:03 by MIKEE
From: THERE IS NO GOD BUT (RENDLE)16 Apr 2010 19:05
To: Mikee 2 of 3

I wouldn't run it as a Windows service, it doesn't really achieve anything and over-complicates deployment. And giving the ASP.NET identity permission to start and stop services is fraught with badness. And I'm not entirely sure a service can access the audio stack anyway.

 

If I understand correctly, this is running on your server, so you can install .NET 4? If so, take a look at the Managed Extensibility Framework, which will let you drop different assemblies into a folder and automagically load types from it to implement interfaces.

 

I'd write some more, but I've had two project kick-off meetings this week and just finished a two-day envisioning session at Microsoft, so I'm a bit tired.

From: 99% of gargoyles look like (MR_BASTARD)16 Apr 2010 21:35
To: THERE IS NO GOD BUT (RENDLE) 3 of 3
I know what you mean. Envisioning is a real mind-fuck.