terrymanu opened a new issue, #12366:
URL: https://github.com/apache/shardingsphere/issues/12366

   The current example is not good enough. It is difficult to understand, which 
users can not find their desired example codes quickly, the disadvantages are:
   
   1. The categories of examples are not in same abstract level, they are not 
show the overview of ShardingSphere features and structure clearly;
   2. The `example-core` module is too complicated which contains too many 
common and abstract codes, user do not need to understander them. It is better 
to use "flat" codes and make them independent each other;
   3. Proxy and JDBC need to provide configurations for multiple dimensions, 
such as different modes, different kernel providers and different feature 
configs;
   4. JDBC example can be split to different adaptors, such as `jdbc`, `spring 
boot starter & jdbc`, `spring boot starter & jpa`, `spring boot starter & 
mybatis`, `spring namespace & jdbc`, `spring namespace & jpa` and , `spring 
namespace & mybatis`;
   5. Proxy do not need java connect example, config only is enough.
   
   It is more clear if adjust example structure as:
   
   ```
   shardingsphere-example
     ├- shardingsphere-jdbc-example
        ├- shardingsphere-jdbc-${mode}-example
           ├- shardingsphere-jdbc-${mode}-${transaction}-${feature}-example
              ├- 
shardingsphere-jdbc-${mode}-${transaction}-${feature}-${framework}-example
     ├- shardingsphere-proxy-example
        ├- shardingsphere-proxy-${mode}-example
           ├- shardingsphere-proxy-${mode}-${transaction}-${feature}-example
     ├- shardingsphere-parser-example
   ```
   
   `${xxx}` are variables which can be replaced by:
   
   - `${mode}`: memory, standalone-file, cluster-zookeeper, cluster-etcd
   - `${transaction}`: local, xa-atomikos, xa-bitronix, xa-narayana, base-seata
   - `${feature}`: sharding, readwrite-splitting, db-discovery, encrypt, shadow 
and all permutation of them
   - `${framework}`: jdbc, springboot-starter-jdbc, springboot-starter-jpa, 
springboot-starter-mybatis, springnamespace-jdbc, springnamespace-jpa, 
spring-namespace-mybatis
   
   The duplicated codes may consider about using code-generation engine.
   
   ![example-code-gen-engine 
drawio](https://user-images.githubusercontent.com/5516298/132954397-406a0dbe-f28f-4e5b-89b2-1d79595422b4.png)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to