SlideShare a Scribd company logo
Programming ASP NET MVC 4 Developing Real World Web
Applications with ASP NET MVC 1st Edition Jess
Chadwick download pdf
https://ebookfinal.com/download/programming-asp-net-mvc-4-developing-
real-world-web-applications-with-asp-net-mvc-1st-edition-jess-chadwick/
Visit ebookfinal.com today to download the complete set of
ebook or textbook!
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Programming Microsoft ASP NET MVC 1st Edition Dino
Esposito
https://ebookfinal.com/download/programming-microsoft-asp-net-mvc-1st-
edition-dino-esposito/
Pro ASP NET MVC 4 4th Edition Adam Freeman
https://ebookfinal.com/download/pro-asp-net-mvc-4-4th-edition-adam-
freeman/
Beginning jQuery 2 for ASP NET Developers Using jQuery 2
with ASP NET Web Forms and ASP NET MVC 1st Edition Bipin
Joshi (Auth.)
https://ebookfinal.com/download/beginning-jquery-2-for-asp-net-
developers-using-jquery-2-with-asp-net-web-forms-and-asp-net-mvc-1st-
edition-bipin-joshi-auth/
ASP NET MVC Framework Unleashed 1st Edition Stephen
Walther
https://ebookfinal.com/download/asp-net-mvc-framework-unleashed-1st-
edition-stephen-walther/
Developing Web applications with Visual Basic NET and ASP
NET 1st Edition John Alexander
https://ebookfinal.com/download/developing-web-applications-with-
visual-basic-net-and-asp-net-1st-edition-john-alexander/
Professional ASP NET MVC 1 0 1st Edition Rob Conery
https://ebookfinal.com/download/professional-asp-net-mvc-1-0-1st-
edition-rob-conery/
Beginning ASP NET MVC 1 0 1st Edition Simone Chiaretta
https://ebookfinal.com/download/beginning-asp-net-mvc-1-0-1st-edition-
simone-chiaretta/
Pro ASP NET MVC 2 Framework 2nd Edition Steven Sanderson
https://ebookfinal.com/download/pro-asp-net-mvc-2-framework-2nd-
edition-steven-sanderson/
Windows Azure and ASP NET MVC Migration 1st Edition
Benjamin Perkins
https://ebookfinal.com/download/windows-azure-and-asp-net-mvc-
migration-1st-edition-benjamin-perkins/
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick
Programming ASP NET MVC 4 Developing Real World
Web Applications with ASP NET MVC 1st Edition Jess
Chadwick Digital Instant Download
Author(s): Jess Chadwick, Todd Snyder, Hrusikesh Panda
ISBN(s): 9781449320317, 1449320317
Edition: 1
File Details: PDF, 9.42 MB
Year: 2012
Language: english
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick
Programming ASP.NET MVC 4
Jess Chadwick, Todd Snyder, and Hrusikesh Panda
Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo
Programming ASP.NET MVC 4
by Jess Chadwick, Todd Snyder, and Hrusikesh Panda
Copyright © 2012 Jess Chadwick, Todd Synder, Hrusikesh Panda. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editor: Rachel Roumeliotis
Production Editor: Rachel Steely
Copyeditor: Rachel Head
Proofreader: Leslie Graham, nSight
Indexer: Lucie Haskins
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrators: Robert Romano and Rebecca Demarest
October 2012: First Edition.
Revision History for the First Edition:
2012-09-14 First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449320317 for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Programming ASP.NET MVC 4, the image of a scabbardfish, and related trade dress
are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-1-449-32031-7
[LSI]
1347629749
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Part I. Up and Running
1. Fundamentals of ASP.NET MVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Microsoft’s Web Development Platforms 3
Active Server Pages (ASP) 3
ASP.NET Web Forms 4
ASP.NET MVC 4
The Model-View-Controller Architecture 4
The Model 5
The View 6
The Controller 6
What’s New in ASP.NET MVC 4? 6
Introduction to EBuy 8
Installing ASP.NET MVC 9
Creating an ASP.NET MVC Application 9
Project Templates 10
Convention over Configuration 13
Running the Application 15
Routing 15
Configuring Routes 16
Controllers 18
Controller Actions 19
Action Results 19
Action Parameters 21
Action Filters 23
Views 24
Locating Views 24
Hello, Razor! 26
Differentiating Code and Markup 27
iii
Layouts 28
Partial Views 30
Displaying Data 31
HTML and URL Helpers 33
Models 34
Putting It All Together 35
The Route 35
The Controller 35
The View 38
Authentication 41
The AccountController 42
Summary 44
2. ASP.NET MVC for Web Forms Developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
It’s All Just ASP.NET 45
Tools, Languages, and APIs 46
HTTP Handlers and Modules 46
Managing State 46
Deployment and Runtime 47
More Differences than Similarities 47
Separation of Application Logic and View Logic 48
URLs and Routing 48
State Management 49
Rendering HTML 50
Authoring ASP.NET MVC Views Using Web Forms Syntax 54
A Word of Caution 55
Summary 56
3. Working with Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Building a Form 57
Handling Form Posts 59
Saving Data to a Database 59
Entity Framework Code First: Convention over Configuration 60
Creating a Data Access Layer with Entity Framework Code First 60
Validating Data 61
Specifying Business Rules with Data Annotations 63
Displaying Validation Errors 65
Summary 68
4. Client-Side Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Working with JavaScript 69
Selectors 71
Responding to Events 74
iv | Table of Contents
DOM Manipulation 76
AJAX 77
Client-Side Validation 79
Summary 83
Part II. Going to the Next Level
5. Web Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
The Model-View-Controller Pattern 87
Separation of Concerns 87
MVC and Web Frameworks 88
Architecting a Web Application 90
Logical Design 90
ASP.NET MVC Web Application Logical Design 90
Logical Design Best Practices 92
Physical Design 93
Project Namespace and Assembly Names 93
Deployment Options 94
Physical Design Best Practices 94
Design Principles 96
SOLID 96
Inversion of Control 102
Don’t Repeat Yourself 110
Summary 110
6. Enhancing Your Site with AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Partial Rendering 111
Rendering Partial Views 112
JavaScript Rendering 117
Rendering JSON Data 118
Requesting JSON Data 119
Client-Side Templates 120
Reusing Logic Across AJAX and Non-AJAX Requests 123
Responding to AJAX Requests 124
Responding to JSON Requests 125
Applying the Same Logic Across Multiple Controller Actions 126
Sending Data to the Server 128
Posting Complex JSON Objects 129
Model Binder Selection 131
Sending and Receiving JSON Data Effectively 132
Cross-Domain AJAX 133
JSONP 133
Table of Contents | v
Enabling Cross-Origin Resource Sharing 137
Summary 138
7. The ASP.NET Web API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Building a Data Service 139
Registering Web API Routes 141
Leaning on Convention over Configuration 142
Overriding Conventions 143
Hooking Up the API 143
Paging and Querying Data 146
Exception Handling 147
Media Formatters 149
Summary 152
8. Advanced Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Data Access Patterns 153
Plain Old CLR Objects 153
Using the Repository Pattern 154
Object Relational Mappers 156
Entity Framework Overview 158
Choosing a Data Access Approach 159
Database Concurrency 160
Building a Data Access Layer 161
Using Entity Framework Code First 161
The EBuy Business Domain Model 163
Working with a Data Context 167
Sorting, Filtering, and Paging Data 168
Summary 174
9. Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Building Secure Web Applications 175
Defense in Depth 175
Never Trust Input 176
Enforce the Principle of Least Privilege 176
Assume External Systems Are Insecure 176
Reduce Surface Area 176
Disable Unnecessary Features 177
Securing an Application 177
Securing an Intranet Application 178
Forms Authentication 183
Guarding Against Attacks 192
SQL Injection 192
Cross-Site Scripting 198
vi | Table of Contents
Cross-Site Request Forgery 199
Summary 201
10. Mobile Web Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
ASP.NET MVC 4 Mobile Features 203
Making Your Application Mobile Friendly 205
Creating the Auctions Mobile View 205
Getting Started with jQuery Mobile 207
Enhancing the View with jQuery Mobile 209
Avoiding Desktop Views in the Mobile Site 216
Improving Mobile Experience 216
Adaptive Rendering 217
The Viewport Tag 217
Mobile Feature Detection 218
CSS Media Queries 220
Browser-Specific Views 221
Creating a New Mobile Application from Scratch 224
The jQuery Mobile Paradigm Shift 224
The ASP.NET MVC 4 Mobile Template 224
Using the ASP.NET MVC 4 Mobile Application Template 226
Summary 229
Part III. Going Above and Beyond
11. Parallel, Asynchronous, and Real-Time Data Operations . . . . . . . . . . . . . . . . . . . . . 233
Asynchronous Controllers 233
Creating an Asynchronous Controller 234
Choosing When to Use Asynchronous Controllers 236
Real-Time Asynchronous Communication 236
Comparing Application Models 237
HTTP Polling 237
HTTP Long Polling 238
Server-Sent Events 239
WebSockets 240
Empowering Real-Time Communication 241
Configuring and Tuning 245
Summary 246
12. Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Types of Caching 247
Server-Side Caching 248
Client-Side Caching 248
Table of Contents | vii
Server-Side Caching Techniques 248
Request-Scoped Caching 248
User-Scoped Caching 249
Application-Scoped Caching 250
The ASP.NET Cache 251
The Output Cache 252
Donut Caching 255
Donut Hole Caching 257
Distributed Caching 259
Client-Side Caching Techniques 264
Understanding the Browser Cache 264
App Cache 265
Local Storage 268
Summary 269
13. Client-Side Optimization Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Anatomy of a Page 271
Anatomy of an HttpRequest 272
Best Practices 273
Make Fewer HTTP Requests 274
Use a Content Delivery Network 274
Add an Expires or a Cache-Control Header 276
GZip Components 278
Put Stylesheets at the Top 279
Put Scripts at the Bottom 279
Make Scripts and Styles External 281
Reduce DNS Lookups 282
Minify JavaScript and CSS 282
Avoid Redirects 283
Remove Duplicate Scripts 285
Configure ETags 285
Measuring Client-Side Performance 286
Putting ASP.NET MVC to Work 289
Bundling and Minification 289
Summary 293
14. Advanced Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Wayfinding 295
URLs and SEO 297
Building Routes 298
Default and Optional Route Parameters 299
Routing Order and Priority 301
Routing to Existing Files 301
viii | Table of Contents
Ignoring Routes 302
Catch-All Routes 302
Route Constraints 303
Peering into Routes Using Glimpse 305
Attribute-Based Routing 306
Extending Routing 310
The Routing Pipeline 310
Summary 315
15. Reusable UI Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
What ASP.NET MVC Offers out of the Box 317
Partial Views 317
HtmlHelper Extensions or Custom HtmlHelpers 317
Display and Editor Templates 318
Html.RenderAction() 318
Taking It a Step Further 319
The Razor Single File Generator 319
Creating Reusable ASP.NET MVC Views 321
Creating Reusable ASP.NET MVC Helpers 325
Unit Testing Razor Views 327
Summary 328
Part IV. Quality Control
16. Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Error Handling in ASP.NET MVC 331
Enabling Custom Errors 332
Handling Errors in Controller Actions 333
Defining Global Error Handlers 334
Logging and Tracing 336
Logging Errors 336
ASP.NET Health Monitoring 338
Summary 341
17. Automated Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
The Semantics of Testing 343
Manual Testing 344
Automated Testing 345
Levels of Automated Testing 345
Unit Tests 345
Fast 347
Integration Tests 348
Table of Contents | ix
Acceptance Tests 349
What Is an Automated Test Project? 350
Creating a Visual Studio Test Project 350
Creating and Executing a Unit Test 352
Testing an ASP.NET MVC Application 354
Testing the Model 355
Test-Driven Development 358
Writing Clean Automated Tests 359
Testing Controllers 361
Refactoring to Unit Tests 364
Mocking Dependencies 365
Testing Views 370
Code Coverage 372
The Myth of 100% Code Coverage 374
Developing Testable Code 374
Summary 376
18. Build Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Creating Build Scripts 378
Visual Studio Projects Are Build Scripts! 378
Adding a Simple Build Task 378
Executing the Build 379
The Possibilities Are Endless! 380
Automating the Build 380
Types of Automated Builds 381
Creating the Automated Build 383
Continuous Integration 386
Discovering Issues 386
The Principles of Continuous Integration 386
Summary 391
Part V. Going Live
19. Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
What Needs to Be Deployed 395
Core Website Files 395
Static Content 398
What Not to Deploy 398
Databases and Other External Dependencies 399
What the EBuy Application Requires 400
Deploying to Internet Information Server 401
Prerequisites 401
x | Table of Contents
Creating and Configuring an IIS Website 402
Publishing from Within Visual Studio 403
Deploying to Windows Azure 407
Creating a Windows Azure Account 408
Creating a New Windows Azure Website 408
Publishing a Windows Azure Website via Source Control 409
Summary 410
Part VI. Appendixes
A. ASP.NET MVC and Web Forms Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
B. Leveraging NuGet as a Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
C. Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
D. Cross-Reference: Targeted Topics, Features, and Scenarios . . . . . . . . . . . . . . . . . . . 455
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Table of Contents | xi
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick
Preface
The web application landscape is vast and varied. Microsoft’s ASP.NET Framework—
built on top of the mature and robust .NET Framework—is one of the most trusted
platforms in the industry. ASP.NET MVC is Microsoft’s latest addition to the world of
ASP.NET providing web developers with an alternative development approach that
helps you build web applications with ease.
The main goal of this book is simple: to help you to build a complete understanding
of the ASP.NET MVC 4 Framework from the ground up. However, it doesn’t stop there
—the book combines fundamental ASP.NET MVC concepts with real-world insight,
modern web technologies (such as HTML 5 and the jQuery JavaScript Framework),
and powerful architecture patterns so that you’re ready to produce not just a website
that uses the ASP.NET MVC Framework, but a stable and scalable web application
that is easy to grow and maintain with your expanding needs.
Audience
This book is for people who want to learn how to leverage the Microsoft ASP.NET
MVC Framework to build robust and maintainable websites. Though the book uses
many code examples to describe this process in detail, it is not simply targeted at ap-
plicationdevelopers.Muchofthebookintroducesconceptsandtechniquesthatbenefit
both developers writing application code and the leaders driving these development
projects.
Assumptions This Book Makes
While this book aims to teach you everything you need to know in order to create robust
and maintainable web applications with the ASP.NET MVC Framework, it assumes
that you already have some fundamental knowledge about application development
with the Microsoft .NET Framework. In other words, you should already be comfort-
able using HTML, CSS, and JavaScript to produce a very basic website and have enough
knowledge of the .NET Framework and the C# language to create a “Hello World”
application.
xiii
Code throughout this book can be found at: https://github.com/Program
mingAspNetMvcBook/CodeExamples
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, databases and tables, filenames, and
file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements
such as variable or function names, data types, environment variables, statements,
and keywords.
Constant width bold
Used for emphasis in code and to show commands or other text that should be
typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values deter-
mined by context.
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in
this book in your programs and documentation. You do not need to contact us for
permission unless you’re reproducing a significant portion of the code. For example,
writing a program that uses several chunks of code from this book does not require
permission. Selling or distributing a CD-ROM of examples from O’Reilly books does
require permission. Answering a question by citing this book and quoting example
code does not require permission. Incorporating a significant amount of example code
from this book into your product’s documentation does require permission.
xiv | Preface
We appreciate, but do not require, attribution. An attribution usually includes the title,
author, publisher, and ISBN. For example: “Programming ASP.NET MVC 4 by Jess
Chadwick, Todd Synder, and Hrusikesh Panda (O’Reilly). Copyright 2012 Jess Chad-
wick, Todd Synder, and Hrusikesh Panda, 978-1-449-32031-7.”
If you feel your use of code examples falls outside fair use or the permission given above,
feel free to contact us at permissions@oreilly.com.
Safari® Books Online
Safari Books Online is an on-demand digital library that lets you easily
search over 7,500 technology and creative reference books and videos to
find the answers you need quickly.
Withasubscription,youcanreadanypageandwatchanyvideofromourlibraryonline.
Read books on your cell phone and mobile devices. Access new titles before they are
available for print, and get exclusive access to manuscripts in development and post
feedback for the authors. Copy and paste code samples, organize your favorites, down-
load chapters, bookmark key sections, create notes, print out pages, and benefit from
lots of other time-saving features.
O’Reilly Media has uploaded this book to the Safari Books Online service. To have full
digital access to this book and to other books on similar topics from O’Reilly and other
publishers, sign up for free at http://my.safaribooksonline.com.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
We have a web page for this book, where we list errata, examples, and any additional
information. You can access this page at:
http://bit.ly/Programming_ASP_NET
To comment or ask technical questions about this book, send email to:
bookquestions@oreilly.com
For more information about our books, courses, conferences, and news, see our website
at http://www.oreilly.com.
Preface | xv
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
xvi | Preface
PART I
Up and Running
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick
Random documents with unrelated
content Scribd suggests to you:
ARTICLE XVI[326]
INCOME TAX
The Congress shall have power to lay and collect taxes on
incomes, from whatever source derived, without
apportionment among the several states, and without regard
to any census or enumeration.
ARTICLE XVII[327]
SENATE: ELECTION: VACANCIES
The Senate of the United States shall be composed of two
Senators from each state, elected by the people thereof, for
six years; and each Senator shall have one vote. The
electors in each state shall have the qualifications requisite
for electors of the most numerous branch of the state
legislatures.
When vacancies happen in the representation of any state
in the Senate, the executive authority of such state shall
issue writs of election to fill such vacancies: Provided, That
the legislature of any state may empower the executive
thereof to make temporary appointment until the people fill
the vacancies by election as the legislature may direct.
This amendment shall not be so construed as to affect the
election or term of any Senator chosen before it becomes
valid as part of the Constitution.
ARTICLE XVIII[328]
NATIONAL PROHIBITION
Section 1—After one year from the ratification of this
article the manufacture, sale or transportation of intoxicating
liquors within, the importation thereof into, or the exportation
thereof from the United States and all territory subject to the
jurisdiction thereof for beverage purposes is hereby
prohibited.
Section 2—The Congress and the several States shall
have concurrent power to enforce this article by appropriate
legislation.
Section 3—This article shall be inoperative unless it shall
have been ratified as an amendment to the Constitution by
the legislatures of the several States, as provided in the
Constitution, within seven years of the date of the submission
hereof to the States by Congress.
ARTICLE XIX[329]
WOMAN SUFFRAGE
Section 1—The right of citizens of the United States to
vote shall not be denied or abridged by the United States or
by any State on account of sex.
Section 2—Congress shall have power to enforce this
article by appropriate legislation.
INDEX
A
Accidents, industrial, 411-412
Admission of new states, 227-228
Agriculture, the federal Department of, 299 n
scope and methods of, 339-342
special characteristics of, 343-345
improvements in, 345-346
government encouragement of, 346-348
financial aids to, 348-349
problems of, 349-352
Agricultural bloc, in Congress, 282 n, 350-351
Alaska, government of, 229 n
Albany Congress, 248
Ambassadors, appointment and duties of, 591-595
Amendments, to state constitutions, 232
to national constitution, 260-262
American Federation of Labor, 403-404
Americanization, the public schools as agencies of, 28
purpose and methods of, 33
“American Plan” in industry, 409
Anti-Trust Law. See Sherman Act
Appointments to office, methods of, 99-101
confirmation of, 270-271
presidential, 293-294
Appeals, judicial, 311-312
Appropriations in Congress, 463-465
Arbitration, of labor disputes, 409-410
compulsory, 410-411
international, 601-602
Aristotle, classification of governments by, 66-67
Armaments, the cost of, 563-564
Army, various divisions of the, 567-571
control of, in war, 571-572
Army in peace, 572-573
Articles of Confederation, 249-251, 287
Assessments for taxation, 456-457
Athletics, value of, in training citizens, 86-88
Attorney-General, office of, 299 n
Australian ballot, 132
B
Balance of power in Europe, 629
Ballot, history of the, 131-132
reform of, 132-133
preferential, 133-134
Banks, functions of, 434
organization of, 435-437
federal reserve, 437-439
work of, 439-442
See also Farm Loan Banks
Bargaining, collective, 405-406
Billboards, regulation of, 214-215
Bill of Rights, 261
Bimetallism, the controversy over, 428-430
Blacklists, industrial, 407
Blackstone’s Commentaries, 314 n
Bloc. See Agricultural bloc
Blue-sky laws, 446 n
Boards, in counties, 169-170
in cities, 192
in state government, 238-239
of education, 498
of health, 534
Bonds, defined and explained, 445 n
government, 466-467
serial, 469
Bonaparte, Napoleon, on the qualities of a good constitution,
258
Bosses, political, their origin, 29
their methods, 160-161
Boycotts in labor troubles, 407
Brindell Case, 404 n
Bryan, William J., on free silver, 430
Budgets, how made, 462-463
in Congress, 463-465
Buildings, public, in cities, 212-214
Bureau of Animal Industry, 347
of Foreign and Domestic Commerce, 376
of Child Welfare, 415 n
of Education, 499
of American Republics, 617
Burke, Edmund, on the function of a representative, 98-99
Business taxes, 222
C
Cabinet, organization and functions of, 297-303
Campaign funds, 161-162
Capital, as a factor in production, 48-50
Center of population in the United States, 21
Chancery. See Equity
Charters, municipal, 186-190
Checks and balances, 232-234
Child labor, the restriction of, 414-415
Chief justice, duties of, in presidential impeachments, 270 n
China, economic resources of, 335
open door in, 618-620
Circuit courts, 313
Cities, drift of population to, 22-23
growth of, 183-184
character of population in, 184-186
relation to state, 186-190
government of, 190-199
administrative problems in, 203-222
taxation in, 455-457
City councils, 193-194
City government, development of, 182-184
present organization of, 184-199
See also Municipal problems
City-manager plan, 197-198
City planning, 206-298
Citizenship, rights of, 79
qualifications for, 81
dual, 82 n
obligations of, 83-84
training for, 84-88
Civil liberty, origin and nature of, 78-81
relation of direct legislation to, 111
Civil War, effect of, on relations between nation and states,
227
on the constitution, 261-262
martial law during, 574-575
naval progress during, 575 n
cost of pensions after, 583
danger of foreign intervention during, 608
Civil service, federal, 104
in counties, 173
See also Merit system
Clayton Act, 391, 408
Cleveland, adoption of city manager plan in, 197 n
Grover, use of armed forces in labor troubles by, 572-573
Closed shop, the question of, 408-409
Coal, the conservation of, 329-330
Codes of law, 315 n
Coinage in the United States, 427-430
Colbert, Jean-Baptiste, on the art of taxation, 455 n
Collective bargaining, 56, 405-406
Colleges, training for citizenship in, 87-88
Commerce, purposes of, 356-357
development of, 357-358
scope and nature of, 358-359
regulation of, 359-360
agencies of, 364-368
effect of tariffs on, 368-372
the encouragement of, 372-378
Commission government, in cities, 194-196
in states, 241-242
Commissions, public service, 480-481
Committees, party, 156-158
in the Senate, 268-269
in the House, 275
of conference, 277-278
on budget matters, 464-465
Communism, economic aspects of, 650-652
Common law, 314-315
Companies, commercial, 50-51
See also Holding companies
Competition, the nature of, 54
among public utilities, 475-476
Conciliation in labor disputes, 409-410
Confederation, Articles of, 249-251
Confirmation of appointments, 100
Congress, of the Confederation, 248-252, 257
of the United States, influence of public opinion on, 95-96
organization and work of, 266-282
committees in, 268-278
agricultural bloc in, 350-351
new budget system in, 464-465
of Vienna, 627-628
Conservation of natural resources, 326-336
Consular service, 373-374
Constitution of the United States, events leading to, 246-253
makers of, 254-255
nature of, 257-258
development of, 258-260
methods of amending, 260-262
Constitutions, state, 230-232
Consumption of wealth, 39-40
Constabulary, state, 217
Constitutional Convention of 1787, 253-257
Continental Congress, 248
Contract, freedom of, 55-56
Conventions, party, state, 129, 156-157
national, 158-159
Coroner, office of, 172
Corporations, the nature of, 50-51
citizenship of, 81 n
industrial, 384-385
control of, 389-393
Council, in cities, 193-194
County districts, 177
County government, 167-174
County manager plan, 170
Courtesy of the Senate, 270-271
Courts, county, 170-171
state, 239
federal, 308-313
Courts-martial, 573-574
Covenant. See League of Nations
Credit, agricultural, 348-349
relation of money to, 442-443
Credit, relation of prices to, 443-444
advantages and dangers of, 444-445
Crime, classifications of, 550-551
causes of, 552-553
methods of dealing with, 553-557
“Crime of 1873”, 429 n
“Cross of Gold” campaign, 430
Currency, paper, history of, 430-431
present forms of, 431-432
advantages of, 432-434
Currency Act (1900), 430
Custom, the influence of, 9-10
D
Darwin, Charles, theories of, 2-4
Debts, public, necessity of, 465-466
nature and amount of, 466-468
repayment of, 468-469
Declaration of Independence, influence of John Locke on,
64-65
assertion of civil rights in, 80
political doctrines of, 248-249
Defence, national, cost of, 563-564
need for, 564-567
methods of, 567-583
Degeneracy as a cause of poverty, 542
Demand and supply, relations of, 40
Democracy, true and false types, 68
progress of, 69
justification of, 70
relation of education to, 492-493
relation of socialism to, 657-658
achievements of, 658-660
citizen’s duty toward, 660-661
Departments, in city government, 191-192, 205-206
in state government, 238-239
in federal government, 299
Diminishing returns, the law of, 343
Diplomatic service, organization and functions of, 591-595
Direct legislation, progress of, 107-108
procedure in, 109-110
merits and defects of, 110-112
Disarmament, international, 576-577
See also Washington Conference
Disease, the germ theory of, 516-517
transmission of, 517-520
in industry, 521-522
the prevention of, 522-524
District attorney. See Prosecuting attorney
of Columbia, government of, 230 n
courts, federal, 313
Divine right, theory of, 63-64
Division of labor, 44-46
in agriculture, 344-345
of powers, 232-234
Divorce problem, 557-560
Domestic relations, courts of, 559
Drug evil, the, 526
Duties on imports, 459
See also Tariffs and Tariff problems
E
Economics, the subject-matter of, 38-39
Education, relation to democracy, 492-493
to personal efficiency, 493-494
purpose and value of, 494-495
growth of, 495-496
control and management of, 496-498
national government’s work for, 498-499
federal aid to, 499-500
problems of, 500-507
vocational, 507-508
Educational tests for voting, 122-124
Elections, in counties, 169
procedure at, 129-137
corrupt practices at, 137-138
of senators, 267-268
of representatives in Congress, 273-274
presidential, 288-290
See also Ballots, City Government, Voting
Emergency Fleet Corporation, 375
Employers’ liability, 411-412
England, local government in, 227
cabinet system in, 301
Environment, the influence of, 5-9
Equity, origin and nature of, 316-317
Espionage Act, the, 581
Europe, relations with, 613
Evolution, theory of, 1-5
in political institutions, 66
Excess profits, taxation of, 458-459
Exchange, the theory of, 53
Expatriation, the doctrine of, 83
F
Factories. See Industry
Family, as a fundamental social group, 11-12
its place in the evolution of government, 66
Far East, American interests in the, 617-618
Farm Loan Banks, 348-349
Farmers’ Alliance. See National Farmers’ Alliance
Institutes, 350
Farmer-Labor party, 351
Federalism, the nature of, 67-68
Federalist, The, 257
Federal reserve banks, organization and work of, 437-439
Trade Commission, 341-392
Filibusters, 278-279
Filtration of water supplies, 530-531
Fire prevention, the need for, 217-218
methods of, 218-219
Fisheries, economic importance of, 333
Fittest, survival of the, 3-4, 11
Food, the inspection of, 525-526
control of, in war time, 582
Foreign policy, American traditions relating to, 606-607
nature of, 587-590
control of, 590-591
how conducted, 591-602
Forests, economic importance of, 331
See also Reserves
Four Power Treaty, 619-620
Fourteen Points, the, 609-610
France, local government in, 227
Franchises, taxation of, 456
public service, 477-480
Freedom of speech in war time, 581-582
Free silver, the fight for, 428-430
Free trade, arguments for and against, 370-372
G
Garbage, disposal of, 527-528
Gary system, 506-507
General property tax, 455-456
“Gentlemen’s agreement”, with Japan, 32
in industry, 386
Geography, influence of, 8-9, 333-336
George, Henry, social views of, 461 n
Germany, social insurance in, 419
Gerrymander, origin and use of, 273
Gladstone, W. E., opinion of the national constitution, 256-
257
Gompers, Samuel, 405
Government, the importance of, 13
as a factor in production, 51-52
the basis of obedience to, 63-65
origin of, 65-66
classification of, 66-69
purpose of, 70-72
functions of, 72-73
the study of, 74
Governor, position and powers of, 237-238
Grand jury, 318
Granges. See Patrons of Husbandry
Greenbacks, the, 431
Guidance, vocational, 396-397
Guild operation, 488-489
H
Habeas corpus, the writ of, 317 n
Habit, influence of, 10
Hague Conferences, the, 577
Hamilton, Alexander, 255, 257
Report on Manufactures, 370
Hawaii, government of, 229 n
Hayes-Tilden election, 290 n
Highways in counties, 168
Hobbes, Thomas, defender of absolutism, 65
Holding companies, 387
Holy Alliance, 598-599
Home rule, municipal, 187-190
House of Representatives, federal, organization and work of,
272-283
Housing, municipal control of, 531-533
I
Ideals, national, economic influence of, 327
effect of urban growth on, 184-186
Illiteracy in the United States, 502 n
Immigration, the course of, 23-24
causes of, 25-26
effects of, 26-29
restriction of, 29-30, 32
Impeachments, federal, 269-270
Income taxes, 458-459
Increasing returns, law of, 388
Incidence of taxation, 451-452
Individualism as an economic system, 14, 73
Index numbers, 443 n
Industrial accidents, 411-412
courts, 410-411
democracy, 393-394
Revolution, nature of, 383-384
Revolution, effect on labor, 400-401, 414 n
Workers of the World (the I. W. W.), 405
Industry, definition of, 383
development and organization of, 384-386
combinations in, 386-389
government regulation of, 389-393
present-day problems of, 393-397
the hygiene of, 520-521
Inheritances, taxes on, 458
Initiative and referendum, origin and spread of, 107-108
how used, 109-110
value of, 110-111
objections to, 111-112
Injunctions, use of, in labor disputes, 407-408
Insular possessions, government of, 229-230
Insane, problem of the, 549-550
Insects as disease carriers, 518-519
Insurance, against accident, 413
against unemployment, 418
against old age, 419
Interest on invested capital, 49-50
Interior Department, its work, 299 n
International, The, 651-652
International law, nature and scope of, 588-590
Interstate commerce, growth of, 359-361
regulation of, 362-364
Commerce Commission, jurisdiction and work of, 363-364
Interpretation, development of the constitution by, 259-260
J
Jackson, Andrew, removals from office by, 102
Japan, relations with, 618-620
Japanese, problem of the, on Pacific slope, 32-33
Jefferson, Thomas, believer in social contract theory, 65
on entangling alliances, 598, 606
Johnson, Andrew, impeachment of, 270 n
Judicial procedure, 317-323
Judicial supremacy, the doctrine of, 310-311
Judges, selection and removal of, 239-240
Jukes, the, 542-543
Junior high schools and colleges, 502-503
Jury, grand, 318
trial, 318-319
merits and defects of, 317-321
Justice, Department of, its work, 299 n
Juvenile delinquency, 557
K
Kansas plan of arbitration, 410-411
Knights of Labor, 402-403
L
Labor, as a factor in production, 43-44
division of, 44-46
perishable nature of, 46-47
federal department of, 299 n
Labor in agriculture, 349
changes in the conditions of, 400-401
organization of, 401-403
American Federation of, 403-404
the radical element in, 404-405
methods and policies of, 405-410
problems of, 410-419
services of, during the World War, 419-420
relations of, to League of Nations, 637
Latin-America, relations with, 615-617
Law, branches of the, 314-315
military, 573-574
martial, 574-575
relations of labor to, 411
League of Nations, origin of the, 625-630
covenant of, 630-632
as a scheme of government, 632-636
system of mandates, 636-637
relation of labor to, 637
public health work of, 638
American objections to, 638-639
work of, 639-640
relation of Washington Conference to, 640-641
future of, 641-642
relation of Monroe Doctrine to, 600 n
Legislative reference bureaus, 237 n
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookfinal.com

