Natural for AJAX

  1. How important is a Version Control System (VCS) in the ‘New World’. I know automated deployments may depend on something like SVN.
  2. How important are ‘Best Practices’ with Natural AJAX and what are the top 5.

TIA
Happy New Year

Mike Waldron

Hi Mike,

Version Control System
For me a version control system is a prerequisite to work in a team and to be agile. It allows me to share my results with my team colleagues. I can integrate the changes of my team colleagues with 1 click and in nightly builds all the tested changes are integrated night by night.
And the best is: It allows me to make mistakes! If I find, that a test fails because one of my changes, I can easily revert my change. I can see all the history of changes to not make the same mistake again. I as a developer would not like to miss my version control system.

Best Practises
Not sure if these are the top 5 best practices for everybody but here are 6 best practices which are important for me:

  1. Make yourself familiar with web applications. A web application is similar to a desktop application and still there are differences. Here are 2 examples: A web application must not close the browser window when the application finished - like you are used from desktop applications. Browser and end user nicely take care of moving the cursor to the fields, your application does not need to remember the cursor position. Do not try to rebuild such desktop functionality with high effort. Instead: Use the standard browser behavior which you get for free.

  2. Prefer doing style settings in a css style sheet instead of adding corresponding settings to many controls in many pages.

  3. Use Natural ONE as development tool and stick to the naming rules of the user interface component folders. Then you can package your deployment .war file with 1 click without any additional manual tasks.

  4. Have a kind of central “configuration” user interface component, which simply contains your central styles, images, multi language files maybe custom controls, templates…and then multiple user interface components, which hold the layouts.

  5. Prefer having many small pages over 1 really big page containing everything. It’s much more end user friendly and the browser performance is much better. Also it’s much easier to maintain for you.

  6. Prefer page popups over browser popups because most security settings don’t allow browser popups.

Best Regards,
Christine

Christine, thank you so much for the answer. And it makes perfect sense.

Mike Waldron

Christine, I have used all the VCS systems, CVS, TFS, SVN and a little GIT.
I am trying to figure out how to best set SVN up for NaturalOne that has a Natural Server on Linux.

  1. Downloaded the plug in for SVN Eclipse
  2. Got a repository from the company infrastructure to use for our ‘modernization’ project.
  3. Created a new workspace
  4. Created a new project for Natural Ajax
    ie, Map conversion, Layout Editor for XML, etc
    Program for conversion
  5. ‘hooked’ this project to be under the control of SVN
  6. I see all the activities in SVN Explorer
    My questions revolve around how do we control this for 9 people who will be creating
    XML Panels/Controls, Generating NS8, Updating programs after conversion
  7. Deployment

The whole application library from the Linux Server does or does not need to be downloaded for SVN?
We check out maps, convert them and then delete them from the project telling the Natural Server it is available for normal development.
Programs, subprograms and helproutines are checked out and modified.

I have gone through all the docs and it seems to me, a dedicated admin person needs to control this for normal version control, checkin, catall and then the new modules/interfaces, NS8, XML, Generated HTML, etc.

Any guidance would be appreciated. I do have a power point presentation for an actual implementation, but I am looking at the global picture.

Mike Waldron

Hi Mike,

In my team we are working the following way:

  • Have a central SVN repository with all the sources in it. It’s very important to only check the files in, which are NOT compile or generation results. This means: Don’t check your *.NS8 files or the generated *.html files in.
  • Everybody has his Eclipse/ONE Development environment installed and works locally on his PC. Everybody checks out the common projects, modifies files, runs local tests and commits the modifications to the SVN repository.
  • Every morning I check if there are some modifications from my colleagues and check out there modifications to my local environment. Sometime I also do this during the day, maybe when I am waiting for a modification from my colleague.
  • Every night the products/components on which we - as a team - are working is built from the SVN repository. We are using ant scripts and have integrated the ant scripts into Jenkins. For Ajax projects we are using the ant war deployment script plus additional scripts for product specific steps.

Regarding your questions: Ideally everything should be in the SVN repository. You then have exactly 1 place from which you do the builds, freeze your products, create branches and so on. If you have several different locations you need to take care for dependencies yourself, which could become complex.

What’s unclear to me: Do you generate Ajax layouts for your maps every day? This would mean your keep on modifying your maps and always generate Ajax layouts again? If this is the case: Why?

Regarding administration: Similar to other servers in your company you probably need someone who takes care that the SVN repository server is running. It’s similar to an E-Mail server or network servers. But besides this, for html generation or the like I don’t see the requirement for an administrator. All developers just use the ONE builds to build their projects in their local environment. And during the night automated jobs are running based on ant/Jenkins scripts. The scripts can be easily maintained by your developer team. It’s again just the Jenkins server which probably requires an administrator.

Best Regards,
Christine

Christine,

Awesome, thanks.

Currently we are doing ‘skunk works’ to figure out how to truly implement NaturalOne and have the user community to buy in. We have chosen around 86 main transactions and are working on ‘standards’ and ‘best practices’.

I believe after that settles down, we need to fully implement SVN for control and deployment.

Thanks again

Mike Waldron

Oh to answer you question, maps are only reconverted when the default template changes and it is big enough to have to regenerate. Also there are times when controls are misunderstood, so there is a need to reconvert/gen.

Also the SAG Eclipse editor has a tendency to lose focus and eventually a XML gets messed up and a reconvert is the best way to go.

SAG is working on the problem.

Thanks

Mike

Designer 9.9 NaturalOne 8.3.6

We use NATURAL AJAX and we don’t know how to make IP NUMBER useful under the NATURAL session.

Could you trie to explain ?

The code to get the IP NUMBER is not so dificult to make, but what to do to make it used in NATURAL session ?

Thanks.
Dayse Vianna

Hi Dayse,

does the NJX:REQUESTCONTEXT control meet your requirements?

Here is a link to the documentation:
http://techcommunity.softwareag.com/ecosystem/documentation/naturalONE/natONE838/core/njx/njx_requestcontext.htm#njx_requestcontext

I am curious: How does your application want to use the IP NUMBER?

Best Regards,
Christine

Hi Christine,

Thanks for your attention.

We have an application that must be acessed only by some physical locals. We have to make the same securityway when the application was only acessed by SNA terminals.

We did that under Applinx, but now in AJAX we have dificulties.

I hope the documentation helps us.

Thanks.
Dayse Vianna