Open rockfordlhotka opened 5 years ago
My reactionary $0.02....
I don't like method names with underscores. They look like the auto-generated event name that I know VB does (or did) and …. bleh. So please don't do that!
What I'm missing is, why does there have to be a "default" name anyway? Why worry about a convention? That's completely up to the developer now.
The snippets need something in them :)
Snippets, schnippets :)
I'd go with names that match the attribute names. The developer can choose to rename them if they want.
I strongly agree with Jason, you should avoid method names with underscores.
I'd go with names that match the attribute names. The developer can choose to rename them if they want.
Yes,
I agree that the names should match the attribute name.
I'm sensing a clear preference here 😄
I am looking for input.
In the new CSLA v5 model the server-side data portal methods can have any valid name. I'm wondering what should be the new default naming convention?
They were
DataPortal_XYZ
-DataPortal_Fetch
, etc.Right now the snippets continue to use that convention, but with the new attributes, so
The problem with this is that some of those methods are virtual from the base classes. For example:
As a default this isn't ideal, because as soon as anyone starts adding injected parameters then the override won't match the base and compiler errors will result. In other words, it is kind of a pain.
So I'm thinking other naming would be better - avoid the overrides by default. Options that come to mind:
Create
,Fetch
,Update
,Insert
,Delete
,DeleteSelf
Csla_XYZ
orDP_XYZ
The drawback to the simple names is that they might conflict with existing names or methods people want for their own use. The upside is that they are simple and straightforward.
The different prefix is ok, but not as readable as the simple names. But they would probably avoid any possible conflicts with methods people would otherwise want to implement themselves.
I appreciate any feedback or thoughts.