Improved the data mining wiki page

This commit is contained in:
Lennart Hensler
2015-08-18 14:56:27 +02:00
parent 9239e2c5cf
commit 5fdd04581f
2 changed files with 14 additions and 4 deletions
+12 -4
View File
@@ -19,6 +19,9 @@
* Create a `ResourceBundleStringMessages` in the `DataMiningBundleService`
* The `ResourceBundleStringMessages` needs the resource base name, which should be `<string messages package name>/<string messages base name>`
* A reference to this `ResourceBundleStringMessages` should be returned by the method `getStringMessages()`
* **[Optional]** It may be necessary to implement GWT specific components for the new Data Mining Bundle, like DTOs or a [Serialization Dummy](wiki/typical-data-mining-scenarios#Include-a-Type-forcefully-in-the-GWT-Serialization-Policy).
* This should be done in a separate bundle.
* See [Typical Development Scenarios](wiki/typical-development-scenarios#Adding-a-shared-GWT-library-bundle) for instructions, how to add a shared GWT bundle.
## Adding an absolute new Data Type
@@ -120,9 +123,14 @@ It can happen, that a necessary type isn't included in the GWT Serialization Pol
* Create a dummy class in a shared bundle, if such a dummy class doesn't exist already in the scope of the type.
* For example like `SSEDataMiningSerializationDummy`.
* The class has to implement `Serializable` and should only have a private standard constructor, to prevent an accidental instantiation.
* The class has to implement the interface `SerializationDummy` and should only have a private standard constructor, to prevent an accidental instantiation.
* Implementing this interface adds the dummy automatically to the serialization policy, without changing the `DataMiningService`.
* Add a private non-final instance variable of the type to the dummy.
* Add a pseudo method to the GWT-Service, that uses the dummy class, if such a method doesn't exist already.
* For example like `SSEDataMiningSerializationDummy pseudoMethodSoThatSomeSSEDataMiningClassesAreAddedToTheGWTSerializationPolicy()`.
The type will be included in the GWT Serialization Policy, because the GWT-Service has a method, that uses the dummy class, that uses the type.
The type will be included in the GWT Serialization Policy, because the `DataMiningService` has a method, that uses the interface `SerializationDummy`, that uses the type.
If you can't implement `SerializationDummy` for any reasons do the following:
* Implement the interface `Serializable` or `IsSerializable` instead.
* Add a pseudo method to the GWT-Service, that uses the dummy class.
* For example like `SerializationDummy pseudoMethodSoThatSomeClassesAreAddedToTheGWTSerializationPolicy()`.
+2
View File
@@ -68,12 +68,14 @@ Sometimes we need a bundle containing code and resources which can be used by ot
To create and use such a bundle from another GWT bundle (e.g. com.sap.sailing.gwt.ui) some additional steps compared to the normal Java bundle creation are required.
GWT library bundle project creation
* Add a new Java plugin project, using <git-workspace>/java/<bundle-name> as the project directory
* Add the GWT-SDK dependency to the project
* Add a GWT module file to project (ModuleName.gwt.xml)
* Add the bundle to the main pom.xml in /git/java
Use the GWT library project in a GWT UI project
* Add the src folder of the GWT library bundle to classpath of all GWT-Launch configurations (required to let the GWT dev mode find the sources of java classes) -> Open GWT launch config, select tab 'classpath', select 'User entries', click 'Advanced' button, choose 'add folders' option and add the src folder of the GWT library project
* Add the bundle the pom.xml of the GWT UI project (for the maven build)