1 / 51

Genius Framework について

Genius Framework について. 吉津 卓保(S2ファクトリー株式会社). 自己紹介. seagirl という名前でブログをやっています。. http://blog.s2factory.co.jp/yoshizu/. Agenda. Genius Framework とは 開発動機 Genius のアーキテクチャ Genius の便利なコマンド. 1. Genius Framework とは. Flex アプリケーションの開発(mx パッケージのライブラリと mxmlc コンパイラを使った開発)における、アーキテクチャレイヤのフレームワーク. ??.

Télécharger la présentation

Genius Framework について

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Genius Framework について • 吉津 卓保(S2ファクトリー株式会社)

  2. 自己紹介

  3. seagirl という名前でブログをやっています。 http://blog.s2factory.co.jp/yoshizu/

  4. Agenda • Genius Framework とは • 開発動機 • Genius のアーキテクチャ • Genius の便利なコマンド

  5. 1. Genius Framework とは

  6. Flex アプリケーションの開発(mx パッケージのライブラリと mxmlc コンパイラを使った開発)における、アーキテクチャレイヤのフレームワーク

  7. ??

  8. 長い!

  9. よくわかんない!

  10. と言われる… orz →もうちょっと簡潔に

  11. プログラムをどうやって分けるかプログラムをどこに書くかプログラムをどうやって分けるかプログラムをどこに書くか

  12. ということを決めたルールのようなもの → アーキテクチャ

  13. Genius はアーキテクチャを提案するもの

  14. ルールに従うことで、色々幸せになれる • 仕様変更に強い • 複数人数で開発しやすい • 余計なことで悩まない

  15. 2. 開発動機

  16. Web で見かけるサンプル <?xml version="1.0"encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()"> <mx:Script> <![CDATA[ privatefunctioninit():void { message.text ='Hello, world!'; } ]]> </mx:Script> <mx:Labelid="message" /> </mx:Application>

  17. MXML を使えば簡単にWeb アプリが作れる!! → おお 素晴らしい!!

  18. だけど、こんな感じに書いていって、本当にちゃんとしたアプリケーションが作れるの?だけど、こんな感じに書いていって、本当にちゃんとしたアプリケーションが作れるの?

  19. ぐちゃぐちゃ

  20. あっという間に数千行のスパゲッティなコードになるので、おすすめ出来ない。あっという間に数千行のスパゲッティなコードになるので、おすすめ出来ない。

  21. プログラムを整理したい

  22. フレームワークが必要

  23. Cairngorm • Adobe 公式 • ケアンゴームと読む • ほぼアーキテクチャのみ

  24. Cairngorm のアーキテクチャを構成する登場人物 EventDispatcher FrontController ModelLocator View ViewHelper ViewLocator ValueObject Service ServiceLocator Delegate Command Responder Event

  25. 複雑すぎる! 分割が細かすぎる! めんどくさい! 楽になってない!

  26. ちょっとした機能を追加するだけなに、5 個も 6 個もクラスを作らなければならない。

  27. うんざり

  28. 作ろう

  29. 3. Genius のアーキテクチャ

  30. Thread Model View

  31. シンプル!

  32. Model • データの保持 • データの処理

  33. View • プレゼンテーションロジック(AS) • UI 定義(MXML)

  34. The Flex Code-Behind Pattern 書いているとき 動いているとき ViewBase (AS) View インスタンス View (MXML)

  35. http://blog.vivisectingmedia.com/2008/04/the-flex-code-behind-pattern/http://blog.vivisectingmedia.com/2008/04/the-flex-code-behind-pattern/ 詳細

  36. Thread • コントローラ層( ユーザーイベントのハンドリングやモデルの操作など) • サービス層( 外部サービスとのやりとり)

  37. http://www.libspark.org/wiki/Thread 詳細

  38. 耐久性 クラスファイル 300 個くらいの実案件で使っています。

  39. 4. Genius の便利なコマンド

  40. プロジェクトや各クラスの作成はコマンドで一発!プロジェクトや各クラスの作成はコマンドで一発!

  41. genius コマンド % ./genius -n HelloSample -p jp.seagirl.sample -o ~/Desktop created ./application/src/main.mxml created ./application/src/application/core/Application.as created ./application/src/application/threads/ChangeStateThread.as created ./application/src/application/views/MainBase.as created ./application/src/application/views/Main.mxml created ./application/src/application/views/IntroBase.as created ./application/src/application/views/Intro.mxml

  42. generate コマンド % ./generate UserModel created ./../src/application/models/UserModel.as done.

  43. 便利!

  44. ただし、

  45. シェル環境が必要 • Mac OS X → Terminal.app • Windows → Cygwin など

  46. Demo

  47. Genius Framework 1.5本日正式リリース(安定板) http://www.libspark.org/browser/as3/GeniusFramework/tags/v1.5

  48. 参考資料 プロジェクトホーム http://www.libspark.org/wiki/seagirl/genius 開発者のブログ http://blog.s2factory.co.jp/yoshizu/

More Related