Hi All,
For several reasons I would like to move the mojoPortal.Net namespace from its own project into the mojoPortal.Web project.
Basically moving the Email.cs and SmtpSettings.cs and other classes into the mojoPortal.Web project in a folder under /Components
One reason for this is because I'm working on file system abstraction as part of web farm support so that the user uploadable files could be stored in Windows Azure Blob storage for example as an alternative to local disk storage.
So the problem is in how file attachments are handled in email. Currently we just pass in paths to the attachments so this is strongly coupled to the disk file system. I want to change it so that we pass in an object that implements a new IFileSystem interface and then create attachments from a stream returned from IFileSystem rather than directly accessing the file from disk. To do that I would need to add a reference in the email class to mojoPortal.FileSystem namespace which lives in mojoPortal.Web project. But I can't do that because it would be a circular reference between the mojoPortal.Web project and the mojoPortal.Net project.
The solution is to move the mojoPortal.Net classes into the mojoPortal.Web project so they can easily access mojoPortal.FileSystem. This would also reduce the number of projects in the solution by one which also would be beneficial in terms of reducing the time to load or build the solution in Visual Studio.
But my concern is this could be a breaking change for custom features that others have built if you send email in your features. So I wonder how many of you see it as a problem to change your feature by removing any reference you have to the mojoPortal.Net project and only reference mojoPortal.Web. Actually I think if your use of this namespace is in places that already reference both mojoPortal.Web and mojoPortal.Net projects then it might not be a problem. I could keep an empty class in the mojoPortal.Net project and then it should not break as long as you have a reference to both projects in the places where you send email.
But for some projects such as those from developers who develop against the dlls instead of working against the mojoPortal source code it might break the feature.
Fixing it would be very simple, just removing the reference to the mojoPortal.Net project or dll as the case may be and reference mojoPortal.Web project. Since we would keep the namespace as mojoPortal.Net no actual changes to your code would be needed, only the reference changes.
If I proceed with this change then I would also need to package an empty mojoPortal.Net.dll in the upgrade so it would overwrite the older version on disk, otherwise it would cause an error because of having the same namespaces and classes in 2 assemblies.
So my question for those of you who read this forum is what do you think, would this be a huge problem or an easy adjustment for you?
Thanks for any feedback.
Best,
Joe