Pages

Monday, January 16, 2012

An ExtJS MVC application with dynamically loaded views and controllers

Here's a slightly more complex MVC application, that allows for dynamic loading of controllers and views:



here is the jsfiddle code

19 comments:

  1. Thanks for the tutorial. The video only had mono sound though! Glad you were able to go over specific details of the 'MVC' pattern of Extjs. I am sure this is only one implementation, but it looks sound.

    I am brand new to Extjs and it seems like there is a steep learning curve. I wish they had more examples of full blown application guides / tutorials. The only examples I see are too basic. I cannot grasp the higher level concepts based on those. This video brings me one step closer to learning. Hopefully I will be able to provide similar communal help once I get going.

    Regards,

    ReplyDelete
  2. Hi there, this was very helpful. I can use this technique for my next project.
    I am starting with ExtJS 4.2 (beta) so I had to change the setMainView Function center var to:

    var center = this.viewport.layout.centerRegion;

    ReplyDelete
  3. Thank you for great video and code example, it was very helpful. Can I please clarify one thing, how new tab can be modified (e.g closable, icon image...)?

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. Thanks for the great code example. It was very helpful.

    ReplyDelete
  6. Thank you so much for this video, and code sample. Am a newbie to extJs and was wondering how to connect the dots. Like Carey Hinoki said, the tutorials go from extremely simple to incomprehensible.

    I also would thank Anonymous #1 for the line: var center = this.viewport.layout.centerRegion;
    The 4.1 Docs have your version of : layout.region which is deprecated.

    All the best,
    Doron.

    ReplyDelete
  7. Thanks for a great tutorial. This got me started really quickly as opposed to trying to figure out the basics looking through APIs and other docs.

    ReplyDelete
  8. This comment has been removed by a blog administrator.

    ReplyDelete
  9. Any chance of making this video available again?

    ReplyDelete
  10. hi neil, first, this is an awesome extjs tutorial! it has made get a better understanding of extjs MVC. one issue though, your code in jsfiddle.net is not running could kindly check it out.

    lewis

    ReplyDelete
  11. Really good video! A nice and simple solution to load controllers.

    I tested the fiddle and it's not working anymore: TypeError: this.viewport.layout.regions is undefined

    I solved this by setting an itemId to the center panel and adding a reference to this in the application: http://jsfiddle.net/vkgjU/395/

    ReplyDelete
    Replies
    1. Thanks Michels for the heads up. Your fiddle works fine. Much appreciated.

      lewis

      Delete
  12. Very helpful. Thanks :)

    ReplyDelete
  13. I checked out the fiddle link the sample is not working.

    ReplyDelete