SCA Assembly vs. Spring + CXF
Sunday, July 22nd, 2007From Ke Jin’s comment on InfoQ:
The programming objects of so-called “remote-services” in SCA are either their client stubs (for client applications) or server skeletons (for server applications). Both of these classes are merely special cases of POJOs.
As the matter of fact, the so-called SCA assembly model is merely a DSL (domain specific language) that can easily be realized on top of Spring or any decent POJO IoC containers, with few hundreds lines of code and half day of work.
So I’m not the only one who thinks this!
Now, I’m extending on the SCA examples I’ve seen, so this could be a completely wrong example. BUT, is this:
<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<component name="AccountService">
<implementation.java class="AccountServiceImpl"/>
</component>
<service name="accountDataService">
<interface.java interface="services.accountdata.AccountDataService"/>
<binding.ws uri="/accountDataService" />
</service>
<property name="currency" type="xsd:string">USD</property>
</componentType>
Really that much different from this:
<beans default-autowire="byType"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
<bean id="AccountService" class="foo.AccountServiceImpl">
<property name="currency" value="USD"/>
</bean>
<jaxws:client id="accountDataService" class="services.accountdata.AccountDataService"
address="http://host/accountDataService"/>
</beans>
(In this case the AccountDataService is being wired in as a property on the AccountService)
Someone show me where Ke Jin is wrong and where SCA expands on Spring capabilties. Language independence does NOT count as I consider that a big red herring (that can be another blog entry for when I have more time).