SOJO介绍

     POJO大家并不陌生,可是SOJO大家知道吗?SOJO英文全称“Simplified Old Java Objects”意即简化你的java对象。SOJO框架的目标是将javaBeans转化为一种简单的表示方式,转换为诸如JSON, XML或者任何易于同非java程式交互的格式。

     SOJO通过管理“循环变量”(with cycle detection)来转换和标识复杂的演变的java对象。这个转换设备是可插拔的,所以你可以以自定义的形式实现并使用。

     虽然POJOS是如此的重要和有用,可是在有些场景下它必须和非java环境和系统交互,所以POJOS就显得无能为力,这就是SOJO要解决的问题:

      

  • data interchange (interchange): 数据交换
    • JSON (JavaScript Object Notation) a lightweight data-interchange format
    • Object To XML - where is XML-RPC a special case
    • Comma Separated Values (CSV)
    • Java serialization, without implements the interface java.io.Serializable (e.g. cluster, cache, remote communication, ...)
  • operation of complex Java-Objects-graphs (common / navigation): 操作具有继承关系和不同版本的java对象
    • copy or clone complex object graph (can manage different versions from one object graph (object history))
    • compare complex object graph
    • walk over object graph (to traverse)
    • extend objects to additional information (e.g.: object-versions (number of changes), data changed date or changed user)
    • easy navigate on the complex object graph (with a navigation language)
    • mapping from one property to other property (name to name mapping (by naming conflicts) or value to value mapping (to convert values))
    • making object-values immutable, for testing concurrent access - multi threading)
  • remote acces/communication: 远程访问和交互
    • HTTP protocol - request and response are based on String represantation
    • RMI (Java-Object must serializable (marshalling) or deserializable (unmarshalling))
    • WebService or XML RPC - convert Java-Object in special String represantation, in XML
    • create "value objects" or "transfer objects" to sent objects over the network
  • data access: 数据访问
    • object/relational persistence respectively object/relational mapping
    • flat files (convert Java-Object-Graph to a flat represantation)
    • property files (e.g. convert Strings to Long, Date, ... by reading a property file and map the value to setter from a Bean)
    • legacy systems
  • GUI interface: gui接口
    • transform business models to GUI-models (DataBinder)
    • every changes on the GUI-model must to notice (integrated PropertyChangeListener or VetoableChangeListener)
  • and so on ...

                SOJO将会比较简单的解决以上问题。

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值