title: How to split Qooxdoo project into logical separate .JS files
body: <p>I am trying to make use of the import and export module functions in Javascript in a Qooxdoo application.</p>
  <p>I want to create an instance of &quot;session&quot; defined in my session.js (see file contents) below, in my main application, but the import statement:</p>
  <p>&quot;import {session) from 'session.js'; &quot;</p>
  <p>Needs to be higher up in the code chain than application.js? (I get an error saying that when I try that approach). I am not sure where else that import statement could go? I have tried some of the other .JS project files without any success.</p>
  <p>In the application code I would create a new instance of session using something like this:</p>
  <p>&quot;let mysession = new session();&quot;</p>
  <p>That is my theory anyway!</p>
  <p>All I am trying to do is split code into separate .js files, so that it is easier to manage.</p>
  <p>The &quot;included&quot; files will only be used in this project. And I am updating them as I go along. So I would not like to have to rebuild them separately when doing a build of the application.js file.</p>
  <p>I might be making this way too complicated.</p>
  <p>I have done some playing around with a very old version of Qooxdoo years ago, but the current Qooxdoo is clearly very different. According to my old code it seemed like it was possible to reference other files by using Javascript statements like &quot;var session = test.general.session.getInstance();&quot;. But this no longer seems to work?</p>
  <p>If someone could point me in the right direction, I would be very grateful. I have hunted through the Qooxdoo Web site, but cannot seem to find anything relevant, of course I might be missing what I am looking for!</p>
  <p>Thanks in advance.</p>
  <p>Lisa.</p>
  <p>Very abbreviated contents of the file &quot;session.js&quot;.</p>
  <pre><code>qx.Class.define('session',
  {
    extend : qx.core.Object,
    type : 'singleton',
  
    construct: function ()
    {
      this.base(arguments);
      this.datasetName = 'Test Dataset';
      this.userFirstName = 'Dave';
      this.userSurname = 'Smith';
    },
  
    members:
    {
      datasetName : null,
      userFirstName : null,
      userSurname : null,
      tblmdlOpenForms : null,
      currentOpenForm : null,
      currentOpenWindow : null,
      __OpenFormIndex : null,
  
      __menuOptionAlreadyOpen : function(option)
      {
        if (this.currentOpenForm == option)
          return true
        else
          return false
      },   
  }
  });
  
  export {session};
  </code></pre>