More Related Content

Similar to Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick (20)

PDF
ASP.NET Core in Action (2018).pdf
Emma Burke
 
PDF
Learning Web App Development 1st Edition Semmy Purewal
molaxmeizu
 
PDF
Download full ebook of Learning Node Shelley Powers instant download pdf
zeitsloyerqy
 
DOCX
www.free-ebooks-download.orgwww.free-ebooks-download.o.docx
odiliagilby
 
PDF
Designing Evolvable Web Apis With Aspnet 1st Edition Glenn Block
zisanashham6
 
PDF
Learning the iOS 4 SDK for JavaScript Programmers Create Native Apps with Obj...
thoramenzab0
 
PDF
Learning the iPhone SDK for JavaScript Programmers Create Native Apps with Ob...
matbarnargis59
 
PDF
Client Server Web Apps with JavaScript and Java Rich Scalable and RESTful 1st...
zubinrlondoit
 
PDF
Full Stack Serverless 1st Edition Nader Dabit
ibokocazim
 
PDF
Download full ebook of Angularjs Brad Green Shyam Seshadri instant download pdf
mehiicniode
 
PDF
ASP NET 4 0 in Practice Daniele Bochicchio
sabenaforu
 
PDF
Full Stack Serverless 1st Edition Nader Dabit
gwapateyei
 
