フォトアルバム

2011年10月

            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

なかのひと

373news.com

google Search

  • Google
    blog.ganymean.org
    WWW

Google Analytics

« 2005年10月 | メイン | 2006年1月 »

Tartan Ver1.05仕様

Paul KennyからTartan1.05のプレビューがリリースされた。
どうやら、TartanからColdSpringが使えるように、User-defined Factoriesを実装したようだ。
サンプルプログラムもMach-IIの一部が移植されているようなので、じっくりながめてみてから報告します。

Property Manager - tartan.core.PropertyManager

ServiceContext - tartan.context.ServiceContext

User-defined Factories - tartan.core.Factory (abstract base class)

configure() method
Flash Remoting

XmlReaders/Builders

Sample Applications

 

MachII1.1.0リリース!

Mach-II Ver1.1.0がリリースされました。
今回のリリースから、Peter J Farrellがコアメンバーになっています。
彼のブログの記事からVer1.1.0のリリースノートを抜粋・翻訳しておきます。
一つづつ読みこなしながら詳細をリポートしようと思います。

  • Full backwards compatibility – fully tested under CFMX 6.1 and 7
    • 完全後方互換(CFMX6.1とCFMX7で検証済)
  • Developed under a new community oriented development process
    • コミュニティ志向開発プロセスの採用
  • Updated sample applications
    • サンプルアプリケーションの更新
  • 14 page Mach-II Frequently Asked Questions PDF
  • New QuickStart by Matt Woodward
    • 新クイックスタートのリリース(By Matt Woodward)
  • Bug fixes!
    • バグフィックス
  • New Redirect command
    • 新リダイレクトコマンド
  • ResultArg and ContentArg attributes (no more having to use the request scope as a data bus)
    • ResultArg/ContentArg属性(リクエストスコープのデータバス使用は不要となる)
  • Better exception handling
    • 改良された例外処理
  • XML config file validation (CFMX7 only)
    • XML Configファイルの検証(CFMX7のみ)
  • The ability to get the original cfcatch object when an exception occurs
    • 例外発生時のオリジナルcfcatchオブジェクトのハンドリング
  • New invokers for listeners
    • リスナーの新しい呼出方法
  • Updated and completely NEW documentation
    • 更新され、完全にリニューアルされたドキュメント
  • Better hints in the framework - fire up your CFCExplorer when you need help
    • CFCExplorerで利用可能なフレームワーク用ヒントファイルの提供

CFMX用フレームワーク比較

Sean CorfieldがColdfusion用フレームワークの比較プレゼンを彼のブログにアップした。
Fusebox4、Mach-II、Model-Glueの3つについて、特徴と概観図をシンプルに比較しており、大変わかりやすい。
早速、Model-Glue+ColdSpringとTartanの比較資料における概観図に引用させてもらった。

ModelGlue+TarTan or ColdSpring(その2)

前回、紹介した資料の最終ページにあるとおり、
Sean CorfieldのColdfusionフレームワーク用サンプルアプリケーションGGCCでファイル数を比較してみると、ModelGlue+ColdSpringのModelGlue+Tartanに対する優位性がはっきりわかります。

  1. ggcc7 : ModelGlue                       17Files (Corrected at Nov 17, 2005 By suggest Sean Corfield)
  2. ggcc8 : ModelGlue+Tartan            27Files
  3. ggcc9 : ModelGlue+ColdSpring      21Files

Tartanは、サービスコントローラがあり、コマンドcfcを介して、VO/DAO/Gateway/Exceptionなどのモデルcfcにアクセスするため、サービスコントローラやCommandファイルの分だけファイル構成が複雑になります。
したがって、ModelGlueのフットワークの軽さにフィットするのは、ColdSpringになるのかもしれません。

ModelGlue+TarTan or ColdSpring

ColdSpringに触れてから、ModelGlue+ColdSpringの組合せを研究してきたけど、
ここらで一旦

  1. ModelGlue+Tartan
  2. ModelGlue+ColdSpring

の違いについて整理してみる。

  • Tartan
    • サービスフレームワーク
    • コマンドドリブンベース
    • IoC機能(DI機能)
    • サービスレイヤ機能
      • Service, VO, DAO, Gateway, Utility, Exception
  • ColdSpring
    • MVCフレームワークのサポート
    • AOP機能
    • IoC機能(DI機能)
    • サービスレイヤ支援機能(Bean化)
      • Service, VO, DAO, Gateway, Utility, Exception

各々の特徴と概観を資料 にまとめてみました。ご参考までに 。

LoggingAOP with ColdSpring

今日は、ColdSpringAOPとLog4jを使ったロギングサービスについて、解説します。
Chris ScottのColdSpringAOPのチュートリアルから引用してみます。

1.最初に、LoggingServiceを定義します。javaのlog4jからloggerクラスを生成しています。

<cfcomponent name="LoggingService" output="false">

  <cffunction name="init" returntype="net.klondike.service.LoggingService" access="public" output="false">
    <cfset var category = CreateObject("java", "org.apache.log4j.Category") />
    <cfset variables.logger = category.getInstance('net.klondike') />

    <cfreturn this />
  </cffunction>
 
  <cffunction name="info" access="public" returntype="void" output="false">
    <cfargument name=message" type="string" required="true" />
    <cfif variables.logger.isInfoEnabled()>
    <cfset variables.logger.info(arguments.message) />
    </cfif>

  </cffunction>
 
</cfcomponent>

2.次に、AOPパートです。loggingBeforeAdviceを定義します。

<cfcomponent name="loggingBeforeAdvice" extends="coldspring.aop.BeforeAdvice">

  <!--- setters for dependencies --->
  <cffunction name="setLoggingService" returntype="void" access="public""false" hint="Dependency: security service"> output=
    <cfargument name="loggingService" type="net.klondike.service.LoggingService" required="true"/>
    <cfset variables.m_loggingService = arguments.loggingService />
  </cffunction>
<cffunction name="getLoggingService" returntype="net.klondike.service.LoggingService""public" output="false" hint="Dependency: security service"> access=
    <cfreturn variables.m_loggingService />
  </cffunction>
 
  <!--- before() is called by the aop framework before method invocation --->
  <cffunction name="before" access="public" returntype="any">
    <cfargument name="method" type="coldspring.aop.Method" required="true" />
    <cfargument name="args" type="struct" required="true" />
    <cfargument name="target" type="any" required="true" />
   
    <cfset var arg = '' />
    <cfset var argString = '' />
    <cfset var objName = getMetadata(arguments.target).name />
    <cfloop collection="#args#" item="arg">
      <cfif isSimpleValue(args[arg])>
        <cfif len(argString)>
          <cfset argString = argString & ', ' />
        </cfif>
        <cfset argString = argString & arg & '=' & args[arg] >
      </cfif>
    </cfloop>
        <cfset variables.m_loggingService.info("[" & objName & "] " & method.getMethodName() & "(" & argString & ") called!") />
      </cffunction>
  </cfcomponent>

3.最後に、ColdSpringのbean定義を行います。

<beans>
 
  <!—define the logging service -->
  <bean id="loggingService"
        class="net.klondike.component.LoggingService" />

 
  <!--define the loggingBeforeAdvice and set its logging service property to reference the bean above -->
  <bean id="loggingBeforeAdvice"
        class="net.klondike.aspects.loggingBeforeAdvice">

    <property name="loggingService">
      <ref bean="loggingService" />
    </property>
  </bean>
 
  <!—now define a NamedMethodPointcutAdvisor, set the advice property to the bean above, and set its mappedNames property to ‘*’ which will create a pointcut to match all methods excluding any init method -->
  <bean id="loggingAdvisor"
        class="coldspring.aop.support.NamedMethodPointcutAdvisor">

    <property name="advice">
      <ref bean="loggingBeforeAdvice" />
    </property>
    <property name="mappedNames">
      <value>*</value>
    </property>
  </bean>
 
  <!-- to create the proxy object, first create our dao as the target object -->
  <bean id="catalogDaoTarget"
        class="net.klondike.component.catalogDAO">
    <property name="dsn">
      <value>klondike</value>
    </property>
  </bean>
 
  <!-- now create a ProxyFactoryBean with the id catalogDAO, set the target to the catalogDaoTarget bean above, and give it ,the id of the NamedMethodPointcutAdvisor above in the list of interceptorNames -->
  <bean id="catalogDAO"
        class="coldspring.aop.framework.ProxyFactoryBean">
    <property name="target">
      <ref bean="catalogDaoTarget" />
    </property>
    <property name="interceptorNames">
      <list>
        <value>loggingAdvisor</value>
      </list>
    </property>
  </bean>

 
  <!--now to use the proxy DAO, we give the id of the ProxyFactoryBean to the catalog service as the reference for the property catalogDAO -->
  <bean id="catalogService"
        class="net.klondike.component.CatalogService">
    <property name="catalogDAO">
      <ref bean="catalogDAO" />
    </property>
  </bean>

</beans>

オープンソースCFプロジェクト

Seanが Brian RinaldiがまとめたColdFusionのオープンソースプロジェクトを紹介している。

ColdFusionでも、フレームワーク以外にポータル、ブログ、アルバム、Ajax、JUnit・・・
結構使えるオープンソースがあるもんだ・・・

ColdSpring Ver0.5

ColdSpringのMLで次期バージョンの内容がDave Rossからアナウンスされた。

次期バーションは0.5、12/15リリース予定

1.Hierarchical BeanFactory(階層化BeanFactory)
 親bean
  子bean(オーバライド可能)
 Mach-IIは、plugin動作の検証済み
 ModelGlueは、開発中(見送りもあり?)
2.Remoting helper classes
 Flash Remoting対応(to do mapping of CFC types to AS types)
3.ModelGlue controller autowiring by Sean
4.Mach-II controller (listener/filter/plugin) autowiring
5.コアBeanFactory機能のバグフィックス&アップグレード
6.AOP機能ののバグフィックス&アップグレード
7.factory-bean/factory-methodの属性サポート
8.AfterThrowing advice(例外処理後のAdvice)
9.bean生成における例外処理の強化

			

ログイン

  • コントロールパネルへのログイン
    アカウント:

    パスワード:

更新ブログ

最近のトラックバック

Google

ブログ powered by TypePad
Member since 04/2005