Git Product home page Git Product logo

beboj's Introduction

        Developer Readme
      ====================


I am using GWT 2.2 at the moment (but might work with other versions as well).

  Modules
  =======

 * Beboj (org.openstreetmap.beboj.Beboj)
    The main module.

    inherits JOSM

 * JOSM (org.openstreetmap.josm.JOSM)
    Contains JOSM code that is compiled for client use.

    inherits JavaEmulation

    In sync with
        ____________
       |            |
       | JOSM r4105 |
       |____________|

    At the moment, the update to a later JOSM version is quite some tedious fiddling,
    so the sources better stay as close to the original as (sensibly) possible

    Should not (or as little as possible) depend on GWT specific classes.

    This module contains classes that are not present in JOSM, but could go upstream in principle:
     - everything in the org.openstreetmap.josm.beboj package
     - org.openstreetmap.josm.data.osm.QBLevel
          This is a inner class from QuadBuckets originally. Moved to an extra file as workaround
          for some GWT bug. (see QuadBuckets for details)
     - org.openstreetmap.josm.gui.NavigationSupport & sub classes
          Generalizes the zoom handling.
     - org.openstreetmap.josm.io.DiffResultEntry
          Originally an inner class of DiffResultProcessor. Moved to separate file due to
          client / server code splitting.

    Porting Java to the GWT subset
    ------------------------------

    Common things that need fixing:
     * remove @Override for clone(): in GWT, 'Object' does not have a clone() method
     * get rid of String.format: not implemented by GWT
     * no 'Double.doubleToLongBits(d)' - replace by '(int) d' (bad hash) or '(""+d).hashCode()' (expensive)

    Concurrency is not an issue, so AtomicLong can by replaced by long and so forth.

 * JavaEmulation (org.openstreetmap.beboj.emul.JavaEmulation)
    Partial classpath emulation.

    The code from this module will only run in web mode. In development mode, normal JRE classes are used instead.
    This is a limitation of the GWT framework. For workaround, one can rename the packages, so they no longer match classpath.

 * OpenLayers (org.openstreetmap.openlayers.OpenLayers)
    Openlayers library

    Include this module to get the openlayers library into the public path (will be copied to war folder).
    There is a config file (beboj.cfg), to reduce the size of the library in a custom build (openlayers-minimal.js).
    If you add more imagery sources / controls, it probably has to be adapted. (For convenience, there is also
    a full version of the OpenLayers lib in the repository.)
    At time of writing, the lib is based on svn.openlayers.org r11949.


  Server Code
  ===========

Apart from the modules, there is code that runs on the server, only. It is located in org.openstreetmap.beboj.server
and org.openstreetmap.josm_server.

For the latter, package names of the original JOSM classes are changed (josm -> josm_server). In principle,
one could have both, client and server code, in separate source folders and keep the package names. However,
the Eclipse GWT plugin has a bug that shows bogus warnings when it finds server and client code in the same
package. Renaming the packages turned out to be the less annoying alternative.

Significant changes:
 * Credentials are passed explicitly as parameter, no Authenticator is installed.
 * In upload code, diff results are returned, not just the processed primitives.
      (We have to send the result of the upload from server to client. Consequently
      we cannot update the OsmPrimitives in place, but have to send the diff results,
      so the client can update its dataset later.)


  Credits
  =======

Obviously, most of the code is taken from the JOSM project (http://josm.openstreetmap.de/).

EditMode Mouse Handling is very much inspired by Potlatch 2 (http://www.geowiki.co.uk/).

Includes the Openlayers library (http://openlayers.org/).

beboj's People

Contributors

bastik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.