PDF
Learning Nodejs For Net Developers Harry Cummings
coeldiad
 
PDF
[Ebooks PDF] download AngularJS 1st Edition Brad Green full chapters
kiciunonge
 
PDF
Exam Ref 70 486 Developing ASP NET MVC 4 Web Applications William Penberthy
zeemetapa
 
PDF
AWS System Administration Best Practices for Sysadmins in the Amazon Cloud 1s...
pulbzlod930
 
PDF
Intro to asp.net mvc 4 with visual studio
Organisation for Economic Co-operation & Development
 
PDF
ASP NET 4 0 in Practice Daniele Bochicchio
fofangomeal55
 
PDF
Javascript Web Applications Otx Alex Maccaw
fahradzereit93
 
PDF
Instant download Developing Backbone js Applications Addy Osmani pdf all chapter
dinetvenitja
 
ASP.NET Core in Action (2018).pdf
Emma Burke
 
Learning Web App Development 1st Edition Semmy Purewal
molaxmeizu
 
Download full ebook of Learning Node Shelley Powers instant download pdf
zeitsloyerqy
 
www.free-ebooks-download.orgwww.free-ebooks-download.o.docx
odiliagilby
 
Designing Evolvable Web Apis With Aspnet 1st Edition Glenn Block
zisanashham6
 
