SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb [Backbone.js] Structuring a calendar application

    Hello!

    I'm trying to make a calendar application using backbone.js. I have some difficulties in rendering the calendar. I can't decide whether to have one month model which will keep all the data or to have a day model and a collection of day models. Which is the best way to structure my code? Can you give me some advice?

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hey,

    Welcome to Sitepoint
    Start with only things you want to persist, maybe you don't need months or days, only the events that you put on a calendar.
    Javascript Date objects have all they need to create a calendar / year / month / days / etc.. Have a look at one of the good datepicker javascript widgets for example.

    I find it easier starting with the views. My only advice would be to try to keep as few models/views/routers as possible.


Bookmarks

Posting Permissions

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