Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 121 - GST External Projects  (Read 294 times)
Reuben B.
Four Js
Posts: 934


« on: April 08, 2022, 05:37:36 am »

When transitioning into a development environment based on Genero Studio, one of the decisions you will have to make is based on how you structure your project (sometimes known as the 4pw) file or files.
 
We donít impose a limit of number of files in a .4pw but you may get to a point where instead of having a monolithic project file, you think can I have lots of smaller project files instead.  This can be done with External Projects.   

Read more here https://4js.com/ask-reuben/ig-121/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Reuben B.
Four Js
Posts: 934


« Reply #1 on: April 08, 2022, 06:02:46 am »

I got asked an interesting question on Instagram.  I'll answer here

Quote
great! Is it possible to have an all320.4pw and another all400.4pw? maybe it is possible to build same external projects in many versions, right?

A .4pw, like the other GUI source files such as .4fd, .4rp, .4ba, .4db etc need to be maintained using the same version of Genero Studio (X.YY).  As I mentioned in the article these files are xml internally, and you can see that if you open them in a text editor.

What happens between versions is that we might add extra nodes, extra attributes to this internal xml.  So when you open a 3.20 version of these files using 4.00 Studio you will typically get a dialog warning then when saved it will be saved in the new format, that is the new nodes and attributes will be added.   Similarly if you open a 4.00 version of these files in 3.20 Studio you will get a dialog advising that the file was created with a new version and cannot be opened.  This is because the 3.20 Studio does not know about these new nodes and attributes in the xml.

So to answer, yes you would probably have an all320.4pw and an all400.4pw.  I would expect you could only add External projects that were on the same version but a quick test suggests it does not do a version check... (I'll have to check that)

As the .4pw is xml internally, this does mean you can script it.  I gave the example in the article of a system with 400 applications.  You don't necessarily have to go Right-click -> Add External project 400 times.  You could potentially create the .4pw with a script (or Genero application) that looks at something where your 400 applications are listed and builds a .4pw by iterating through that list creating an xml document that matches the 4pw structure.  You could also create scripts to do diff that ignore the version differences.



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines