Focal Point
[CLOSED] What is the Best Practice for porting HTML code between Content Folders??

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9067043086

January 18, 2016, 12:28 PM
W Kassebaum
[CLOSED] What is the Best Practice for porting HTML code between Content Folders??
In WF8..is the best practice for developing HTML forms in the contents area to have mirrored images of the environments, so that as the code can be seemlessly ported from one environment to another without making changes?

I have a development machine w/ 2 folders in the contents area:
a. one is a TEST folder (which points to dev data)
b. one is a PROD folder which mirrors the production machine (and which points to prod data)
I have a production machien w/ 1 PROD folder in the contents area..(and which points to prod data)

The implication of my setup is that as I develop the forms (with references to external procedures to populate dropdown values etc), I can not easily port code from one folder to another because the references to those fexes are hard coded in the xmlroot structure (just like they were in previous releases of WF)...and they cannot be changed w/out putting the code in the new folder, opening it up..and changing the refernces.

Here is an example of the HTML code for requestid "get_divisions". Please note the hard coded TEST refernce in the ibif_ex:


When this code is ported to another directory on another machine (lets say PROD), the form will fail because TEST doesn't exist. Even if it did exist, it may not be my intention for the TEST/get_divisions.fex to be refernces vs a PROD/get_divisions.fex

(I was able to get around this is previous releases by tweeking the HTML code to refernce an Amper variable for those values..but that's no longer the case since the HTML code is not editable directly anylonger)

From a developer's perspective, all this makes it a challenge to create portable code..code that can be migrated up and down the migration path w/ a minimum of changes. It has to be changed as migrated up..and it has to be changed if migrated back to development for fixes/changes.

My guess is that, based upon a post by Sandy Kadish, that the 'best practice' is to have numerous mirrored images of each other..so that the code ports from one to the other instance.

Am I missing something simple here?..something which would allow the code to be portable w/ a minimum of efforts/tweeks?

Thanks in advance.

Wm

This message has been edited. Last edited by: W Kassebaum,


WebFOCUS 8
Windows, All Outputs
January 18, 2016, 12:56 PM
W Kassebaum
here is that reference:
request requestid="get_areasdetail" sourcetype="typeFex" ibif_ex="/WFC/Repository/TEST/get_areasdetail.fex" ibiapp_app="" activeType="-1" activereport="0" compoundreport="0"/


WebFOCUS 8
Windows, All Outputs
January 18, 2016, 02:44 PM
Francis Mariani
I'd say the complication is that you have two "pseudo" environments on your Dev machine.

We work with four environments (Dev, QA, UAT, Prod) without any issues. The environment is not part of any path, so, all paths resolve in all environments.

I'd eliminate the TEST/PROD folder from your Dev machine. If you really need two environments before you deploy to prod, I would suggest having two installations on your Dev machine, and still NOT have the environment as a folder.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
January 18, 2016, 03:15 PM
W Kassebaum
Thanks Francis,
So..to make sure I understand you correctly.

1. You have these 4, indepent, mirrored environments, each with the "same folder structure under the content area" and same app structure on the reporting server...

These environments can be on 4 different machines..or..you have multiple clients on each machine..

Regardless, they all have the same 'folder structure'...right?

2. Because each of these folder structures are 'the same'..when you create something one one folder..the references remain intact as the code migrated from DEV to QA to UAT to PROD.... right?

3. So.. you don't have to change any IBFS refernces for common code referenes inside the code..right?

4. Your firm purchased 4 licenses...right, one each fro DEV/TEST/UAT/PROD...rigth?

Overall, I understand and agree w/ what you are recommending.

Unfortunately, we only have 2 licenses, one for Dev/UAT and one for PROD. I do not believe we can install 2 clients on 1 machine and stay within the license agreement.

As an aside, I've opened case # 30183532 for a NFR which would create a 'Porting Wizard' to allow code to be ported from one folder to another (on the same machine) and which would handle this resource reference auto-magically.

thanks again for your insights.

Wm


WebFOCUS 8
Windows, All Outputs
January 18, 2016, 03:23 PM
Francis Mariani
1) Yes, we have four separate machines. The folder structure is the same on all four machines.
2) The references do not have to be modified, because the folder structure is the same on all four machines.
3) No changes are made.
4) Yes, we have four licences.

Unfortunately, I cannot think of an easy method to solving your problem. Hopefully someone else will pipe in soon, perhaps from Australia...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
January 19, 2016, 03:24 AM
SSander
quote:

As an aside, I've opened case # 30183532 for a NFR which would create a 'Porting Wizard' to allow code to be ported from one folder to another (on the same machine) and which would handle this resource reference auto-magically.

Good NFR but indeed - our setup is similar to Francis - but we have only 2 mirrored enviroments. Dev(Test) and Production.

There is no other way to do it, as parameters in "INCLUDE" names are not allowed and same with the HTML-s if you reference some fex.

Regards,


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
January 19, 2016, 09:47 AM
Francis Mariani
Is it possible IBI will allow a second instance of WF on the same box, for testing purposes?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
January 20, 2016, 09:16 AM
W Kassebaum
no...a licence is needed for each installation.


WebFOCUS 8
Windows, All Outputs
January 22, 2016, 07:36 AM
CLH
Hi,

Would setting up a common folder name work ? Are you just using the prod folder on your dev machine to allow the code to be tested against production data ? If so could you just make which data set you want to use a selectable variable. So same code but going against a different data source ?


Webfocus 8.0.7 on Windows