Modern Web Development: Understanding domains, technologies, and user experience
Dino Esposito
PUBLISHED BY
Microsoft Press
A division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright 2016 by Dino Esposito
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher.
Library of Congress Control Number: 2015934865
ISBN: 978-1-5093-0001-3
Printed and bound in the United States of America.
First Printing
Microsoft Press books are available through booksellers and distributors worldwide. If you need support related to this book, email Microsoft Press Support at .
This book is provided as-is and expresses the authors views and opinions. The views, opinions and information expressed in this book, including URL and other Internet website references, may change without notice.
Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.
Microsoft and the trademarks listed at http://www.microsoft.com on the Trademarks webpage are trademarks of the Microsoft group of companies. All other marks are property of their respective owners.
Acquisitions and Developmental Editor: Devon Musgrave
Project Editor: Steve Sagman
Editorial Production: Waypoint Press
Technical Reviewer: Marc Young
Copyeditor: Roger LeBlanc
Indexer: Toni Culley
Cover: Twist Creative Seattle and Joel Panchot
To my wife Silvia.
You make me feel sandy like a clepsydra. I get empty and filled all the time; but its such a thin kind of sand that even when Im full, without you, I just feel empty.
DINO
Contents at a glance
Contents
What do you think of this book? We want to hear from you!
Microsoft is interested in hearing your feedback so we can improve our books and learning resources for you. To participate in a brief survey, please visit:
http://aka.ms/tellpress
Introduction
No later than the summer of 2008, I gave a few public talks about the future of the web. Customers who hired me at the time heard from this expert voice that the web of the (near) future would be significantly different than what it was looking like in 2008. At the time, the brilliant future of the web seemed to be in the hands of compiled code run from within the browser.
JavaScript? Its dead, at last! ASP.NET? Its gone, thankfully!
The future as I saw it back then (along with many other experts) had only rich-client technologies in store for millions of us. And Microsoft Silverlight stood at the center of the new web universe.
If you started hibernating in 2008 and woke up any time in the past three or even four years, you found a different world than I, or possibly you, had imagined. It was solidly server-side-based and different from what the expectations were. Today, you find a web world in which JavaScript reigns and, with it, a ton of ad hoc tools and frameworks.
Customers who paid good money to hear my expert voice back in 2008 tell them to invest in Silverlight are now paying good money to switch back more or less to where they were in 2008.
Well, not exactly.
This book comes at a weird time, but its not a weird book. Two decades of web experience taught us that real revolutions happen when, mostly due to rare astral alignments, a bunch of people happen to have the same programming needs. So it was for Ajax, and so it is today for responsive and interactive front ends. JavaScript has been revived because it is the simplest way for programmers to achieve goals. And because it is still effective enough to make solutions easy to sell.
Planning a web solution today means having a solid server-side environment to serve rich and interactive HTML pages, styled with CSS and actioned by JavaScript. Even though a lot of new ad hoc technologies have been developed, the real sticking points with modern applications (which are for the most part web applications) are domain analysis and the supporting architecture. Everything else revolves around the implementation of a few common practices for a few common tasks, some of which are relatively new requirementsfor example, push notifications from the server.
In this book, you will find a summary of practices and techniques that guarantee effective solutions for your customers. The point today is no longer to use the latest release of the latest platform or framework. The point is just to give customers what they really want. Tools to build software exist; ideas and plans make the difference.
Who should read this book
This book exists to help web developers improve their skills. The inspiring principle for the book is that today we mostly write software to mirror a piece of the real world, rather than to bend the real world to a piece of technology.
If you just want to do your day-to-day job better, learning from the mistakes that others made and looking at the same mistakes you made with a more thoughtful perspective, then you should definitely read this book.
Assumptions
This book assumes you are familiar with the Microsoft web stack. This experience can range from having done years of Web Forms development to being a JavaScript angel. The main focus is ASP.NET MVC, because that will be the standard with ASP.NET Core and remain so for the future of the ASP.NET platform. Here are some key goals for readers of the book: learning a method general enough so that you can start development projects with a deep understanding of the domain of the problem, select the right approach, and go forward with reliable coding practices.
This book might not be for you if...
If youre looking for a step-by-step guide to some ASP.NET MVC or perhaps Bootstrap, this book is probably not the best option you have. It does cover basic aspects of both technologies, but it hardly does that with the necessary slow pace of a beginner book.
Organization of this book
The book is divided in three parts: understanding the business domain, implementing common features, and analyzing the user experience.
offers a summary of modern software architecture, with a brief overview of domain-driven design concepts and architectural patterns. The focus is on the real meaning of the expression domain model and examining how it differs from other flavors of models you might work with. Key to effective design todayan approach that weds domain analysis and user experienceis the separation of commands and queries into distinct stacks. This simple strategy has a number of repercussions in terms of persistence model, scalability, and actual implementation.
begins with a summary of the ASP.NET MVC programming modelthe way to go for web developers, especially in light of the new ASP.NET Core platform. Next, it covers Bootstrap for styling and structuring the client side of the views and looks at techniques for posting and presenting data.
is all about user experience in the context of web applications. Web content is consumed through various devices and in a number of situations. This creates a need for having adaptive front ends that respond intelligently to the requesting devices. In this book, youll find two perspectives regarding client responsiveness: a common responsive web design perspective and the server-side device perspective.