What’s in an SPA? Part II, the A in SPA

As you may remember from the first part of this thrilling SPA saga, the only object I’ve invoked right now is the Application. What is this Application that everyone in the ‘hood is talking about? For starters it should be your main dispatcher for all the objects in your application. Remember, we’re not doing a […]

What’s in an SPA?

Initially nothing. You can start from zero. Or have a landing page with a login, like in this case: <body> <div data-role="page" id="login"> <div class="login">         <label for="user">User</label><input id="user"/>               <label for="pwd">Password</label><input id="pwd" type="password" />    <button>Login</button>     </div> </div> </body>

Refactoring: utiliza los métodos adecuados

El método que tenemos hoy en la mesa de autopsias pretende asegurar que siempre haya una opción seleccionada en un grupo de checkboxes, en caso de que el usuario decida deseleccionar todas. La razón de forzar que haya siempre una opción marcada es evitar que al código que usará la selección del usuario no le de un pasmo porque no comprueba […]