Implicit constraints, Pre-defined constraints, User-defined constraints
Please could someone explain to me the differnece between the following:
Implicit constraints
Pre-defined constraints
User-defined constraints
As I understand it, Implicit Constraints seem to be those that come with an object when you drag it onto the designer. There is a list of implicit constraints, somewhere e.g. SupportsASPNET, SupportsASPWebApplications, SupportsStaticContent, AuthenticationModeConstraint. Where in the system do I find these objects?
Pre-defined constraints - these are pre-defined in what sense?
User-defined - these are User-defined in what sense?
Why is there a node named User-defined on the designer, even before I have tried to define any "User-defined" constraints?
- e.g. Logical Server Constraints | User Defined Common Language Runtime.|
Why is Common Language Runtime a *User-Defined* constraint in this instance? I didn't add it to the designer, it was there already. Why then is it not a "pre-defined" constraint?
To add to this:
In the Settings and Constraints Editor (SCE), there are two ways to define Operating System for an ASP.NET Web Application:
1. Logical Server Constraints | IISWebServer
2. Logical Server Constraints | User Defined | OperatingSystemDescription
What's the difference?
Hello
Please see the following MSDN topic on this.
Constraining Application and Application Hosting Relationships
http://msdn2.microsoft.com/en-us/library/ms181966.aspx
Thanks
Brian [MSFT]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Dear Brian,
Thanks for your reply. Unfortunately, I have already been to MSDN - that's where my question arose. I am having difficulty understanding the documentation. I am working with the designers and MSDN to try to figure out what you are tryng to get at - where and how does the distinction between the three types take effect?
Thanks
Jean-Pierre
Hello Jean-Pierre,
The following is a reply from one of our program managers:
Hi Jean-Pierre,
The three types of constraints as described in our documentation is an attempt to categorize the different kinds of constraints the tool can identify and validate:
Implicit - A user cannot enable to disable them, they are rules backed into the system. Examples of implicit constraints are diagramming gestures such as trying to bind and application to the wrong kind of server, wiring to incompatible endpoints, and settings such as trying to use Forms based auth without enabling anonymous on IIS. Implicit constraints are defined and stored within the SDM documents and are not user editable. Implicit constraints can also be authored using the SDM SDK. http://msdn.microsoft.com/vstudio/teamsystem/architect/sdm/default.aspx.
Pre-Defined Constraints - A predefined constraint is a set of constrainable settings that are grouped together in a logical fashion. Examples of pre-defined constraints are the ASP.NET constraint dialogs that appear in the Constraints section of the settings and constraints editor. The dialogs are coded such that they follow some basic syntax checking and are evaluated against a number of settings.
User Defined Constraints - User defined constraints are constraints that the *user* decides to enable and author. All settings available to the user can be enabled and specific values can be checked. The definition of the constraint is under *user control* to enable (e.g.: check) and define (e.g.: place a value to be evaluated). Any number of user defined constraints can be defined and they are all evaluated at once upon the *validate* option. The user defined node contains the hierarchy of settings that *can be user enabled and defined* within a given context.
User Defined Constraints as well as Pre-Defined Constraints can be enabled and disabled by the user using the checkboxes, whereas implicit constraints simply run all of the time.
I hope this helps.
Let me know if this is still unclear.
Elona,
Thanks. This makes it a *lot* clearer.
However, please could you clarify a bit more for me. Perhaps it's a basic question or one of fundamental misunderstannding on my behalf.
When you say "the user", to whom do you refer? I am authoring settings and constraints in the AD or the LDC designers. When authoring constraints under the "User Defined" node, I have the power to set custom error messages, operators, the "overridable" flag etc.
These become available in the _System Designer_, where one can override settings if the "overridable" flag is set. You can't change anything about the constraint design itself in the _Systems Designer_. Similalry, you see error messages when validating the diagram in the _Deployment Diagram_, whereas you can't edit anything about the constraint itself in the Deployment Diagram.
Would I be correct to assume that I am playing the "author" role in AD and LDC, whereas I am a "user" in the Systems Designer and Deployment Diagrams. Is this the "user" to whom you are referring?
When I set values for constraints in the _AD / LDC_, am I behaving as a user or an author? Is there an overlap here?
Is there some idea of a "design time/real time" in the distributed modelling architecture that I am missing? If so, please could you clarify.
Looking forward to your reply.
Thanks
Jean-Pierre
p.s. Another area I see this is in the distinction between "Applications" in the Application Designer, and "Application Uses", which you find in the System Designer. It seems that the Application is being authored in AD, but "Used" in SD.
Elona,
Pre-deifined versus User-defined:
I understand that you are saying that whereas both Pre-Defined and User-Defined constraints can be enabled/disabled and values can be set, the distinction between them lies in the ability to DEFINE the constraint itself.
User-Defined constraints can be DEFINED by their Operator and Custom Message, whereas Pre-Defined cannot be defined in this way (you can just set values, enable/disable).
I hope that I have understood you properly.
Jean-Pierre
Hi Jean-Pierre,
The "user" in "user-defined constraints" refers to you, the person writing (authoring) the constraint. This is the same person who sets up any pre-defined constraint.
As a side note, "User-defined" might not be the best term for this; we'd be interested in hearing what you think is a clearer term. We selected "user-defined" to differentiate between the constraints we'd provided (pre-defined constraints) and those you as the user could create yourself. Constraints are really just wrappers for groups of settings you want to establish requirements for. Our pre-defined constraints wrap up certain logical groups of settings we felt you would commonly want to constrain against. Your user-defined constraints will wrap up others.
One important note is that you can write a user-defined constraint that conflicts with one of the pre-defined constraints. When you set pre-defined constraints, you can see the settings it impacts in the grey pane located at the bottom of the Settings and Constraints editor.
Regarding this, "Would I be correct to assume that I am playing the "author" role in AD and LDC, whereas I am a "user" in the Systems Designer and Deployment Diagrams. Is this the "user" to whom you are referring? "
You are correct in saying that constraints are only authored in Application Designer and Logical Datacenter designer. However, user-defined constraints are treated in the same way as pre-defined constraints in System Designer. That is, the constraint that you establish on an application in Application Designer is enforced on the application use in System Designer. Again, the "user" is you.
Regarding this, "When I set values for constraints in the _AD / LDC_, am I behaving as a user or an author? Is there an overlap here?" There's no real distinction here. You are the person (user) setting (authoring, writing) the constraint for the application or logical server. The one key thing is that you cannot edit constraints on the application use in System Designer. You can only change settings that have been marked as overrideable (as you've already noted).
Well, it's Monday morning and so I'm not sure I've achieved the clearest explanation here :) Let me know if you have outstanding questions, and thank you for your feedback on this. I wrote those topics you're struggling over and the concepts they present are not easy to grasp or to document. Any insight into how we can improve what we call things or improve our topics is very much appreciated.
Hello Jean-Pierre,
Yes, you are correct on both accounts.
Elona