HTML and CSS Reference
In-Depth Information
Upvoting a Question
When an attendee taps the upvote button on a question, you'll want to add an effect to provide visual feedback.
Simply highlighting the control and incrementing the vote count should be enough in this case.
Answering a Question
When a presenter answers a question, it should stay on the screen, but move somewhere less prominent. You'll need
to implement effects to reorder the list of questions, moving the answered question below unanswered questions,
as well as reducing its opacity to keep the focus on unanswered questions.
Feedback from UI Elements
Users can hover over or tab through the various UI elements in the app, so you'll want to be sure to add effects to let
them know what's clickable or which form element has focus. This can be accomplished with CSS.
Other Effects
The site's back end will update the app with new data via Pusher whenever other users perform certain actions,
so there has to be effects in place to handle manipulating the DOM to show the updates. We'll go into deeper detail
on these effects in a later chapter.
Back-End Planning
The back end of the site is where all user actions need to be processed and stored. To make the app simple to maintain
and quick to develop, let's run through how both the scripts and the database should be organized.
Model View Controller
The industry standard for software design in web applications is the Model-View-Controller (MVC) pattern. There are
dozens of PHP frameworks available, and most of them are based on the MVC pattern.
Because of its widespread usage and the fact that it's generally considered the best approach for web
applications, you'll be building this app using the MVC pattern.
a BrIeF INtrO tO the MVC prOGraMMING patterN
mVC sounds more complicated than it is. at its core, the concept of mVC is to separate any presentational
elements (the view, which is commonly html markup) from data (the model, typically information stored in
a database) from logic (the controller, which might be php code).
there are three pretty clear distinctions made in an app using the mVC pattern:
Controllers Classes and code that manipulate data and interpret user input. this is what
interprets user instructions (such as a page request), asks the model for the required
data, manipulates it, and sends it to the view for output.
Models Classes that read and write data. that's it. these classes don't do any manipulation
to the data and they don't generate any output that would be shown to the end user.
Search WWH ::

Custom Search