10. Some things Rails
provides
• Structure (You know where things go/
are)
Friday, February 1, 2013
11. Some things Rails
provides
• Structure (You know where things go/
are)
• MVC
Friday, February 1, 2013
12. Some things Rails
provides
• Structure (You know where things go/
are)
• MVC
• File structure
Friday, February 1, 2013
13. Some things Rails
provides
• Structure (You know where things go/
are)
• MVC
• File structure
• Declarative DSL/State what you mean
Friday, February 1, 2013
14. Some things Rails
provides
• Structure (You know where things go/
are)
• MVC
• File structure
• Declarative DSL/State what you mean
• Generators
Friday, February 1, 2013
15. What kinds of apps
do you make with
Rails?
Friday, February 1, 2013
32. Some things Rails
provides (revisited)
• Structure (You know where things go/
are)
• MVC
• File structure
• Declarative/State what you mean
• Generators
Friday, February 1, 2013
40. Controller
Controller
Controller
Controller
Model
Controller
Controller
Friday, February 1, 2013
41. Controller
Controller
Controller
Controller
Model Model
Controller
Controller
Friday, February 1, 2013
42. Controller
Controller
Controller
Controller
Model Model
Controller
Model
Controller
Friday, February 1, 2013
43. Controller
Controller
Controller
Controller
Partial
Model Model
Controller
Model
Controller
Friday, February 1, 2013
44. Controller
Controller
Controller
Controller
Partial
Model Model
Partial
Controller
Model
Controller
Friday, February 1, 2013
45. Controller
Controller
Controller
Controller
Partial
Model Model
Partial Partial
Controller
Model
Controller
Friday, February 1, 2013
46. Controller
Controller
Controller
Controller
Partial
Model Model
Partial Partial
Controller
Model
Partial
Controller
Friday, February 1, 2013
47. Controller
Controller
Controller
Controller
Partial
Model Model
Partial Partial
Controller
Model Partial
Partial
Controller
Friday, February 1, 2013
48. Controller
Controller
Controller
Controller
Partial
Model Model
AJAX
Partial Partial
Controller
Model Partial
Partial
Controller
Friday, February 1, 2013
49. Controller
Controller
Controller
Controller
Partial AJAX
Model Model
AJAX
Partial Partial
Controller
Model Partial
Partial
Controller
Friday, February 1, 2013
50. Controller
Controller
Controller
Controller
Partial AJAX
Model Model
AJAX
Partial Partial
AJAX
Controller
Model Partial
Partial
Controller
Friday, February 1, 2013
51. Controller
Controller
Controller
Controller
Partial AJAX
Model Model
AJAX
Partial Partial
AJAX AJAX
Controller
Model Partial
Partial
Controller
Friday, February 1, 2013
52. Controller
Controller
Controller
Controller
Partial AJAX
Model Model
AJAX
Partial Partial
AJAX AJAX
Controller
Model Partial
Partial AJAX
Controller
Friday, February 1, 2013
53. Controller
Controller
Controller
Controller
Partial AJAX
Model Model
AJAX AJAX
Partial Partial
AJAX AJAX
Controller
Model Partial
Partial AJAX
Controller
Friday, February 1, 2013
74. extjs
• Hundreds of components
Friday, February 1, 2013
75. extjs
• Hundreds of components
• Component based architecture
Friday, February 1, 2013
76. extjs
• Hundreds of components
• Component based architecture
• Well documented
Friday, February 1, 2013
77. extjs
• Hundreds of components
• Component based architecture
• Well documented
• Active community
Friday, February 1, 2013
78. extjs
• Hundreds of components
• Component based architecture
• Well documented
• Active community
• Maintained by a company
Friday, February 1, 2013
79. extjs
• Hundreds of components
• Component based architecture
• Well documented
• Active community
• Maintained by a company
• Dual License
Friday, February 1, 2013
80. extjs
• Hundreds of components
• Component based architecture
• Well documented
• Active community
• Maintained by a company
• Dual License
• GPL
Friday, February 1, 2013
81. extjs
• Hundreds of components
• Component based architecture
• Well documented
• Active community
• Maintained by a company
• Dual License
• GPL
• Commercial
Friday, February 1, 2013
82. EXTJS
Y U NO HAVE FREE, PERMISSIVE LICENSE!
Friday, February 1, 2013
86. Ext JS?
• Best RIA framework (cuz it’s pay and
it’s all they do, next best is far from it)
Friday, February 1, 2013
87. Ext JS?
• Best RIA framework (cuz it’s pay and
it’s all they do, next best is far from it)
• Cross platform
Friday, February 1, 2013
88. Ext JS?
• Best RIA framework (cuz it’s pay and
it’s all they do, next best is far from it)
• Cross platform
• Examples and documentation
Friday, February 1, 2013
89. Ext JS?
• Best RIA framework (cuz it’s pay and
it’s all they do, next best is far from it)
• Cross platform
• Examples and documentation
• Maintained by company/support/
training
Friday, February 1, 2013
91. Missing
• Seamless service side bindings (you do
it yourself)
Friday, February 1, 2013
92. Missing
• Seamless service side bindings (you do
it yourself)
• Server driven configuration (you do
both sides driving however you want)
Friday, February 1, 2013
109. client + server = WIN!
• Single point of configuration
Friday, February 1, 2013
110. client + server = WIN!
• Single point of configuration
• Testability
Friday, February 1, 2013
111. client + server = WIN!
• Single point of configuration
• Testability
• Resuability
Friday, February 1, 2013
112. client + server = WIN!
• Single point of configuration
• Testability
• Resuability
• Code encapsulation
Friday, February 1, 2013
113. A netzke component is a
ruby class represented
by an ext js component in
the browser
Friday, February 1, 2013
114. Ruby class
responsibilities
• Generate Ext JS counterpart (client
class)
• Configure it’s client class instance
• Run any server side logic
• Handle nesting, dynamic loading, etc.
Friday, February 1, 2013
115. Netzke component
Ruby class:
class SimpleComponent < Netzke::Base
end
and it’s corresponding JS class
Ext.define(‘Netzke.classes.SimpleComponent’, {
// ...
});
Friday, February 1, 2013
116. some netzke
features
Friday, February 1, 2013
127. Rails setup
• Copy extjs lib to public/extjs
Friday, February 1, 2013
128. Rails setup
• Copy extjs lib to public/extjs
• Copy famfamfam_silk_icons to images/icons (optional)
Friday, February 1, 2013
129. Rails setup
• Copy extjs lib to public/extjs
• Copy famfamfam_silk_icons to images/icons (optional)
• Gemfile
gem ‘netzke-core’ # presently point to github
gem ‘netzke-basepack’
Friday, February 1, 2013
130. Rails setup
• Copy extjs lib to public/extjs
• Copy famfamfam_silk_icons to images/icons (optional)
• Gemfile
gem ‘netzke-core’ # presently point to github
gem ‘netzke-basepack’
• add to routes.rb
netzke # all data and dynamic loading routes
Friday, February 1, 2013
131. Rails setup
• Copy extjs lib to public/extjs
• Copy famfamfam_silk_icons to images/icons (optional)
• Gemfile
gem ‘netzke-core’ # presently point to github
gem ‘netzke-basepack’
• add to routes.rb
netzke # all data and dynamic loading routes
• Add to header of the appropriate layout
<%= csrf_meta_tag %>
<%= load_netzke %>
Friday, February 1, 2013
134. why netzke?
• Clean client (Ext JS)/server (Rails)
integration
• Built in components that understand
Rails
Friday, February 1, 2013
135. why netzke?
• Clean client (Ext JS)/server (Rails)
integration
• Built in components that understand
Rails
• Easy to compose and reuse components
Friday, February 1, 2013
136. why netzke?
• Clean client (Ext JS)/server (Rails)
integration
• Built in components that understand
Rails
• Easy to compose and reuse components
• Stop writing everything from scratch on
both front and back ends
Friday, February 1, 2013
139. Audit Log Archive App
• Audit Log data for our Salesforce.com
instance taking up all our space, so
need to archive it, but still get access off
line
• Salesforce.com database, i.e. legacy
Friday, February 1, 2013
179. Benefits
• Server multiplexing
Friday, February 1, 2013
180. Benefits
• Server multiplexing
• Reusable components - OO coding
Friday, February 1, 2013
181. Benefits
• Server multiplexing
• Reusable components - OO coding
• The power of Ext JS
Friday, February 1, 2013
182. Benefits
• Server multiplexing
• Reusable components - OO coding
• The power of Ext JS
• Dynamic Loading
Friday, February 1, 2013
183. Benefits
• Server multiplexing
• Reusable components - OO coding
• The power of Ext JS
• Dynamic Loading
• Quick Development
Friday, February 1, 2013
184. Benefits
• Server multiplexing
• Reusable components - OO coding
• The power of Ext JS
• Dynamic Loading
• Quick Development
• Easy to code if your needs match the
examples
Friday, February 1, 2013
186. Drawbacks
• ExtJS License (YMMV)
Friday, February 1, 2013
187. Drawbacks
• ExtJS License (YMMV)
• Netzke documentation good but sometimes stuff
missing
Friday, February 1, 2013
188. Drawbacks
• ExtJS License (YMMV)
• Netzke documentation good but sometimes stuff
missing
• Needs to know Ext JS for certain parts
Friday, February 1, 2013
189. Drawbacks
• ExtJS License (YMMV)
• Netzke documentation good but sometimes stuff
missing
• Needs to know Ext JS for certain parts
• Needs ActiveRecordSession store, session hungry
Friday, February 1, 2013
190. Drawbacks
• ExtJS License (YMMV)
• Netzke documentation good but sometimes stuff
missing
• Needs to know Ext JS for certain parts
• Needs ActiveRecordSession store, session hungry
• I don’t know how to TDD/unit test these yet
Friday, February 1, 2013
191. Drawbacks
• ExtJS License (YMMV)
• Netzke documentation good but sometimes stuff
missing
• Needs to know Ext JS for certain parts
• Needs ActiveRecordSession store, session hungry
• I don’t know how to TDD/unit test these yet
• Caching can bite you during development
Friday, February 1, 2013
192. Drawbacks
• ExtJS License (YMMV)
• Netzke documentation good but sometimes stuff
missing
• Needs to know Ext JS for certain parts
• Needs ActiveRecordSession store, session hungry
• I don’t know how to TDD/unit test these yet
• Caching can bite you during development
• Easy to code if your needs match the examples
Friday, February 1, 2013
194. CONCLUSION
• Netzke awesome for Data Rich RIA’s
Friday, February 1, 2013
195. CONCLUSION
• Netzke awesome for Data Rich RIA’s
• Focus on what you want to solve not
the details
Friday, February 1, 2013
196. CONCLUSION
• Netzke awesome for Data Rich RIA’s
• Focus on what you want to solve not
the details
• Ruby to write frontend
Friday, February 1, 2013
197. CONCLUSION
• Netzke awesome for Data Rich RIA’s
• Focus on what you want to solve not
the details
• Ruby to write frontend
• General happiness all around
Friday, February 1, 2013
198. Resources
• http://netzke.org
• showcase apps
• https://groups.google.com/group/
netzke
• http://writelesscode.com
• @netzke
• I will blog about how to write ALAA
Friday, February 1, 2013
199. Credit to @nomadcoder
• For writing @netzke (awesome!)
• For material from his slides, which I
liberally borrowed
Friday, February 1, 2013