0

I'm currently building a large single page application using the latest ExtJS library and I wanted to know if SPA is even recommended when using the ExtJS lib since its so heavy up front. Are there recommended examples of using routing? Most of my background on FE routing stems from Backbone/Angular/Ember.

Also whats the best method to handle lazy loading+instantiation of widgets.

I already know what the best practical scenarios are conceptually so I'm looking for more implementation guidance (and if possible, code sample / links). I'm also briefed on the Sencha docs on large scale applications using ExtJS.

Thanks

boatcoder
  • 17,525
  • 18
  • 114
  • 178
Matt Lo
  • 5,442
  • 1
  • 21
  • 21
  • there's no such thing as lazy-loading on a true single-page-app with all-inline resources. if you just have all the html on a single page, you can point to CDN copies of your javascript and CSS, using a manifest to provide offline capabilities. – dandavis Jun 28 '13 at 19:17
  • @dandavis what about widgets you don't need _yet_, you can at least lazy instantiate them. – Matt Lo Jun 28 '13 at 19:50

1 Answers1

1

It ain't that heavy up-front. Use Sencha cmd to only require the classes that you actually use. You don't have to load extjs-all.js .

You CAN load 1000 controllers with 20 event handlers in under 1 second, it's the view rendering that takes time.

Best practices for initializing and deconstructing controllers

I don't understand your question about lazy loading widgets. Don't instantiate them until you need them, and destroy them when you don't.

You can have some load-on-demand modules as well, using Ext.Loader.

There are no good routing docs, but take a look at how MS Prism does it.

Community
  • 1
  • 1
Neil McGuigan
  • 46,580
  • 12
  • 123
  • 152