Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Hybrid View

  1. #1
    Ext User hcristea's Avatar
    Join Date
    Mar 2007
    Posts
    31
    Vote Rating
    0
    hcristea is on a distinguished road

      0  

    Default Application architecture like API Viewer (2.0)

    Application architecture like API Viewer (2.0)


    Hello everybody,
    Its been awhile since my last post on these forums. I'm raising a question to which i haven't found an answer on the forums yet.

    Looking on the API viewer for the ext 2.0 i would like to know if there is a way to make the a web application using Ext to behave like the API viewer.

    When I say "behave like the API viewer", i mean no use of iframes in the center region and the content of the tabs to be fetched using Ajax.

    Inside the tabs I would like to have complex functionalities, like grids, forms, other (inner) layouts, all with their particular business logic. In a way something similar with the API viewer, or yahoo mail beta but a but more complex.

    I've be studying Marketo architecture a little bit and I've noticed that when a new tab is created the response for the ajax included data (json), raw html, and some javascript.

    What would be the best practice to implement something like this?
    1. no iframes for the tabs
    2. tab content is dynamic, i.e. there could be grids forms, and distinct business logic in each tab
    3. custom javascript code for business logic to be loaded on demand
    4. response to ajax calls to contain raw HTML and script, then script to be evaluated and to work with the new added raw html

  2. #2
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    This is what I do.

    I have a tree on the left region to be used as a menu. The tree is built based on a JSON object. Each node has some configuration info to be used to decide what to do when the user clicks it (actually is a key to index a configuration structure). The normal behaviour in response to a tree click is adding a tab to the center region and loading an HTML fragment into it. The fragment is always like this:
    Code:
    <style>/* optional style */</style>
    <div class="fragment" id="fragment-whatever">
       <!-- some stuff here -->
    </div>
    I do not load any javascript code with the fragment. All my code is loaded at startup time in a single javascript file. Every HTML fragment has an associated javascript class. After the fragment is loaded into the tab, I instantiate an object of the associated class. The configuration structure maintains the url of the fragment, the layout of the panel to create, the javascript class name associated, and other informations.

    One thing you may want to consider is a naming scheme for your tag ids and CSS selectors so that different fragment do not interfere with each other. Sometime I get a reference to a DOM element in the fragment selecting by class name, but usually I assign to every fragment a unique prefix that I use for all the ids of that fragment. This however has to be tweaked a little if you have multiple copies of the same fragment loaded in different tabs at the same time.

    Anyway the Ext 2.0 API application, has already much of this code.

    Luca

  3. #3
    Sencha User fangzhouxing's Avatar
    Join Date
    Mar 2007
    Posts
    466
    Vote Rating
    1
    fangzhouxing is on a distinguished road

      0  

    Default


    All my code is loaded at startup time in a single javascript file
    That will slow down dev process! I loaded all js files on demand in my project.

  4. #4
    Ext User hcristea's Avatar
    Join Date
    Mar 2007
    Posts
    31
    Vote Rating
    0
    hcristea is on a distinguished road

      0  

    Default


    Quote Originally Posted by fangzhouxing View Post
    That will slow down dev process! I loaded all js files on demand in my project.
    How could this slow down the dev process (as in Development Process)? Do you mean slowing down the loading of the pages?

    How do you load the js on demand?

  5. #5
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    Quote Originally Posted by hcristea View Post
    How do you load the js on demand?
    You use the "scripts: true" configuration parameter in the load() method of the panel.
    It evaluates (using javascript eval() function) the javascript code inside the loaded fragment.

  6. #6
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    Quote Originally Posted by fangzhouxing View Post
    That will slow down dev process! I loaded all js files on demand in my project.
    As hcristea pointed out, this depends on the size of the application, or better, the relative size compared to Ext itself. It also depends if this is a long lived application and the network speed. And then it also depends how often you clean your cache .

    Anyway, I have users with a 56K modem connection that do not complain. I have no idea how it is possible. Maybe nowadays all intenet contents is so bloated that they are accustomed to be waiting.

  7. #7
    Ext User hcristea's Avatar
    Join Date
    Mar 2007
    Posts
    31
    Vote Rating
    0
    hcristea is on a distinguished road

      0  

    Default


    Quote Originally Posted by fermo111 View Post
    Anyway, I have users with a 56K modem connection that do not complain. I have no idea how it is possible.
    Probably they dont complain because the scripts are loaded from cache. I have an online web application using ext-js 0.33 and nobody compains about the speed. It takes awhile when i change the version and the scrips reload from the server but after that they are cached and the loading time is actually pretty fast.

    Of course my users are regular people, not some web dev freaks who clean their cache every 5 minutes

  8. #8
    Sencha User fangzhouxing's Avatar
    Join Date
    Mar 2007
    Posts
    466
    Vote Rating
    1
    fangzhouxing is on a distinguished road

      0  

    Default


    How could this slow down the dev process (as in Development Process)? Do you mean slowing down the loading of the pages?

    How do you load the js on demand?
    In dev time, when you find a bug, you must refresh the page to reload the new js file. If you load all js in start time, then you waste many time in reloading.

    You can see my load js on demand code here(extracted from my project):
    http://extjs.com/forum/showthread.php?p=92714#post92714

  9. #9
    Ext User
    Join Date
    Nov 2007
    Posts
    42
    Vote Rating
    0
    Ephicient is on a distinguished road

      0  

    Default


    Depending on the number of links in your left nav, couldn't your main page become quite large by maintaining each link's content in DIVs on the main page? What about autoLoad'ing a separate HTML file into the content panel?

  10. #10
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    Quote Originally Posted by Ephicient View Post
    Depending on the number of links in your left nav, couldn't your main page become quite large by maintaining each link's content in DIVs on the main page? What about autoLoad'ing a separate HTML file into the content panel?
    Actually I do both. Depending on the fragment that is asked, this can be loaded in its own tab or in a "global" tab (replacing the previous content). This is specified in the config structure.