开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > protostuff |
protostuff
|
1 | 2 | 1090 |
贡献者 | 讨论 | 代码提交 |
Protostuff is the stuff around protobuf.
Features
Speed and Efficiency very fast and efficient ser/deser Simplicity and Code Size generated code = pojos with cached schemas. Small Serialized Size and Compatibility the small serialized size is the strongest point of protobuf along with forward and backward compatibility. Lite Runtime 43kb core serialization library (protostuff-core) Unobtrusive and Flexibile designed to work with existing objects. All that's needed is a schema, which could be: hand-written code-generated generated at runtime via protostuff-runtime the schema is flexible enough that it can be used to efficiently ser/deser the objects to various formats (native, json, xml, atom, etc)
Goal
automate/auto-generate components Pojos, GWT json overlays, Data Access Objects, webservice REST/RPC endpoints/services, GUIs rapid hassle-free development a single change in your .proto will propagate to your code-generated components. Todo code generator for Data Access Objects code generator for REST/RPC endpoints/services code generator for GUIs xml/atom format
If anyone is interested in joining the project, join the discussion group and share your thoughts!
Its open for a lot of ideas/implementations.
The protostuff modules:protostuff-core
Very minimal 43kb library for protobuf serialization. The generated code (simple java beans/pojos) depends on this library.
protostuff-runtime
Serializes your existing pojos using protobuf serialization. See ProtostuffRuntime Leverage the speed, size and efficiency of protobuf ser/deser!
protostuff-json
Allows the pojos(existing or generated) to be serialized to json. Uses low-level jackson-core-asl-1.2.1 for json ser/deser. protostuff-parser A lexer/parser for .proto files using ANTLR v3 Used by protostuff-compiler protostuff-compiler A pure java compiler that can be used to compile the .proto files to any output. java -jar protostuff-compiler-jarjar.jar modules.properties modules.properties
modules = foo
foo.source = path/to/your/foo.proto
#java_bean, gwt_overlay
foo.output = java_bean
foo.outputDir = generated
foo.options = key:value,generate_field_mapSee the compiler options.
Currently the implemented compilers are: java_bean gwt_overlay protostuff-maven-plugin configuration, compilation and code generation of .proto files via maven2 sample config
com.dyuproject.protostuff
protostuff-maven-plugin
${protostuff.version}
src/main/resources/media.proto
src/main/java
java_bean
UTF-8
generate_field_map
separate_schema
generate-sources
generate-sources
compile
protostuff-repo
protostuff-repo
http://protostuff.googlecode.com/svn/repos/maven2
Utilities for the generated java code by C++ protoc protostuff-model
Metadata for the code generated by the c++ compiler protoc. Used by protostuff-codegen to generate code. protostuff-codegen Generates extra code from the protoc-compiled code using protostuff-model. Limitations: no nested messages only nested enums the imports need to be mapped by the developer via code generator options. Currently it generates: json ser/deser code gwt overlays protostuff-model-json The generated json ser/deser code depends on this library. Uses jackson-core-asl-1.2.1
image made with wordle