application -> instance where it makes sense
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 24 Jul 2009 14:33:37 +0200
changeset 2476 1294a6bdf3bf
parent 2475 b6753521129d
child 2477 7baebaf44fc2
application -> instance where it makes sense
__init__.py
__pkginfo__.py
appobject.py
common/i18n.py
common/mail.py
common/migration.py
cwconfig.py
cwctl.py
cwvreg.py
dbapi.py
devtools/__init__.py
devtools/apptest.py
devtools/fake.py
devtools/fill.py
devtools/stresstester.py
doc/book/en/admin/create-instance.rst
doc/book/en/admin/gae.rst
doc/book/en/admin/index.rst
doc/book/en/admin/instance-config.rst
doc/book/en/admin/setup.rst
doc/book/en/admin/site-config.rst
doc/book/en/annexes/cookbook.rst
doc/book/en/annexes/cubicweb-ctl.rst
doc/book/en/annexes/faq.rst
doc/book/en/development/cubes/layout.rst
doc/book/en/development/datamodel/define-workflows.rst
doc/book/en/development/datamodel/definition.rst
doc/book/en/development/devcore/appobject.rst
doc/book/en/development/devweb/internationalization.rst
doc/book/en/development/entityclasses/data-as-objects.rst
doc/book/en/development/migration/index.rst
doc/book/en/development/webstdlib/basetemplates.rst
doc/book/en/development/webstdlib/startup.rst
doc/book/en/intro/concepts/index.rst
doc/book/en/intro/tutorial/components.rst
doc/book/en/intro/tutorial/create-cube.rst
etwist/request.py
etwist/server.py
etwist/twconfig.py
etwist/twctl.py
goa/dbinit.py
goa/dbmyams.py
goa/gaesource.py
goa/goaconfig.py
goa/goactl.py
goa/goavreg.py
goa/overrides/toolsutils.py
goa/skel/loader.py
goa/skel/main.py
goa/tools/laxctl.py
hercule.py
schema.py
schemas/bootstrap.py
server/__init__.py
server/checkintegrity.py
server/migractions.py
server/querier.py
server/repository.py
server/schemahooks.py
server/serverconfig.py
server/serverctl.py
server/sources/__init__.py
server/sources/native.py
server/test/unittest_schemaserial.py
toolsutils.py
vregistry.py
web/application.py
web/request.py
web/views/basecomponents.py
web/views/basecontrollers.py
web/views/bookmark.py
web/views/cwproperties.py
web/views/magicsearch.py
web/views/schema.py
web/views/startup.py
web/webconfig.py
web/webctl.py
wsgi/request.py
--- a/__init__.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/__init__.py	Fri Jul 24 14:33:37 2009 +0200
@@ -198,7 +198,7 @@
     # abstract methods to override according to the web front-end #############
 
     def base_url(self):
-        """return the root url of the application"""
+        """return the root url of the instance"""
         raise NotImplementedError
 
     def decorate_rset(self, rset):
--- a/__pkginfo__.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/__pkginfo__.py	Fri Jul 24 14:33:37 2009 +0200
@@ -7,7 +7,7 @@
 distname = "cubicweb"
 modname = "cubicweb"
 
-numversion = (3, 3, 4)
+numversion = (3, 4, 0)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL v2'
--- a/appobject.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/appobject.py	Fri Jul 24 14:33:37 2009 +0200
@@ -40,11 +40,11 @@
 
     At registration time, the following attributes are set on the class:
     :vreg:
-      the application's registry
+      the instance's registry
     :schema:
-      the application's schema
+      the instance's schema
     :config:
-      the application's configuration
+      the instance's configuration
 
     At instantiation time, the following attributes are set on the instance:
     :req:
@@ -276,7 +276,7 @@
         return output.getvalue()
 
     def format_date(self, date, date_format=None, time=False):
-        """return a string for a date time according to application's
+        """return a string for a date time according to instance's
         configuration
         """
         if date:
@@ -289,7 +289,7 @@
         return u''
 
     def format_time(self, time):
-        """return a string for a time according to application's
+        """return a string for a time according to instance's
         configuration
         """
         if time:
@@ -297,7 +297,7 @@
         return u''
 
     def format_float(self, num):
-        """return a string for floating point number according to application's
+        """return a string for floating point number according to instance's
         configuration
         """
         if num:
--- a/common/i18n.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/common/i18n.py	Fri Jul 24 14:33:37 2009 +0200
@@ -73,7 +73,7 @@
         pofiles = [pof for pof in pofiles if exists(pof)]
         mergedpo = join(destdir, '%s_merged.po' % lang)
         try:
-            # merge application messages' catalog with the stdlib's one
+            # merge instance/cubes messages catalogs with the stdlib's one
             execute('msgcat --use-first --sort-output --strict %s > %s'
                     % (' '.join(pofiles), mergedpo))
             # make sure the .mo file is writeable and compile with *msgfmt*
--- a/common/mail.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/common/mail.py	Fri Jul 24 14:33:37 2009 +0200
@@ -18,7 +18,7 @@
 
 def addrheader(uaddr, uname=None):
     # even if an email address should be ascii, encode it using utf8 since
-    # application tests may generate non ascii email address
+    # automatic tests may generate non ascii email address
     addr = uaddr.encode('UTF-8')
     if uname:
         return '%s <%s>' % (header(uname).encode(), addr)
--- a/common/migration.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/common/migration.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,5 +1,4 @@
-"""utility to ease migration of application version to newly installed
-version
+"""utilities for instances migration
 
 :organization: Logilab
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
--- a/cwconfig.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/cwconfig.py	Fri Jul 24 14:33:37 2009 +0200
@@ -22,6 +22,7 @@
 from os.path import exists, join, expanduser, abspath, normpath, basename, isdir
 
 from logilab.common.decorators import cached
+from logilab.common.deprecation import deprecated_function
 from logilab.common.logging_ext import set_log_methods, init_log
 from logilab.common.configuration import (Configuration, Method,
                                           ConfigurationMixIn, merge_options)
@@ -221,7 +222,7 @@
           'group': 'appobjects', 'inputlevel': 2,
           }),
         )
-    # static and class methods used to get application independant resources ##
+    # static and class methods used to get instance independant resources ##
 
     @staticmethod
     def cubicweb_version():
@@ -247,7 +248,7 @@
 
     @classmethod
     def i18n_lib_dir(cls):
-        """return application's i18n directory"""
+        """return instance's i18n directory"""
         if cls.mode in ('dev', 'test') and not os.environ.get('APYCOT_ROOT'):
             return join(CW_SOFTWARE_ROOT, 'i18n')
         return join(cls.shared_dir(), 'i18n')
@@ -424,7 +425,7 @@
     @classmethod
     def build_vregistry_path(cls, templpath, evobjpath=None, tvobjpath=None):
         """given a list of directories, return a list of sub files and
-        directories that should be loaded by the application objects registry.
+        directories that should be loaded by the instance objects registry.
 
         :param evobjpath:
           optional list of sub-directories (or files without the .py ext) of
@@ -539,7 +540,7 @@
 
     # for some commands (creation...) we don't want to initialize gettext
     set_language = True
-    # set this to true to avoid false error message while creating an application
+    # set this to true to avoid false error message while creating an instance
     creating = False
     # set this to true to allow somethings which would'nt be possible
     repairing = False
@@ -566,7 +567,7 @@
           }),
         ('sender-name',
          {'type' : 'string',
-          'default': Method('default_application_id'),
+          'default': Method('default_instance_id'),
           'help': 'name used as HELO name for outgoing emails from the \
 repository.',
           'group': 'email', 'inputlevel': 2,
@@ -604,28 +605,28 @@
 
     @classmethod
     def config_for(cls, appid, config=None):
-        """return a configuration instance for the given application identifier
+        """return a configuration instance for the given instance identifier
         """
-        config = config or guess_configuration(cls.application_home(appid))
+        config = config or guess_configuration(cls.instance_home(appid))
         configcls = configuration_cls(config)
         return configcls(appid)
 
     @classmethod
     def possible_configurations(cls, appid):
         """return the name of possible configurations for the given
-        application id
+        instance id
         """
-        home = cls.application_home(appid)
+        home = cls.instance_home(appid)
         return possible_configurations(home)
 
     @classmethod
-    def application_home(cls, appid):
-        """return the home directory of the application with the given
-        application id
+    def instance_home(cls, appid):
+        """return the home directory of the instance with the given
+        instance id
         """
         home = join(cls.registry_dir(), appid)
         if not exists(home):
-            raise ConfigurationError('no such application %s (check it exists with "cubicweb-ctl list")' % appid)
+            raise ConfigurationError('no such instance %s (check it exists with "cubicweb-ctl list")' % appid)
         return home
 
     MODES = ('common', 'repository', 'Any', 'web')
@@ -639,14 +640,14 @@
 
     # default configuration methods ###########################################
 
-    def default_application_id(self):
-        """return the application identifier, useful for option which need this
+    def default_instance_id(self):
+        """return the instance identifier, useful for option which need this
         as default value
         """
         return self.appid
 
     def default_log_file(self):
-        """return default path to the log file of the application'server"""
+        """return default path to the log file of the instance'server"""
         if self.mode == 'dev':
             basepath = '/tmp/%s-%s' % (basename(self.appid), self.name)
             path = basepath + '.log'
@@ -662,10 +663,10 @@
         return '/var/log/cubicweb/%s-%s.log' % (self.appid, self.name)
 
     def default_pid_file(self):
-        """return default path to the pid file of the application'server"""
+        """return default path to the pid file of the instance'server"""
         return join(self.runtime_dir(), '%s-%s.pid' % (self.appid, self.name))
 
-    # instance methods used to get application specific resources #############
+    # instance methods used to get instance specific resources #############
 
     def __init__(self, appid):
         self.appid = appid
@@ -724,7 +725,7 @@
         self._cubes = self.reorder_cubes(list(self._cubes) + cubes)
 
     def main_config_file(self):
-        """return application's control configuration file"""
+        """return instance's control configuration file"""
         return join(self.apphome, '%s.conf' % self.name)
 
     def save(self):
@@ -741,7 +742,7 @@
         return md5.new(';'.join(infos)).hexdigest()
 
     def load_site_cubicweb(self):
-        """load (web?) application's specific site_cubicweb file"""
+        """load instance's specific site_cubicweb file"""
         for path in reversed([self.apphome] + self.cubes_path()):
             sitefile = join(path, 'site_cubicweb.py')
             if exists(sitefile) and not sitefile in self._site_loaded:
@@ -764,7 +765,7 @@
             self.load_defaults()
 
     def load_configuration(self):
-        """load application's configuration files"""
+        """load instance's configuration files"""
         super(CubicWebConfiguration, self).load_configuration()
         if self.apphome and self.set_language:
             # init gettext
@@ -783,7 +784,7 @@
             logging.fileConfig(logconfig)
 
     def available_languages(self, *args):
-        """return available translation for an application, by looking for
+        """return available translation for an instance, by looking for
         compiled catalog
 
         take *args to be usable as a vocabulary method
@@ -863,6 +864,6 @@
 
 set_log_methods(CubicWebConfiguration, logging.getLogger('cubicweb.configuration'))
 
-# alias to get a configuration instance from an application id
-application_configuration = CubicWebConfiguration.config_for
-
+# alias to get a configuration instance from an instance id
+instance_configuration = CubicWebConfiguration.config_for
+application_configuration = deprecated_function(instance_configuration, 'use instance_configuration')
--- a/cwctl.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/cwctl.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,6 +1,6 @@
 """%%prog %s [options] %s
 
-CubicWeb main applications controller.
+CubicWeb main instances controller.
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 %s"""
 
@@ -45,11 +45,11 @@
     return modes
 
 
