Skip to main content
Home  ›  Blog

Breaking Change in v16.02 for new features in 16.01 (Typed Code)

Some of the new features in 16.01 turned out to have far reaching consequences which had to be modified in 16.02 to ensure long term quality. This means we had to make some breaking changes - sorry 😥.

Next we'll explain what got broken and why, as well as guidance if you had installed the latest Blog or Mobius App, which had used this new API. 

What got Broken: Typed Code

In v16.01 we introduced some new features such as the AsTyped(...) command and ways to get typed values from dynamic entity objects like Content.String("FieldName")

When we started using this to refactor all our existing apps, we discovered that we had made some poor design choices. These new commands were meant to provide strict type safety in Razor, but this kind of use only made it look as if this were the case. The way code was actually compiled resulted in it appearing as if it were type safe, when in reality most use cases were not type safe at all. 

We then worked on improving the API but it quickly became clear that the only way to do this right was to create new base classes which are now called RazorPro, CodePro and ApiPro. These now do what we were trying to achieve, but with a different API than originally published in v16.01.

We then had to make a hard choice. Either we: 

  • leave the 16.01 API as is, and risk that people use it. This would result in various confusing scenarios and code snippets which would work exclusively in certain edge cases
  • or clean up the API and show clear errors and guidance for people who were already using it.

Because such APIs will have to live for many years to come, it became clear that we had to break it so that future would remain simple and consistent. 

Broken APIs and Apps

Basically all the new APIs we introduced in 16.01 that were available on Razor14 were removed again. Specifically: 

  • AsTyped(...) and AsTypedList(...)
  • Typed methods on dynamic objects, such as .String(name), .Int(name) etc.
  • New properties on the Data object, such as Data.MyContent, Data.MyHeader

This will not affect many people, but it will affect people who downloaded the very latest version of the following Apps:

  • Blog 6.00.01
  • Mobius 5.07.00

These Apps had been upgraded to use the new API but preserving that would have meant preserving this un-recommended functionality for 10+ years.

How to Fix Blog 06.00.01

If you have the Blog App in version 06.00.01 and you just upgraded to a newer 2sxc you will see errors which will also link to this page. 

Upon release of 2sxc 16.02 we are also releasing a new Blog 06.00.02 which has the same functionality but using the latest code. 

To upgrade a previous installation, just download the ZIP from Github and manually unzip and copy-paste all the files in the "Apps\Blog6\2sexy" folder in the ZIP to overwrite your existing files. 

If you had made any changes you will have to repeat those - sorry 😥.

How to Fix Mobius 05.07.00

If you have the Mobius App in version 05.07.00 and you just upgraded to a newer 2sxc you will see errors which will also link to this page. 

Upon release of 2sxc 16.02 we are also releasing a new Mobius 05.07.02 which has the same functionality but using the latest code. 

To upgrade a previous installation, just download the ZIP from Github and manually unzip and copy-paste all the files from the "Apps\MobiusForms5\2sexy" folder in the zip to overwrite your existing files. 

If you had made any changes you will have to repeat those - sorry 😥.

Sorry - Hope you Understand

We're verry sorry to make this decision and cause some work on your side. It was a very difficult choice for us, as it broke Apps which we had already published. But in the long run we believe this is critical for everybody. We hope you understand. 

iJungleboy


Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see github), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler