Anvil Extras v2.2

We’ve just released Anvil Extras v2.2.0 with:

Notable Change

  • persistence - A new module to define simple classes for use in client side code and have instances of those classes synchronised with data tables rows.

This supersedes the Anvil ORM project and should be used in preference to that library.

Minor Changes

  • add tag property to custom components
    Chip tag initialization
  • add format_selected_text method override for multi-select-dropdown
  • add selected_keys property for multi-select-dropdown

Bug Fixes

  • navigation - Add args and kwargs to open_form
  • storage - fix serialisation of dictionary values
8 Likes

And almost immediately followed by v2.2.1 as the inevitable typo only comes to light slightly after release rather than before.

4 Likes

Now at v2.2.3 with some minor bug fixes in the new persistence module.

1 Like

@owen.campbell nice work with anvil-extras!
Question for you: how “official” is anvil-extras? I’m interested in utilizing the persistence module to achieve ORM functionality, but I’m generally hesitant to include third party libraries. Do you know is this is used widely in production?

Yes, it is widely used in production.

You can clone it and depend on your own version, so your apps don’t crash when Anvil Extras disappears.

You can depend on a specific version of the public release, so your apps don’t crash when a change introduces some incompatibility or errors.

I depend on the latest version on all my production apps. It has happened once that the new release broke some features, but Owen and Stu were very responsive and fixed it in matter of minutes.

2 Likes

Thank you!

It’s not official in any way. It’s simply a library that we (the maintainers) make available under an open source licence.

I have no way of knowing how and where it’s to used other than my own clients, several of which use it in their production apps.

3 Likes

I use bits of it in production. Works very well.

4 Likes

Re: persistence module

Is there a reason the “model” lives in the client code instead of server code? This seems a little off to me in terms of concern separation and security. Then again, this may be my Django background talking.

2 Likes

(I’ve moved your questions to a more relevant thread. Please continue in this thread or create a new topic here—or, preferably, for questions like your most recent one, on github.)

p.s. Welcome!

2 Likes

It’s a front end, client side module. The model is similar to a model in angular js.

Security is handled by whatever you choose to write as your server functions.

1 Like

Wouldn’t this mean that users can essentially see the structure of your database tables based on the model classes you create in the client code?

1 Like

No more so than any other time you pass a data tables row to the client.

1 Like