Learning the iOS 4 SDK for JavaScript Programmers Create Native Apps with Obj...
thoramenzab0
 
Learning the iPhone SDK for JavaScript Programmers Create Native Apps with Ob...
matbarnargis59
 
Client Server Web Apps with JavaScript and Java Rich Scalable and RESTful 1st...
zubinrlondoit
 
Full Stack Serverless 1st Edition Nader Dabit
ibokocazim
 
Download full ebook of Angularjs Brad Green Shyam Seshadri instant download pdf
mehiicniode
 
ASP NET 4 0 in Practice Daniele Bochicchio
sabenaforu
 
Full Stack Serverless 1st Edition Nader Dabit
gwapateyei
 
Learning Nodejs For Net Developers Harry Cummings
coeldiad
 
[Ebooks PDF] download AngularJS 1st Edition Brad Green full chapters
kiciunonge
 
Exam Ref 70 486 Developing ASP NET MVC 4 Web Applications William Penberthy
zeemetapa
 
AWS System Administration Best Practices for Sysadmins in the Amazon Cloud 1s...
pulbzlod930
 
Intro to asp.net mvc 4 with visual studio
Organisation for Economic Co-operation & Development
 
ASP NET 4 0 in Practice Daniele Bochicchio
fofangomeal55
 
Javascript Web Applications Otx Alex Maccaw
fahradzereit93
 
