Recent Posts and Articles
- Status: Projection Pages are now Listable by default, Nick and Sébastien are working on their feature branches, TaxonomyService is refactored and contains API-documentation, the MissingSettingsBanner for Email settings was causing a performance bug in OutputCache which is now fixed.
- Stanley was given write access to the Orchard repository, congrats!
- Demo by Sipke - updates to Dynamic Forms: client-side validation support for fields is several ways (integrated wit MVC validation). We had a long discussion regarding possible changes and improvements.
- Demo by Benedek: a PowerShell script (soon to be open-sourced as part of the Orchard Dojo Library) to check the consistency between the content of .csproj files and the file system both ways.
- Announcement by Benedek: the translations of the Gallery themes and modules are moved to a different project on Crowdin.
- Demo by Zoltán - Orchard beginner walk-through on TryOrchard: the "Try Orchard!" sites on DotNest now display tips and a walk-through aimed at beginners with Orchard on the front-end and the Dashboard.
- The new theme for the Orchard community sites are still work-in-progress by Shaun.
There’s a number of differences between regular MVC controllers and WebAPI controllers that make the latter much more suitable to building APIs: they are REST-centric, they can negotiate the format of the answer, etc. Implementing WebAPI controllers in Orchard is really simple. First, you need a route, and that will be the subject of this post.
Whenever you need to get the URL of a ASP.NET MVC action, you should use Url.Action (where URL is an instance of UrlHelper), and never hard-code the URL. This way, the URL is dynamically constructed from the available information in the Url.Action parameters and in the route table. If the route is changed, the results of the Url.Action call will change accordingly, and everything will continue to work. The same principles, of course, apply to WebAPI actions.
There are rare cases where you’ll want to be able to inject instances of classes that don’t implement IDependency. One example of this can be found in MvcModule in Orchard.Framework, which also provides a good example of how to do it. The idea is to derive from Module, and override the Load method to register factories for the types you want to expose:
Many times when we choose the platform for our customers we generally do not put web applications on a CMS because it is too much overhead for a web application. Vice versa, you would not want to build out a custom CMS on the MVC platform when ones already exists for you website. So how do we get the best of both worlds?
MiniProfiler is especially good at showing you the select n+1 problems in your Orchard applications. For some reason, however, it is only active on the front-end. If you have to debug a performance issue in the dashboard, you’re out of luck. Fortunately, the limitation is entirely arbitrary, easy to find, and easy to remove.
- Sébastien fixed a nasty issue in Taxonomies with Terms created from code (#20959), refactored TaxonomyService, removed a few unused methods, aaand: added in-line documentation to ITaxonomyService!
- We reviewed a PR, then triaged a bunch of issues (we're now in the middle of March).
Here is a list of some useful Orchard CMS modules, not part of the core Orchard CMS installation that I use every day.