Templates or Scaffolding for CRUD server actions - Read Only entities

Forgive me if this is completely obvious.

Outsystems best practices suggests exposing entities outside of your Core systems as read only, and creating Public server actions in your core module for completing updates, soft deletes etc..

What I'm not finding are templates or simple ways of creating a core set of CRUD routines / server actions per entity.

There are scant details (at least in my current searches) for best practice naming conventions, or details of what should be in these routines..

A scaffolded solution like screen design, would be great, where you could create / copy a core set of routines, and then "drop" your new Entity on the server action to have the the actions updated for your new entity.

I'd like these routines to automatically take care of CreatedBy, CreatedDate, ModifiedBy, ModifiedDate, IsActive, IsDeleted (for Soft database deletes) etc...
I'd also like these routines to automatically take care of Audit requirements, such us logging details of changes to Key fields etc.

I get the need for this, but I'm struggling with the how to do it in the best fashion..

Are there templates available?  Is there a simple way of doing this??  Is there a course that covers this in some detail..

This is the sort of detail that changes creating a simple app, from Hours, to Days...

If you expose entities as public, the scaffolding to the detail screen is OK, and creates a basic "Save" action related to the screen, that runs the Entities CreateOrUpdate action...  Clearly you lose this if you expose entities as read only..

Thank you in advance..

(We have an existing set of modules with nearly 200 Entities, so you could imagine the time taken (by others) to develop the CRUD server actions..  (And I'm not convinced the examples I have available to me are best practice..))

I feel the same pain.


Our customers was hyped and sold with fast development using Outsystems Platform.

It was indeed fast, if you didn't take into account of 4 Layer Canvas and suggested Best Practice.


We did a very fast project on one of our customer, and was very much satisfied and impressed.

Once Outsystems GSP (Guided Success Program) engineer came to review, our speedy performance suddenly deccelerating.


The suggested 4 Layer Canvas and best practices are indeed very good, but our customer was not impressed anymore with our speed of development.

We have to sacrifice some speedy scaffolding technique, and also fixing our existing module, which takes time.


Worst of all, our customer won't give a damn to architecture and best practices, they expect we finished on schedule (which was tight, even before all of this).

Solution

Hi Steve,

Many community members feel the same.

The best you can do is vote on one of the ideas posted around the concept of CRUD templates and more customisable schafolding features.

Here is one with a lot of votes:

 https://www.outsystems.com/ideas/624/allow-redefining-entity-built-in-actions-crud-wrappers?IsFromAdvancedSearch=True

The more votes the higher the change OutSystems will.listen to us.

Regards,

Daniel

Solution

Introducing your own CRUD wrappers and exposing as read only also means you are likely opening yourself up for update anomalies, as you probably won't  be locking records for update.

User A opens record for update.

User B opens same record for update.

User B updates some fields related to the record, eg a status field.

User A save his changes..  (Leaving the status field as he found it.)

User B's status change, and other changes are now lost..

I'm just not getting the need for the levels of abstraction if the app is self contained.  (not always the case.)

Hi Steve, 

please, check this article: https://medium.com/@jmjames/outsystems-crud-wrapper-basics-e9a577a3e044

And it's true, I think we all feel this pain, I already gave the idea for it to be realized automatically, and my idea, was linked to the idea that Daniel indicated the link.

Best regards,

Nuno Verdasca


Daniël Kuhlmann wrote:

Hi Steve,

Many community members feel the same.

The best you can do is vote on one of the ideas posted around the concept of CRUD templates and more customisable schafolding features.

Here is one with a lot of votes:

 https://www.outsystems.com/ideas/624/allow-redefining-entity-built-in-actions-crud-wrappers?IsFromAdvancedSearch=True

The more votes the higher the change OutSystems will.listen to us.

Regards,

Daniel

Daniel,
Thanks.
Have Liked/Voted for the linked idea.
The linked idea pretty much covers the issues I'm having.

At the moment I'm feeling that it is best to initially expose as public, created your screens etc, then create CRUD actions in core espace, change entity to read-only, create BL logic related to same, and then address the issues in the BL espace, and UI espace created by converting espace to read-only..

(Requires Many saves of the espaces, resulting in lots of not required versions of the espaces..  And Huge amounts of fiddling around with dependencies..)

Cheers

Steven


Nuno Miguel Verdasca wrote:

Hi Steve, 

please, check this article: https://medium.com/@jmjames/outsystems-crud-wrapper-basics-e9a577a3e044

And it's true, I think we all feel this pain, I already gave the idea for it to be realized automatically, and my idea, was linked to the idea that Daniel indicated the link.

Best regards,

Nuno Verdasca


medium.com is outside of the Outsystems Realm, and not where I think anyone should be looking for best practice advice on Outsystems, it is not exclusive to outsystems either..  The article is nice, and covers of some the reasons why you should do it, but also lacks the the necessary best practice details, on what you should be doing.

Cheers

Steven