Read Only C# Exposure

The use of specific JADE features and proposals for new feature suggestions
StevenQuickGS1
Posts: 2
Joined: Wed Jun 15, 2016 2:58 pm

Read Only C# Exposure

Postby StevenQuickGS1 » Tue Oct 18, 2016 9:45 am

Is it possible to expose classes in a schema with a read only access rather than read/write with the c# exposure?

User avatar
BeeJay
Posts: 311
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Read Only C# Exposure

Postby BeeJay » Tue Oct 18, 2016 2:19 pm

I'm not sure about being able to expose as read only, but in one of my projects I made the conscious decision to not expose any of my persistent model classes and instead create a subschema of my model schema in which I create proxy classes to represent the data I want available to users of the C# API. This allowed for far greater control of what developers using the exposure could do in the system, and helped ensure critical information is not inadvertently leaked via the exposure. It also means you're free to make what would otherwise be breaking changes to exposed classes without impacting any C# consuming logic, assuming the exposed wrapper classes need no changes to the exposed properties & methods.

Hope that helps.

Cheers,
BeeJay.


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests

cron