-class ApplicationCommand(Command):
-    """base class for command taking 0 to n application id as arguments
-    (0 meaning all registered applications)
+class InstanceCommand(Command):
+    """base class for command taking 0 to n instance id as arguments
+    (0 meaning all registered instances)
     """
-    arguments = '[<application>...]'
+    arguments = '[<instance>...]'
     options = (
         ("force",
          {'short': 'f', 'action' : 'store_true',
@@ -84,7 +84,7 @@
         return allinstances
 
     def run(self, args):
-        """run the <command>_method on each argument (a list of application
+        """run the <command>_method on each argument (a list of instance
         identifiers)
         """
         if not args:
@@ -102,29 +102,29 @@
         for appid in args:
             if askconfirm:
                 print '*'*72
-                if not confirm('%s application %r ?' % (self.name, appid)):
+                if not confirm('%s instance %r ?' % (self.name, appid)):
                     continue
             self.run_arg(appid)
 
     def run_arg(self, appid):
-        cmdmeth = getattr(self, '%s_application' % self.name)
+        cmdmeth = getattr(self, '%s_instance' % self.name)
         try:
             cmdmeth(appid)
         except (KeyboardInterrupt, SystemExit):
             print >> sys.stderr, '%s aborted' % self.name
             sys.exit(2) # specific error code
         except (ExecutionError, ConfigurationError), ex:
-            print >> sys.stderr, 'application %s not %s: %s' % (
+            print >> sys.stderr, 'instance %s not %s: %s' % (
                 appid, self.actionverb, ex)
         except Exception, ex:
             import traceback
             traceback.print_exc()
-            print >> sys.stderr, 'application %s not %s: %s' % (
+            print >> sys.stderr, 'instance %s not %s: %s' % (
                 appid, self.actionverb, ex)
 
 
-class ApplicationCommandFork(ApplicationCommand):
-    """Same as `ApplicationCommand`, but command is forked in a new environment
+class InstanceCommandFork(InstanceCommand):
+    """Same as `InstanceCommand`, but command is forked in a new environment
     for each argument
     """
 
@@ -136,7 +136,7 @@
         for appid in args:
             if askconfirm:
                 print '*'*72
-                if not confirm('%s application %r ?' % (self.name, appid)):
+                if not confirm('%s instance %r ?' % (self.name, appid)):
                     continue
             if forkcmd:
                 status = system('%s %s' % (forkcmd, appid))
@@ -148,10 +148,9 @@
 # base commands ###############################################################
 
 class ListCommand(Command):
-    """List configurations, componants and applications.
+    """List configurations, cubes and instances.
 
-    list available configurations, installed web and server componants, and
-    registered applications
+    list available configurations, installed cubes, and registered instances
     """
     name = 'list'
     options = (
@@ -206,30 +205,30 @@
         try:
             regdir = cwcfg.registry_dir()
         except ConfigurationError, ex:
-            print 'No application available:', ex
+            print 'No instance available:', ex
             print
             return
         instances = list_instances(regdir)
         if instances:
-            print 'Available applications (%s):' % regdir
+            print 'Available instances (%s):' % regdir
             for appid in instances:
                 modes = cwcfg.possible_configurations(appid)
                 if not modes:
-                    print '* %s (BROKEN application, no configuration found)' % appid
+                    print '* %s (BROKEN instance, no configuration found)' % appid
                     continue
                 print '* %s (%s)' % (appid, ', '.join(modes))
                 try:
                     config = cwcfg.config_for(appid, modes[0])
                 except Exception, exc:
-                    print '    (BROKEN application, %s)' % exc
+                    print '    (BROKEN instance, %s)' % exc
                     continue
         else:
-            print 'No application available in %s' % regdir
+            print 'No instance available in %s' % regdir
         print
 
 
-class CreateApplicationCommand(Command):
-    """Create an application from a cube. This is an unified
+class CreateInstanceCommand(Command):
+    """Create an instance from a cube. This is an unified
     command which can handle web / server / all-in-one installation
     according to available parts of the software library and of the
     desired cube.
@@ -238,11 +237,11 @@
       the name of cube to use (list available cube names using
       the "list" command). You can use several cubes by separating
       them using comma (e.g. 'jpl,eemail')
-    <application>
-      an identifier for the application to create
+    <instance>
+      an identifier for the instance to create
     """
     name = 'create'
-    arguments = '<cube> <application>'
+    arguments = '<cube> <instance>'
     options = (
         ("config-level",
          {'short': 'l', 'type' : 'int', 'metavar': '<level>',
@@ -255,7 +254,7 @@
          {'short': 'c', 'type' : 'choice', 'metavar': '<install type>',
           'choices': ('all-in-one', 'repository', 'twisted'),
           'default': 'all-in-one',
-          'help': 'installation type, telling which part of an application \
+          'help': 'installation type, telling which part of an instance \
 should be installed. You can list available configurations using the "list" \
 command. Default to "all-in-one", e.g. an installation embedding both the RQL \
 repository and the web server.',
@@ -285,13 +284,13 @@
             print '\navailable cubes:',
             print ', '.join(cwcfg.available_cubes())
             return
-        # create the registry directory for this application
-        print '\n'+underline_title('Creating the application %s' % appid)
+        # create the registry directory for this instance
+        print '\n'+underline_title('Creating the instance %s' % appid)
         create_dir(config.apphome)
         # load site_cubicweb from the cubes dir (if any)
         config.load_site_cubicweb()
         # cubicweb-ctl configuration
-        print '\n'+underline_title('Configuring the application (%s.conf)' % configname)
+        print '\n'+underline_title('Configuring the instance (%s.conf)' % configname)
         config.input_config('main', self.config.config_level)
         # configuration'specific stuff
         print
@@ -311,7 +310,7 @@
                            'continue anyway ?'):
                 print 'creation not completed'
                 return
-        # create the additional data directory for this application
+        # create the additional data directory for this instance
         if config.appdatahome != config.apphome: # true in dev mode
             create_dir(config.appdatahome)
         if config['uid']:
@@ -323,18 +322,18 @@
         helper.postcreate()
 
 
-class DeleteApplicationCommand(Command):
-    """Delete an application. Will remove application's files and
+class DeleteInstanceCommand(Command):
+    """Delete an instance. Will remove instance's files and
     unregister it.
     """
     name = 'delete'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = ()
 
     def run(self, args):
         """run the command with its specific arguments"""
-        appid = pop_arg(args, msg="No application specified !")
+        appid = pop_arg(args, msg="No instance specified !")
         configs = [cwcfg.config_for(appid, configname)
                    for configname in cwcfg.possible_configurations(appid)]
         if not configs:
@@ -353,16 +352,16 @@
             if ex.errno != errno.ENOENT:
                 raise
         confignames = ', '.join([config.name for config in configs])
-        print 'application %s (%s) deleted' % (appid, confignames)
+        print 'instance %s (%s) deleted' % (appid, confignames)
 
 
-# application commands ########################################################
+# instance commands ########################################################
 
-class StartApplicationCommand(ApplicationCommand):
-    """Start the given applications. If no application is given, start them all.
+class StartInstanceCommand(InstanceCommand):
+    """Start the given instances. If no instance is given, start them all.
 
-    <application>...
-      identifiers of the applications to start. If no application is
+    <instance>...
+      identifiers of the instances to start. If no instance is
       given, start them all.
     """
     name = 'start'
@@ -374,7 +373,7 @@
         ("force",
          {'short': 'f', 'action' : 'store_true',
           'default': False,
-          'help': 'start the application even if it seems to be already \
+          'help': 'start the instance even if it seems to be already \
 running.'}),
         ('profile',
          {'short': 'P', 'type' : 'string', 'metavar': '<stat file>',
@@ -383,8 +382,8 @@
           }),
         )
 
-    def start_application(self, appid):
-        """start the application's server"""
+    def start_instance(self, appid):
+        """start the instance's server"""
         # use get() since start may be used from other commands (eg upgrade)
         # without all options defined
         debug = self.get('debug')
@@ -403,31 +402,31 @@
             print "starting server with command :"
             print command
         if system(command):
-            print 'an error occured while starting the application, not started'
+            print 'an error occured while starting the instance, not started'
             print
             return False
         if not debug:
-            print 'application %s started' % appid
+            print 'instance %s started' % appid
         return True
 
 
-class StopApplicationCommand(ApplicationCommand):
-    """Stop the given applications.
+class StopInstanceCommand(InstanceCommand):
+    """Stop the given instances.
 
-    <application>...
-      identifiers of the applications to stop. If no application is
+    <instance>...
+      identifiers of the instances to stop. If no instance is
       given, stop them all.
     """
     name = 'stop'
     actionverb = 'stopped'
 
     def ordered_instances(self):
-        instances = super(StopApplicationCommand, self).ordered_instances()
+        instances = super(StopInstanceCommand, self).ordered_instances()
         instances.reverse()
         return instances
 
-    def stop_application(self, appid):
-        """stop the application's server"""
+    def stop_instance(self, appid):
+        """stop the instance's server"""
         config = cwcfg.config_for(appid)
         helper = self.config_helper(config, cmdname='stop')
         helper.poststop() # do this anyway
@@ -458,15 +457,15 @@
         except OSError:
             # already removed by twistd
             pass
-        print 'application %s stopped' % appid
+        print 'instance %s stopped' % appid
 
 
-class RestartApplicationCommand(StartApplicationCommand,
-                                StopApplicationCommand):
-    """Restart the given applications.
+class RestartInstanceCommand(StartInstanceCommand,
+                                StopInstanceCommand):
+    """Restart the given instances.
 
-    <application>...
-      identifiers of the applications to restart. If no application is
+    <instance>...
+      identifiers of the instances to restart. If no instance is
       given, restart them all.
     """
     name = 'restart'
@@ -476,18 +475,18 @@
         regdir = cwcfg.registry_dir()
         if not isfile(join(regdir, 'startorder')) or len(args) <= 1:
             # no specific startorder
-            super(RestartApplicationCommand, self).run_args(args, askconfirm)
+            super(RestartInstanceCommand, self).run_args(args, askconfirm)
             return
         print ('some specific start order is specified, will first stop all '
-               'applications then restart them.')
+               'instances then restart them.')
         # get instances in startorder
         stopped = []
         for appid in args:
             if askconfirm:
                 print '*'*72
-                if not confirm('%s application %r ?' % (self.name, appid)):
+                if not confirm('%s instance %r ?' % (self.name, appid)):
                     continue
-            self.stop_application(appid)
+            self.stop_instance(appid)
             stopped.append(appid)
         forkcmd = [w for w in sys.argv if not w in args]
         forkcmd[1] = 'start'
@@ -497,46 +496,46 @@
             if status:
                 sys.exit(status)
 
-    def restart_application(self, appid):
-        self.stop_application(appid)
-        if self.start_application(appid):
-            print 'application %s %s' % (appid, self.actionverb)
+    def restart_instance(self, appid):
+        self.stop_instance(appid)
+        if self.start_instance(appid):
+            print 'instance %s %s' % (appid, self.actionverb)
 
 
-class ReloadConfigurationCommand(RestartApplicationCommand):
-    """Reload the given applications. This command is equivalent to a
+class ReloadConfigurationCommand(RestartInstanceCommand):
+    """Reload the given instances. This command is equivalent to a
     restart for now.
 
-    <application>...
-      identifiers of the applications to reload. If no application is
+    <instance>...
+      identifiers of the instances to reload. If no instance is
       given, reload them all.
     """
     name = 'reload'
 
-    def reload_application(self, appid):
-        self.restart_application(appid)
+    def reload_instance(self, appid):
+        self.restart_instance(appid)
 
 
-class StatusCommand(ApplicationCommand):
-    """Display status information about the given applications.
+class StatusCommand(InstanceCommand):
+    """Display status information about the given instances.
 
-    <application>...
-      identifiers of the applications to status. If no application is
-      given, get status information about all registered applications.
+    <instance>...
+      identifiers of the instances to status. If no instance is
+      given, get status information about all registered instances.
     """
     name = 'status'
     options = ()
 
     @staticmethod
-    def status_application(appid):
-        """print running status information for an application"""
+    def status_instance(appid):
+        """print running status information for an instance"""
         for mode in cwcfg.possible_configurations(appid):
             config = cwcfg.config_for(appid, mode)
             print '[%s-%s]' % (appid, mode),
             try:
                 pidf = config['pid-file']
             except KeyError:
-                print 'buggy application, pid file not specified'
+                print 'buggy instance, pid file not specified'
                 continue
             if not exists(pidf):
                 print "doesn't seem to be running"
@@ -551,22 +550,22 @@
             print "running with pid %s" % (pid)
 
 
-class UpgradeApplicationCommand(ApplicationCommandFork,
-                                StartApplicationCommand,
-                                StopApplicationCommand):
-    """Upgrade an application after cubicweb and/or component(s) upgrade.
+class UpgradeInstanceCommand(InstanceCommandFork,
+                                StartInstanceCommand,
+                                StopInstanceCommand):
+    """Upgrade an instance after cubicweb and/or component(s) upgrade.
 
     For repository update, you will be prompted for a login / password to use
     to connect to the system database.  For some upgrades, the given user
     should have create or alter table permissions.
 
-    <application>...
-      identifiers of the applications to upgrade. If no application is
+    <instance>...
+      identifiers of the instances to upgrade. If no instance is
       given, upgrade them all.
     """
     name = 'upgrade'
     actionverb = 'upgraded'
-    options = ApplicationCommand.options + (
+    options = InstanceCommand.options + (
         ('force-componant-version',
          {'short': 't', 'type' : 'csv', 'metavar': 'cube1=X.Y.Z,cube2=X.Y.Z',
           'default': None,
@@ -584,7 +583,7 @@
         ('nostartstop',
          {'short': 'n', 'action' : 'store_true',
           'default': False,
-          'help': 'don\'t try to stop application before migration and to restart it after.'}),
+          'help': 'don\'t try to stop instance before migration and to restart it after.'}),
 
         ('verbosity',
          {'short': 'v', 'type' : 'int', 'metavar': '<0..2>',
@@ -595,7 +594,7 @@
         ('backup-db',
          {'short': 'b', 'type' : 'yn', 'metavar': '<y or n>',
           'default': None,
-          'help': "Backup the application database before upgrade.\n"\
+          'help': "Backup the instance database before upgrade.\n"\
           "If the option is ommitted, confirmation will be ask.",
           }),
 
@@ -610,10 +609,10 @@
         )
 
     def ordered_instances(self):
-        # need this since mro return StopApplicationCommand implementation
-        return ApplicationCommand.ordered_instances(self)
+        # need this since mro return StopInstanceCommand implementation
+        return InstanceCommand.ordered_instances(self)
 
-    def upgrade_application(self, appid):
+    def upgrade_instance(self, appid):
         from logilab.common.changelog import Version
         config = cwcfg.config_for(appid)
         config.repairing = True # notice we're not starting the server
@@ -623,7 +622,7 @@
         except AttributeError:
             # not a server config
             pass
-        # get application and installed versions for the server and the componants
+        # get instance and installed versions for the server and the componants
         print 'getting versions configuration from the repository...'
         mih = config.migration_handler()
         repo = mih.repo_connect()
@@ -654,13 +653,13 @@
         if cubicwebversion > applcubicwebversion:
             toupgrade.append(('cubicweb', applcubicwebversion, cubicwebversion))
         if not self.config.fs_only and not toupgrade:
-            print 'no software migration needed for application %s' % appid
+            print 'no software migration needed for instance %s' % appid
             return
         for cube, fromversion, toversion in toupgrade:
             print '**** %s migration %s -> %s' % (cube, fromversion, toversion)
         # only stop once we're sure we have something to do
         if not (cwcfg.mode == 'dev' or self.config.nostartstop):
-            self.stop_application(appid)
+            self.stop_instance(appid)
         # run cubicweb/componants migration scripts
         mih.migrate(vcconf, reversed(toupgrade), self.config)
         # rewrite main configuration file
@@ -681,9 +680,9 @@
                 return
         mih.shutdown()
         print
-        print 'application migrated'
+        print 'instance migrated'
         if not (cwcfg.mode == 'dev' or self.config.nostartstop):
-            self.start_application(appid)
+            self.start_instance(appid)
         print
 
 
@@ -693,11 +692,11 @@
     argument may be given corresponding to a file containing commands to
     execute in batch mode.
 
-    <application>
-      the identifier of the application to connect.
+    <instance>
+      the identifier of the instance to connect.
     """
     name = 'shell'
-    arguments = '<application> [batch command file]'
+    arguments = '<instance> [batch command file]'
     options = (
         ('system-only',
          {'short': 'S', 'action' : 'store_true',
@@ -717,7 +716,7 @@
 
         )
     def run(self, args):
-        appid = pop_arg(args, 99, msg="No application specified !")
+        appid = pop_arg(args, 99, msg="No instance specified !")
         config = cwcfg.config_for(appid)
         if self.config.ext_sources:
             assert not self.config.system_only
@@ -736,18 +735,18 @@
         mih.shutdown()
 
 
-class RecompileApplicationCatalogsCommand(ApplicationCommand):
-    """Recompile i18n catalogs for applications.
+class RecompileInstanceCatalogsCommand(InstanceCommand):
+    """Recompile i18n catalogs for instances.
 
-    <application>...
-      identifiers of the applications to consider. If no application is
-      given, recompile for all registered applications.
+    <instance>...
+      identifiers of the instances to consider. If no instance is
+      given, recompile for all registered instances.
     """
     name = 'i18ninstance'
 
     @staticmethod
-    def i18ninstance_application(appid):
-        """recompile application's messages catalogs"""
+    def i18ninstance_instance(appid):
+        """recompile instance's messages catalogs"""
         config = cwcfg.config_for(appid)
         try:
             config.bootstrap_cubes()
@@ -756,8 +755,8 @@
             if ex.errno != errno.ENOENT:
                 raise
             # bootstrap_cubes files doesn't exist
-            # set creating to notify this is not a regular start
-            config.creating = True
+            # notify this is not a regular start
+            config.repairing = True
             # create an in-memory repository, will call config.init_cubes()
             config.repository()
         except AttributeError:
@@ -791,16 +790,16 @@
             print cube
 
 register_commands((ListCommand,
-                   CreateApplicationCommand,
-                   DeleteApplicationCommand,
-                   StartApplicationCommand,
-                   StopApplicationCommand,
-                   RestartApplicationCommand,
+                   CreateInstanceCommand,
+                   DeleteInstanceCommand,
+                   StartInstanceCommand,
+                   StopInstanceCommand,
+                   RestartInstanceCommand,
                    ReloadConfigurationCommand,
                    StatusCommand,
-                   UpgradeApplicationCommand,
+                   UpgradeInstanceCommand,
                    ShellCommand,
-                   RecompileApplicationCatalogsCommand,
+                   RecompileInstanceCatalogsCommand,
                    ListInstancesCommand, ListCubesCommand,
                    ))
 
--- a/cwvreg.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/cwvreg.py	Fri Jul 24 14:33:37 2009 +0200
@@ -40,15 +40,15 @@
 
 
 class CubicWebRegistry(VRegistry):
-    """Central registry for the cubicweb application, extending the generic
+    """Central registry for the cubicweb instance, extending the generic
     VRegistry with some cubicweb specific stuff.
 
-    This is one of the central object in cubicweb application, coupling
+    This is one of the central object in cubicweb instance, coupling
     dynamically loaded objects with the schema and the configuration objects.
 
     It specializes the VRegistry by adding some convenience methods to access to
     stored objects. Currently we have the following registries of objects known
-    by the web application (library may use some others additional registries):
+    by the web instance (library may use some others additional registries):
 
     * etypes
     * views
@@ -91,7 +91,7 @@
             self.register_property(key, **propdef)
 
     def set_schema(self, schema):
-        """set application'schema and load application objects"""
+        """set instance'schema and load application objects"""
         self.schema = schema
         clear_cache(self, 'rqlhelper')
         # now we can load application's web objects
--- a/dbapi.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/dbapi.py	Fri Jul 24 14:33:37 2009 +0200
@@ -60,7 +60,7 @@
             raise ConnectionError('Could not get repository for %s '
                                   '(not registered in Pyro), '
                                   'you may have to restart your server-side '
-                                  'application' % nsid)
+                                  'instance' % nsid)
         return core.getProxyForURI(uri)
 
 def repo_connect(repo, login, password, cnxprops=None):
@@ -422,8 +422,8 @@
             hm, config = self._repo.hm, self._repo.config
             hm.set_schema(hm.schema) # reset structure
             hm.register_system_hooks(config)
-            # application specific hooks
-            if self._repo.config.application_hooks:
+            # instance specific hooks
+            if self._repo.config.instance_hooks:
                 hm.register_hooks(config.load_hooks(self.vreg))
 
     def source_defs(self):
--- a/devtools/__init__.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/devtools/__init__.py	Fri Jul 24 14:33:37 2009 +0200
@@ -43,7 +43,7 @@
 class TestServerConfiguration(ServerConfiguration):
     mode = 'test'
     set_language = False
-    read_application_schema = False
+    read_instance_schema = False
     bootstrap_schema = False
     init_repository = True
     options = merge_options(ServerConfiguration.options + (
@@ -77,12 +77,12 @@
     def apphome(self):
         if exists(self.appid):
             return abspath(self.appid)
-        # application cube test
+        # cube test
         return abspath('..')
     appdatahome = apphome
 
     def main_config_file(self):
-        """return application's control configuration file"""
+        """return instance's control configuration file"""
         return join(self.apphome, '%s.conf' % self.name)
 
     def instance_md5_version(self):
@@ -149,7 +149,7 @@
         return ('en', 'fr', 'de')
 
     def ext_resources_file(self):
-        """return application's external resources file"""
+        """return instance's external resources file"""
         return join(self.apphome, 'data', 'external_resources')
 
     def pyro_enabled(self):
@@ -235,14 +235,14 @@
         # XXX I'm afraid this test will prevent to run test from a production
         # environment
         self._sources = None
-        # application cube test
+        # instance cube test
         if cube is not None:
             self.apphome = self.cube_dir(cube)
         elif 'web' in os.getcwd().split(os.sep):
             # web test
             self.apphome = join(normpath(join(dirname(__file__), '..')), 'web')
         else:
-            # application cube test
+            # cube test
             self.apphome = abspath('..')
         self.sourcefile = sourcefile
         self.global_set_option('realm', '')
--- a/devtools/apptest.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/devtools/apptest.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-"""This module provides misc utilities to test applications
+"""This module provides misc utilities to test instances
 
 :organization: Logilab
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
@@ -59,7 +59,7 @@
 
 
 def get_versions(self, checkversions=False):
-    """return the a dictionary containing cubes used by this application
+    """return the a dictionary containing cubes used by this instance
     as key with their version as value, including cubicweb version. This is a
     public method, not requiring a session id.
 
@@ -406,7 +406,7 @@
         rset.vreg = self.vreg
         rset.req = self.session
         # call to set_pool is necessary to avoid pb when using
-        # application entities for convenience
+        # instance entities for convenience
         self.session.set_pool()
         return rset
 
--- a/devtools/fake.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/devtools/fake.py	Fri Jul 24 14:33:37 2009 +0200
@@ -87,12 +87,12 @@
         return None
 
     def base_url(self):
-        """return the root url of the application"""
+        """return the root url of the instance"""
         return BASE_URL
 
     def relative_path(self, includeparams=True):
         """return the normalized path of the request (ie at least relative
-        to the application's root, but some other normalization may be needed
+        to the instance's root, but some other normalization may be needed
         so that the returned path may be used to compare to generated urls
         """
         if self._url.startswith(BASE_URL):
--- a/devtools/fill.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/devtools/fill.py	Fri Jul 24 14:33:37 2009 +0200
@@ -225,7 +225,7 @@
     :param etype: the entity's type
 
     :type schema: cubicweb.schema.Schema
-    :param schema: the application schema
+    :param schema: the instance schema
 
     :type entity_num: int
     :param entity_num: the number of entities to insert
@@ -325,7 +325,7 @@
 def make_relations_queries(schema, edict, cursor, ignored_relations=(),
                            existingrels=None):
     """returns a list of generated RQL queries for relations
-    :param schema: The application schema
+    :param schema: The instance schema
 
     :param e_dict: mapping between etypes and eids
 
--- a/devtools/stresstester.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/devtools/stresstester.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-""" Usage: %s [OPTIONS] <application id> <queries file>
+""" Usage: %s [OPTIONS] <instance id> <queries file>
 
 Stress test a CubicWeb repository
 
@@ -151,8 +151,8 @@
         user = raw_input('login: ')
     if password is None:
         password = getpass('password: ')
-    from cubicweb.cwconfig import application_configuration
-    config = application_configuration(args[0])
+    from cubicweb.cwconfig import instance_configuration
+    config = instance_configuration(args[0])
     # get local access to the repository
     print "Creating repo", prof_file
     repo = Repository(config, prof_file)
--- a/doc/book/en/admin/create-instance.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/admin/create-instance.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -7,7 +7,7 @@
 -----------------
 
 Now that we created our cube, we can create an instance to view our
-application in a web browser. To do so we will use a `all-in-one`
+instance in a web browser. To do so we will use a `all-in-one`
 configuration to simplify things ::
 
   cubicweb-ctl create -c all-in-one mycube myinstance
@@ -24,12 +24,12 @@
 (:ref:`ConfigurationPostgres`).
 
 It is important to distinguish here the user used to access the database and the
-user used to login to the cubicweb application. When an instance starts, it uses
+user used to login to the cubicweb instance. When an instance starts, it uses
 the login/psswd for the database to get the schema and handle low level
 transaction. But, when :command:`cubicweb-ctl create` asks for a manager
 login/psswd of *CubicWeb*, it refers to the user you will use during the
-development to administrate your web application. It will be possible, later on,
-to use this user to create others users for your final web application.
+development to administrate your web instance. It will be possible, later on,
+to use this user to create others users for your final web instance.
 
 
 Instance administration
--- a/doc/book/en/admin/gae.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/admin/gae.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -126,14 +126,14 @@
 'cubicweb'". They disappear after the first run of i18ninstance.
 
 .. note:: The command  myapp/bin/laxctl i18ncube needs to be executed
-   only if your application is using cubes from cubicweb-apps.
+   only if your instance is using cubes from cubicweb-apps.
    Otherwise, please skip it.
 
-You will never need to add new entries in the translation catalog. Instead we would
-recommand you to use ``self.req._("msgId")`` in your application code
-to flag new message id to add to the catalog, where ``_`` refers to
-xgettext that is used to collect new strings to translate.
-While running ``laxctl i18ncube``, new string will be added to the catalogs.
+You will never need to add new entries in the translation catalog. Instead we
+would recommand you to use ``self.req._("msgId")`` in your code to flag new
+message id to add to the catalog, where ``_`` refers to xgettext that is used to
+collect new strings to translate.  While running ``laxctl i18ncube``, new string
+will be added to the catalogs.
 
 Generating the data directory
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -152,18 +152,18 @@
 
   $ python myapp/bin/laxctl genschema
 
-Application configuration
+Instance configuration
 -------------------------
 
 Authentication
 ~~~~~~~~~~~~~~
 
-You have the option of using or not google authentication for your application.
+You have the option of using or not google authentication for your instance.
 This has to be define in ``app.conf`` and ``app.yaml``.
 
 In ``app.conf`` modify the following variable::
  
-  # does this application rely on google authentication service or not.
+  # does this instance rely on google authentication service or not.
   use-google-auth=no
 
 In ``app.yaml`` comment the `login: required` set by default in the handler::
@@ -177,7 +177,7 @@
 
 
 
-Quickstart : launch the application
+Quickstart : launch the instance
 -----------------------------------
 
 On Mac OS X platforms, drag that directory on the
@@ -189,7 +189,7 @@
 
 Once the local server is started, visit `http://MYAPP_URL/_load <http://localhost:8080/_load>`_ and sign in as administrator.
 This will initialize the repository and enable you to log in into
-the application and continue the installation.
+the instance and continue the installation.
 
 You should be redirected to a page displaying a message `content initialized`.
 
--- a/doc/book/en/admin/index.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/admin/index.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -7,7 +7,7 @@
 -------------------------
 
 This part is for installation and administration of the *CubicWeb* framework and
-applications based on that framework.
+instances based on that framework.
 
 .. toctree::
    :maxdepth: 1
@@ -25,11 +25,11 @@
 RQL logs
 --------
 
-You can configure the *CubicWeb* application to keep a log
+You can configure the *CubicWeb* instance to keep a log
 of the queries executed against your database. To do so,
-edit the configuration file of your application
+edit the configuration file of your instance
 ``.../etc/cubicweb.d/myapp/all-in-one.conf`` and uncomment the
 variable ``query-log-file``::
 
-  # web application query log file
+  # web instance query log file
   query-log-file=/tmp/rql-myapp.log
--- a/doc/book/en/admin/instance-config.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/admin/instance-config.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -22,7 +22,7 @@
 :`web.auth-model` [cookie]:
     authentication mode, cookie or http
 :`web.realm`:
-    realm of the application in http authentication mode
+    realm of the instance in http authentication mode
 :`web.http-session-time` [0]:
     period of inactivity of an HTTP session before it closes automatically.
     Duration in seconds, 0 meaning no expiration (or more exactly at the
@@ -70,7 +70,7 @@
     regular expression matching sites which could be "embedded" in
     the site (controllers 'embed')
 :`web.submit-url`:
-    url where the bugs encountered in the application can be mailed to
+    url where the bugs encountered in the instance can be mailed to
 
 
 RQL server configuration
@@ -92,7 +92,7 @@
 -----------------------------------
 Web server side:
 
-:`pyro-client.pyro-application-id`:
+:`pyro-client.pyro-instance-id`:
     pyro identifier of RQL server (e.g. the instance name)
 
 RQL server side:
@@ -107,7 +107,7 @@
     hostname hosting pyro server name. If no value is
     specified, it is located by a request from broadcast
 :`pyro-name-server.pyro-ns-group` [cubicweb]:
-    pyro group in which to save the application
+    pyro group in which to save the instance
 
 
 Configuring e-mail
@@ -125,9 +125,9 @@
 :`email.smtp-port [25]`:
     SMTP server port to use for outgoing mail
 :`email.sender-name`:
-    name to use for outgoing mail of the application
+    name to use for outgoing mail of the instance
 :`email.sender-addr`:
-    address for outgoing mail of the application
+    address for outgoing mail of the instance
 :`email.default dest-addrs`:
     destination addresses by default, if used by the configuration of the
     dissemination of the model (separated by commas)
--- a/doc/book/en/admin/setup.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/admin/setup.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -39,7 +39,7 @@
   apt-get install cubicweb cubicweb-dev
 
 `cubicweb` installs the framework itself, allowing you to create
-new applications.
+new instances.
 
 `cubicweb-dev` installs the development environment allowing you to
 develop new cubes.
@@ -112,7 +112,7 @@
     export PYTHONPATH=/full/path/to/cubicweb-forest
 
 If you installed *CubicWeb* with packages, no configuration is required and your
-new cubes will be placed in `/usr/share/cubicweb/cubes` and your applications
+new cubes will be placed in `/usr/share/cubicweb/cubes` and your instances
 will be placed in `/etc/cubicweb.d`.
 
 You may run a system-wide install of *CubicWeb* in "user mode" and use it for
@@ -181,7 +181,7 @@
 
   This login/password will be requested when you will create an
   instance with `cubicweb-ctl create` to initialize the database of
-  your application.
+  your instance.
 
 .. note::
     The authentication method can be configured in ``pg_hba.conf``.
--- a/doc/book/en/admin/site-config.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/admin/site-config.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -5,7 +5,7 @@
 
 .. image:: ../images/lax-book.03-site-config-panel.en.png
 
-This panel allows you to configure the appearance of your application site.
+This panel allows you to configure the appearance of your instance site.
 Six menus are available and we will go through each of them to explain how
 to use them.
 
@@ -65,9 +65,9 @@
 
 Boxes
 ~~~~~
-The application has already a pre-defined set of boxes you can use right away.
+The instance has already a pre-defined set of boxes you can use right away.
 This configuration section allows you to place those boxes where you want in the
-application interface to customize it.
+instance interface to customize it.
 
 The available boxes are :
 
@@ -82,7 +82,7 @@
 * search box : search box
 
 * startup views box : box listing the configuration options available for
-  the application site, such as `Preferences` and `Site Configuration`
+  the instance site, such as `Preferences` and `Site Configuration`
 
 Components
 ~~~~~~~~~~
--- a/doc/book/en/annexes/cookbook.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/annexes/cookbook.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -10,7 +10,7 @@
 * How to import LDAP users in *CubicWeb*?
 
   Here is a very useful script which enables you to import LDAP users
-  into your *CubicWeb* application by running the following: ::
+  into your *CubicWeb* instance by running the following: ::
 
 
     import os
@@ -66,7 +66,7 @@
 * How to load data from a script?
 
   The following script aims at loading data within a script assuming pyro-nsd is
-  running and your application is configured with ``pyro-server=yes``, otherwise
+  running and your instance is configured with ``pyro-server=yes``, otherwise
   you would not be able to use dbapi. ::
 
     from cubicweb import dbapi
--- a/doc/book/en/annexes/cubicweb-ctl.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/annexes/cubicweb-ctl.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -26,8 +26,8 @@
 ------------------------
 
 * ``newcube``, create a new cube on the file system based on the name
-  given in the parameters. This command create a cube from an application
-  skeleton that includes default files required for debian packaging.
+  given in the parameters. This command create a cube from a skeleton
+  that includes default files required for debian packaging.
 
 
 Command to create an instance
@@ -69,7 +69,7 @@
 * ``db-check``, checks data integrity of an instance. If the automatic correction
   is activated, it is recommanded to create a dump before this operation.
 * ``schema-sync``, synchronizes the persistent schema of an instance with
-  the application schema. It is recommanded to create a dump before this operation.
+  the instance schema. It is recommanded to create a dump before this operation.
 
 Commands to maintain i18n catalogs
 ----------------------------------
--- a/doc/book/en/annexes/faq.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/annexes/faq.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -141,7 +141,7 @@
 ------------------------------------------------
 
   While modifying the description of an entity, you get an error message in
-  the application `Error while publishing ...` for Rest text and plain text.
+  the instance `Error while publishing ...` for Rest text and plain text.
   The server returns a traceback like as follows ::
 
       2008-10-06 15:05:08 - (cubicweb.rest) ERROR: error while publishing ReST text
@@ -225,14 +225,14 @@
     decribed above.
 
 
-How to change the application logo ?
+How to change the instance logo ?
 ------------------------------------
 
   There are two ways of changing the logo.
 
   1. The easiest way to use a different logo is to replace the existing
      ``logo.png`` in ``myapp/data`` by your prefered icon and refresh.
-     By default all application will look for a ``logo.png`` to be
+     By default all instance will look for a ``logo.png`` to be
      rendered in the logo section.
 
      .. image:: ../images/lax-book.06-main-template-logo.en.png
@@ -270,7 +270,7 @@
     user-attrs-map=gecos:email,uid:login
 
   Any change applied to configuration file requires to restart your
-  application.
+  instance.
 
 I get NoSelectableObject exceptions, how do I debug selectors ?
 ---------------------------------------------------------------
@@ -316,14 +316,14 @@
   If you have PostgreSQL set up to accept kerberos authentication, you can set
   the db-host, db-name and db-user parameters in the `sources` configuration
   file while leaving the password blank. It should be enough for your
-  application to connect to postgresql with a kerberos ticket.
+  instance to connect to postgresql with a kerberos ticket.
 
 
 How to load data from a script ?
 --------------------------------
 
   The following script aims at loading data within a script assuming pyro-nsd is
-  running and your application is configured with ``pyro-server=yes``, otherwise
+  running and your instance is configured with ``pyro-server=yes``, otherwise
   you would not be able to use dbapi. ::
 
     from cubicweb import dbapi
@@ -337,7 +337,7 @@
 What is the CubicWeb datatype corresponding to GAE datastore's UserProperty ?
 -----------------------------------------------------------------------------
 
-  If you take a look at your application schema and
+  If you take a look at your instance schema and
   click on "display detailed view of metadata" you will see that there
   is a Euser entity in there. That's the one that is modeling users. The
   thing that corresponds to a UserProperty is a relationship between
--- a/doc/book/en/development/cubes/layout.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/cubes/layout.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -80,7 +80,7 @@
 * ``entities`` contains the entities definition (server side and web interface)
 * ``sobjects`` contains hooks and/or views notifications (server side only)
 * ``views`` contains the web interface components (web interface only)
-* ``test`` contains tests related to the application (not installed)
+* ``test`` contains tests related to the cube (not installed)
 * ``i18n`` contains message catalogs for supported languages (server side and
   web interface)
 * ``data`` contains data files for static content (images, css, javascripts)
--- a/doc/book/en/development/datamodel/define-workflows.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/datamodel/define-workflows.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -20,7 +20,7 @@
 -----------------
 
 We want to create a workflow to control the quality of the BlogEntry
-submitted on your application. When a BlogEntry is created by a user
+submitted on your instance. When a BlogEntry is created by a user
 its state should be `submitted`. To be visible to all, it has to
 be in the state `published`. To move it from `submitted` to `published`,
 we need a transition that we can call `approve_blogentry`.
--- a/doc/book/en/development/datamodel/definition.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/datamodel/definition.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -3,7 +3,7 @@
 Yams *schema*
 -------------
 
-The **schema** is the core piece of a *CubicWeb* application as it defines
+The **schema** is the core piece of a *CubicWeb* instance as it defines
 the handled data model. It is based on entity types that are either already
 defined in the *CubicWeb* standard library; or more specific types, that
 *CubicWeb* expects to find in one or more Python files under the directory
@@ -24,9 +24,8 @@
 They are implicitely imported (as well as the special the function "_"
 for translation :ref:`internationalization`).
 
-The instance schema of an application is defined on all appobjects by a .schema
-class attribute set on registration.  It's an instance of
-:class:`yams.schema.Schema`.
+The instance schema is defined on all appobjects by a .schema class attribute set
+on registration.  It's an instance of :class:`yams.schema.Schema`.
 
 Entity type
 ~~~~~~~~~~~
--- a/doc/book/en/development/devcore/appobject.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/devcore/appobject.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -19,9 +19,9 @@
 At the recording, the following attributes are dynamically added to
 the *subclasses*:
 
-* `vreg`, the `vregistry` of the application
-* `schema`, the application schema
-* `config`, the application configuration
+* `vreg`, the `vregistry` of the instance
+* `schema`, the instance schema
+* `config`, the instance configuration
 
 We also find on instances, the following attributes:
 
@@ -36,7 +36,7 @@
     can be specified through the special parameter `method` (the connection
     is theoretically done automatically :).
 
-  * `datadir_url()`, returns the directory of the application data
+  * `datadir_url()`, returns the directory of the instance data
     (contains static files such as images, css, js...)
 
   * `base_url()`, shortcut to `req.base_url()`
@@ -57,9 +57,9 @@
 
 :Data formatting:
   * `format_date(date, date_format=None, time=False)` returns a string for a
-    mx date time according to application's configuration
+    mx date time according to instance's configuration
   * `format_time(time)` returns a string for a mx date time according to
-    application's configuration
+    instance's configuration
 
 :And more...:
 
--- a/doc/book/en/development/devweb/internationalization.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/devweb/internationalization.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -16,7 +16,7 @@
 
 * in your Python code and cubicweb-tal templates : mark translatable strings
 
-* in your application : handle the translation catalog
+* in your instance : handle the translation catalog
 
 String internationalization
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -66,16 +66,16 @@
 .. note::
 
    We dont need to mark the translation strings of entities/relations
-   used by a particular application's schema as they are generated
+   used by a particular instance's schema as they are generated
    automatically.
 
 
 Handle the translation catalog
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Once the internationalization is done in your application's code, you need
-to populate and update the translation catalog. Cubicweb provides the
-following commands for this purpose:
+Once the internationalization is done in your code, you need to populate and
+update the translation catalog. Cubicweb provides the following commands for this
+purpose:
 
 
 * `i18ncubicweb` updates Cubicweb framework's translation
@@ -83,28 +83,28 @@
   need to use this command.
 
 * `i18ncube` updates the translation catalogs of *one particular
-  component* (or of all components). After this command is
+  cube* (or of all cubes). After this command is
   executed you must update the translation files *.po* in the "i18n"
   directory of your template. This command will of course not remove
   existing translations still in use.
 
 * `i18ninstance` recompile the translation catalogs of *one particular
   instance* (or of all instances) after the translation catalogs of
-  its components have been updated. This command is automatically
+  its cubes have been updated. This command is automatically
   called every time you create or update your instance. The compiled
   catalogs (*.mo*) are stored in the i18n/<lang>/LC_MESSAGES of
-  application where `lang` is the language identifier ('en' or 'fr'
+  instance where `lang` is the language identifier ('en' or 'fr'
   for exemple).
 
 
 Example
 ```````
-You have added and/or modified some translation strings in your application
-(after creating a new view or modifying the application's schema for exemple).
+You have added and/or modified some translation strings in your cube
+(after creating a new view or modifying the cube's schema for exemple).
 To update the translation catalogs you need to do:
 
-1. `cubicweb-ctl i18ncube <component>`
-2. Edit the <component>/xxx.po  files and add missing translations (empty `msgstr`)
+1. `cubicweb-ctl i18ncube <cube>`
+2. Edit the <cube>/i18n/xxx.po  files and add missing translations (empty `msgstr`)
 3. `hg ci -m "updated i18n catalogs"`
-4. `cubicweb-ctl i18ninstance <myapplication>`
+4. `cubicweb-ctl i18ninstance <myinstance>`
 
--- a/doc/book/en/development/entityclasses/data-as-objects.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/entityclasses/data-as-objects.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -61,10 +61,10 @@
 Tne :class:`AnyEntity` class
 ----------------------------
 
-To provide a specific behavior for each entity, we have to define
-a class inheriting from `cubicweb.entities.AnyEntity`. In general, we
-define this class in a module of `mycube.entities` package of an application
-so that it will be available on both server and client side.
+To provide a specific behavior for each entity, we have to define a class
+inheriting from `cubicweb.entities.AnyEntity`. In general, we define this class
+in `mycube.entities` module (or in a submodule if we want to split code among
+multiple files) so that it will be available on both server and client side.
 
 The class `AnyEntity` is loaded dynamically from the class `Entity`
 (`cubciweb.entity`). We define a sub-class to add methods or to
--- a/doc/book/en/development/migration/index.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/migration/index.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -7,17 +7,17 @@
 
 One of the main concept in *CubicWeb* is to create incremental applications.
 For this purpose, multiple actions are provided to facilitate the improvement
-of an application, and in particular to handle the changes to be applied
+of an instance, and in particular to handle the changes to be applied
 to the data model, without loosing existing data.
 
-The current version of an application model is provided in the file
+The current version of a cube (and of cubicweb itself) is provided in the file
 `__pkginfo__.py` as a tuple of 3 integers.
 
 Migration scripts management
 ----------------------------
 
 Migration scripts has to be located in the directory `migration` of your
-application and named accordingly:
+cube and named accordingly:
 
 ::
 
@@ -67,11 +67,8 @@
 * `interactive_mode`, boolean indicating that the script is executed in
   an interactive mode or not
 
-* `appltemplversion`, application model version of the instance
-
-* `templversion`, installed application model version
-
-* `cubicwebversion`, installed cubicweb version
+* `versions_map`, dictionary of versions used by this instance (key are cubes
+  names, including 'cubicweb', values are version, eg 3-uple)
 
 * `confirm(question)`, function asking the user and returning true
   if the user answers yes, false otherwise (always returns true in
@@ -84,16 +81,14 @@
 
 * `checkpoint`, request confirming and executing a "commit" at checking point
 
-* `repo_schema`, instance persisting schema (e.g. instance schema of the
-  current migration)
+* `schema`, instance schema (readen from the database)
 
-* `newschema`, installed schema on the file system (e.g. schema of
+* `fsschema`, installed schema on the file system (e.g. schema of
   the updated model and cubicweb)
 
-* `sqlcursor`, SQL cursor for very rare cases where it is really
-   necessary or beneficial to go through the sql
+* `repo`, repository object
 
-* `repo`, repository object
+* `session`, repository session object
 
 
 Schema migration
@@ -134,18 +129,12 @@
 * `drop_relation_definition(subjtype, rtype, objtype, commit=True)`, removes
   a relation definition.
 
-* `synchronize_permissions(ertype, commit=True)`, synchronizes permissions on
-  an entity type or relation type.
-
-* `synchronize_rschema(rtype, commit=True)`, synchronizes properties and permissions
-  on a relation type.
-
-* `synchronize_eschema(etype, commit=True)`, synchronizes properties and persmissions
-  on an entity type.
-
-* `synchronize_schema(commit=True)`, synchronizes the persisting schema with the
-  updated schema (but without adding or removing new entity types, relations types
-  or even relations definitions).
+* `sync_schema_props_perms(ertype=None, syncperms=True,
+                           syncprops=True, syncrdefs=True, commit=True)`,
+  synchronizes properties and/or permissions on:
+  * the whole schema if ertype is None
+  * an entity or relation type schema if ertype is a string
+  * a relation definition  if ertype is a 3-uple (subject, relation, object)
 
 * `change_relation_props(subjtype, rtype, objtype, commit=True, **kwargs)`, changes
   properties of a relation definition by using the named parameters of the properties
@@ -204,7 +193,7 @@
 accomplished otherwise or to repair damaged databases during interactive
 session. They are available in `repository` scripts:
 
-* `sqlexec(sql, args=None, ask_confirm=True)`, executes an arbitrary SQL query
+* `sql(sql, args=None, ask_confirm=True)`, executes an arbitrary SQL query on the system source
 * `add_entity_type_table(etype, commit=True)`
 * `add_relation_type_table(rtype, commit=True)`
 * `uninline_relation(rtype, commit=True)`
--- a/doc/book/en/development/webstdlib/basetemplates.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/webstdlib/basetemplates.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -159,7 +159,7 @@
 .. _TheMainTemplate:
 
 TheMainTemplate is responsible for the general layout of the entire application.
-It defines the template of ``id = main`` that is used by the application.
+It defines the template of ``id = main`` that is used by the instance.
 
 The default main template (`cubicweb.web.views.basetemplates.TheMainTemplate`)
 builds the page based on the following pattern:
--- a/doc/book/en/development/webstdlib/startup.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/development/webstdlib/startup.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -9,5 +9,5 @@
     a result set to apply to.
 
 *schema*
-    A view dedicated to the display of the schema of the application
+    A view dedicated to the display of the schema of the instance
 
--- a/doc/book/en/intro/concepts/index.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/intro/concepts/index.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -67,8 +67,9 @@
 directory is looked up, as well as the paths in :envvar:`CW_INSTANCES_DIR`
 environment variable.
 
-The term application can refer to an instance or to a cube, depending on the
-context. This book will try to avoid using this term and use *cube* and
+The term application is used to refer at "something that should do something as a
+whole", eg more like a project and so can refer to an instance or to a cube,
+depending on the context. This book will try to use *application*, *cube* and
 *instance* as appropriate.
 
 Data Repository
@@ -166,7 +167,7 @@
 At startup, the `registry` or registers base, inspects a number of directories
 looking for compatible classes definition. After a recording process, the objects
 are assigned to registers so that they can be selected dynamically while the
-application is running.
+instance is running.
 
 Selectors
 ~~~~~~~~~
@@ -215,7 +216,7 @@
 
 **No need for a complicated ORM when you have a powerful query language**
 
-All the persistant data in a CubicWeb application is retrieved and modified by using the
+All the persistent data in a CubicWeb instance is retrieved and modified by using the
 Relation Query Language.
 
 This query language is inspired by SQL but is on a higher level in order to
--- a/doc/book/en/intro/tutorial/components.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/intro/tutorial/components.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -11,7 +11,7 @@
 A library of standard cubes are available from `CubicWeb Forge`_
 Cubes provide entities and views.
 
-The available application entities are:
+The available application entities in standard cubes are:
 
 * addressbook: PhoneNumber and PostalAddress
 
@@ -43,7 +43,7 @@
 Adding comments to BlogDemo
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-To import a cube in your application just change the line in the
+To import a cube in your instance just change the line in the
 ``__pkginfo__.py`` file and verify that the cube you are planning
 to use is listed by the command ``cubicweb-ctl list``.
 For example::
@@ -51,7 +51,7 @@
     __use__ = ('comment',)
 
 will make the ``Comment`` entity available in your ``BlogDemo``
-application.
+cube.
 
 Change the schema to add a relationship between ``BlogEntry`` and
 ``Comment`` and you are done. Since the comment cube defines the
@@ -75,5 +75,4 @@
 
   synchronize_rschema('BlogEntry')
 
-You can now start your application and add comments to each
-`BlogEntry`.
+You can now start your instance and add comments to each `BlogEntry`.
--- a/doc/book/en/intro/tutorial/create-cube.rst	Fri Jul 24 13:50:59 2009 +0200
+++ b/doc/book/en/intro/tutorial/create-cube.rst	Fri Jul 24 14:33:37 2009 +0200
@@ -60,33 +60,33 @@
 Create your instance
 --------------------
 
-To use this cube as an application and create a new instance named ``blogdemo``, do::
+To use this cube as an instance and create a new instance named ``blogdemo``, do::
 
   cubicweb-ctl create blog blogdemo
 
 
 This command will create the corresponding database and initialize it.
 
-Welcome to your web application
+Welcome to your web instance
 -------------------------------
 
-Start your application in debug mode with the following command: ::
+Start your instance in debug mode with the following command: ::
 
   cubicweb-ctl start -D blogdemo
 
 
-You can now access your web application to create blogs and post messages
+You can now access your web instance to create blogs and post messages
 by visiting the URL http://localhost:8080/.
 
-A login form will appear. By default, the application will not allow anonymous
-users to enter the application. To login, you need then use the admin account
+A login form will appear. By default, the instance will not allow anonymous
+users to enter the instance. To login, you need then use the admin account
 you created at the time you initialized the database with ``cubicweb-ctl
 create``.
 
 .. image:: ../../images/login-form.png
 
 
-Once authenticated, you can start playing with your application
+Once authenticated, you can start playing with your instance
 and create entities.
 
 .. image:: ../../images/blog-demo-first-page.png
@@ -251,7 +251,7 @@
             self.render_entity_relations(entity, siderelations)
 
 .. note::
-  When a view is modified, it is not required to restart the application
+  When a view is modified, it is not required to restart the instance
   server. Save the Python file and reload the page in your web browser
   to view the changes.
 
--- a/etwist/request.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/etwist/request.py	Fri Jul 24 14:33:37 2009 +0200
@@ -38,7 +38,7 @@
         self._headers = req.headers
 
     def base_url(self):
-        """return the root url of the application"""
+        """return the root url of the instance"""
         return self._base_url
 
     def http_method(self):
@@ -47,7 +47,7 @@
 
     def relative_path(self, includeparams=True):
         """return the normalized path of the request (ie at least relative
-        to the application's root, but some other normalization may be needed
+        to the instance's root, but some other normalization may be needed
         so that the returned path may be used to compare to generated urls
 
         :param includeparams:
--- a/etwist/server.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/etwist/server.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-"""twisted server for CubicWeb web applications
+"""twisted server for CubicWeb web instances
 
 :organization: Logilab
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
@@ -271,9 +271,9 @@
 
 # This part gets run when you run this file via: "twistd -noy demo.py"
 def main(appid, cfgname):
-    """Starts an cubicweb  twisted server for an application
+    """Starts an cubicweb  twisted server for an instance
 
-    appid: application's identifier
+    appid: instance's identifier
     cfgname: name of the configuration to use (twisted or all-in-one)
     """
     from cubicweb.cwconfig import CubicWebConfiguration
--- a/etwist/twconfig.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/etwist/twconfig.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,9 +1,9 @@
 """twisted server configurations:
 
-* the "twisted" configuration to get a web application running in a standalone
+* the "twisted" configuration to get a web instance running in a standalone
   twisted web server which talk to a repository server using Pyro
 
-* the "all-in-one" configuration to get a web application running in a twisted
+* the "all-in-one" configuration to get a web instance running in a twisted
   web server integrating a repository server in the same process (only available
   if the repository part of the software is installed
 
@@ -19,7 +19,7 @@
 from cubicweb.web.webconfig import WebConfiguration, merge_options, Method
 
 class TwistedConfiguration(WebConfiguration):
-    """web application (in a twisted web server) client of a RQL server"""
+    """web instance (in a twisted web server) client of a RQL server"""
     name = 'twisted'
 
     options = merge_options((
@@ -81,7 +81,7 @@
     from cubicweb.server.serverconfig import ServerConfiguration
 
     class AllInOneConfiguration(TwistedConfiguration, ServerConfiguration):
-        """repository and web application in the same twisted process"""
+        """repository and web instance in the same twisted process"""
         name = 'all-in-one'
         repo_method = 'inmemory'
         options = merge_options(TwistedConfiguration.options
--- a/etwist/twctl.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/etwist/twctl.py	Fri Jul 24 14:33:37 2009 +0200
@@ -64,8 +64,8 @@
     from cubicweb.server import serverctl
 
     class AllInOneCreateHandler(serverctl.RepositoryCreateHandler, TWCreateHandler):
-        """configuration to get a web application running in a twisted web
-        server integrating a repository server in the same process
+        """configuration to get an instance running in a twisted web server
+        integrating a repository server in the same process
         """
         cfgname = 'all-in-one'
 
--- a/goa/dbinit.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/dbinit.py	Fri Jul 24 14:33:37 2009 +0200
@@ -20,7 +20,7 @@
         try:
             group = Get(key)
         except datastore_errors.EntityNotFoundError:
-            raise Exception('can\'t find required group %s, is your application '
+            raise Exception('can\'t find required group %s, is your instance '
                             'correctly initialized (eg did you run the '
                             'initialization script) ?' % groupname)
         _GROUP_CACHE[groupname] = group
--- a/goa/dbmyams.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/dbmyams.py	Fri Jul 24 14:33:37 2009 +0200
@@ -167,7 +167,7 @@
     SCHEMAS_LIB_DIRECTORY = join(CW_SOFTWARE_ROOT, 'schemas')
 
 def load_schema(config, schemaclasses=None, extrahook=None):
-    """high level method to load all the schema for a lax application"""
+    """high level method to load all the schema for a lax instance"""
     # IMPORTANT NOTE: dbmodel schemas must be imported **BEFORE**
     # the loader is instantiated because this is where the dbmodels
     # are registered in the yams schema
--- a/goa/gaesource.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/gaesource.py	Fri Jul 24 14:33:37 2009 +0200
@@ -155,7 +155,7 @@
         return rqlst
 
     def set_schema(self, schema):
-        """set the application'schema"""
+        """set the instance'schema"""
         self.interpreter = RQLInterpreter(schema)
         self.schema = schema
         if 'CWUser' in schema and not self.repo.config['use-google-auth']:
--- a/goa/goaconfig.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/goaconfig.py	Fri Jul 24 14:33:37 2009 +0200
@@ -17,7 +17,7 @@
 from cubicweb.goa.dbmyams import load_schema
 
 UNSUPPORTED_OPTIONS = set(('connections-pool-size',
-                           'pyro-port', 'pyro-id', 'pyro-application-id',
+                           'pyro-port', 'pyro-id', 'pyro-instance-id',
                            'pyro-ns-host', 'pyro-ns-port', 'pyro-ns-group',
                            'https-url', 'host', 'pid-file', 'uid', 'base-url', 'log-file',
                            'smtp-host', 'smtp-port',
@@ -30,41 +30,41 @@
 # * check auth-mode=http + fix doc (eg require use-google-auth = False)
 
 class GAEConfiguration(ServerConfiguration, WebConfiguration):
-    """repository and web application in the same twisted process"""
+    """repository and web instance in Google AppEngine environment"""
     name = 'app'
     repo_method = 'inmemory'
     options = merge_options((
         ('included-cubes',
          {'type' : 'csv',
           'default': [],
-          'help': 'list of db model based cubes used by the application.',
+          'help': 'list of db model based cubes used by the instance.',
           'group': 'main', 'inputlevel': 1,
           }),
         ('included-yams-cubes',
          {'type' : 'csv',
           'default': [],
-          'help': 'list of yams based cubes used by the application.',
+          'help': 'list of yams based cubes used by the instance.',
           'group': 'main', 'inputlevel': 1,
           }),
         ('use-google-auth',
          {'type' : 'yn',
           'default': True,
-          'help': 'does this application rely on google authentication service or not.',
+          'help': 'does this instance rely on google authentication service or not.',
           'group': 'main', 'inputlevel': 1,
           }),
         ('schema-type',
          {'type' : 'choice', 'choices': ('yams', 'dbmodel'),
           'default': 'yams',
-          'help': 'does this application is defining its schema using yams or db model.',
+          'help': 'does this instance is defining its schema using yams or db model.',
           'group': 'main', 'inputlevel': 1,
           }),
         # overriden options
         ('query-log-file',
          {'type' : 'string',
           'default': None,
-          'help': 'web application query log file: DON\'T SET A VALUE HERE WHEN '
-          'UPLOADING YOUR APPLICATION. This should only be used to analyse '
-          'queries issued by your application in the development environment.',
+          'help': 'web instance query log file: DON\'T SET A VALUE HERE WHEN '
+          'UPLOADING YOUR INSTANCE. This should only be used to analyse '
+          'queries issued by your instance in the development environment.',
           'group': 'main', 'inputlevel': 2,
           }),
         ('anonymous-user',
@@ -86,7 +86,7 @@
     cube_vobject_path = WebConfiguration.cube_vobject_path | ServerConfiguration.cube_vobject_path
 
     # use file system schema
-    bootstrap_schema = read_application_schema = False
+    bootstrap_schema = read_instance_schema = False
     # schema is not persistent, don't load schema hooks (unavailable)
     schema_hooks = False
     # no user workflow for now
@@ -130,7 +130,7 @@
         return self._cubes
 
     def vc_config(self):
-        """return CubicWeb's engine and application's cube versions number"""
+        """return CubicWeb's engine and instance's cube versions number"""
         return {}
 
     # overriden from cubicweb web configuration
--- a/goa/goactl.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/goactl.py	Fri Jul 24 14:33:37 2009 +0200
@@ -172,13 +172,13 @@
 
 
 class NewGoogleAppCommand(Command):
-    """Create a new google appengine application.
+    """Create a new google appengine instance.
 
-    <application directory>
-      the path to the appengine application directory
+    <instance directory>
+      the path to the appengine instance directory
     """
     name = 'newgapp'
-    arguments = '<application directory>'
+    arguments = '<instance directory>'
 
     def run(self, args):
         if len(args) != 1:
@@ -187,7 +187,7 @@
         appldir = normpath(abspath(appldir))
         appid = basename(appldir)
         context = {'appname': appid}
-        # goa application'skeleton
+        # goa instance'skeleton
         copy_skeleton(join(CW_SOFTWARE_ROOT, 'goa', 'skel'),
                       appldir, context, askconfirm=True)
         # cubicweb core dependancies
--- a/goa/goavreg.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/goavreg.py	Fri Jul 24 14:33:37 2009 +0200
@@ -37,7 +37,7 @@
                             'cubicweb.goa.appobjects')
         for cube in reversed(self.config.cubes()):
             self.load_cube(cube)
-        self.load_application(applroot)
+        self.load_instance(applroot)
 
     def load_directory(self, directory, cube, skip=()):
         for filename in listdir(directory):
@@ -49,7 +49,7 @@
                         cube in self.config['included-cubes'],
                         cube)
 
-    def load_application(self, applroot):
+    def load_instance(self, applroot):
         self._auto_load(applroot, self.config['schema-type'] == 'dbmodel')
 
     def _import(self, modname):
--- a/goa/overrides/toolsutils.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/overrides/toolsutils.py	Fri Jul 24 14:33:37 2009 +0200
@@ -17,7 +17,7 @@
     return result
 
 def read_config(config_file):
-    """read the application configuration from a file and return it as a
+    """read the instance configuration from a file and return it as a
     dictionnary
 
     :type config_file: str
--- a/goa/skel/loader.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/skel/loader.py	Fri Jul 24 14:33:37 2009 +0200
@@ -12,11 +12,11 @@
     from cubicweb.goa.goaconfig import GAEConfiguration
     from cubicweb.goa.dbinit import create_user, create_groups
 
-    # compute application's root directory
+    # compute instance's root directory
     APPLROOT = dirname(abspath(__file__))
     # apply monkey patches first
     goa.do_monkey_patch()
-    # get application's configuration (will be loaded from app.conf file)
+    # get instance's configuration (will be loaded from app.conf file)
     GAEConfiguration.ext_resources['JAVASCRIPTS'].append('DATADIR/goa.js')
     config = GAEConfiguration('toto', APPLROOT)
     # create default groups
--- a/goa/skel/main.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/skel/main.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-"""module defining the root handler for a lax application. You should not have
+"""module defining the root handler for a lax instance. You should not have
 to change anything here.
 
 :organization: Logilab
@@ -8,7 +8,7 @@
 """
 __docformat__ = "restructuredtext en"
 
-# compute application's root directory
+# compute instance's root directory
 from os.path import dirname, abspath
 APPLROOT = dirname(abspath(__file__))
 
@@ -16,7 +16,7 @@
 from cubicweb import goa
 goa.do_monkey_patch()
 
-# get application's configuration (will be loaded from app.conf file)
+# get instance's configuration (will be loaded from app.conf file)
 from cubicweb.goa.goaconfig import GAEConfiguration
 GAEConfiguration.ext_resources['JAVASCRIPTS'].append('DATADIR/goa.js')
 config = GAEConfiguration('toto', APPLROOT)
@@ -29,13 +29,13 @@
 # before schema loading
 import custom
 
-# load application'schema
+# load instance'schema
 vreg.schema = config.load_schema()
 
 # load dynamic objects
 vreg.load(APPLROOT)
 
-# call the postinit so custom get a chance to do application specific stuff
+# call the postinit so custom get a chance to do instance specific stuff
 custom.postinit(vreg)
 
 from cubicweb.wsgi.handler import CubicWebWSGIApplication
--- a/goa/tools/laxctl.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/goa/tools/laxctl.py	Fri Jul 24 14:33:37 2009 +0200
@@ -69,7 +69,7 @@
 
 
 class PopulateDataDirCommand(LaxCommand):
-    """populate application's data directory according to used cubes"""
+    """populate instance's data directory according to used cubes"""
     name = 'populatedata'
 
     def _run(self, args):
@@ -118,7 +118,7 @@
 
 
 class URLCommand(LaxCommand):
-    """abstract class for commands doing stuff by accessing the web application
+    """abstract class for commands doing stuff by accessing the web instance
     """
     min_args = max_args = 1
     arguments = '<site url>'
--- a/hercule.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/hercule.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-"""RQL client for cubicweb, connecting to application using pyro
+"""RQL client for cubicweb, connecting to instance using pyro
 
 :organization: Logilab
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
@@ -79,7 +79,7 @@
         'debug' :        "Others",
         })
 
-    def __init__(self, application=None, user=None, password=None,
+    def __init__(self, instance=None, user=None, password=None,
                  host=None, debug=0):
         CLIHelper.__init__(self, os.path.join(os.environ["HOME"], ".erqlhist"))
         self.cnx = None
@@ -92,12 +92,12 @@
         self.autocommit = False
         self._last_result = None
         self._previous_lines = []
-        if application is not None:
-            self.do_connect(application, user, password, host)
+        if instance is not None:
+            self.do_connect(instance, user, password, host)
         self.do_debug(debug)
 
-    def do_connect(self, application, user=None, password=None, host=None):
-        """connect to an cubicweb application"""
+    def do_connect(self, instance, user=None, password=None, host=None):
+        """connect to an cubicweb instance"""
         from cubicweb.dbapi import connect
         if user is None:
             user = raw_input('login: ')
@@ -107,16 +107,16 @@
         if self.cnx is not None:
             self.cnx.close()
         self.cnx = connect(login=user, password=password, host=host,
-                           database=application)
+                           database=instance)
         self.schema = self.cnx.get_schema()
         self.cursor = self.cnx.cursor()
         # add entities types to the completion commands
         self._completer.list = (self.commands.keys() +
                                 self.schema.entities() + ['Any'])
-        print _('You are now connected to %s') % application
+        print _('You are now connected to %s') % instance
 
 
-    help_do_connect = ('connect', "connect <application> [<user> [<password> [<host>]]]",
+    help_do_connect = ('connect', "connect <instance> [<user> [<password> [<host>]]]",
                        _(do_connect.__doc__))
 
     def do_debug(self, debug=1):
@@ -142,9 +142,9 @@
     help_do_description = ('description', "description", _(do_description.__doc__))
 
     def do_schema(self, name=None):
-        """display information about the application schema """
+        """display information about the instance schema """
         if self.cnx is None:
-            print _('You are not connected to an application !')
+            print _('You are not connected to an instance !')
             return
         done = None
         if name is None:
@@ -189,7 +189,7 @@
         else, stores the query line and waits for the suite
         """
         if self.cnx is None:
-            print _('You are not connected to an application !')
+            print _('You are not connected to an instance !')
             return
         # append line to buffer
         self._previous_lines.append(stripped_line)
@@ -232,11 +232,11 @@
 class CubicWebClientCommand(Command):
     """A command line querier for CubicWeb, using the Relation Query Language.
 
-    <application>
-      identifier of the application to connect to
+    <instance>
+      identifier of the instance to connect to
     """
     name = 'client'
-    arguments = '<application>'
+    arguments = '<instance>'
     options = CONNECT_OPTIONS + (
         ("verbose",
          {'short': 'v', 'type' : 'int', 'metavar': '<level>',
--- a/schema.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/schema.py	Fri Jul 24 14:33:37 2009 +0200
@@ -401,7 +401,7 @@
 
 
     :type name: str
-    :ivar name: name of the schema, usually the application identifier
+    :ivar name: name of the schema, usually the instance identifier
 
     :type base: str
     :ivar base: path of the directory where the schema is defined
@@ -856,7 +856,7 @@
 
 class CubicWebSchemaLoader(BootstrapSchemaLoader):
     """cubicweb specific schema loader, automatically adding metadata to the
-    application's schema
+    instance's schema
     """
 
     def load(self, config, **kwargs):
--- a/schemas/bootstrap.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/schemas/bootstrap.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-"""core CubicWeb schema necessary for bootstrapping the actual application's schema
+"""core CubicWeb schema necessary for bootstrapping the actual instance's schema
 
 :organization: Logilab
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
@@ -16,7 +16,7 @@
 # not restricted since as "is" is handled as other relations, guests need
 # access to this
 class CWEType(EntityType):
-    """define an entity type, used to build the application schema"""
+    """define an entity type, used to build the instance schema"""
     permissions = META_ETYPE_PERMS
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
@@ -27,7 +27,7 @@
 
 
 class CWRType(EntityType):
-    """define a relation type, used to build the application schema"""
+    """define a relation type, used to build the instance schema"""
     permissions = META_ETYPE_PERMS
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
@@ -46,7 +46,7 @@
     """define a final relation: link a final relation type from a non final
     entity to a final entity type.
 
-    used to build the application schema
+    used to build the instance schema
     """
     permissions = META_ETYPE_PERMS
     relation_type = SubjectRelation('CWRType', cardinality='1*',
@@ -83,7 +83,7 @@
     """define a non final relation: link a non final relation type from a non
     final entity to a non final entity type.
 
-    used to build the application schema
+    used to build the instance schema
     """
     permissions = META_ETYPE_PERMS
     relation_type = SubjectRelation('CWRType', cardinality='1*',
--- a/server/__init__.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/__init__.py	Fri Jul 24 14:33:37 2009 +0200
@@ -31,9 +31,9 @@
     from cubicweb.server.sqlutils import sqlexec, sqlschema, sqldropschema
     # configuration to avoid db schema loading and user'state checking
     # on connection
-    read_application_schema = config.read_application_schema
+    read_instance_schema = config.read_instance_schema
     bootstrap_schema = config.bootstrap_schema
-    config.read_application_schema = False
+    config.read_instance_schema = False
     config.creating = True
     config.bootstrap_schema = True
     config.consider_user_state = False
@@ -137,11 +137,11 @@
     session.close()
     # restore initial configuration
     config.creating = False
-    config.read_application_schema = read_application_schema
+    config.read_instance_schema = read_instance_schema
     config.bootstrap_schema = bootstrap_schema
     config.consider_user_state = True
     config.set_language = True
-    print '-> database for application %s initialized.' % config.appid
+    print '-> database for instance %s initialized.' % config.appid
 
 
 def initialize_schema(config, schema, mhandler, event='create'):
@@ -153,7 +153,7 @@
     # execute cubes pre<event> script if any
     for path in reversed(paths):
         mhandler.exec_event_script('pre%s' % event, path)
-    # enter application'schema into the database
+    # enter instance'schema into the database
     serialize_schema(mhandler.rqlcursor, schema)
     # execute cubicweb's post<event> script
     mhandler.exec_event_script('post%s' % event)
--- a/server/checkintegrity.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/checkintegrity.py	Fri Jul 24 14:33:37 2009 +0200
@@ -282,7 +282,7 @@
 
 
 def check(repo, cnx, checks, reindex, fix):
-    """check integrity of application's repository,
+    """check integrity of instance's repository,
     using given user and password to locally connect to the repository
     (no running cubicweb server needed)
     """
--- a/server/migractions.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/migractions.py	Fri Jul 24 14:33:37 2009 +0200
@@ -477,7 +477,7 @@
     def cmd_add_cubes(self, cubes, update_database=True):
         """update_database is telling if the database schema should be updated
         or if only the relevant eproperty should be inserted (for the case where
-        a cube has been extracted from an existing application, so the
+        a cube has been extracted from an existing instance, so the
         cube schema is already in there)
         """
         newcubes = super(ServerMigrationHelper, self).cmd_add_cubes(cubes)
@@ -642,7 +642,7 @@
                 rtypeadded = rschema.type in applschema
                 for targetschema in rschema.objects(etype):
                     # ignore relations where the targeted type is not in the
-                    # current application schema
+                    # current instance schema
                     targettype = targetschema.type
                     if not targettype in applschema and targettype != etype:
                         continue
@@ -662,7 +662,7 @@
                 rtypeadded = rschema.type in applschema or rschema.type in added
                 for targetschema in rschema.subjects(etype):
                     # ignore relations where the targeted type is not in the
-                    # current application schema
+                    # current instance schema
                     targettype = targetschema.type
                     # don't check targettype != etype since in this case the
                     # relation has already been added as a subject relation
--- a/server/querier.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/querier.py	Fri Jul 24 14:33:37 2009 +0200
@@ -519,7 +519,7 @@
     def __init__(self, repo, schema):
         # system info helper
         self._repo = repo
-        # application schema
+        # instance schema
         self.set_schema(schema)
 
     def set_schema(self, schema):
--- a/server/repository.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/repository.py	Fri Jul 24 14:33:37 2009 +0200
@@ -5,7 +5,7 @@
 repository mainly:
 
 * brings these classes all together to provide a single access
-  point to a cubicweb application.
+  point to a cubicweb instance.
 * handles session management
 * provides method for pyro registration, to call if pyro is enabled
 
@@ -179,12 +179,12 @@
         # open some connections pools
         self._available_pools = Queue.Queue()
         self._available_pools.put_nowait(ConnectionsPool(self.sources))
-        if config.read_application_schema:
-            # normal start: load the application schema from the database
+        if config.read_instance_schema:
+            # normal start: load the instance schema from the database
             self.fill_schema()
         elif config.bootstrap_schema:
             # usually during repository creation
-            self.warning("set fs application'schema as bootstrap schema")
+            self.warning("set fs instance'schema as bootstrap schema")
             config.bootstrap_cubes()
             self.set_bootstrap_schema(self.config.load_schema())
             # need to load the Any and CWUser entity types
@@ -197,7 +197,7 @@
                                 'cubicweb.entities.authobjs')
         else:
             # test start: use the file system schema (quicker)
-            self.warning("set fs application'schema")
+            self.warning("set fs instance'schema")
             config.bootstrap_cubes()
             self.set_schema(self.config.load_schema())
         if not config.creating:
@@ -247,9 +247,9 @@
             self.vreg.set_schema(schema)
         self.hm.set_schema(schema)
         self.hm.register_system_hooks(self.config)
-        # application specific hooks
-        if self.config.application_hooks:
-            self.info('loading application hooks')
+        # instance specific hooks
+        if self.config.instance_hooks:
+            self.info('loading instance hooks')
             self.hm.register_hooks(self.config.load_hooks(self.vreg))
 
     def fill_schema(self):
@@ -297,13 +297,13 @@
         config.usergroup_hooks = False
         config.schema_hooks = False
         config.notification_hooks = False
-        config.application_hooks = False
+        config.instance_hooks = False
         self.set_schema(schema, resetvreg=False)
         config.core_hooks = True
         config.usergroup_hooks = True
         config.schema_hooks = True
         config.notification_hooks = True
-        config.application_hooks = True
+        config.instance_hooks = True
 
     def start_looping_tasks(self):
         assert isinstance(self._looping_tasks, list), 'already started'
@@ -441,7 +441,7 @@
     # public (dbapi) interface ################################################
 
     def get_schema(self):
-        """return the application schema. This is a public method, not
+        """return the instance schema. This is a public method, not
         requiring a session id
         """
         try:
@@ -452,7 +452,7 @@
             self.schema.__hashmode__ = None
 
     def get_cubes(self):
-        """return the list of cubes used by this application. This is a
+        """return the list of cubes used by this instance. This is a
         public method, not requiring a session id.
         """
         versions = self.get_versions(not (self.config.creating
@@ -463,7 +463,7 @@
 
     @cached
     def get_versions(self, checkversions=False):
-        """return the a dictionary containing cubes used by this application
+        """return the a dictionary containing cubes used by this instance
         as key with their version as value, including cubicweb version. This is a
         public method, not requiring a session id.
         """
@@ -486,7 +486,7 @@
                     else:
                         fsversion = self.config.cubicweb_version()
                     if version < fsversion:
-                        msg = ('application has %s version %s but %s '
+                        msg = ('instance has %s version %s but %s '
                                'is installed. Run "cubicweb-ctl upgrade".')
                         raise ExecutionError(msg % (cube, version, fsversion))
         finally:
--- a/server/schemahooks.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/schemahooks.py	Fri Jul 24 14:33:37 2009 +0200
@@ -105,7 +105,7 @@
 
 
 class DropTableOp(PreCommitOperation):
-    """actually remove a database from the application's schema"""
+    """actually remove a database from the instance's schema"""
     table = None # make pylint happy
     def precommit_event(self):
         dropped = self.session.transaction_data.setdefault('droppedtables',
@@ -137,7 +137,7 @@
 # deletion ####################################################################
 
 class DeleteCWETypeOp(SchemaOperation):
-    """actually remove the entity type from the application's schema"""
+    """actually remove the entity type from the instance's schema"""
     def commit_event(self):
         try:
             # del_entity_type also removes entity's relations
@@ -166,7 +166,7 @@
 
 
 class DeleteCWRTypeOp(SchemaOperation):
-    """actually remove the relation type from the application's schema"""
+    """actually remove the relation type from the instance's schema"""
     def commit_event(self):
         try:
             self.schema.del_relation_type(self.kobj)
@@ -190,7 +190,7 @@
 
 
 class DeleteRelationDefOp(SchemaOperation):
-    """actually remove the relation definition from the application's schema"""
+    """actually remove the relation definition from the instance's schema"""
     def commit_event(self):
         subjtype, rtype, objtype = self.kobj
         try:
@@ -244,7 +244,7 @@
 # addition ####################################################################
 
 class AddCWETypeOp(EarlySchemaOperation):
-    """actually add the entity type to the application's schema"""
+    """actually add the entity type to the instance's schema"""
     eid = None # make pylint happy
     def commit_event(self):
         self.schema.add_entity_type(self.kobj)
@@ -264,7 +264,7 @@
     * set creation_date and modification_date by creating the necessary
       CWAttribute entities
     * add owned_by relation by creating the necessary CWRelation entity
-    * register an operation to add the entity type to the application's
+    * register an operation to add the entity type to the instance's
       schema on commit
     """
     if entity.get('final'):
@@ -306,7 +306,7 @@
 
 
 class AddCWRTypeOp(EarlySchemaOperation):
-    """actually add the relation type to the application's schema"""
+    """actually add the relation type to the instance's schema"""
     eid = None # make pylint happy
     def commit_event(self):
         rschema = self.schema.add_relation_type(self.kobj)
@@ -315,7 +315,7 @@
 def before_add_ertype(session, entity):
     """before adding a CWRType entity:
     * check that we are not using an existing relation type,
-    * register an operation to add the relation type to the application's
+    * register an operation to add the relation type to the instance's
       schema on commit
 
     We don't know yeat this point if a table is necessary
@@ -326,7 +326,7 @@
 
 def after_add_ertype(session, entity):
     """after a CWRType entity has been added:
-    * register an operation to add the relation type to the application's
+    * register an operation to add the relation type to the instance's
       schema on commit
     We don't know yeat this point if a table is necessary
     """
@@ -340,7 +340,7 @@
 
 
 class AddErdefOp(EarlySchemaOperation):
-    """actually add the attribute relation definition to the application's
+    """actually add the attribute relation definition to the instance's
     schema
     """
     def commit_event(self):
@@ -363,7 +363,7 @@
     * add the necessary column
     * set default on this column if any and possible
     * register an operation to add the relation definition to the
-      application's schema on commit
+      instance's schema on commit
 
     constraints are handled by specific hooks
     """
@@ -436,7 +436,7 @@
       else if it's the first instance of this relation type, add the
       necessary table and set default permissions
     * register an operation to add the relation definition to the
-      application's schema on commit
+      instance's schema on commit
 
     constraints are handled by specific hooks
     """
--- a/server/serverconfig.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/serverconfig.py	Fri Jul 24 14:33:37 2009 +0200
@@ -171,7 +171,7 @@
           'help': 'Pyro server port. If not set, it will be choosen randomly',
           'group': 'pyro-server', 'inputlevel': 2,
           }),
-        ('pyro-id', # XXX reuse pyro-application-id
+        ('pyro-id', # XXX reuse pyro-instance-id
          {'type' : 'string',
           'default': None,
           'help': 'identifier of the repository in the pyro name server',
@@ -180,7 +180,7 @@
         ) + CubicWebConfiguration.options)
 
     # read the schema from the database
-    read_application_schema = True
+    read_instance_schema = True
     bootstrap_schema = True
 
     # check user's state at login time
@@ -193,7 +193,7 @@
     schema_hooks = True
     notification_hooks = True
     security_hooks = True
-    application_hooks = True
+    instance_hooks = True
 
     # should some hooks be deactivated during [pre|post]create script execution
     free_wheel = False
@@ -208,7 +208,7 @@
 
     @classmethod
     def schemas_lib_dir(cls):
-        """application schema directory"""
+        """instance schema directory"""
         return env_path('CW_SCHEMA_LIB', cls.SCHEMAS_LIB_DIR, 'schemas')
 
     @classmethod
@@ -269,23 +269,6 @@
 
     def load_hooks(self, vreg):
         hooks = {}
-        for path in reversed([self.apphome] + self.cubes_path()):
-            hooksfile = join(path, 'application_hooks.py')
-            if exists(hooksfile):
-                self.warning('application_hooks.py is deprecated, use dynamic '
-                             'objects to register hooks (%s)', hooksfile)
-                context = {}
-                # Use execfile rather than `load_module_from_name` because
-                # the latter gets fooled by the `sys.modules` cache when
-                # loading different configurations one after the other
-                # (another fix would have been to do :
-                #    sys.modules.pop('applications_hooks')
-                #  or to modify load_module_from_name so that it provides
-                #  a use_cache optional parameter
-                execfile(hooksfile, context, context)
-                for event, hooksdef in context['HOOKS'].items():
-                    for ertype, hookcbs in hooksdef.items():
-                        hooks.setdefault(event, {}).setdefault(ertype, []).extend(hookcbs)
         try:
             apphookdefs = vreg.registry_objects('hooks')
         except RegistryNotFound:
--- a/server/serverctl.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/serverctl.py	Fri Jul 24 14:33:37 2009 +0200
@@ -58,10 +58,10 @@
 
 def system_source_cnx(source, dbms_system_base=False,
                       special_privs='CREATE/DROP DATABASE', verbose=True):
-    """shortcut to get a connextion to the application system database
+    """shortcut to get a connextion to the instance system database
     defined in the given config. If <dbms_system_base> is True,
     connect to the dbms system database instead (for task such as
-    create/drop the application database)
+    create/drop the instance database)
     """
     if dbms_system_base:
         from logilab.common.adbh import get_adv_func_helper
@@ -119,7 +119,7 @@
     cfgname = 'repository'
 
     def bootstrap(self, cubes, inputlevel=0):
-        """create an application by copying files from the given cube and by
+        """create an instance by copying files from the given cube and by
         asking information necessary to build required configuration files
         """
         config = self.config
@@ -182,7 +182,7 @@
     cfgname = 'repository'
 
     def cleanup(self):
-        """remove application's configuration and database"""
+        """remove instance's configuration and database"""
         from logilab.common.adbh import get_adv_func_helper
         source = self.config.sources()['system']
         dbname = source['db-name']
@@ -231,19 +231,19 @@
 
 
 # repository specific commands ################################################
-class CreateApplicationDBCommand(Command):
-    """Create the system database of an application (run after 'create').
+class CreateInstanceDBCommand(Command):
+    """Create the system database of an instance (run after 'create').
 
     You will be prompted for a login / password to use to connect to
     the system database.  The given user should have almost all rights
     on the database (ie a super user on the dbms allowed to create
     database, users, languages...).
 
-    <application>
-      the identifier of the application to initialize.
+    <instance>
+      the identifier of the instance to initialize.
     """
     name = 'db-create'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = (
         ("create-db",
@@ -262,7 +262,7 @@
         from logilab.common.adbh import get_adv_func_helper
         from indexer import get_indexer
         verbose = self.get('verbose')
-        appid = pop_arg(args, msg="No application specified !")
+        appid = pop_arg(args, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         create_db = self.config.create_db
         source = config.sources()['system']
@@ -308,7 +308,7 @@
                 helper.create_language(cursor, extlang)
         cursor.close()
         cnx.commit()
-        print '-> database for application %s created and necessary extensions installed.' % appid
+        print '-> database for instance %s created and necessary extensions installed.' % appid
         print
         if confirm('Do you want to run db-init to initialize the "system database" ?'):
             cmd_run('db-init', config.appid)
@@ -317,18 +317,18 @@
                    '"cubicweb-ctl db-init %s".' % self.config.appid)
 
 
-class InitApplicationCommand(Command):
-    """Initialize the system database of an application (run after 'db-create').
+class InitInstanceCommand(Command):
+    """Initialize the system database of an instance (run after 'db-create').
 
     You will be prompted for a login / password to use to connect to
     the system database.  The given user should have the create tables,
     and grant permissions.
 
-    <application>
-      the identifier of the application to initialize.
+    <instance>
+      the identifier of the instance to initialize.
     """
     name = 'db-init'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = (
         ("drop",
@@ -341,21 +341,21 @@
     def run(self, args):
         print '\n'+underline_title('Initializing the "system database"')
         from cubicweb.server import init_repository
-        appid = pop_arg(args, msg="No application specified !")
+        appid = pop_arg(args, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         init_repository(config, drop=self.config.drop)
 
 
-class GrantUserOnApplicationCommand(Command):
+class GrantUserOnInstanceCommand(Command):
     """Grant a database user on a repository system database.
 
-    <application>
-      the identifier of the application
+    <instance>
+      the identifier of the instance
     <user>
       the database's user requiring grant access
     """
     name = 'db-grant-user'
-    arguments = '<application> <user>'
+    arguments = '<instance> <user>'
 
     options = (
         ("set-owner",
@@ -367,7 +367,7 @@
     def run(self, args):
         """run the command with its specific arguments"""
         from cubicweb.server.sqlutils import sqlexec, sqlgrants
-        appid = pop_arg(args, 1, msg="No application specified !")
+        appid = pop_arg(args, 1, msg="No instance specified !")
         user = pop_arg(args, msg="No user specified !")
         config = ServerConfiguration.config_for(appid)
         source = config.sources()['system']
@@ -385,22 +385,22 @@
             print '-> an error occured:', ex
         else:
             cnx.commit()
-            print '-> rights granted to %s on application %s.' % (appid, user)
+            print '-> rights granted to %s on instance %s.' % (appid, user)
 
 class ResetAdminPasswordCommand(Command):
     """Reset the administrator password.
 
-    <application>
-      the identifier of the application
+    <instance>
+      the identifier of the instance
     """
     name = 'reset-admin-pwd'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     def run(self, args):
         """run the command with its specific arguments"""
         from cubicweb.server.sqlutils import sqlexec, SQL_PREFIX
         from cubicweb.server.utils import crypt_password, manager_userpasswd
-        appid = pop_arg(args, 1, msg="No application specified !")
+        appid = pop_arg(args, 1, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         sourcescfg = config.read_sources_file()
         try:
@@ -433,15 +433,15 @@
 
 
 class StartRepositoryCommand(Command):
-    """Start an CubicWeb RQL server for a given application.
+    """Start an CubicWeb RQL server for a given instance.
 
     The server will be accessible through pyro
 
-    <application>
-      the identifier of the application to initialize.
+    <instance>
+      the identifier of the instance to initialize.
     """
     name = 'start-repository'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = (
         ("debug",
@@ -451,7 +451,7 @@
 
     def run(self, args):
         from cubicweb.server.server import RepositoryServer
-        appid = pop_arg(args, msg="No application specified !")
+        appid = pop_arg(args, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         debug = self.config.debug
         # create the server
@@ -514,7 +514,7 @@
         return
     # version of installed software
     eversion = dbversions['cubicweb']
-    status = application_status(config, eversion, dbversions)
+    status = instance_status(config, eversion, dbversions)
     # * database version > installed software
     if status == 'needsoftupgrade':
         print "database is using some earlier version than installed software!"
@@ -532,7 +532,7 @@
     #   ok!
 
 
-def application_status(config, cubicwebapplversion, vcconf):
+def instance_status(config, cubicwebapplversion, vcconf):
     cubicwebversion = config.cubicweb_version()
     if cubicwebapplversion > cubicwebversion:
         return 'needsoftupgrade'
@@ -559,14 +559,14 @@
 
 
 class DBDumpCommand(Command):
-    """Backup the system database of an application.
+    """Backup the system database of an instance.
 
-    <application>
-      the identifier of the application to backup
+    <instance>
+      the identifier of the instance to backup
       format [[user@]host:]appname
     """
     name = 'db-dump'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = (
         ("output",
@@ -582,7 +582,7 @@
         )
 
     def run(self, args):
-        appid = pop_arg(args, 1, msg="No application specified !")
+        appid = pop_arg(args, 1, msg="No instance specified !")
         if ':' in appid:
             host, appid = appid.split(':')
             _remote_dump(host, appid, self.config.output, self.config.sudo)
@@ -591,13 +591,13 @@
 
 
 class DBRestoreCommand(Command):
-    """Restore the system database of an application.
+    """Restore the system database of an instance.
 
-    <application>
-      the identifier of the application to restore
+    <instance>
+      the identifier of the instance to restore
     """
     name = 'db-restore'
-    arguments = '<application> <backupfile>'
+    arguments = '<instance> <backupfile>'
 
     options = (
         ("no-drop",
@@ -609,23 +609,23 @@
         )
 
     def run(self, args):
-        appid = pop_arg(args, 1, msg="No application specified !")
+        appid = pop_arg(args, 1, msg="No instance specified !")
         backupfile = pop_arg(args, msg="No backup file specified !")
         _local_restore(appid, backupfile, not self.config.no_drop)
 
 
 class DBCopyCommand(Command):
-    """Copy the system database of an application (backup and restore).
+    """Copy the system database of an instance (backup and restore).
 
-    <src-application>
-      the identifier of the application to backup
+    <src-instance>
+      the identifier of the instance to backup
       format [[user@]host:]appname
 
-    <dest-application>
-      the identifier of the application to restore
+    <dest-instance>
+      the identifier of the instance to restore
     """
     name = 'db-copy'
-    arguments = '<src-application> <dest-application>'
+    arguments = '<src-instance> <dest-instance>'
 
     options = (
         ("no-drop",
@@ -648,8 +648,8 @@
 
     def run(self, args):
         import tempfile
-        srcappid = pop_arg(args, 1, msg="No source application specified !")
-        destappid = pop_arg(args, msg="No destination application specified !")
+        srcappid = pop_arg(args, 1, msg="No source instance specified !")
+        destappid = pop_arg(args, msg="No destination instance specified !")
         _, output = tempfile.mkstemp()
         if ':' in srcappid:
             host, srcappid = srcappid.split(':')
@@ -664,13 +664,13 @@
 
 
 class CheckRepositoryCommand(Command):
-    """Check integrity of the system database of an application.
+    """Check integrity of the system database of an instance.
 
-    <application>
-      the identifier of the application to check
+    <instance>
+      the identifier of the instance to check
     """
     name = 'db-check'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = (
         ("checks",
@@ -702,7 +702,7 @@
 
     def run(self, args):
         from cubicweb.server.checkintegrity import check
-        appid = pop_arg(args, 1, msg="No application specified !")
+        appid = pop_arg(args, 1, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         config.repairing = self.config.force
         repo, cnx = repo_cnx(config)
@@ -711,19 +711,19 @@
 
 
 class RebuildFTICommand(Command):
-    """Rebuild the full-text index of the system database of an application.
+    """Rebuild the full-text index of the system database of an instance.
 
-    <application>
-      the identifier of the application to rebuild
+    <instance>
+      the identifier of the instance to rebuild
     """
     name = 'db-rebuild-fti'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     options = ()
 
     def run(self, args):
         from cubicweb.server.checkintegrity import reindex_entities
-        appid = pop_arg(args, 1, msg="No application specified !")
+        appid = pop_arg(args, 1, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         repo, cnx = repo_cnx(config)
         session = repo._get_session(cnx.sessionid, setpool=True)
@@ -731,28 +731,28 @@
         cnx.commit()
 
 
-class SynchronizeApplicationSchemaCommand(Command):
+class SynchronizeInstanceSchemaCommand(Command):
     """Synchronize persistent schema with cube schema.
 
     Will synchronize common stuff between the cube schema and the
     actual persistent schema, but will not add/remove any entity or relation.
 
-    <application>
-      the identifier of the application to synchronize.
+    <instance>
+      the identifier of the instance to synchronize.
     """
     name = 'schema-sync'
-    arguments = '<application>'
+    arguments = '<instance>'
 
     def run(self, args):
-        appid = pop_arg(args, msg="No application specified !")
+        appid = pop_arg(args, msg="No instance specified !")
         config = ServerConfiguration.config_for(appid)
         mih = config.migration_handler()
         mih.cmd_synchronize_schema()
 
 
-register_commands( (CreateApplicationDBCommand,
-                    InitApplicationCommand,
-                    GrantUserOnApplicationCommand,
+register_commands( (CreateInstanceDBCommand,
+                    InitInstanceCommand,
+                    GrantUserOnInstanceCommand,
                     ResetAdminPasswordCommand,
                     StartRepositoryCommand,
                     DBDumpCommand,
@@ -760,5 +760,5 @@
                     DBCopyCommand,
                     CheckRepositoryCommand,
                     RebuildFTICommand,
-                    SynchronizeApplicationSchemaCommand,
+                    SynchronizeInstanceSchemaCommand,
                     ) )
--- a/server/sources/__init__.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/sources/__init__.py	Fri Jul 24 14:33:37 2009 +0200
@@ -53,7 +53,7 @@
     uri = None
     # a reference to the system information helper
     repo = None
-    # a reference to the application'schema (may differs from the source'schema)
+    # a reference to the instance'schema (may differs from the source'schema)
     schema = None
 
     def __init__(self, repo, appschema, source_config, *args, **kwargs):
@@ -95,7 +95,7 @@
         return cmp(self.uri, other.uri)
 
     def set_schema(self, schema):
-        """set the application'schema"""
+        """set the instance'schema"""
         self.schema = schema
 
     def support_entity(self, etype, write=False):
--- a/server/sources/native.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/sources/native.py	Fri Jul 24 14:33:37 2009 +0200
@@ -225,7 +225,7 @@
         return rqlst
 
     def set_schema(self, schema):
-        """set the application'schema"""
+        """set the instance'schema"""
         self._cache = Cache(self.repo.config['rql-cache-size'])
         self.cache_hit, self.cache_miss, self.no_cache = 0, 0, 0
         self.schema = schema
--- a/server/test/unittest_schemaserial.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/test/unittest_schemaserial.py	Fri Jul 24 14:33:37 2009 +0200
@@ -24,7 +24,7 @@
         self.assertListEquals(list(eschema2rql(schema.eschema('CWAttribute'))),
                               [
             ('INSERT CWEType X: X description %(description)s,X final %(final)s,X name %(name)s',
-             {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the application schema',
+             {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the instance schema',
               'name': u'CWAttribute', 'final': False})
             ])
 
@@ -101,7 +101,7 @@
     def test_updateeschema2rql1(self):
         self.assertListEquals(list(updateeschema2rql(schema.eschema('CWAttribute'))),
                               [('SET X description %(description)s,X final %(final)s,X name %(name)s WHERE X is CWEType, X name %(et)s',
-                                {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the application schema', 'et': 'CWAttribute', 'final': False, 'name': u'CWAttribute'}),
+                                {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the instance schema', 'et': 'CWAttribute', 'final': False, 'name': u'CWAttribute'}),
                                ])
 
     def test_updateeschema2rql2(self):
--- a/toolsutils.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/toolsutils.py	Fri Jul 24 14:33:37 2009 +0200
@@ -140,7 +140,7 @@
     chmod(filepath, 0600)
 
 def read_config(config_file):
-    """read the application configuration from a file and return it as a
+    """read the instance configuration from a file and return it as a
     dictionnary
 
     :type config_file: str
--- a/vregistry.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/vregistry.py	Fri Jul 24 14:33:37 2009 +0200
@@ -356,7 +356,7 @@
                 sys.path.remove(webdir)
         if CW_SOFTWARE_ROOT in sys.path:
             sys.path.remove(CW_SOFTWARE_ROOT)
-        # load views from each directory in the application's path
+        # load views from each directory in the instance's path
         filemods = self.init_registration(path, extrapath)
         change = False
         for filepath, modname in filemods:
--- a/web/application.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/application.py	Fri Jul 24 14:33:37 2009 +0200
@@ -201,7 +201,7 @@
         raise Redirect(req.build_url(path, **args))
 
     def logout(self, req):
-        """logout from the application by cleaning the session and raising
+        """logout from the instance by cleaning the session and raising
         `AuthenticationError`
         """
         self.session_manager.close_session(req.cnx)
@@ -218,11 +218,11 @@
                  session_handler_fact=CookieSessionHandler,
                  vreg=None):
         super(CubicWebPublisher, self).__init__()
-        # connect to the repository and get application's schema
+        # connect to the repository and get instance's schema
         if vreg is None:
             vreg = cwvreg.CubicWebRegistry(config, debug=debug)
         self.vreg = vreg
-        self.info('starting web application from %s', config.apphome)
+        self.info('starting web instance from %s', config.apphome)
         self.repo = config.repository(vreg)
         if not vreg.initialized:
             self.config.init_cubes(self.repo.get_cubes())
--- a/web/request.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/request.py	Fri Jul 24 14:33:37 2009 +0200
@@ -515,7 +515,7 @@
         return self.base_url() + self.relative_path(includeparams)
 
     def _datadir_url(self):
-        """return url of the application's data directory"""
+        """return url of the instance's data directory"""
         return self.base_url() + 'data%s/' % self.vreg.config.instance_md5_version()
 
     def selected(self, url):
@@ -587,7 +587,7 @@
 
     def relative_path(self, includeparams=True):
         """return the normalized path of the request (ie at least relative
-        to the application's root, but some other normalization may be needed
+        to the instance's root, but some other normalization may be needed
         so that the returned path may be used to compare to generated urls
 
         :param includeparams:
--- a/web/views/basecomponents.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/basecomponents.py	Fri Jul 24 14:33:37 2009 +0200
@@ -57,7 +57,7 @@
 
 
 class ApplLogo(component.Component):
-    """build the application logo, usually displayed in the header"""
+    """build the instance logo, usually displayed in the header"""
     id = 'logo'
     property_defs = VISIBLE_PROP_DEF
     # don't want user to hide this component using an cwproperty
@@ -118,8 +118,8 @@
 
 
 class ApplicationMessage(component.Component):
-    """display application's messages given using the __message parameter
-    into a special div section
+    """display messages given using the __message parameter into a special div
+    section
     """
     __select__ = yes()
     id = 'applmessages'
@@ -138,7 +138,7 @@
 
 
 class ApplicationName(component.Component):
-    """display the application name"""
+    """display the instance name"""
     id = 'appliname'
     property_defs = VISIBLE_PROP_DEF
     # don't want user to hide this component using an cwproperty
--- a/web/views/basecontrollers.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/basecontrollers.py	Fri Jul 24 14:33:37 2009 +0200
@@ -78,7 +78,7 @@
     id = 'login'
 
     def publish(self, rset=None):
-        """log in the application"""
+        """log in the instance"""
         if self.config['auth-mode'] == 'http':
             # HTTP authentication
             raise ExplicitLogin()
@@ -91,7 +91,7 @@
     id = 'logout'
 
     def publish(self, rset=None):
-        """logout from the application"""
+        """logout from the instance"""
         return self.appli.session_handler.logout(self.req)
 
 
@@ -568,7 +568,8 @@
         self.smtp.sendmail(helo_addr, [recipient], msg.as_string())
 
     def publish(self, rset=None):
-        # XXX this allow anybody with access to an cubicweb application to use it as a mail relay
+        # XXX this allows users with access to an cubicweb instance to use it as
+        # a mail relay
         body = self.req.form['mailbody']
         subject = self.req.form['subject']
         for recipient in self.recipients():
--- a/web/views/bookmark.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/bookmark.py	Fri Jul 24 14:33:37 2009 +0200
@@ -85,7 +85,7 @@
         if eschema.has_perm(req, 'add') and rschema.has_perm(req, 'add', toeid=ueid):
             boxmenu = BoxMenu(req._('manage bookmarks'))
             linkto = 'bookmarked_by:%s:subject' % ueid
-            # use a relative path so that we can move the application without
+            # use a relative path so that we can move the instance without
             # loosing bookmarks
             path = req.relative_path()
             url = self.create_url(self.etype, __linkto=linkto, path=path)
--- a/web/views/cwproperties.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/cwproperties.py	Fri Jul 24 14:33:37 2009 +0200
@@ -64,6 +64,7 @@
 
 
 class SystemCWPropertiesForm(FormViewMixIn, StartupView):
+    """site-wide properties edition form"""
     id = 'systempropertiesform'
     __select__ = none_rset() & match_user_groups('managers')
 
@@ -94,7 +95,6 @@
         return status
 
     def call(self, **kwargs):
-        """The default view representing the application's index"""
         self.req.add_js(('cubicweb.edition.js', 'cubicweb.preferences.js', 'cubicweb.ajax.js'))
         self.req.add_css('cubicweb.preferences.css')
         vreg = self.vreg
@@ -226,6 +226,7 @@
 
 
 class CWPropertiesForm(SystemCWPropertiesForm):
+    """user's preferences properties edition form"""
     id = 'propertiesform'
     __select__ = (
         (none_rset() & match_user_groups('users','managers'))
--- a/web/views/magicsearch.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/magicsearch.py	Fri Jul 24 14:33:37 2009 +0200
@@ -42,7 +42,7 @@
     :param translations: the reverted l10n dict
 
     :type schema: `cubicweb.schema.Schema`
-    :param schema: the application's schema
+    :param schema: the instance's schema
     """
     # var_types is used as a map : var_name / var_type
     vartypes = {}
@@ -94,7 +94,7 @@
     :param ambiguous_nodes: a map : relation_node / (var_name, available_translations)
 
     :type schema: `cubicweb.schema.Schema`
-    :param schema: the application's schema
+    :param schema: the instance's schema
     """
     # Now, try to resolve ambiguous translations
     for relation, (var_name, translations_found) in ambiguous_nodes.items():
--- a/web/views/schema.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/schema.py	Fri Jul 24 14:33:37 2009 +0200
@@ -37,7 +37,7 @@
 
 class SchemaView(tabs.TabsMixin, StartupView):
     id = 'schema'
-    title = _('application schema')
+    title = _('instance schema')
     tabs = [_('schema-text'), _('schema-image')]
     default_tab = 'schema-text'
 
@@ -59,7 +59,7 @@
                % xml_escape(self.build_url('view', vid='schemagraph', skipmeta=0)))
         self.w(u'<img src="%s" alt="%s"/>\n' % (
             xml_escape(self.req.build_url('view', vid='schemagraph', skipmeta=1)),
-            self.req._("graphical representation of the application'schema")))
+            self.req._("graphical representation of the instance'schema")))
 
 
 class SchemaTabTextView(StartupView):
--- a/web/views/startup.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/views/startup.py	Fri Jul 24 14:33:37 2009 +0200
@@ -36,7 +36,7 @@
         return False
 
     def call(self, **kwargs):
-        """The default view representing the application's management"""
+        """The default view representing the instance's management"""
         self.req.add_css('cubicweb.manageview.css')
         self.w(u'<div>\n')
         if not self.display_folders():
--- a/web/webconfig.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/webconfig.py	Fri Jul 24 14:33:37 2009 +0200
@@ -1,4 +1,4 @@
-"""common web configuration for twisted/modpython applications
+"""common web configuration for twisted/modpython instances
 
 :organization: Logilab
 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
@@ -60,7 +60,7 @@
 
 
 class WebConfiguration(CubicWebConfiguration):
-    """the WebConfiguration is a singleton object handling application's
+    """the WebConfiguration is a singleton object handling instance's
     configuration and preferences
     """
     cubicweb_vobject_path = CubicWebConfiguration.cubicweb_vobject_path | set(['web/views'])
@@ -83,13 +83,13 @@
         ('query-log-file',
          {'type' : 'string',
           'default': None,
-          'help': 'web application query log file',
+          'help': 'web instance query log file',
           'group': 'main', 'inputlevel': 2,
           }),
-        ('pyro-application-id',
+        ('pyro-instance-id',
          {'type' : 'string',
-          'default': Method('default_application_id'),
-          'help': 'CubicWeb application identifier in the Pyro name server',
+          'default': Method('default_instance_id'),
+          'help': 'CubicWeb instance identifier in the Pyro name server',
           'group': 'pyro-client', 'inputlevel': 1,
           }),
         # web configuration
@@ -156,7 +156,7 @@
         ('submit-url',
          {'type' : 'string',
           'default': Method('default_submit_url'),
-          'help': ('URL that may be used to report bug in this application '
+          'help': ('URL that may be used to report bug in this instance '
                    'by direct access to the project\'s (jpl) tracker, '
                    'if you want this feature on. The url should looks like '
                    'http://mytracker.com/view?__linkto=concerns:1234:subject&etype=Ticket&type=bug&vid=creation '
@@ -168,7 +168,7 @@
         ('submit-mail',
          {'type' : 'string',
           'default': None,
-          'help': ('Mail used as recipient to report bug in this application, '
+          'help': ('Mail used as recipient to report bug in this instance, '
                    'if you want this feature on'),
           'group': 'web', 'inputlevel': 2,
           }),
@@ -215,7 +215,7 @@
     # don't use @cached: we want to be able to disable it while this must still
     # be cached
     def repository(self, vreg=None):
-        """return the application's repository object"""
+        """return the instance's repository object"""
         try:
             return self.__repo
         except AttributeError:
@@ -223,7 +223,7 @@
             if self.repo_method == 'inmemory':
                 repo = get_repository('inmemory', vreg=vreg, config=self)
             else:
-                repo = get_repository('pyro', self['pyro-application-id'],
+                repo = get_repository('pyro', self['pyro-instance-id'],
                                       config=self)
             self.__repo = repo
             return repo
@@ -298,7 +298,7 @@
                 yield join(fpath)
 
     def load_configuration(self):
-        """load application's configuration files"""
+        """load instance's configuration files"""
         super(WebConfiguration, self).load_configuration()
         # load external resources definition
         self._build_ext_resources()
--- a/web/webctl.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/web/webctl.py	Fri Jul 24 14:33:37 2009 +0200
@@ -27,4 +27,4 @@
             config.global_set_option('anonymous-password', 'anon')
 
     def postcreate(self):
-        """hooks called once application's initialization has been completed"""
+        """hooks called once instance's initialization has been completed"""
--- a/wsgi/request.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/wsgi/request.py	Fri Jul 24 14:33:37 2009 +0200
@@ -34,7 +34,7 @@
         self._headers = dict([(normalize_header(k[5:]), v) for k, v in self.environ.items()
                               if k.startswith('HTTP_')])
         https = environ.get("HTTPS") in ('yes', 'on', '1')
-        self._base_url = base_url or self.application_uri()
+        self._base_url = base_url or self.instance_uri()
         post, files = self.get_posted_data()
         super(CubicWebWsgiRequest, self).__init__(vreg, https, post)
         if files is not None:
@@ -63,7 +63,7 @@
 
     def relative_path(self, includeparams=True):
         """return the normalized path of the request (ie at least relative
-        to the application's root, but some other normalization may be needed
+        to the instance's root, but some other normalization may be needed
         so that the returned path may be used to compare to generated urls
 
         :param includeparams:
@@ -105,10 +105,10 @@
 
     ## wsgi request helpers ###################################################
 
-    def application_uri(self):
-        """Return the application's base URI (no PATH_INFO or QUERY_STRING)
+    def instance_uri(self):
+        """Return the instance's base URI (no PATH_INFO or QUERY_STRING)
 
-        see python2.5's wsgiref.util.application_uri code
+        see python2.5's wsgiref.util.instance_uri code
         """
         environ = self.environ
         url = environ['wsgi.url_scheme'] + '://'