To top off DNN Connect 2022 we're releasing the first LTS of 2sxc 14, full of new features to make Razor even easier to write.
LTS 2sxc 14.07
Our LTS releases are our long-term releases, which will receive receive security fixes as well as critical bugfixes until the next LTS is released. For many, this is the "stable, for production" release.
We had noticed that our typical razor files had a lot of var pageSvc = GetService<IPageService>() and similar code. This was good and correct in terms of separation of concerns, but Razor files tended to quickly become very code-heavy.
So we now introduce the concept of a ServiceKit. It is a predefined list of services which are commonly used, made available on the property Kit.
For example, the ServiceKit14 (see docs) has 15 predefined properties such as Adam, Json, Page, Render etc. These will all create the service if it hasn't been accessed yet, and cache if for next use cases.
For example, this kind of code is now much simpler:
var pageSvc = GetService<IPageService>();
is now just
New Razor14 Base Class for Razor
The feature with the new Kit is available on the new base classes Razor14, Code14 and Api14.
This is important, because it allows us to grow the APIs and some day introduce a Razor15 or Razor16, which may have a ServiceKit with different APIs.
It is now much easier to create custom toolbars using the Toolbar Service (on Kit.Toolbar).
This will let you creat custom toolbars in a much easier to write way than previously using
Best check out the latest Apps incl. Content, which have been migrated to this easier convention.
New NPM Packages for TypeScript and Angular
We've created new NPM packages for @2sic.com/sxc-typings and also @2sic.com/sxc-angular.
This will help your productivity and really streamline your work.
Note also that we renamed the previous Angular package from @2sic.com/dnn-sxc-angular to @2sic.com/sxc-angular, because it also works on Oqtane, so the term DNN was confusing.
Major JS Docs Update
Most of the JS docs are now generated from the real underlying code in the repo - and we massively enhanced the documentation.
We wish you all a relaxed, sexy summer 2022!
iJungleboy & Tonci
PS: get it now from the releases