oqtane.framework icon indicating copy to clipboard operation
oqtane.framework copied to clipboard

Consider improving the file management

Open gordon-matt opened this issue 4 years ago • 4 comments

Is there any chance you might consider improving the file management? I'm wondering if it's possible to make some kind of interface to swap custom file managers in, in place of the default? elFinder would be a good choice.. but there are others too.

I have successfully integrated 2 different file managers in .NET Core myself. Here are the links:

elFinder.NetCore

  • This one is pure C# code; a server side connector for the frontend..

PeachPie Responsive File Manager

  • This is something I did when I wanted to see if I could get a PHP file manager (https://www.responsivefilemanager.com/) working in .NET Core. Thanks to PeachPie, it works very well.

Ideally, being able to let users choose their own file manager would be great.. but that could be tricky I guess.. So if it's not possible, then perhaps considering one of the above or some other one which is more user friendly? Otherwise, do you have plans to improve your own one?

gordon-matt avatar Nov 08 '21 08:11 gordon-matt

There are 2 distinct sides to file management - the front-end user interface, and the back-end APIs and storage. It is not clear to me if you are referring to the front-end, back-end, or both?

The whole concept of a modular application framework is that you have the ability to extend it with additional functionality. So if you want to create a new front-end user interface for file management, you can create your own module and use it rather than the default module which is provided with the framework. You can even make your module available for others to use - either as an open source or commercial offering.

sbwalker avatar Nov 08 '21 14:11 sbwalker

I am primarily interested with the frontend UI. However, having different methods of storage would be nice too. For example, the work done on the elFinder connector allows for the development of different storage providers. By default, it stores the files in the file system, but there is also an Azure storage provider available and one can develop other providers if required.

So back to Oqtane; like I said, I think the main concern right now is the file manager you have is not very user friendly. It works well enough, but could definitely be improved, aesthetically. If you run the demo app for either (or both) of the projects I linked to, you'll get the idea.

I just want to make sure we're on the same page. You said that we can create our own front-end for the file management. That sounds great. I have no idea how I would do that though. Honestly, I am not only new to Oqtane, but only started learning Blazor several days ago. Absolutely loving it so far. How would one go about replacing the default file manager's frontend (and possibly backend as well) then?

gordon-matt avatar Nov 08 '21 20:11 gordon-matt

In regards to the front-end UI, the general approach for the framework is to provide a set of administrative UIs which are consistent in their look and feel and expose all of the back-end functionality available. Consistency is key and it is one of the Oqtane philosophy goals (https://www.oqtane.org/Resources/Blog/PostId/538/oqtane-philosophy). So the File Manager provided in the framework should have a consistent appearance and behavior as the other admin modules.

That being said, Oqtane is a modular framework. So it allows you to build highly custom, best-of-breed modules which provide additional functionality and a superior user experience to what is provided by default. This is actually a fairly fundamental concept behind Oqtane - it is a framework focused on developers, not a business application focused on end-users.

As far as how to build modules for Oqtane, there are plenty of blogs, sample modules, videos, etc... which explain the fundamentals. In general it is not much different than developing a bespoke Blazor application - however there are lot of building blocks and patterns you can leverage so that you don't have to build everything from scratch.

sbwalker avatar Nov 11 '21 13:11 sbwalker

I am aware of your philosophy and agree with it entirely. I was not suggesting otherwise. Consistency is important. I was merely wondering whether it is at all possible to do some work to enable being able to swap out the default in future for a custom one.. and so it would remain consistent across all pages using the file manager. Example:

Let's say you have an interface, called: IFileManager, with the default implementation perhaps being called OqtaneFileManager.. and then we could create our own, such as ElFinderFileManager or ResponsiveFileManager, etc. that inherit from that and override certain methods and of course the UI. Then in the Startup, we just do something like:

services.AddOqtaneTransientServices(options => 
{
	options.UseFileManager<MyCustomFileManager>()
});

And voila! Every module, page, etc. that currently has a file manager is now using the custom one instead of the default.

Of course I'm not exactly sure this is even possible.. I guess the interface would have some methods like:

ShowUI()
HideUI()
OnFileSelected()
// etc..

Something like that.. I think you get the idea.

Anyway, I'll think more about this myself later once I've had more time to delve into Oqtane further..

gordon-matt avatar Nov 13 '21 05:11 gordon-matt