Tamás Vajk and Olivier Gaudin - SonarLint and SonarQube

This week, Sébastien Ros is back on the show to demo the fantastic support for modularity that was built for Orchard Core, but that is usable in any ASP.NET Core application.
sebastien for president.
Great Work!!!
is it possible to include typescript files in Modules? and also somehow reference typescript file from one module and inherit from it?
Thanks,
Great presentation Sébastien.
We all know that Orchard the CMS has a very nice story about module discovery but in the scenario where the CMS is not involved, is there a predefined way to let the Web Application automatically discovered the modules without previously referencing them ?
Thanks
@sumonnet:
Yes you can add any static file. You can reference it directly and it will incur a direct dependency with this module. We do that in the CMS packages, where jQuery for instance is provided by a single module even though most of them depend on this script.
The next level of features is provided by our Orchard.ResourceManagement module which can inject script/css management and manages dependencies from several modules.
@messan:
We tried this approach as this is what we do in Orchard 1 but the complexity involved and degraded experience were not worth it. For instance discovering modules would mean that they have to be in a specific folder under the web app. Not talking about dotnet tooling that doesn't work with this like razor precompilation, publish, pack, ... These can all be solved but with some significant amount of custom code and hacks. After implementing both we really do prefer the "referenced" way.
Hi!
I created one website use Orchard Core modular. But when I deploy on Azure it isn't working. It allway show error 404. Could you please help me about that!
As always, look at your logs.
@bleroy
It haven't error. When I request to server, It response status 404. I don't understand why I can run on local, but I deploy on azure it's not working with error 404.
I thank on azure it not accept routing I config in module.
Do I need configuration any things so it's working.
http://space-web.azurewebsites.net
You can see it.
It's impossible to diagnose from so little information. Comments on a video are also not the best for such a discussion. You can ask for help on one of the places http://www.orchardproject.net/discussions links to.
This looks clever but what on earth is going on? From the looks of things the modules are moved to a Packages directory within the application. Is this done via a build task? If so then how are the views found?
Adam
Adam,
Yes, the static assets like JavaScript, css and razor views have to be copied below the application. It's done using an msbuild tasks that is used as you reference the "marker" packages. An improvement we could make in the future is to use custom file providers, or copy the resources on-demand on the filesystem (like a cache).
Thanks Sebastien. I've downloaded the sample app however whenever I make a change to my view in Module1 and do a build it doesn't update the view in the Packages directory. Could you please point me to part which copies the packages so I can debug it. Thank you.
Adam,
It is done through msbuild task in .props / .targets files, paticularly an AfterTargets="Build" is executed when you "really" build the app. Before, when building / starting the app this task was always triggered, even if the app didn't need to be rebuilt. Now this no more the case, so when you only update e.g a razor file you would need to do a Rebuild on your module or your app.
But while in dev, modules asset files are served fron their project locations through custom file providers. So you don't need to copy them under the Packages folder. You can update assets, put a brekpoint in a razor file ..., this directly in the module project files.
Then, when you want to copy them under Packages, if you didn't change any other item which is a compilation dependency (e.g a csharp file), you would need to do a Rebuild on your module or a Rebuild on your app. To prevent from having to rebuild many projects, one workaround is to update only one csharp file of the app (e.g startup.cs), then only do a Build on the app or restart it.
But notice that when publishing, the app is automatically rebuilt, so ...
Best
If anyone looking for the latest version of the sample using Orchard Modules, refer to https://github.com/OrchardCMS/OrchardCore.Samples
An awesome demonstration .. Can we modularize without Orchard references?
@dskc No, there is no default way to do modular apps in ASP.NET. Orchard Core provides one solution for it, and requires you to reference a Nuget package.
How to consume module 1 or module 2 from Orchard CMS web app on the last example?
This appears to have changed with the release of .NET Core 2.1. Could someone please explain how this is done?
Great demo!
This was a great video! I learned a ton from this but I've had some issues since things have changed in the last year. In particular I've been wondering about the shared _viewstart in the core module. It doesn't seem to work like it did in the current build. Is there a new way of doing this or did I just somehow get it wrong?
This is super exciting!
Finally, something that ties in all the great stories around asp.net mvc core into an awesome framework for building modular apps that can power SaaS platforms.
Reminds me of the web forms based web client software factory but this goes well beyond it.
Great work!