Repository: zest-qi4j Updated Branches: refs/heads/develop 2868e9f6b -> 5618cbd52
http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/introduction/tenminutes/src/docs/ten-minutes.txt ---------------------------------------------------------------------- diff --git a/tutorials/introduction/tenminutes/src/docs/ten-minutes.txt b/tutorials/introduction/tenminutes/src/docs/ten-minutes.txt index 34f99c3..1d298c7 100644 --- a/tutorials/introduction/tenminutes/src/docs/ten-minutes.txt +++ b/tutorials/introduction/tenminutes/src/docs/ten-minutes.txt @@ -17,18 +17,18 @@ * under the License. /////////////////////////////////////////////////////////////// -[[ten-minutes-intro,Qi4j in 10 minutes]] -= Qi4j in 10 minutes = +[[ten-minutes-intro,Zest� in 10 minutes]] += Zest� in 10 minutes = TIP: Theses tutorials are based on actual code found in the `tutorials/` directory of the -http://qi4j.org/downloads.html[Qi4j SDK sources]. You should start your favorite editor and find the code related to +http://qi4j.org/downloads.html[Zest� SDK sources]. You should start your favorite editor and find the code related to this tutorial, run it and play with it. - * Qi4j does not introduce any new programming language, no additional compilers needed and all your existing tools + * Zest� does not introduce any new programming language, no additional compilers needed and all your existing tools work just like before. It is pure Java. - * Qi4j works with Composites. - * The equivalent of an Object instance in OOP, is a Composite instance in Qi4j. + * Zest� works with Composites. + * The equivalent of an Object instance in OOP, is a Composite instance in Zest�. * Composites are constructed from Fragments. * Fragments are Mixins, Concerns, Constraints and SideEffects. * Only Mixins carry Composite state. The others are shared between Composite instances. @@ -62,14 +62,14 @@ tag=allClass Extending the ConcernOf is a convenience mechanism, instead of an explicit @ConcernFor annotation on a private field, which can be used in rare occasions when you are not able to extend. This base class defines the `next` field, which is -set up by the Qi4j runtime and points to the next fragment in the call stack. +set up by the Zest� runtime and points to the next fragment in the call stack. -We can also see that the InventoryService is provided to the concern, which is done with dependency injection. Qi4j +We can also see that the InventoryService is provided to the concern, which is done with dependency injection. Zest� also supports dependency injection via constructors and methods. -The above example is obviously doing persistence, and we have no code handling this. But Qi4j supports persistence -directly in its Core, and it is taken care of by Qi4j, since it is declared as an EntityComposite. -Nothing else is needed, provided that the Qi4j Runtime has been setup with one or more persisted EntityStores. But +The above example is obviously doing persistence, and we have no code handling this. But Zest� supports persistence +directly in its Core, and it is taken care of by Zest�, since it is declared as an EntityComposite. +Nothing else is needed, provided that the Zest� Runtime has been setup with one or more persisted EntityStores. But we have a naming convention that EntityComposites have "Entity" as the suffix in its name. There are other built-in Composite subtypes as well, such as ValueComposite and ServiceComposite. This distinction helps @@ -93,10 +93,10 @@ tag=allClass ----------- The MailService is dependency injected, as we have seen before. -@This is telling Qi4j that the SideEffect needs a reference to the Composite instance that it belongs to. +@This is telling Zest� that the SideEffect needs a reference to the Composite instance that it belongs to. By asking for both the HasCustomer and the HasLineItems types, we get type-safety and don't need to bother with casts. -In fact, Qi4j will ensure that you can't even cast the `hasCustomer` instance to the HasLineItems type. +In fact, Zest� will ensure that you can't even cast the `hasCustomer` instance to the HasLineItems type. By not referencing the aggregated interface OrderEntity, we reduce the coupling of this SideEffect and it can be used in any other Composite where the HasCustomer and HasLineItems combination is used, for instance in an InvoiceEntity. @@ -105,5 +105,5 @@ So, build the report, send it via the MailService. == Conclusion == -In this short introduction, we have covered the essence of Qi4j. We have looked at what is a Composite, seen some of the +In this short introduction, we have covered the essence of Zest�. We have looked at what is a Composite, seen some of the Fragments in action, and how simple it is to turn a Composite into a persisted Composite, known as an EntityComposite. http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/introduction/thirtyminutes/src/docs/thirty-minutes.txt ---------------------------------------------------------------------- diff --git a/tutorials/introduction/thirtyminutes/src/docs/thirty-minutes.txt b/tutorials/introduction/thirtyminutes/src/docs/thirty-minutes.txt index aa88345..80ad021 100644 --- a/tutorials/introduction/thirtyminutes/src/docs/thirty-minutes.txt +++ b/tutorials/introduction/thirtyminutes/src/docs/thirty-minutes.txt @@ -17,16 +17,16 @@ * under the License. /////////////////////////////////////////////////////////////// -[[thirty-minutes-intro,Qi4j in 30 minutes]] -= Qi4j in 30 minutes = +[[thirty-minutes-intro,Zest� in 30 minutes]] += Zest� in 30 minutes = TIP: Theses tutorials are based on actual code found in the `tutorials/` directory of the -http://qi4j.org/downloads.html[Qi4j SDK sources]. You should start your favorite editor and find the code related to +http://qi4j.org/downloads.html[Zest� SDK sources]. You should start your favorite editor and find the code related to this tutorial, run it and play with it. -This introduction will deepen your understanding of Qi4j, as we touches on a couple of the common features of Qi4j. It -is expected that you have gone through and understood the "Qi4j in 10 minutes" introduction. +This introduction will deepen your understanding of Zest�, as we touches on a couple of the common features of Zest�. It +is expected that you have gone through and understood the "Zest� in 10 minutes" introduction. If you want to reproduce what's explained in this tutorial, remember to depend on the Core Runtime artifact that depends on Core API, Core SPI, Core Bootstrap and Core Functional & I/O APIs: @@ -56,8 +56,8 @@ source=tutorials/introduction/thirtyminutes/src/main/java/org/qi4j/demo/thirtymi tag=2 ----------- -Quite a lot of Qi4j features are leveraged above; -[1] Property is a first class citizen in Qi4j, instead of getters/setters naming convention to declare properties. +Quite a lot of Zest� features are leveraged above; +[1] Property is a first class citizen in Zest�, instead of getters/setters naming convention to declare properties. [2] ValueComposite for Action means that it is among other things Immutable. [3] The Action extends a Property. We call that Property subtyping and highly recommended. [4] The CompositeBuilder creates Immutable Action instances. @@ -87,7 +87,7 @@ tag=4 The above construct is called a Generic Concern, since it implements java.lang.reflect.InvocationHandler instead of the interface of the domain model. The ConcernOf baseclass will also need to be of InvocationHandler type, and the -Qi4j Runtime will handle the chaining between domain model style and this generic style of interceptor call chain. +Zest� Runtime will handle the chaining between domain model style and this generic style of interceptor call chain. Finally, we need to declare the Concern in the OrderEntity; @@ -109,7 +109,7 @@ Glad you asked. It is done via the Query API. It is important to understand that the persistence concern of storage and retrieval. This enables many performance optimization opportunities as well as a more flexible Indexing strategy. The other thing to understand is that the Query API is using the domain model, in Java, and not some String based query language. We have made this choice to ensure refactoring safety. In rare cases, the -Query API is not capable enough, in which case Qi4j still provides the ability to look up and execute native queries. +Query API is not capable enough, in which case Zest� still provides the ability to look up and execute native queries. Let's say that we want to find a particular Order from its SequenceNumber. @@ -152,13 +152,13 @@ This covers the most basic Query capabilities and how to use it. For Querying to assembled during bootstrap. At the time of this writing, only an RDF indexing subsystem exist, and is added most easily by assembly.addAssembler( new RdfNativeSesameStoreAssembler() ). -It can be a bit confusing to see Qi4j use Java itself as a Query language, but since we have practically killed the +It can be a bit confusing to see Zest� use Java itself as a Query language, but since we have practically killed the classes and only operate with interfaces, it is possible to do a lot of seemingly magic stuff. Just keep in mind that it is pure Java, albeit heavy use of dynamic proxies to capture the intent of the query. == Conclusion == -We have now explored a couple more intricate features of Qi4j, hopefully without being overwhelmed with details on how -to create applications from scratch, how to structure applications, and how the entire Qi4j Extension system works. +We have now explored a couple more intricate features of Zest�, hopefully without being overwhelmed with details on how +to create applications from scratch, how to structure applications, and how the entire Zest� Extension system works. We have looked at how to add a Concern that uses a private Mixin, we have touched a bit on Generic Concerns, and finally a short introduction to the Query API. http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/introduction/twohours/src/docs/two-hours.txt ---------------------------------------------------------------------- diff --git a/tutorials/introduction/twohours/src/docs/two-hours.txt b/tutorials/introduction/twohours/src/docs/two-hours.txt index bd84428..fa14f5d 100644 --- a/tutorials/introduction/twohours/src/docs/two-hours.txt +++ b/tutorials/introduction/twohours/src/docs/two-hours.txt @@ -17,12 +17,12 @@ * under the License. /////////////////////////////////////////////////////////////// -[[two-hours-intro,Qi4j in 2 hours]] -= Qi4j in 2 hours = +[[two-hours-intro,Zest� in 2 hours]] += Zest� in 2 hours = NOTE: This tutorial is not written yet. Learn how to contribute in <<community-docs>>. -This introduction assumes that the "Qi4j in 10 minutes" and "Qi4j in 30 minutes" introductions has been read and +This introduction assumes that the "Zest� in 10 minutes" and "Zest� in 30 minutes" introductions has been read and understood. In this introduction we will touch on the core concepts of UnitOfWork, Application structure and Bootstrap API. @@ -34,7 +34,7 @@ interact with the underlying persistence system. This is done via EntitySessions - Application Structure - - * There are one Application per Qi4j instance. + * There are one Application per Zest� instance. * An Application consists of one or more Layers. http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/introduction/twominutes/src/docs/two-minutes.txt ---------------------------------------------------------------------- diff --git a/tutorials/introduction/twominutes/src/docs/two-minutes.txt b/tutorials/introduction/twominutes/src/docs/two-minutes.txt index bc87861..a5c0c04 100644 --- a/tutorials/introduction/twominutes/src/docs/two-minutes.txt +++ b/tutorials/introduction/twominutes/src/docs/two-minutes.txt @@ -17,14 +17,14 @@ * under the License. /////////////////////////////////////////////////////////////// -[[two-minutes-intro,Qi4j in 2 minutes]] -= Qi4j in 2 minutes = +[[two-minutes-intro,Zest� in 2 minutes]] += Zest� in 2 minutes = TIP: Theses tutorials are based on actual code found in the `tutorials/` directory of the -http://qi4j.org/downloads.html[Qi4j SDK sources]. You should start your favorite editor and find the code related to +http://qi4j.org/downloads.html[Zest� SDK sources]. You should start your favorite editor and find the code related to this tutorial, run it and play with it. -To show that Qi4j is not necessarily complex, not hard to get going with and easy to deploy, we are first showing the +To show that Zest� is not necessarily complex, not hard to get going with and easy to deploy, we are first showing the classic HelloWorld, as small as it can get and still be Composite Oriented Programming and not only standard OOP. If you want to reproduce what's explained in this tutorial, remember to depend on the Core Runtime artifact that depends @@ -64,7 +64,7 @@ source=tutorials/introduction/twominutes/src/main/java/org/qi4j/demo/twominute/M tag=documentation ----------- -. The SingletonAssembler is a convenience class that creates a Qi4j Runtime instance and an application with one layer +. The SingletonAssembler is a convenience class that creates a Zest� Runtime instance and an application with one layer and one module in it. . We declare a TransientComposite of type `Speaker`. http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/services/src/docs/step1.txt ---------------------------------------------------------------------- diff --git a/tutorials/services/src/docs/step1.txt b/tutorials/services/src/docs/step1.txt index 7e6cbe9..21f72d2 100644 --- a/tutorials/services/src/docs/step1.txt +++ b/tutorials/services/src/docs/step1.txt @@ -23,13 +23,13 @@ In this tutorial we start with basic Java classes, to simulate a very simple Library where you can borrow and return books. -Qi4j relies heavily on the use of interfaces. This makes it possible for an object +Zest� relies heavily on the use of interfaces. This makes it possible for an object to externally implement a number of interfaces which internally is backed by a number of Mixins, some of which you may have written yourself, and some of which may have been reused. This is also true for services, which we are to cover in this tutorial. The first task is therefore to refactor the code so that the methods are implemented from an -interface instead, and to essentially make the identical "application" into a Qi4j application. +interface instead, and to essentially make the identical "application" into a Zest� application. We also want the Book to be a ValueComposite. Steps for this tutorial: http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/services/src/docs/step2.txt ---------------------------------------------------------------------- diff --git a/tutorials/services/src/docs/step2.txt b/tutorials/services/src/docs/step2.txt index 73c20d8..f0c5db0 100644 --- a/tutorials/services/src/docs/step2.txt +++ b/tutorials/services/src/docs/step2.txt @@ -21,7 +21,7 @@ = Step 2 - Hooking into the Service Activation = Services can be "activated" and "passivated". Applications can be notified of this occurring -by Qi4j runtime by assembling them with an Activator. +by Zest� runtime by assembling them with an Activator. Activators methods are called around "activation" and "passivation": beforeActivation, afterActivation, beforeActivation, afterPassivation. The http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/services/src/docs/step3.txt ---------------------------------------------------------------------- diff --git a/tutorials/services/src/docs/step3.txt b/tutorials/services/src/docs/step3.txt index 9c471d3..62363ef 100644 --- a/tutorials/services/src/docs/step3.txt +++ b/tutorials/services/src/docs/step3.txt @@ -20,13 +20,13 @@ [[tut-services-step3,Step 3 - Reading the Service Configuration]] = Step 3 - Reading the Service Configuration = -Services typically have configuration. Configurations are directly supported in Qi4j. A +Services typically have configuration. Configurations are directly supported in Zest�. A ConfigurationComposite is a subtype of EntityComposite. That is because configurations are stored in EntityStores, can be modified in runtime by client code and has the same semantics as regular entities. -Qi4j also handles the bootstrapping of configuration for the services. If the ConfigurationComposite is -not found in the configured entity store, then Qi4j will automatically locate a properties file for each +Zest� also handles the bootstrapping of configuration for the services. If the ConfigurationComposite is +not found in the configured entity store, then Zest� will automatically locate a properties file for each service instance, read those properties into a ConfigurationComposite instance, save that to the entity store and provide the values to the service. The properties file must be with the same name as the service instance with the extension "properties" in the same package as the service. http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/72a43f3c/tutorials/services/src/docs/tut-services.txt ---------------------------------------------------------------------- diff --git a/tutorials/services/src/docs/tut-services.txt b/tutorials/services/src/docs/tut-services.txt index 690cbfe..fc051d9 100644 --- a/tutorials/services/src/docs/tut-services.txt +++ b/tutorials/services/src/docs/tut-services.txt @@ -21,13 +21,13 @@ = Services Composites Tutorial = TIP: Theses tutorials are based on actual code found in the `tutorials/` directory of the -http://qi4j.org/downloads.html[Qi4j SDK sources]. You should start your favorite editor and find the code related to +http://qi4j.org/downloads.html[Zest� SDK sources]. You should start your favorite editor and find the code related to this tutorial, run it and play with it. In this other set of tutorials it will be shown how to create and work with Service Composites, which are composites that extends from the ServiceComposite class. We will refactor one a very simple Library where you can borrow and -return books to take advantage of the various features in Qi4j. These refactorings will benefit from automatic Service +return books to take advantage of the various features in Zest�. These refactorings will benefit from automatic Service activation and Configuration Entities management. - <<tut-services-step1>>
