Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Swiz
Search
bclinkinbeard
November 02, 2011
Programming
92
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Swiz
bclinkinbeard
November 02, 2011
Other Decks in Programming
See All in Programming
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.9k
「人を評価する AI」の設計と実装
ryoyanara
0
260
Cloudflare is Agents
chimame
0
180
仕様駆動開発の消費期限
watany
20
9.1k
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
580
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
460
バグを直したら useEffect が消えた
colorful12
3
770
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
550
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
110
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
730
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
160
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Side Projects
sachag
455
43k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
400
4 Signs Your Business is Dying
shpigford
187
23k
Un-Boring Meetings
codingconduct
0
400
Rails Girls Zürich Keynote
gr2m
96
14k
Docker and Python
trallard
47
4.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
410
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
420
Bash Introduction
62gerente
615
220k
Transcript
Universal Mind™ Universal Mind | Ben Clinkinbeard Introduction to Swiz
Universal Mind™ Universal Mind | Ben Clinkinbeard Ben Clinkinbeard Technical
Architect Universal Mind
Universal Mind™ Universal Mind | Ben Clinkinbeard Tao of Swiz
What does Swiz believe in?
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz is unobtrusive
Imposes no patterns on your code
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz is unobtrusive
Requires minimal framework references
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz makes you
productive Virtually zero boilerplate
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz makes you
productive Expedites tedious tasks
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz is extensible
It doesn’t do everything. On purpose.
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz gets out
of your way Focus on problems, not a framework
Universal Mind™ Universal Mind | Ben Clinkinbeard What is clean
code? • Separation of concerns • Decoupled
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz terminology What
does it all mean, Basil?
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz instance Unit
of awesomeness
Universal Mind™ Universal Mind | Ben Clinkinbeard Swiz instance <swiz:Swiz>
<swiz:config> <swiz:SwizConfig eventPackages="com.foo.events" viewPackages="com.foo.views.*" /> </swiz:config> <swiz:beanProviders> <config:OrdersServiceBeans /> <!--config:OrdersDelegateBeans /--> <config:OrdersMockDelegateBeans /> <config:OrdersModelBeans /> <config:OrdersControllerBeans /> </swiz:beanProviders> </swiz:Swiz>
Universal Mind™ Universal Mind | Ben Clinkinbeard SwizConfig
Universal Mind™ Universal Mind | Ben Clinkinbeard Bean An object
managed by Swiz
Universal Mind™ Universal Mind | Ben Clinkinbeard Prototype Bean++
Universal Mind™ Universal Mind | Ben Clinkinbeard BeanProvider Provider of
beans
Universal Mind™ Universal Mind | Ben Clinkinbeard BeanProvider Declares non-view
beans
Universal Mind™ Universal Mind | Ben Clinkinbeard BeanProvider <swiz:BeanProvider> <models:AppModel
/> <models:UserModel /> <control:UserController /> <control:ProductsController id=”prodController” /> <swiz:Prototype type=”{ SomePresoModel }” /> </swiz:Swiz>
Universal Mind™ Universal Mind | Ben Clinkinbeard Dependency [Inject] marks
the spot
Universal Mind™ Universal Mind | Ben Clinkinbeard [Dispatcher] Shared event
bus, injected by Swiz
Universal Mind™ Universal Mind | Ben Clinkinbeard [Dispatcher( “global” )]
Maps to root Swiz instance
Universal Mind™ Universal Mind | Ben Clinkinbeard [Dispatcher( “local” )]
Maps to your Swiz instance
Universal Mind™ Universal Mind | Ben Clinkinbeard [Dispatcher] in practice
[Dispatcher] public var dispatcher:IEventDispatcher; ... dispatcher.dispatchEvent( someEvent );
Universal Mind™ Universal Mind | Ben Clinkinbeard [EventHandler] System event
handler
Universal Mind™ Universal Mind | Ben Clinkinbeard [Inject]
Universal Mind™ Universal Mind | Ben Clinkinbeard Inject by type
[Inject] public var model:UserModel; [Inject] public var delegate:IUserDelegate;
Universal Mind™ Universal Mind | Ben Clinkinbeard Inject by name
[Inject( “userService” )] public var service:RemoteObject; ... <mx:RemoteObject id=”userService” />
Universal Mind™ Universal Mind | Ben Clinkinbeard Inject bean property
[Inject( “userModel.currentUser” )] public var currentUser:User;
Universal Mind™ Universal Mind | Ben Clinkinbeard Inject bean property
[Inject( “userModel.currentUser”, bind=”true” )] public var currentUser:User;
Universal Mind™ Universal Mind | Ben Clinkinbeard Inject bean property
[Inject( “userModel.currentUser”, twoWay=”true” )] public var currentUser:User;
Universal Mind™ Universal Mind | Ben Clinkinbeard Setter injection [Inject]
public function setModel( model:UserModel ):void { this.model = model; }
Universal Mind™ Universal Mind | Ben Clinkinbeard [EventHandler]
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler basics [EventHandler(
“com.foo.events.UserEvent.ADD_USER” )] public function addUser( event:UserEvent ):void{...}
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler basics [EventHandler(
event = “UserEvent.ADD_USER” )] public function addUser( event:UserEvent ):void{...} ... <swiz:SwizConfig eventPackages=”com.foo.events” />
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler basics [EventHandler(
“UserEvent.CLEAR_ALL_USERS” )] public function clearUsers():void{...}
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler hotness [EventHandler(
“UserEvent.ADD_USER”, properties=”user” )] public function addUser( user:User ):void{...}
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler hotness [EventHandler(
“UserEvent.ADD_USER”, properties=”user” )] [EventHandler( “UserEvent.EDIT_USER”, properties=”user” )] [EventHandler( “UserEvent.DELETE_USER”, properties=”user” )] public function manageUser( user:User ):void{...}
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler hotness [EventHandler(
“UserEvent.*”, properties=”user” )] public function manageUser( user:User ):void{...}
Universal Mind™ Universal Mind | Ben Clinkinbeard EventHandler options priority,
useCapture, stop(Immediate)Propagation
Universal Mind™ Universal Mind | Ben Clinkinbeard Also...
Universal Mind™ Universal Mind | Ben Clinkinbeard [PostConstruct] Method to
be run once dependencies fulfilled
Universal Mind™ Universal Mind | Ben Clinkinbeard [PreDestroy] Method to
be run prior to tear down
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewAdded] Get reference
to a new view
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewAdded] [ViewAdded] public
function addViewListeners( view:MyForm ):void { // add view listeners }
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewAdded] [ViewAdded] public
function set myForm( view:MyForm ):void { _myForm = view; }
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewAdded] [ViewAdded] public
var view:MyForm;
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewRemoved] Get notified
a view was removed
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewRemoved] [ViewRemoved] public
function removeViewListeners( view:MyForm ):void { // remove view listeners }
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewNavigator] Get a
reference to ViewNavigator in non-view class
Universal Mind™ Universal Mind | Ben Clinkinbeard [ViewNavigator] Whoops...
Universal Mind™ Universal Mind | Ben Clinkinbeard Go forth and
kick ass
Universal Mind™ Universal Mind | Ben Clinkinbeard Site / blog
http://swizframework.org
Universal Mind™ Universal Mind | Ben Clinkinbeard Wiki http://wiki.swizframework.org
Universal Mind™ Universal Mind | Ben Clinkinbeard Bugs http://bugs.swizframework.org
Universal Mind™ Universal Mind | Ben Clinkinbeard Mailing list http://groups.google.com/group/swiz-framework