Wiki source code of Clazzes.org Sketch Home

Version 4.1 by 5fbc055b7cc103006957e1ae on 2012-06-15 04.57:22

Show last authors
1 Clazzes.org Sketch is a framework which provides 2D Vector Graphics for web applications. The project provides PDF-compatible shapes with double-precision coordinates and a HTML5 user frontend which works in all modern browsers, using Google Web Toolkit (GWT). It includes a //Scientific Shapes// component for rendering charts and tables of large data-sets.
2
3 All aspects of the project are highly modular and OSGi compliant, making it possible to only include only selected shapes and/or capabilities.
4
5 = {{id name="Clazzes.orgSketchHome-Architecture"/}}Architecture =
6
7 Due to the great modularity, clazzes.org Sketch relies on [[Maven>>url:http://maven.apache.org/||shape="rect"]] for the build process. It is not advisable to attempt to build it without.
8
9 The framework consists of 3 major components:
10
11 * Server-side data-object abstraction with de-/serialization capabilities to JSON and XML
12 * PDF rendering components
13 * A browser-based GUI frontend using GWT, which provides full drawing capabilites.
14
15 Each of these provides one Maven parent project (ending in {{code language="none"}}-main{{/code}}) and four basic modules:
16
17 * {{code language="none"}}serializable-entities{{/code}} provides basic entities needed for depicting the graphics, like drawing, layer, stroke-, fill- and colour-palettes, etc.
18 * {{code language="none"}}richtext{{/code}} provides an abstraction of basic formatted text
19 * {{code language="none"}}shapes{{/code}} provides basic geometric shapes like rectangles, ellipses, lines etc.
20 * {{code language="none"}}scientific-shapes{{/code}} provides charts and tables for representing data from external providers
21
22 {{code language="none"}}shapes{{/code}} and {{code language="none"}}scientific-shapes{{/code}} depend on {{code language="none"}}serializable-entities{{/code}}, but are independent of each other.
23
24 === {{id name="Clazzes.orgSketchHome-Server-sideModules"/}}Server-side Modules ===
25
26 Server-side modules provide a data-model, and serializers for JSON (to communicate with the web front-end) and XML (for storage). The XML format is defined by modular schema files, which are also provided at the following URLs:
27
28 {{code language="none"}}
29 http://www.clazzes.org/sketch/entities/1v0/entities.xsd
30 http://www.clazzes.org/sketch/richtext/1v0/richtext.xsd
31 http://www.clazzes.org/sketch/shapes/1v0/shapes.xsd
32 http://www.clazzes.org/sketch/scientific/1v0/scientificshapes.xsd
33 {{/code}}
34
35 The format of the JSON serialization strings largely follows the schema definitions.
36
37 PDF-generation modules are by definition also server-side, as they rely on the data model. They produce standards-compliant PDF files using apache [[PDFbox>>url:http://pdfbox.apache.org/||shape="rect"]].
38
39 === {{id name="Clazzes.orgSketchHome-ClientModules"/}}Client Modules ===
40
41 The client modules provide a slightly adapted data model with JavaScript objects, using GWTs possiblities to include native JavaScript. Client-side modules provide two distinct packages per server-sided module: one containing pure data-model and de-/serialization components, and another for user-interface widgets/interactive components (ending on {{code language="none"}}-canvas{{/code}}).
42
43 The user interface utilizes a html5 canvas to depict the scenery, while retaining information about the position of each object for interaction.
44
45 = {{id name="Clazzes.orgSketchHome-Contribution"/}}Contribution =
46
47 At the moment, available documentation is still rather sparse, but the classes are well documented. If you want to give it a try, you can check out the components at the following SVN repositories:
48
49 {{code language="none"}}
50 http://svn.clazzes.org/svn/sketch/trunk/main
51 http://svn.clazzes.org/svn/sketch/trunk/pdf
52 http://svn.clazzes.org/svn/sketch/trunk/gwt
53 {{/code}}