Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Featured tags

IIS
API
All tags >

Scheduling application, new branding assets - This week in Orchard (06/07/2021)

The new branding assets for Orchard Core are here! Check out our current post for a demo about a scheduling application, for the Auto Setup updates, and many more! Orchard Core updates New branding assets The issue was that we didn't really have concise branding guidelines or even proper branding assets. But the time has come, Orchard Core has now new branding assets! If you open up the Orchard Core Documentation, you will see the new icons and the new colors everywhere. If you click on the Resources option from the menu and select Branding from the left, you will find the updated guidelines and graphic assets for Orchard Core's branding. If you open up the admin UI of your site, you will see the new logo there too. When referring to Orchard Core, please use one of the logo variations without altering anything apart from the resolution (so don't change the colors, aspect ratio, graphics, or anything else). Bootstrap 5 for the front-end themes Orchard Core comes with some built-in front-end themes that you can use for your site. You can use a theme adapted for agency websites, a theme adapted for blogs, a landing page for a project that is under construction, and of course, the default Theme. When you use the latest preview source of Orchard Core you will notice that all of these now using Bootstrap 5, which means if you would like to use or customize them, you have the options to use the features that come from Bootstrap 5! Here is the content of the package.json file of the Blog theme. Add DistributedLock for Multi-instance AutoSetup It can happen that you have multiple deployments of Orchard Core, but you share the same database or the same Redis instance. Now you can see a new section in the documentation that explains how you can use the new optional distributed lock parameters like the LockTimeout or the LockExpiration. These help you to set the timeout in milliseconds to acquire a distributed auto-setup lock and the expiration in milliseconds of the distributed setup lock. Check implied permissions PermissionHandler should check ImpliedBy permissions. RolesPermissionsHandler doesn't have to check all user roles permissions, just Anonymous and Authenticated if applicable. RolesPermissionsHandler is scoped, so we can cache Anonymous and Authenticated permissions and not query them for each permission evaluation. Check out the default implementation of the IPermissionGrantingService interface, which evaluates if the specified PermissionRequirement is granted by provided claims. Demos Scheduling application The StatCan Orchard Core repository houses a collection of custom Orchard Core resources, modules, and themes that support various web applications and software-as-a-service (SaaS) products. Built on top of Orchard Core CMS, developers have a suite of web application features out of the box (e.g., content management, authentication, forms, themes, etc.) by customizing the selection and configuration of components. The extensibility of the framework allows new features and components to be added easily. One of the custom modules called StatCan Scheduling provides types and utilities useful for scheduling appointments. Let's see that module in action! First of all, let's run the solution and set up your site using the Vuetify platform theme recipe. The scheduling application and the Vuetify platform theme recipe are heavily built on the VueForms module that you can also find in this repository. If you haven't heard about it yet, you can open up This week in Orchard post from last year, where you can find a demo about this module. The first thing that you will see is a calendar that you can use to add appointments to it. You can add a bunch of other calendars and employees to the system. Employees can be used to say that I would like to add an appointment to this calendar for this employee. To be able to add an appointment, first, you need to add an employee to the system. It can be done using the admin UI of Orchard Core (Content -> Content Items -> New Employee). Let's say we would like to add an employee, and we assign this employee to the Default calendar. If you would like to add more than one calendar, you will find a taxonomy named Calendars. This has an AppointmentCalendar term content type. If you add a new AppointmentCalendar, you can specify its color, which will mean if you add a new appointment to this calendar, the color of the appointment will be used from here. But without further ado, let's see the front-end if you add an appointment to this calendar using our newly created employee. As you can see, we have one appointment on July 6 for the employee Gábor Domonkos. The list of employees can be seen on the right, which contains only one employee right now. You have the option to edit the given appointment or employee just by clicking on the given appointment. As we mentioned, this application is heavily built on the VueForms module that means if you navigate to Content -> Vue Forms, you will see a Vue Form content item called Create appointment, which is the component that is responsible for handling the appointment creation logic. And we are just scratching the surface of this application here. If you would like to know more about it, head to YouTube now to see it in action! News from the community Lombiq Helpful Extensions: Helpful Content Types and Widgets The Lombiq Helpful Extensions module is an Orchard Core module containing some handy extensions (e.g., filters for Projector). This time we will see the Helpful Widgets and Helpful Content types features. The Helpful Widgets adds multiple helpful widget content types. These are basic widgets that are added by built-in Orchard Core recipes though in the case of using a custom setup recipe these can be added by this feature too. Includes: ContainerWidget: Works as a container for further widgets. It has a FlowPart attached to it so it can contain additional widgets as well. HtmlWidget: Adds HTML editing and displaying capabilities using a WYSIWYG editor. LiquidWidget: Adds Liquid code editing and rendering capabilities. The Helpful Content Types includes basic content types that are added by built-in Orchard Core recipes though in case of using a custom setup recipe these can be added by this feature too. Includes: Page: Highly customizable page content type with FlowPart and AutoroutePart. The only thing you have to do is to navigate to Configuration -> Features on the admin UI and enable the Helpful Content Types - Lombiq Helpful Extensions and Helpful Widgets - Lombiq Helpful Extensions modules. And as may you guess, if you would like to add a new widget in your zone, you will see the three mentioned widgets without the need of running the given recipes that contain the definition of those widgets. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 207 subscribers! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here!

Parlot, Make deployment steps orderable - This week in Orchard (07/03/2021)

This week you can meet with Parlot, which is a fast, lightweight, and simple to use .NET parser combinator! Check out our post for the orderable deployment steps, the improvements of the Kast platform, and many more! Orchard Core updates Make deployment steps orderable This is about making deployment steps orderable in the UI, to allow drag and drop to get steps where you want them to be. UI only, as the choice to when steps run should be up to the user. Let's say you have plenty of plans where features don't want to be first - more common when deploying to existing sites, rather than building up recipes, but steps are for both. And now you can also find hints to the important steps that suggest they should go first, like "Content Definitions should be placed before any content steps." Update from node-sass to dart-sass This is about replacing gulp-sass with its newer gulp-dart-sass because node-saas is now deprecated and the latest node-sass doesn't compile on the latest NodeJS anymore. So, it's recommended on the gulp-sass repository be upgraded to gulp-dart-sass as node-sass is deprecated. You can read more about it in this article. Fix WorkflowBlockingActivitiesIndex table indices name length for PostgreSQL This is an interesting one, so we think this should deserve a few lines. Check out the Migrations file in the OrchardCore.Workflows module where you can see the creation of two different indices: IDX_WorkflowBlockingActivitiesIndex_DocumentId_ActivityId and IDX_WorkflowBlockingActivitiesIndex_DocumentId_ActivityName. Because of the PostgreSQL name length limit, it uses only IDX_WorkflowBlockingActivitiesIndex_DocumentId_Activity for both which causes an exception. The fix is just to reduce the length of these indices. Add Properties to SetupContext There is a SetupContext class that had some properties like SiteName, AdminUserName, AdminUserId, etc. This SetupContext class will be prepopulated by the setup screen and then passed to ISetupHandler. But now the ISetupHandler accepts an IDictionary to work with these properties. But why is it useful? When setting up a tenant or site sometimes you need to pass in some custom data and use it in your setup recipes. Like when a user registers on a site and he submits a form with firstname, lastname, etc. We then call a workflow that creates the tenant and executes a setup recipe. In this setup recipe, we could create a landing page and we want to assign the firstname, lastname to be set as the displaytext of the landing page content item. Or another use case would be to populate the custom user profile settings during setup. So, from now, the developers can populate the Properties bag from his workflow task or a custom setup screen if they would like to. You can see a good example in the ExecuteAsync method of the SetupTenantTask. Demos Parlot The Shortcodes repository by Sébastien Ros contains a Shortcodes processor for .NET with a focus on performance and simplicity. And now that Shortcodes processor is updated to use a new parser called Parlot. Parlot is a French pronunciation of the word like chat or someone who talks a lot. In French, you write it parlotte. Parlot is a hand-written parser for Shortcodes and that parser is now extracted to make it reusable. You can find adding and using Parlot in the Shortcodes module in this PR. If you check out that pull request, you will see that before this PR we had the Character.cs, Cursor.cs classes. Now they aren't here anymore, they are in the package. The code is almost the same. Now we have a ShortcodesParser.cs that is using Parlot. And in this file, you can find the grammar of Shortcodes. A text is based on shortcode and TEXT nodes. A Shortcode can have an identifier and arguments. An argument is like identifier equals value. It's actually could be just a value if you want. And a value is either a string or a number. This class contains a bunch of first-level methods like ParseNode, ParseRawText, and so on. If you check out the JSON benchmarks of Parlot, you will see a nice table about the performance of Parlot. And in that table, you can see the performance of parsing JSON documents. As you can see, it is ten times faster than something like Sprache, which is a famous parser. Pidgin has been created to be faster than Sprache and now Parlot is faster than Pidgins. If you take a look at the allocations, you can see that they are equal because it's just about allocating JSON. This benchmark creates an expression tree (AST) representing mathematical expressions with operator precedence and grouping. Same thing here. This table is about comparing the low level, the fluent API, and Piding. Even the Fluent API is five times faster than Pidgin. And in terms of allocation, it's a little bit better than Pidgin. Here you can see a demo video about Parlot and a lot more than that! Like stories about the NCalc library that is created by Sébastien Ros 10 years ago. NCalc is a mathematical expressions evaluator in .NET. NCalc can parse any expression and evaluate the result, including static or dynamic parameters and custom functions. And that library is used by the Sprache.Calc library. Sprache.Calc provides easy to use extensible expression evaluator based on the LinqyCalculator sample. The evaluator supports arithmetic operations, custom functions, and parameters. It takes a string representation of an expression and converts it to a structured LINQ expression instance which can easily be compiled to an executable delegate. In contrast with interpreted expression evaluators such as NCalc, compiled expressions perform just as fast as native C# methods. We can fill up the whole This week in Orchard post just by these libraries and the story behind Parlot. Or we can start to describe how the parser works and how you can extend it with your own implementations, but this may no longer be closely related to the topic of this series. So, as we just mentioned before: if you are interested in these topics, this will be your presentation! Resource Zones, Resource Layers, Resource Widgets Kast is an Australian company and one of their primary goals is to implement the Kast platform with the Kast Group Finder component. We worked together with Seth Cleaver (Co-founder and Director of Kast) on this tool to be able to create an intuitive self-service process that enables people within a church to easily find a suitable group to attend, simplify the administrative processes required for getting people into groups, and provide information to the group co-ordinators that might assist in planning and measuring effectiveness. Check out this case study about how we've developed this multi-tenant social group management platform for churches! The Kast platform is growing from time to time and this time you could see an improvement from Dean Marcussen which is about providing ways to edit static resources (like JavaScript and CSS) using the admin UI. The exact issue in GitHub is opened by Dody Gunawinata a while ago about the downside of the current theme system is that to change anything will require deployment. The way around is to include the JS/CSS in a template and include them in every other template. Check out the following recording for a possible solution! It didn't seem like the design was wanted for Orchard Core itself, so it will probably remain private at this stage. But if the people wanted it, it might be possible to make it available at some point as a contribution module. News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 190 subscribers! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

Forum favourites: multi-node Orchard, community features and low-level data access

Forum topics from the Orchard discussion board that we found interesting: Running Orchard on two nodes: this is a tricky thing but in this discussion there some good tips Community features in Orchard: a lot of built-in and third-party modules bring "social" functionality to Orchard. You won't be able to just install Contrib.Facebook but there are some decent fundamentals. A tale of database table locking, transactions and low-level data access in Orchard: sometimes you just have to bury deeper.