Instant download Developing Backbone js Applications Addy Osmani pdf all chapter
dinetvenitja
 

Recently uploaded (20)

PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Ad

Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick

  • 1. Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick download pdf https://ebookfinal.com/download/programming-asp-net-mvc-4-developing- real-world-web-applications-with-asp-net-mvc-1st-edition-jess-chadwick/ Visit ebookfinal.com today to download the complete set of ebook or textbook!
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. Programming Microsoft ASP NET MVC 1st Edition Dino Esposito https://ebookfinal.com/download/programming-microsoft-asp-net-mvc-1st- edition-dino-esposito/ Pro ASP NET MVC 4 4th Edition Adam Freeman https://ebookfinal.com/download/pro-asp-net-mvc-4-4th-edition-adam- freeman/ Beginning jQuery 2 for ASP NET Developers Using jQuery 2 with ASP NET Web Forms and ASP NET MVC 1st Edition Bipin Joshi (Auth.) https://ebookfinal.com/download/beginning-jquery-2-for-asp-net- developers-using-jquery-2-with-asp-net-web-forms-and-asp-net-mvc-1st- edition-bipin-joshi-auth/ ASP NET MVC Framework Unleashed 1st Edition Stephen Walther https://ebookfinal.com/download/asp-net-mvc-framework-unleashed-1st- edition-stephen-walther/
  • 3. Developing Web applications with Visual Basic NET and ASP NET 1st Edition John Alexander https://ebookfinal.com/download/developing-web-applications-with- visual-basic-net-and-asp-net-1st-edition-john-alexander/ Professional ASP NET MVC 1 0 1st Edition Rob Conery https://ebookfinal.com/download/professional-asp-net-mvc-1-0-1st- edition-rob-conery/ Beginning ASP NET MVC 1 0 1st Edition Simone Chiaretta https://ebookfinal.com/download/beginning-asp-net-mvc-1-0-1st-edition- simone-chiaretta/ Pro ASP NET MVC 2 Framework 2nd Edition Steven Sanderson https://ebookfinal.com/download/pro-asp-net-mvc-2-framework-2nd- edition-steven-sanderson/ Windows Azure and ASP NET MVC Migration 1st Edition Benjamin Perkins https://ebookfinal.com/download/windows-azure-and-asp-net-mvc- migration-1st-edition-benjamin-perkins/
  • 5. Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET MVC 1st Edition Jess Chadwick Digital Instant Download Author(s): Jess Chadwick, Todd Snyder, Hrusikesh Panda ISBN(s): 9781449320317, 1449320317 Edition: 1 File Details: PDF, 9.42 MB Year: 2012 Language: english
  • 8. Programming ASP.NET MVC 4 Jess Chadwick, Todd Snyder, and Hrusikesh Panda Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo
  • 9. Programming ASP.NET MVC 4 by Jess Chadwick, Todd Snyder, and Hrusikesh Panda Copyright © 2012 Jess Chadwick, Todd Synder, Hrusikesh Panda. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or [email protected]. Editor: Rachel Roumeliotis Production Editor: Rachel Steely Copyeditor: Rachel Head Proofreader: Leslie Graham, nSight Indexer: Lucie Haskins Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrators: Robert Romano and Rebecca Demarest October 2012: First Edition. Revision History for the First Edition: 2012-09-14 First release See http://oreilly.com/catalog/errata.csp?isbn=9781449320317 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Programming ASP.NET MVC 4, the image of a scabbardfish, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. ISBN: 978-1-449-32031-7 [LSI] 1347629749
  • 10. Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Part I. Up and Running 1. Fundamentals of ASP.NET MVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Microsoft’s Web Development Platforms 3 Active Server Pages (ASP) 3 ASP.NET Web Forms 4 ASP.NET MVC 4 The Model-View-Controller Architecture 4 The Model 5 The View 6 The Controller 6 What’s New in ASP.NET MVC 4? 6 Introduction to EBuy 8 Installing ASP.NET MVC 9 Creating an ASP.NET MVC Application 9 Project Templates 10 Convention over Configuration 13 Running the Application 15 Routing 15 Configuring Routes 16 Controllers 18 Controller Actions 19 Action Results 19 Action Parameters 21 Action Filters 23 Views 24 Locating Views 24 Hello, Razor! 26 Differentiating Code and Markup 27 iii
  • 11. Layouts 28 Partial Views 30 Displaying Data 31 HTML and URL Helpers 33 Models 34 Putting It All Together 35 The Route 35 The Controller 35 The View 38 Authentication 41 The AccountController 42 Summary 44 2. ASP.NET MVC for Web Forms Developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 It’s All Just ASP.NET 45 Tools, Languages, and APIs 46 HTTP Handlers and Modules 46 Managing State 46 Deployment and Runtime 47 More Differences than Similarities 47 Separation of Application Logic and View Logic 48 URLs and Routing 48 State Management 49 Rendering HTML 50 Authoring ASP.NET MVC Views Using Web Forms Syntax 54 A Word of Caution 55 Summary 56 3. Working with Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Building a Form 57 Handling Form Posts 59 Saving Data to a Database 59 Entity Framework Code First: Convention over Configuration 60 Creating a Data Access Layer with Entity Framework Code First 60 Validating Data 61 Specifying Business Rules with Data Annotations 63 Displaying Validation Errors 65 Summary 68 4. Client-Side Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Working with JavaScript 69 Selectors 71 Responding to Events 74 iv | Table of Contents
  • 12. DOM Manipulation 76 AJAX 77 Client-Side Validation 79 Summary 83 Part II. Going to the Next Level 5. Web Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 The Model-View-Controller Pattern 87 Separation of Concerns 87 MVC and Web Frameworks 88 Architecting a Web Application 90 Logical Design 90 ASP.NET MVC Web Application Logical Design 90 Logical Design Best Practices 92 Physical Design 93 Project Namespace and Assembly Names 93 Deployment Options 94 Physical Design Best Practices 94 Design Principles 96 SOLID 96 Inversion of Control 102 Don’t Repeat Yourself 110 Summary 110 6. Enhancing Your Site with AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Partial Rendering 111 Rendering Partial Views 112 JavaScript Rendering 117 Rendering JSON Data 118 Requesting JSON Data 119 Client-Side Templates 120 Reusing Logic Across AJAX and Non-AJAX Requests 123 Responding to AJAX Requests 124 Responding to JSON Requests 125 Applying the Same Logic Across Multiple Controller Actions 126 Sending Data to the Server 128 Posting Complex JSON Objects 129 Model Binder Selection 131 Sending and Receiving JSON Data Effectively 132 Cross-Domain AJAX 133 JSONP 133 Table of Contents | v
  • 13. Enabling Cross-Origin Resource Sharing 137 Summary 138 7. The ASP.NET Web API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Building a Data Service 139 Registering Web API Routes 141 Leaning on Convention over Configuration 142 Overriding Conventions 143 Hooking Up the API 143 Paging and Querying Data 146 Exception Handling 147 Media Formatters 149 Summary 152 8. Advanced Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Data Access Patterns 153 Plain Old CLR Objects 153 Using the Repository Pattern 154 Object Relational Mappers 156 Entity Framework Overview 158 Choosing a Data Access Approach 159 Database Concurrency 160 Building a Data Access Layer 161 Using Entity Framework Code First 161 The EBuy Business Domain Model 163 Working with a Data Context 167 Sorting, Filtering, and Paging Data 168 Summary 174 9. Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Building Secure Web Applications 175 Defense in Depth 175 Never Trust Input 176 Enforce the Principle of Least Privilege 176 Assume External Systems Are Insecure 176 Reduce Surface Area 176 Disable Unnecessary Features 177 Securing an Application 177 Securing an Intranet Application 178 Forms Authentication 183 Guarding Against Attacks 192 SQL Injection 192 Cross-Site Scripting 198 vi | Table of Contents
  • 14. Cross-Site Request Forgery 199 Summary 201 10. Mobile Web Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 ASP.NET MVC 4 Mobile Features 203 Making Your Application Mobile Friendly 205 Creating the Auctions Mobile View 205 Getting Started with jQuery Mobile 207 Enhancing the View with jQuery Mobile 209 Avoiding Desktop Views in the Mobile Site 216 Improving Mobile Experience 216 Adaptive Rendering 217 The Viewport Tag 217 Mobile Feature Detection 218 CSS Media Queries 220 Browser-Specific Views 221 Creating a New Mobile Application from Scratch 224 The jQuery Mobile Paradigm Shift 224 The ASP.NET MVC 4 Mobile Template 224 Using the ASP.NET MVC 4 Mobile Application Template 226 Summary 229 Part III. Going Above and Beyond 11. Parallel, Asynchronous, and Real-Time Data Operations . . . . . . . . . . . . . . . . . . . . . 233 Asynchronous Controllers 233 Creating an Asynchronous Controller 234 Choosing When to Use Asynchronous Controllers 236 Real-Time Asynchronous Communication 236 Comparing Application Models 237 HTTP Polling 237 HTTP Long Polling 238 Server-Sent Events 239 WebSockets 240 Empowering Real-Time Communication 241 Configuring and Tuning 245 Summary 246 12. Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Types of Caching 247 Server-Side Caching 248 Client-Side Caching 248 Table of Contents | vii
  • 15. Server-Side Caching Techniques 248 Request-Scoped Caching 248 User-Scoped Caching 249 Application-Scoped Caching 250 The ASP.NET Cache 251 The Output Cache 252 Donut Caching 255 Donut Hole Caching 257 Distributed Caching 259 Client-Side Caching Techniques 264 Understanding the Browser Cache 264 App Cache 265 Local Storage 268 Summary 269 13. Client-Side Optimization Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Anatomy of a Page 271 Anatomy of an HttpRequest 272 Best Practices 273 Make Fewer HTTP Requests 274 Use a Content Delivery Network 274 Add an Expires or a Cache-Control Header 276 GZip Components 278 Put Stylesheets at the Top 279 Put Scripts at the Bottom 279 Make Scripts and Styles External 281 Reduce DNS Lookups 282 Minify JavaScript and CSS 282 Avoid Redirects 283 Remove Duplicate Scripts 285 Configure ETags 285 Measuring Client-Side Performance 286 Putting ASP.NET MVC to Work 289 Bundling and Minification 289 Summary 293 14. Advanced Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Wayfinding 295 URLs and SEO 297 Building Routes 298 Default and Optional Route Parameters 299 Routing Order and Priority 301 Routing to Existing Files 301 viii | Table of Contents
  • 16. Ignoring Routes 302 Catch-All Routes 302 Route Constraints 303 Peering into Routes Using Glimpse 305 Attribute-Based Routing 306 Extending Routing 310 The Routing Pipeline 310 Summary 315 15. Reusable UI Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 What ASP.NET MVC Offers out of the Box 317 Partial Views 317 HtmlHelper Extensions or Custom HtmlHelpers 317 Display and Editor Templates 318 Html.RenderAction() 318 Taking It a Step Further 319 The Razor Single File Generator 319 Creating Reusable ASP.NET MVC Views 321 Creating Reusable ASP.NET MVC Helpers 325 Unit Testing Razor Views 327 Summary 328 Part IV. Quality Control 16. Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Error Handling in ASP.NET MVC 331 Enabling Custom Errors 332 Handling Errors in Controller Actions 333 Defining Global Error Handlers 334 Logging and Tracing 336 Logging Errors 336 ASP.NET Health Monitoring 338 Summary 341 17. Automated Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 The Semantics of Testing 343 Manual Testing 344 Automated Testing 345 Levels of Automated Testing 345 Unit Tests 345 Fast 347 Integration Tests 348 Table of Contents | ix
  • 17. Acceptance Tests 349 What Is an Automated Test Project? 350 Creating a Visual Studio Test Project 350 Creating and Executing a Unit Test 352 Testing an ASP.NET MVC Application 354 Testing the Model 355 Test-Driven Development 358 Writing Clean Automated Tests 359 Testing Controllers 361 Refactoring to Unit Tests 364 Mocking Dependencies 365 Testing Views 370 Code Coverage 372 The Myth of 100% Code Coverage 374 Developing Testable Code 374 Summary 376 18. Build Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 Creating Build Scripts 378 Visual Studio Projects Are Build Scripts! 378 Adding a Simple Build Task 378 Executing the Build 379 The Possibilities Are Endless! 380 Automating the Build 380 Types of Automated Builds 381 Creating the Automated Build 383 Continuous Integration 386 Discovering Issues 386 The Principles of Continuous Integration 386 Summary 391 Part V. Going Live 19. Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 What Needs to Be Deployed 395 Core Website Files 395 Static Content 398 What Not to Deploy 398 Databases and Other External Dependencies 399 What the EBuy Application Requires 400 Deploying to Internet Information Server 401 Prerequisites 401 x | Table of Contents
  • 18. Creating and Configuring an IIS Website 402 Publishing from Within Visual Studio 403 Deploying to Windows Azure 407 Creating a Windows Azure Account 408 Creating a New Windows Azure Website 408 Publishing a Windows Azure Website via Source Control 409 Summary 410 Part VI. Appendixes A. ASP.NET MVC and Web Forms Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 B. Leveraging NuGet as a Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 C. Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 D. Cross-Reference: Targeted Topics, Features, and Scenarios . . . . . . . . . . . . . . . . . . . 455 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 Table of Contents | xi
  • 20. Preface The web application landscape is vast and varied. Microsoft’s ASP.NET Framework— built on top of the mature and robust .NET Framework—is one of the most trusted platforms in the industry. ASP.NET MVC is Microsoft’s latest addition to the world of ASP.NET providing web developers with an alternative development approach that helps you build web applications with ease. The main goal of this book is simple: to help you to build a complete understanding of the ASP.NET MVC 4 Framework from the ground up. However, it doesn’t stop there —the book combines fundamental ASP.NET MVC concepts with real-world insight, modern web technologies (such as HTML 5 and the jQuery JavaScript Framework), and powerful architecture patterns so that you’re ready to produce not just a website that uses the ASP.NET MVC Framework, but a stable and scalable web application that is easy to grow and maintain with your expanding needs. Audience This book is for people who want to learn how to leverage the Microsoft ASP.NET MVC Framework to build robust and maintainable websites. Though the book uses many code examples to describe this process in detail, it is not simply targeted at ap- plicationdevelopers.Muchofthebookintroducesconceptsandtechniquesthatbenefit both developers writing application code and the leaders driving these development projects. Assumptions This Book Makes While this book aims to teach you everything you need to know in order to create robust and maintainable web applications with the ASP.NET MVC Framework, it assumes that you already have some fundamental knowledge about application development with the Microsoft .NET Framework. In other words, you should already be comfort- able using HTML, CSS, and JavaScript to produce a very basic website and have enough knowledge of the .NET Framework and the C# language to create a “Hello World” application. xiii
  • 21. Code throughout this book can be found at: https://github.com/Program mingAspNetMvcBook/CodeExamples Conventions Used in This Book The following typographical conventions are used in this book: Italic Indicates new terms, URLs, email addresses, databases and tables, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, data types, environment variables, statements, and keywords. Constant width bold Used for emphasis in code and to show commands or other text that should be typed literally by the user. Constant width italic Shows text that should be replaced with user-supplied values or by values deter- mined by context. This icon signifies a tip, suggestion, or general note. This icon indicates a warning or caution. Using Code Examples This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission. xiv | Preface
  • 22. We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Programming ASP.NET MVC 4 by Jess Chadwick, Todd Synder, and Hrusikesh Panda (O’Reilly). Copyright 2012 Jess Chad- wick, Todd Synder, and Hrusikesh Panda, 978-1-449-32031-7.” If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected]. Safari® Books Online Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly. Withasubscription,youcanreadanypageandwatchanyvideofromourlibraryonline. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, down- load chapters, bookmark key sections, create notes, print out pages, and benefit from lots of other time-saving features. O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and to other books on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com. How to Contact Us Please address comments and questions concerning this book to the publisher: O’Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 800-998-9938 (in the United States or Canada) 707-829-0515 (international or local) 707-829-0104 (fax) We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at: http://bit.ly/Programming_ASP_NET To comment or ask technical questions about this book, send email to: [email protected] For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com. Preface | xv
  • 23. Find us on Facebook: http://facebook.com/oreilly Follow us on Twitter: http://twitter.com/oreillymedia Watch us on YouTube: http://www.youtube.com/oreillymedia xvi | Preface
  • 24. PART I Up and Running
  • 26. Random documents with unrelated content Scribd suggests to you:
  • 27. ARTICLE XVI[326] INCOME TAX The Congress shall have power to lay and collect taxes on incomes, from whatever source derived, without apportionment among the several states, and without regard to any census or enumeration.
  • 28. ARTICLE XVII[327] SENATE: ELECTION: VACANCIES The Senate of the United States shall be composed of two Senators from each state, elected by the people thereof, for six years; and each Senator shall have one vote. The electors in each state shall have the qualifications requisite for electors of the most numerous branch of the state legislatures. When vacancies happen in the representation of any state in the Senate, the executive authority of such state shall issue writs of election to fill such vacancies: Provided, That the legislature of any state may empower the executive thereof to make temporary appointment until the people fill the vacancies by election as the legislature may direct. This amendment shall not be so construed as to affect the election or term of any Senator chosen before it becomes valid as part of the Constitution.
  • 29. ARTICLE XVIII[328] NATIONAL PROHIBITION Section 1—After one year from the ratification of this article the manufacture, sale or transportation of intoxicating liquors within, the importation thereof into, or the exportation thereof from the United States and all territory subject to the jurisdiction thereof for beverage purposes is hereby prohibited. Section 2—The Congress and the several States shall have concurrent power to enforce this article by appropriate legislation. Section 3—This article shall be inoperative unless it shall have been ratified as an amendment to the Constitution by the legislatures of the several States, as provided in the Constitution, within seven years of the date of the submission hereof to the States by Congress.
  • 30. ARTICLE XIX[329] WOMAN SUFFRAGE Section 1—The right of citizens of the United States to vote shall not be denied or abridged by the United States or by any State on account of sex. Section 2—Congress shall have power to enforce this article by appropriate legislation.
  • 31. INDEX A Accidents, industrial, 411-412 Admission of new states, 227-228 Agriculture, the federal Department of, 299 n scope and methods of, 339-342 special characteristics of, 343-345 improvements in, 345-346 government encouragement of, 346-348 financial aids to, 348-349 problems of, 349-352 Agricultural bloc, in Congress, 282 n, 350-351 Alaska, government of, 229 n Albany Congress, 248 Ambassadors, appointment and duties of, 591-595 Amendments, to state constitutions, 232 to national constitution, 260-262 American Federation of Labor, 403-404 Americanization, the public schools as agencies of, 28 purpose and methods of, 33 “American Plan” in industry, 409 Anti-Trust Law. See Sherman Act Appointments to office, methods of, 99-101
  • 32. confirmation of, 270-271 presidential, 293-294 Appeals, judicial, 311-312 Appropriations in Congress, 463-465 Arbitration, of labor disputes, 409-410 compulsory, 410-411 international, 601-602 Aristotle, classification of governments by, 66-67 Armaments, the cost of, 563-564 Army, various divisions of the, 567-571 control of, in war, 571-572 Army in peace, 572-573 Articles of Confederation, 249-251, 287 Assessments for taxation, 456-457 Athletics, value of, in training citizens, 86-88 Attorney-General, office of, 299 n Australian ballot, 132 B Balance of power in Europe, 629 Ballot, history of the, 131-132 reform of, 132-133 preferential, 133-134 Banks, functions of, 434 organization of, 435-437 federal reserve, 437-439 work of, 439-442 See also Farm Loan Banks Bargaining, collective, 405-406
  • 33. Billboards, regulation of, 214-215 Bill of Rights, 261 Bimetallism, the controversy over, 428-430 Blacklists, industrial, 407 Blackstone’s Commentaries, 314 n Bloc. See Agricultural bloc Blue-sky laws, 446 n Boards, in counties, 169-170 in cities, 192 in state government, 238-239 of education, 498 of health, 534 Bonds, defined and explained, 445 n government, 466-467 serial, 469 Bonaparte, Napoleon, on the qualities of a good constitution, 258 Bosses, political, their origin, 29 their methods, 160-161 Boycotts in labor troubles, 407 Brindell Case, 404 n Bryan, William J., on free silver, 430 Budgets, how made, 462-463 in Congress, 463-465 Buildings, public, in cities, 212-214 Bureau of Animal Industry, 347 of Foreign and Domestic Commerce, 376 of Child Welfare, 415 n of Education, 499 of American Republics, 617
  • 34. Burke, Edmund, on the function of a representative, 98-99 Business taxes, 222 C Cabinet, organization and functions of, 297-303 Campaign funds, 161-162 Capital, as a factor in production, 48-50 Center of population in the United States, 21 Chancery. See Equity Charters, municipal, 186-190 Checks and balances, 232-234 Child labor, the restriction of, 414-415 Chief justice, duties of, in presidential impeachments, 270 n China, economic resources of, 335 open door in, 618-620 Circuit courts, 313 Cities, drift of population to, 22-23 growth of, 183-184 character of population in, 184-186 relation to state, 186-190 government of, 190-199 administrative problems in, 203-222 taxation in, 455-457 City councils, 193-194 City government, development of, 182-184 present organization of, 184-199 See also Municipal problems City-manager plan, 197-198 City planning, 206-298
  • 35. Citizenship, rights of, 79 qualifications for, 81 dual, 82 n obligations of, 83-84 training for, 84-88 Civil liberty, origin and nature of, 78-81 relation of direct legislation to, 111 Civil War, effect of, on relations between nation and states, 227 on the constitution, 261-262 martial law during, 574-575 naval progress during, 575 n cost of pensions after, 583 danger of foreign intervention during, 608 Civil service, federal, 104 in counties, 173 See also Merit system Clayton Act, 391, 408 Cleveland, adoption of city manager plan in, 197 n Grover, use of armed forces in labor troubles by, 572-573 Closed shop, the question of, 408-409 Coal, the conservation of, 329-330 Codes of law, 315 n Coinage in the United States, 427-430 Colbert, Jean-Baptiste, on the art of taxation, 455 n Collective bargaining, 56, 405-406 Colleges, training for citizenship in, 87-88 Commerce, purposes of, 356-357 development of, 357-358 scope and nature of, 358-359 regulation of, 359-360
  • 36. agencies of, 364-368 effect of tariffs on, 368-372 the encouragement of, 372-378 Commission government, in cities, 194-196 in states, 241-242 Commissions, public service, 480-481 Committees, party, 156-158 in the Senate, 268-269 in the House, 275 of conference, 277-278 on budget matters, 464-465 Communism, economic aspects of, 650-652 Common law, 314-315 Companies, commercial, 50-51 See also Holding companies Competition, the nature of, 54 among public utilities, 475-476 Conciliation in labor disputes, 409-410 Confederation, Articles of, 249-251 Confirmation of appointments, 100 Congress, of the Confederation, 248-252, 257 of the United States, influence of public opinion on, 95-96 organization and work of, 266-282 committees in, 268-278 agricultural bloc in, 350-351 new budget system in, 464-465 of Vienna, 627-628 Conservation of natural resources, 326-336 Consular service, 373-374 Constitution of the United States, events leading to, 246-253 makers of, 254-255
  • 37. nature of, 257-258 development of, 258-260 methods of amending, 260-262 Constitutions, state, 230-232 Consumption of wealth, 39-40 Constabulary, state, 217 Constitutional Convention of 1787, 253-257 Continental Congress, 248 Contract, freedom of, 55-56 Conventions, party, state, 129, 156-157 national, 158-159 Coroner, office of, 172 Corporations, the nature of, 50-51 citizenship of, 81 n industrial, 384-385 control of, 389-393 Council, in cities, 193-194 County districts, 177 County government, 167-174 County manager plan, 170 Courtesy of the Senate, 270-271 Courts, county, 170-171 state, 239 federal, 308-313 Courts-martial, 573-574 Covenant. See League of Nations Credit, agricultural, 348-349 relation of money to, 442-443 Credit, relation of prices to, 443-444
  • 38. advantages and dangers of, 444-445 Crime, classifications of, 550-551 causes of, 552-553 methods of dealing with, 553-557 “Crime of 1873”, 429 n “Cross of Gold” campaign, 430 Currency, paper, history of, 430-431 present forms of, 431-432 advantages of, 432-434 Currency Act (1900), 430 Custom, the influence of, 9-10 D Darwin, Charles, theories of, 2-4 Debts, public, necessity of, 465-466 nature and amount of, 466-468 repayment of, 468-469 Declaration of Independence, influence of John Locke on, 64-65 assertion of civil rights in, 80 political doctrines of, 248-249 Defence, national, cost of, 563-564 need for, 564-567 methods of, 567-583 Degeneracy as a cause of poverty, 542 Demand and supply, relations of, 40 Democracy, true and false types, 68 progress of, 69 justification of, 70 relation of education to, 492-493 relation of socialism to, 657-658
  • 39. achievements of, 658-660 citizen’s duty toward, 660-661 Departments, in city government, 191-192, 205-206 in state government, 238-239 in federal government, 299 Diminishing returns, the law of, 343 Diplomatic service, organization and functions of, 591-595 Direct legislation, progress of, 107-108 procedure in, 109-110 merits and defects of, 110-112 Disarmament, international, 576-577 See also Washington Conference Disease, the germ theory of, 516-517 transmission of, 517-520 in industry, 521-522 the prevention of, 522-524 District attorney. See Prosecuting attorney of Columbia, government of, 230 n courts, federal, 313 Divine right, theory of, 63-64 Division of labor, 44-46 in agriculture, 344-345 of powers, 232-234 Divorce problem, 557-560 Domestic relations, courts of, 559 Drug evil, the, 526 Duties on imports, 459 See also Tariffs and Tariff problems E Economics, the subject-matter of, 38-39
  • 40. Education, relation to democracy, 492-493 to personal efficiency, 493-494 purpose and value of, 494-495 growth of, 495-496 control and management of, 496-498 national government’s work for, 498-499 federal aid to, 499-500 problems of, 500-507 vocational, 507-508 Educational tests for voting, 122-124 Elections, in counties, 169 procedure at, 129-137 corrupt practices at, 137-138 of senators, 267-268 of representatives in Congress, 273-274 presidential, 288-290 See also Ballots, City Government, Voting Emergency Fleet Corporation, 375 Employers’ liability, 411-412 England, local government in, 227 cabinet system in, 301 Environment, the influence of, 5-9 Equity, origin and nature of, 316-317 Espionage Act, the, 581 Europe, relations with, 613 Evolution, theory of, 1-5 in political institutions, 66 Excess profits, taxation of, 458-459 Exchange, the theory of, 53 Expatriation, the doctrine of, 83 F
  • 41. Factories. See Industry Family, as a fundamental social group, 11-12 its place in the evolution of government, 66 Far East, American interests in the, 617-618 Farm Loan Banks, 348-349 Farmers’ Alliance. See National Farmers’ Alliance Institutes, 350 Farmer-Labor party, 351 Federalism, the nature of, 67-68 Federalist, The, 257 Federal reserve banks, organization and work of, 437-439 Trade Commission, 341-392 Filibusters, 278-279 Filtration of water supplies, 530-531 Fire prevention, the need for, 217-218 methods of, 218-219 Fisheries, economic importance of, 333 Fittest, survival of the, 3-4, 11 Food, the inspection of, 525-526 control of, in war time, 582 Foreign policy, American traditions relating to, 606-607 nature of, 587-590 control of, 590-591 how conducted, 591-602 Forests, economic importance of, 331 See also Reserves Four Power Treaty, 619-620 Fourteen Points, the, 609-610 France, local government in, 227
  • 42. Franchises, taxation of, 456 public service, 477-480 Freedom of speech in war time, 581-582 Free silver, the fight for, 428-430 Free trade, arguments for and against, 370-372 G Garbage, disposal of, 527-528 Gary system, 506-507 General property tax, 455-456 “Gentlemen’s agreement”, with Japan, 32 in industry, 386 Geography, influence of, 8-9, 333-336 George, Henry, social views of, 461 n Germany, social insurance in, 419 Gerrymander, origin and use of, 273 Gladstone, W. E., opinion of the national constitution, 256- 257 Gompers, Samuel, 405 Government, the importance of, 13 as a factor in production, 51-52 the basis of obedience to, 63-65 origin of, 65-66 classification of, 66-69 purpose of, 70-72 functions of, 72-73 the study of, 74 Governor, position and powers of, 237-238 Grand jury, 318
  • 43. Granges. See Patrons of Husbandry Greenbacks, the, 431 Guidance, vocational, 396-397 Guild operation, 488-489 H Habeas corpus, the writ of, 317 n Habit, influence of, 10 Hague Conferences, the, 577 Hamilton, Alexander, 255, 257 Report on Manufactures, 370 Hawaii, government of, 229 n Hayes-Tilden election, 290 n Highways in counties, 168 Hobbes, Thomas, defender of absolutism, 65 Holding companies, 387 Holy Alliance, 598-599 Home rule, municipal, 187-190 House of Representatives, federal, organization and work of, 272-283 Housing, municipal control of, 531-533 I Ideals, national, economic influence of, 327 effect of urban growth on, 184-186 Illiteracy in the United States, 502 n Immigration, the course of, 23-24 causes of, 25-26
  • 44. effects of, 26-29 restriction of, 29-30, 32 Impeachments, federal, 269-270 Income taxes, 458-459 Increasing returns, law of, 388 Incidence of taxation, 451-452 Individualism as an economic system, 14, 73 Index numbers, 443 n Industrial accidents, 411-412 courts, 410-411 democracy, 393-394 Revolution, nature of, 383-384 Revolution, effect on labor, 400-401, 414 n Workers of the World (the I. W. W.), 405 Industry, definition of, 383 development and organization of, 384-386 combinations in, 386-389 government regulation of, 389-393 present-day problems of, 393-397 the hygiene of, 520-521 Inheritances, taxes on, 458 Initiative and referendum, origin and spread of, 107-108 how used, 109-110 value of, 110-111 objections to, 111-112 Injunctions, use of, in labor disputes, 407-408 Insular possessions, government of, 229-230 Insane, problem of the, 549-550 Insects as disease carriers, 518-519 Insurance, against accident, 413 against unemployment, 418
  • 45. against old age, 419 Interest on invested capital, 49-50 Interior Department, its work, 299 n International, The, 651-652 International law, nature and scope of, 588-590 Interstate commerce, growth of, 359-361 regulation of, 362-364 Commerce Commission, jurisdiction and work of, 363-364 Interpretation, development of the constitution by, 259-260 J Jackson, Andrew, removals from office by, 102 Japan, relations with, 618-620 Japanese, problem of the, on Pacific slope, 32-33 Jefferson, Thomas, believer in social contract theory, 65 on entangling alliances, 598, 606 Johnson, Andrew, impeachment of, 270 n Judicial procedure, 317-323 Judicial supremacy, the doctrine of, 310-311 Judges, selection and removal of, 239-240 Jukes, the, 542-543 Junior high schools and colleges, 502-503 Jury, grand, 318 trial, 318-319 merits and defects of, 317-321 Justice, Department of, its work, 299 n Juvenile delinquency, 557 K
  • 46. Kansas plan of arbitration, 410-411 Knights of Labor, 402-403 L Labor, as a factor in production, 43-44 division of, 44-46 perishable nature of, 46-47 federal department of, 299 n Labor in agriculture, 349 changes in the conditions of, 400-401 organization of, 401-403 American Federation of, 403-404 the radical element in, 404-405 methods and policies of, 405-410 problems of, 410-419 services of, during the World War, 419-420 relations of, to League of Nations, 637 Latin-America, relations with, 615-617 Law, branches of the, 314-315 military, 573-574 martial, 574-575 relations of labor to, 411 League of Nations, origin of the, 625-630 covenant of, 630-632 as a scheme of government, 632-636 system of mandates, 636-637 relation of labor to, 637 public health work of, 638 American objections to, 638-639 work of, 639-640 relation of Washington Conference to, 640-641 future of, 641-642 relation of Monroe Doctrine to, 600 n Legislative reference bureaus, 237 n
  • 47. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookfinal.com