Results 1 to 3 of 3

Thread: Router

  1. #1
    Sencha Premium User
    Join Date
    Jun 2016
    Posts
    132
    Vote Rating
    36
      1  

    Default Router

    Having watched some of the SenchaCon videos, I see Mitchell advocating the use of the router, which I think is fantastic. However, the ExtJS router certainly doesn't initially seem as robust as the router from other frameworks eg. in other frameworks, the route directly relates to components & state etc.
    Also, the docs certainly don't advocate the router much at all. The getting started guide doesn't mention it and it's not even listed under "Core Concepts".
    Shouldn't the router be treated as a first class citizen within the docs?

    What are your thoughts on this?

    Thanks in advance,
    Niall.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,985
    Vote Rating
    1334
      1  

    Default

    I do advocate the router being used, in fact when I created it back for 5.0 I implemented it in the KitchenSink right away.

    The issue with the docs and guides is you also have to think about people first starting off and easily overwhelming them. Sure, router should be used up-front but so should many things and the more you stack on for a getting started guide, the more you overwhelm people. If it's a requirement, sure add that in but since the router is technically optional, it shouldn't be in a getting started guide. Guides should cover what they tend to cover, not add things in because I feel like users should use it. I do feel like we need more guides with router in there, it's more of a lack of time than a lack of wanting to do it.

    As for not being as robust, I disagree. I've built many apps and the logic for each app is always different so I took the course that the router does what you tell it to do, it doesn't assume too much. In using the router in many apps, I also don't feel like not being tightly bound to components doesn't hurt you or adds tons of code. Ext JS apps aren't always simple apps that when a route is hit all that needs to be done is a view needs to be shown. Larger apps normally have to create/show/hide many components to get to the actual view you want to get to. For example, a couple years ago I was on a project that was getting into the millions of lines of code for a huge financial company. Their design and needs were not just "switch to this tab in this tabpanel", it was way more complex than that. This was a b2b app so it wasn't consumer facing so the design was more utilitarian.

    We are a bit too close to the 6.5 release to do major work on docs/guides for this but I'll take this feedback back to our docs team so we can better the docs around using the router. If you have specific questions, feel free to reach out or suggest a blog I can write on my blog. I don't do enough blogging these days because of the lack of time I have but it's more lack of ideas (what I think is simple concepts may not be what others think of as simple and I have a hard time thinking of these things).
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium User
    Join Date
    Jun 2016
    Posts
    132
    Vote Rating
    36
      1  

    Default

    Thanks for your reply Mitchell - I watched your SenchaCon talk and loved it btw. I completely understand where you're coming from with regards to large apps, I work in a very similar environment. With regards to blog posts etc., I think some blog posts with examples on the Sencha site itself would be great. Many people who look at Sencha are most likely aware of Angular and React, and so framing such posts in a similar vein might be helpful. I think a blog post that walks through a relatively simple app that takes a "router-first" approach would be great, and could be expanded to cover more advanced examples, much like the example you gave above (hitting a route, and so much needs to happen based on security rules etc.)
    Specifically, handling state when using the router is a topic I'd very much like to see.

    Really looking forward to 6.5 btw and what's coming down the pipelines with the ExtJS framework itself.

Similar Threads

  1. Ext Router
    By prashantjain68 in forum Ext: Q&A
    Replies: 1
    Last Post: 4 Jul 2013, 10:52 AM
  2. Router
    By christocracy in forum Ext: Discussion
    Replies: 6
    Last Post: 1 Nov 2012, 3:48 PM
  3. Now Ext.Router is no more...
    By westy in forum Ext: Discussion
    Replies: 10
    Last Post: 9 Jun 2012, 1:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •