Issue Details (XML | Word | Printable)

Key: ADFEMG-88
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Jan Vervecken
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
adfemg

[ADFng1-02008] - Application level deployment profile names

Created: 20/Jan/13 03:44 PM   Updated: 07/Feb/13 09:40 PM   Resolved: 06/Feb/13 02:10 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Related
 

Tags:
Participants: chriscmuir, Jan Vervecken, Torsten Kleiber and Ulrich Gerkmann-Bartels


 Description  « Hide

hi

Please consider naming guideline [ADFng1-02008] in the "ADF Naming and Project Layout Guidelines v1.00" [1].

[ADFng1-02008] - Application level deployment profile names - For deployment profiles created at the application workspace level, the deployment profile name should be the same as the application workspace name.

Trying to avoid using the same name for different things, is a general guidline that can help to avoid confusion.

In case of naming guideline [ADFng1-02008], confusion about when a name refers to a deployment profile or an application workspace name can be avoided by adding a suffix "-dp" to the deployment profile name.
Such confusion could occur when referring to a deployment profile while using ojdeploy, or when referring to a deployment profile in general.
Also when multiple deployment profiles exist, a "-dp" suffix would allow to easily recognise a name as a deployment profile name.

Given that different naming guidelines [1] suggest to "have the suffix", this also does not seem to conflict with naming guideline [ADFng1-01014], "Don't use Hungarian notation".

many thanks
Jan Vervecken



chriscmuir added a comment - 21/Jan/13 05:17 AM

Thanks for lodging the issue Jan.

Regarding your comment: "Trying to avoid using the same name for different things, is a general guidline that can help to avoid confusion."

I understand your point, but that's the whole argument for Hungarian Notation. Having been through this discussion with pro-and-anti Hungarian Notation advocates and seeing no light at the end of the tunnel, this is why the following paragraph exists on page 4 of the document:

"Generally the guidelines should be followed but in the cases where it doesn't make sense to do so, where you have your own preference, certainly diverge from the guidelines. However ensure to document why and when this has occurred so your team follows a single guideline rather than an ambiguous set of conflicting guidelines from Oracle and your own efforts."

Given this as of yet I don't see a need to change this rule, though you're free to change them yourself.

CM.


Jan Vervecken added a comment - 22/Jan/13 07:40 AM

Thank you for the update Chris.

The general guideline "trying to avoid using the same name for different things" does not imply Hungarian notation.

The goal of Hungarian notation is to include information about what a name is referring to (like a data type).
The goal of a suffix "-dp" to the deployment profile name is to avoid using the same name for different things, to avoid confusion.

The problem of Hungarian notation is, if the information included in the name (like a data type) changes, the name should change.
Currently I don't see how a deployment profile can change, so that it is no longer a deployment profile.

Also, I don't really see the difference with a naming guideline like [ADFng1-04018], suggesting 'View object names should always have the suffix "View"', which also seems intended to "avoid using the same name for different things".

It is because the context of where a name is used is not always sufficient to exactly determine what a name really refers to, that one could value "trying to avoid using the same name for different things" more than trying to avoid Hungarian(-like) notation. So any other "different name", that is not Hungarian(-like) but still makes sense, would be acceptable.

Sure, these naming guidelines include "... where you have your own preference, certainly diverge from the guidelines ...".
If you prefer to not discuss this feedback, you can close this JIRA issue.

regards
Jan Vervecken


Torsten Kleiber added a comment - 22/Jan/13 08:01 PM

If you need more than one deployment profile I think this rule is not useful.
Eg. think about shared libraries

  • profile for local deployment in Integrated Weblogic Server without shared libraries but with all adf libraries
  • profile for server deployment with shared library references and witout adf libraries
    So you need different profiles for referencig different deployment plans.

chriscmuir added a comment - 23/Jan/13 08:10 AM

Fair point. Suggested options/solutions?


Jan Vervecken added a comment - 23/Jan/13 12:44 PM

Thanks for the replies tkleiber and Chris.

  • about "If you need more than one deployment profile ..." and "Fair point. Suggested options/solutions?"
    • As suggested, always add a suffix "-dp" to the deployment profile name.
      I don't think other naming guidelines are really needed, except maybe for the suggestion to always include the "workspace name".

regards
Jan Vervecken


Torsten Kleiber added a comment - 23/Jan/13 08:06 PM

I think additional to the suffic -dp should added a suffix which shortly describes the use case, if more than one deploymentprofile is needed. For automatic builds so the correct profile could be used.

For enforcing the naming standards later I will create an enhacement request for renaming application and project deployment profiles, as actually this is not possible.


chriscmuir added a comment - 23/Jan/13 11:23 PM

tkleiber, can you give a set of examples please, I'd like to show some real ones rather than just make them up.


Torsten Kleiber added a comment - 24/Jan/13 12:25 PM

My standard deployment has single sign on enabled.
As different users see different features and data of the applcation, I have to create for testing an additional application without sso.

The only differences are the context root and the auth-method in web.xml.

So therefore I need two deployment profiles, which contains a different deployment plan to change this values:

webapp.ui-dp
webapp.ui-dp-no-sso


