Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am new to the construction and design of a web app so I\'d like some advice pl

ID: 651608 • Letter: I

Question

I am new to the construction and design of a web app so I'd like some advice please (Django is my framework). I'm trying to code up a "how-to" website instructing users the step-by-step process for doing a certain task. I'd like the navigation of the website to be something like this...

...in which there is a tree-like navigation on the left-pane that lists each step (e.g. Step 1, Step 2, etc...) that expands and loads the instructions for each step into the right-pane. I don't want to reload the page each time so that leads me into AJAX. At this point, I'm not sure how to implement this. Do I store the HTML/CSS into a database to be pulled when the user clicks on certain links? Or do I write the HTML/CSS into my template files with display: hidden to be changed to display: block when corresponding links are clicked?

Explanation / Answer

AJAX implies that you are making a server call for the data, but there is no reason for the server to fetch the data from a database - it could handle it using property files or even constants within a Java servlet or PHP/JSP page, without any involvement of a DB.

As for your use case, unless the menu is really long and has complex use cases, why not just follow your own comment on hiding the sub menus with CSS until they are needed? If the problem is loading the content in the right hand pane, it can also be done by using target on the menu and having a named frame or iframe for contents.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote