|
| 1 | +# sif3-framework-java |
| 2 | +This readme is geared towards developers that wish to contribute to the SIF3 Framework. |
| 3 | +It lists some core constraints as well as some common policies and uses of the SIF3 Framework code base. |
| 4 | +There is a more detailed readme.txt at the root level of the project code that holds information about |
| 5 | +version history and upgrade instructions between different versions. |
| 6 | + |
| 7 | +Generally standard Git practices for forks, branches, pull requests etc. do apply. If you are not familiar |
| 8 | +with these terms and practices you can read up on it on appropriate GitHub documentation. It is out of the scope |
| 9 | +of this readme to repeat those procedures. |
| 10 | + |
| 11 | +## What do I need to consider if I want to provide code to this SIF3 Framework Repository? |
| 12 | +The Java version of the SIF3 Framework has been used in a number of high profile projects who have |
| 13 | +some constraints what they use and allow. This does mainly relate to environments the framework has been tested |
| 14 | +on and with. If you want to contribute code to this framework you must ensure that these environments are |
| 15 | +considered and that the code works with them. The list below highlights the core points to take into account |
| 16 | +when developing and testing your code. |
| 17 | + |
| 18 | +### Java Version |
| 19 | +Since v0.9.0 the SIF3 Framework will no longer support Java 6. The minimum requirement is Java 7. This is the |
| 20 | +version it must be tested with. While it is acknowledged that Java 8 is a much more recent version there are still core |
| 21 | +projects that use Java 7 and therefore you must ensure that you compile, build and test your additions/bug fixes |
| 22 | +with Java 7. Avoid Java 8 features such as the new Date/Time libraries or Lambda notations. |
| 23 | + |
| 24 | +### Servlet Version |
| 25 | +The provider component of the SIF3 Framework requires the Servlet 3.0 specification. You must ensure that your |
| 26 | +development runs with that Servlet version. |
| 27 | + |
| 28 | +### JAX-RS |
| 29 | +JAX-RS is the Java specification for REST web-services. The SIF3 Framework uses JAX-RS annotations. While the code |
| 30 | +base uses the Jersey implementation of the JAX-RS it has also been tested with JBoss RestEasy, which is an alternate JAX-RS |
| 31 | +implementation. As with previous points you must ensure and test your changes with Jersey and RestEasy JAX-RS implementations. |
| 32 | +In the past we have found that some regular expressions used in annotations do not always work with RestEasy as intended |
| 33 | +and simple changes to a regular expression in an annotation may fix "incompatibilty" issues. So if you use annotations in |
| 34 | +the REST Webservice implementation, you must test them with both JAX-RS implementations. |
| 35 | + |
| 36 | +### Web- and Application Servers |
| 37 | +The SIF3 Framework has been used with a number of Java web- and/or application servers. While we cannot test with |
| 38 | +all of them there is a sub-set we take into account in our tests. Code that is provided to the framework that |
| 39 | +touches on web-service functionality must be tested with the follwoing versions of web- and/or application servers: |
| 40 | +- Tomcat v7 |
| 41 | +- JBoss 6 (Free or Licenced version) |
| 42 | +- Optionally Jetty 8 |
| 43 | + |
| 44 | +The list above mentions a minimum version number. It must be ensured that the code you provide runs on these versions. |
| 45 | +Of course it is fine if it runs on newer versions as well :smiley:. |
| 46 | + |
| 47 | +### Components of the Framework |
| 48 | +The SIF3 Framework has two core components. One relates to consumers (client side) and one relates to providers (server side). |
| 49 | +Many classes are common to both and changes in these classes affect both components. When altering the code base in any way |
| 50 | +you must always consider and test the impact for consumers and providers. The prime candidates of classes that are used in |
| 51 | +both components are in the '**sif3Common**' and '**sif3InfraCommon**' source directories. |
| 52 | + |
| 53 | +### Test Classes and Data Model |
| 54 | +There are a number of test and demo classes that form part of the framework. Their intention is two fold: |
| 55 | +- Test functionality |
| 56 | +- Provide Demo Code on how to use the framework |
| 57 | + |
| 58 | +It is important to note that these test and demo classes are based around the SIF AU Data Model. This doesn't mean that the |
| 59 | +framework is tied to that data model at all. None of the classes used in any source directory starting with 'sif3' make |
| 60 | +any assumptions about a data model. Only classes in the directories with a pre-fix 'sif3' form the framework code. |
| 61 | + |
| 62 | +### Source Code dependencies |
| 63 | +The SIF3 Framework has a hierarchy of source directories. It determines which package can import classes from which other |
| 64 | +package. You can verify that the import dependencies aren't broken by running the appropriate ant task. Run them in the |
| 65 | +following order to ensure that no package hierarchy is violated: |
| 66 | + |
| 67 | +1. 02-clean |
| 68 | +2. 03-jar-components |
| 69 | + |
| 70 | +If you get no compilation errors that relate to imports then your dependency hierarchy is correct. Generally the hierarchy is: |
| 71 | +> sif3Common<-sif3InfraModel<-sif3InfraCommon<-sif3InfraREST. |
| 72 | +
|
0 commit comments