Torsten Kleiber added a comment - 25/Jan/13 04:20 PM

Enhacement request for renaming application and project deployment profiles has be create and is public accessible: 16218393.

Do we have to create for tracking this an new jira issue here?


Ulrich Gerkmann-Bartels added a comment - 27/Jan/13 02:41 PM

Hi,

We think you need maybe more than one deployment profile inside a project / application workspace.

So we look at different needs:

a.) build / continuous integration / delivery

We need a simple convention with following aspects:

  • automatic find of the deployment profile,
  • filter for different stages (test, integration, production, with signing pf jars etc.)
  • separate from deployment profiles need by the developer

Our build scripts find automatic new project's and build for the different stages by using following convention:

build*
build_test*
build_int*
build_prod*

Should be the project/modul integrated in the continuous integration process the developer simple use this convention. In simple project most the deployment profile is named: build. So it is easy to remember.

The naming of the artifact don't following the deployment profile name. But this is a other convention.

b.) development

  • The naming of this deployment profiles ist up to the developer but not a.)

Ulrich Gerkmann-Bartels


chriscmuir added a comment - 28/Jan/13 04:10 AM

@tkleiber - thanks for logging the ER. Please lodge a separate issue on the ADF EMG issue tracker so we can track that ER separately to this piece of work that relates to the guidelines. In the new issue just refer back to this issue.

@tkleiber & @Ulrich - returning to the naming conventions - putting aside including the workspace/project name embedded in the deployment profile name for the moment, what it appears both tkleiber and Ulrich have identified is that both rules 02008 and 02009 require a change to accommodate the "need" or "use" of the deployment profile. Both of you have identified different needs, tkleiber through flagging SSO/non SSO use, Ulrich the 3 aspects you discussed.

I don't think it's possible to articulate all the different types of needs for the purposes of defining the rules, because in reality that could be a multiplication of every known option under every known deployment profile type and what every arbitrary uses you have at each site. As such to still present a simple version of the rules, we just state something like:

[ADFng2-02008] – Application level deployment profile names – For deployment profiles created at the application workspace level, the deployment profile name should be the same as the application workspace name. If you have more than one deployment profile that correspondences to different needs/use, include the need/use as a suffix such that it takes the form <WorkspaceName><Need>.

For example: Procurement or ProcurementTest or ProcurementProd

[ADFng2-02009] – Project level deployment profile names – For deployment profiles created at the project level, the deployment profile name should take the form <WorkspaceName><ProjectName>, for example CommonModel or HrViewController. If you have more than one deployment profile that correspondences to different needs/use, include the need/use as a suffix such that it takes the form <WorkspaceName><ProjectName><Need>.

For Example: CommonModel or CommonModelTest or CommonModelProd

...as a result of the change of these rules this will also require a change to rule ADFng1-02010 because at the moment that rule would have the need/use part of the deployment profile reflected in the artefact name. This is undesirable as the IDE hardcodes dependencies based on their path and filename, rather than using a CLASSPATH, that makes slipping in different versions of dependent libraries difficult if the file name changes.

At this time rule ADFng1-02010 is stil under discussion at http://java.net/jira/browse/ADFEMG-102 but a preliminary rewrite of that rule is as follows:

[ADFng2-02010] - Deployment profile archive name and file extensions - the archive name and file extension that is produced for the relating deployment profile should be the same as the deployment profile name minus the need/use as defined in rules 02009 and 02010, all in lowercase as per the Java convention , with a use of an appropriate file type. For example:
• ADF Library <deploymentprofilename>.jar commonmodel.jar
• EAR File <deploymentprofilename>.ear procurement.ear
• JAR File <deploymentprofilename>.jar utilities.jar
• WAR File <deploymentprofilename>.war hr.war


chriscmuir added a comment - 06/Feb/13 02:10 AM

Changes have been made to v2.0 of this doc. Closing the issue.


chriscmuir made changes - 06/Feb/13 02:10 AM
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Jan Vervecken added a comment - 07/Feb/13 09:39 PM

Thank you for the update Chris.

  • about "@tkleiber - thanks for logging the ER. Please lodge a separate issue on the ADF EMG issue tracker ..."
    • see JIRA issue ADFEMG-103 "Allow renaming application and project deployment profiles"
  • about "Changes have been made to v2.0 of this doc."
    • As can be found in "ADF Naming and Project Layout Guidelines v2.00" [1] :

      [ADFng2-02008] – Application level deployment profile names – For deployment profiles created at the application workspace level, the deployment profile name should be the same as the application workspace name. If you have more than one deployment profile that correspondence to different needs/use, include the need/use as a suffix such that it takes the form <WorkspaceName><Need>.

regards
Jan Vervecken


Jan Vervecken made changes - 07/Feb/13 09:39 PM
Link This issue depends on ADFEMG-103 [ ADFEMG-103 ]
Jan Vervecken made changes - 07/Feb/13 09:40 PM
Link This issue depends on ADFEMG-103 [ ADFEMG-103 ]
Jan Vervecken made changes - 07/Feb/13 09:40 PM
Link This issue is related to ADFEMG-103 [ ADFEMG-103 ]