Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8291729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:13:59+00:00 2026-06-08T13:13:59+00:00

I am starting to learn knockout js and i am planning to build a

  • 0

I am starting to learn knockout js and i am planning to build a mid size application like catering 1000 users and 1000 entries. I was wondering how do you guys structure you js files for knockout js application? It is like a conventional MVC file structure like

lib/

app/

app/model/

app/view/

app/controller/

Or you structure it differently?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:14:03+00:00Added an answer on June 8, 2026 at 1:14 pm

    This seems like a very open ended question, as there is no “right” way to structure an application. Also, different size applications will gain different benefits from different structures. You may have only a few models, and not need any folders at all. You have need several. Anyway, on to my answer.

    Since you are asking specifically about knockout, this assumes you are only taking about the client-side javascript, and not the code for your server. If you are talking about the entire application structure, please clarify this in your question.

    First, Knockout does not have controllers. It has ViewModels. This may seem like a semantic distinction, but it really isn’t. Controllers are relatively dumb; they route actions from the view to business logic in the model. ViewModels, on the other hand, are smart; they contain the business logic AND the public properties and methods that the view will consume.

    Models are usually not part of the Knockout side of things. They will be on your server, and represent your database tables (this is a generalization, obviously exceptions exist). With both of these, we eliminate the controller and model directories, and are left with a viewmodels directory.

    Views are trickier. Views are your HTML, but they can also be your knockout templates if you want to reuse them. To keep a seperation between your “views” and your “templates”, I would call this directory templates.

    Finally, I would not place any of this in a lib directory. Your application is not a library for itself. It is the application. All of this should be under your public javascript folder (since the web needs access to it), but I don’t see any reason to push it further down the tree. Surely you will need a lib directory for other plugins, but it will be used by your Knockout application, so lib should be at the same level as your app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i am starting to learn lisp with emacs and was wondering if there
im starting to learn php, a little application im building needs to send visitors
Im starting to learn android programming and i was wondering where i could find
I'm starting to learn about using Memcached with PHP and I was wondering; is
I’m starting to learn MVC3 and I’d like to know if it is advisable
Starting to learn and understand phing. I would like to export sql database using
I'm starting learn some web programming and picked up knockout.js because the MVVM pattern
I'm starting to learn/use SQL and I'm wondering if I can make the usage
Starting to learn Canvas and have two classes so far (main one to call
Just starting to learn ASP.NET (C#) and I am using Visual Studio 2008. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.