Project

General

Profile

Wiki » History » Revision 3

Revision 2 (Henning Blohm, 22.01.2015 16:10) → Revision 3/41 (Henning Blohm, 22.01.2015 16:31)

h1. Intro 

 This project is for the development of [[z2-environment:wiki|z2-environment]] version 3.0. 

 Version 3.0 is a major refactoring release of z2 with new repository code lines and complete package renaming. 

 h1. Essential Differences between v2.3 and v3. 

 * All the typical declarations and package names are no longer *com.zfabrik.<something>* but rather *org.z2env.<something>* 
 * The <z2 home> layout is completely new. new 
 * The essential component types that can be _invoked_ from the core is *system state* and *main program*. 
 * While Jetty is still contained to support Eclipsoid and z2Unit, we support a pre-installed Tomcat as application container. 
 * The core is lighter and more dedicated.  
 * No worker suppport without a corresponding add-on. 
 * There will be substantially less application support like a built-in JTA implementation but we will rather demonstrate how to use third-party tools. 

 h1. Draft Documentation 

 h2. Getting Started 

 To understand how z2 works, you need to understand at most what are z2 modules and components and what are component repositories and how these concepts interplay.  

 Check out [[wiki#understanding-z2|understanding-z2]] for that. 

 It is simplest to start by running a simple Java main program in z2 or a simple Web App.  

 Follow this trail: 

 * [[wiki#building-the-core|Building the core]] 
 * [[wiki#running-a-hello-world-main-program|Running a Hello World main program]] 
 * [[wiki#running-a-hello-world-web-app|Running a Hello World Web App]] 

 h2. Building z2env-core 

 First clone http://git.z2-environment.net/z2env.core 

 <pre> 
 git clone http://git.z2-environment.net/z2env.core 
 </pre> 

 Switch into *org.z2env.core.main* and run  

 <pre> 
 ant -Doutput=<location of z2 home> -Dsetup=<pre configured roots>  
 </pre> 

 where <location of z2 home> is where you want to 



 To do so, first install z2 (the <z2-home>) and <pre configured roots> is a choice of pre-configured content, actually component repositories. 

 If you omit *output* it will default to *gen/dist*. If you omit *setup*, no content will be pre-configured will be modified.  

 Check the folder *setups* for available setups of the core build. These can be local (all repos will be cloned locally) or remote (repos will be remoted). 

 In general this build always updates only boot, z.jar, roots. It will not remove anything. 

 Example to install/update a core only into ../../z2env: 

 <pre> 
 ant -Doutput=here  
 </pre> 

 To install/update a web-basic setup (with tomcat [z2env core] and eclipsoid support) with updates from remote repos: 

 <pre> 
 ant -Doutput=../../z2env -Dsetup=web-basic-remote 
 </pre> 

 h2. Understanding the <HOME> 

 We call an installation of secondly [write a z2env core a *<home>*. The file structure of the *<home>* consists of few but important locations: 

 | z.jar | The actual core implementation. This is precompiled.| 
 | boot/ | A component repository adding to the core and provides the most basic capabilities such as compiling Java code and running a main program. | 
 | roots/ | A file system component repository that is always registered by the core. This is typically filled with other repository components linking to remote or local component repositories. | 
 | modules/ | A file system repository declared under roots/ that is useful to locally augment a core installation.| 

 We use the modules repository for example for command line experiments and simple hacks. It is not as useful for regular development operations as is the dev repo. 
 hello world program].