SPA - best practices or how to design app

2 posts, 0 answers
  1. Peter
    Peter avatar
    5 posts
    Member since:
    Mar 2015

    Posted 06 Oct 2017 Link to this post


    I'm playing with Kendo just few days... yesterday I have start to investigate SPA app pattern and it implementation in Kendo. I understand how views, layouts and router plays together.

    But I have a problem to design app as whole.

    My example app is about customers. Imagine you have customers. Customers have services. And every (logged) user in my app can manage zero or more customers and their services.

    In my app I have a 1 layout object rendered from template. This template have 1 combobox which can be used to select a customer and one div for "views". in this simple case imagine only 3 views, showing 3 different grids of some customer's data (for example services, log entries and contacts).

    My questions:

    1. one BIG model (instance of observable) or one model for layout and 3 smaller models for each views?

    2. if more than one, how to synchronize "customer selection" and propagate this change down to views?

    3. if i have not 3 but 100 views... will be all templates "rendered and synchronized" even if only one is active?

    4. how to free memory from inactive views? each view have datasource for grid, grid's data are huge (500+ rows, more than 10 columns) ... if i enable row filtering, datasource is duplicated for suggestion autocomplete edit box. not sure if one model is good way.


    I would be very happy if someone with more knowledge with Kendo SPA help me how to start :)



  2. Ianko
    Ianko avatar
    1755 posts

    Posted 10 Oct 2017 Link to this post

    Hello Peter,

    If I understand correctly, the main struggle is whether to use a big model or several models contacting with each other. The second, in terms of good practices, is better. 

    However, how to control the data flow between them is achievable programmatically, by using the ObservableObject API:

    As for the other questions, they are mostly related to application structure that depends on the specific application requirements. 

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top