1. #1
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    55
    Vote Rating
    1
    abhilashca is on a distinguished road

      0  

    Question Best Method - Deploying grid to large scale project

    Best Method - Deploying grid to large scale project


    Hello,

    Its been quite sometime, I've been evaluating ExtJs Grid. So far so good and I love the control and API. I have some genuine doubts regarding deploying ExtJs Grid in production environment. Here they goes:

    How can I deploy ExtJs Grid into a large-scale project? Suppose I have a huge project, which contains more than 100 Grids. In that case, how can I handle those Grids?

    1. Do I have to maintain seperate JavaScript file for each grid? That means, If I have 100 grids, do I need to maintain 100 JS files?
    2. Do I have to maintain a wrapper JS file, which can create all those my 100 Grids, as per ther arguments that I pass to a method?

    Which one is better? Or is there any better methods available? Can someone please shed some info on deploying ExtJs Grid in a large-scale project?

    Any help will be appreciated.
    Thanks!

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    55
    Vote Rating
    1
    abhilashca is on a distinguished road

      0  

    Default


    I wonder, no one had tried this yet in production environment!

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default


    What you mean maintaining the grids?
    Do you need common behaviour for all grids? If you do etend the grid class and use the extended grid.
    Do you extend each grid for each page?
    If you have code like:
    var grid = new Ext.GridPanel({...}); there is no maintaince needed for grid.
    --
    Mehmet Çadırcı

  4. #4
    Sencha User
    Join Date
    Oct 2009
    Location
    Cambridge, UK
    Posts
    164
    Vote Rating
    0
    Uberdude is on a distinguished road

      0  

    Default


    Of course Ext grids have been used in large-scale projects. I have myself worked on two decent-sized webapps with ~1000 js files. What are the similarities and differences between all these grids? Apply standard software engineering principles to abstract out common funcitonality into classes. Something to realize in doing things the "Ext way" is there are two reasons one creates a subclass using Ext.extend. One is to make a reusable class which takes a bunch of config options, this is most analagous to creating a class in e.g. Java. The other style of subclass is to create a "preconfigured" class. This is not designed to be a reusable component, but generally corresponds to some particular bit of the UI and serves as a organisational aid to get all the code related to that UI component nicely bundled up and out of the way. You may also find the factory pattern useful.

    P.S. something I should add though is the Ext.Grid makes quite a lot of DOM and older browsers can struggle if you make too many of them. We ended up writing a custom GridView that was more lightweight and didn't create the DOM for rows scrolled out of view. I believe Ext 4's BufferedGrid may offer similar built-in functionality now.

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    55
    Vote Rating
    1
    abhilashca is on a distinguished road

      0  

    Default


    Hello Uberdude. Thanks for the detailed reply.

    I's thinking to maintain a template for each grid, in XML format, on my server. The XML template will have the details of the Grid's model (column properties, etc) as XML nodes and attributes. This XML template will be downloaded via Ajax in the PreRender event of the Grid and is parsed by my custom JavaScript xml-parser, which builds Grid's structure (column details, etc).

    Does that sounds cool? Whats your opinion?
    Thanks!

  6. #6
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default


    If you need simple configuration for grids use external configuration.js files. Parsing xml files will cost time (both development and client side performance).

    If I were you, I would build a grid producer factory and use that with external configuration files.
    +JSON is better than XML
    --
    Mehmet Çadırcı

  7. #7
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    55
    Vote Rating
    1
    abhilashca is on a distinguished road

      0  

    Default


    Thanks for the reply.

    I guess, I had few ideas from you guys. Let me take a try to know which suites me best and will come back, as my trial-and-error progresses.

    Cheers!

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar