Instant Nancy Web Development
eBook - ePub

Instant Nancy Web Development

Christian Horsdal

  1. 74 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Instant Nancy Web Development

Christian Horsdal

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

In Detail

Nancy is a C# web framework which aims to provide you ,the application developer, with an easy path to follow, where things will naturally fall into place and work. Nancy is a powerful, flexible, and lightweight web framework that allows you to get on with your job.

Instant Nancy Web Development will give Readers practical introduction to building, testing, and deploying web applications with Nancy. You will learn how to take full advantage of Nancy to build clean application code, and will see how this code lends itself nicely to test driven development. You will also learn how to hook into Nancy to easily extend the framework.

Instant Nancy Web Development offers you an in-depth exploration of all the major features of the Nancy web framework, from basic routing to deployment in the Cloud, and from model binding to automated tests.

You will learn how to build web applications with Nancy and explore how to build web sites using Razor views. Next, you will learn how to build web based APIs suitable for JavaScript clients, mobile clients, and even desktop applications. In fact, you will learn how to easily combine the two into one.

Finally, you will learn how to leverage Nancy to write clean and maintainable web applications quickly.

Approach

Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. A practical, step-by-step guide featuring recipes that will get you up and running quickly with Nancy.

Who this book is for

If you are a .NET oriented web developer who is curious to find out what lies beyond the Microsoft provided frameworks, then this book is for you! It's beneficial to have a good knowledge of C# and .NET, as well as a basic working knowledge of HTTP. If testability is important to you, and you're looking for a lightweight, code focused approach to building web applications, this book offers you all the guidance that you will need.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Instant Nancy Web Development als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Instant Nancy Web Development von Christian Horsdal im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Software Development. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2013
ISBN
9781783283910

Instant Nancy Web Development


Instant Nancy Web Development

Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2013
Production Reference: 1230913
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-391-0
www.packtpub.com

Credits

Author
Christian Horsdal
Reviewer
Michele Capra
Acquisition Editor
Antony Lowe
Commissioning Editor
Nikhil Chinnari
Technical Editor
Chandni Maishery
Copy Editors
Mradula Hegde
Alfida Paiva
Project Coordinator
Esha Thakker
Proofreader
Karen Estrada
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
Cover Image
Sheetal Aute

About the Author

Christian Horsdal is an independent consultant working with clients as an architect, consultant, and developer. He works with clients of all types, from small start-ups to large global companies.
Christian is an expert .NET architect and developer who mixes and matches commercial, open source, and tailor-made components in a quest to create simple and lean solutions that allow for quick and agile development.
Christian can be found online through his website http://www.horsdal-consult.dk/.

About the Reviewer

Michele Capra is an Italian software consultant, international speaker, and trainer on software development with Microsoft Technologies. He got his master's degree in Software Engineering in 2009 after working as a visiting researcher at Trinity College of Dublin. In the same year, he started working in the software industry and took part in a wide variety of software projects. He has been working for several financial institutions such as banks and funds, as well as start-ups. In these projects, he had the opportunity to learn and practice agile methodologies, for example, Test Driven Development, as well as to study Microsoft Technologies such as WPF, ASP.NET MVC, Windows Phone, and WinRT.
During his career, he has been speaking at several local .NET user-group events (such as WebAPI CodeCage, Windows Phone Refresh, C# Unleashed) as well as national (for example, WhyMCA) and international conferences (for example, Codemotion Berlin).

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
Support files, eBooks, discount offers and more
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print and bookmark content
  • On demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

Welcome to Instant Nancy Web Development. I would like to start off by giving you a few motivations for using Nancy and touch upon the types of applications where I think Nancy really shines. These are personal opinions and others may not agree to it. That's OK. The point is, knowing that these are the motivations I have for using Nancy and that these are the situations where I'd use it, give you better context for reading this book.
The Nancy web framework (http://nancyfx.org/) was founded by Andreas Håkansson, who, along with Steven Robbins, maintains the project. Nancy was originally inspired by the Sinatra Ruby web frameworks, but is by no means a port.

Style matters

Before I get to the motivations for using Nancy, I want to digress for a bit. In this seemingly (or wannabe) rational realm of technology, we tend to focus a lot on the concrete and measurable things when we choose between one technology and the other, such as how do the features lists compare, how well does each cope with high volumes of load, and what is the total cost of ownership for each. We may end up with a chart or spreadsheet scoring each technology on multiple axis and calculating a final aggregate score which the answer to the choice. I think we too often miss an important component in these decisions, namely the style Why? Because style, in my experience, has a tremendous effect on the happiness of the developers working with the technology. Why does that matter? Well, apart from the basic good of people being happy, they are also more productive and more creative when they are happy. This is not too far from saying that a happier developer can save the development time and/or lead to a better product. That is quite tangible, and I argue that it has the potential benefit of choosing the more stylish or more aesthetically pleasing technology.
What is style then? It's a lot of small things, such as how the code looks line by line, how the framework makes you structure the code, and how terse versus explicit the code is.
As it turns out, Nancy's style really clicks for me. I find it fun and refreshing to work with. I hope the recipes in this book will make you feel the same way.

The super duper happy path

Nancy's declared ethos is to provide the super duper happy path; that is, it is a goal for Nancy to make anything you would want to do in a web application easy. To do this, Nancy employs a range of techniques and principles, such as:
  • Small embedded Domain Specific Language (DSL) that makes your application code very short and very explicit at the same time.
  • The other principle is convention over configuration. There are lots of things in Nancy applications that we don't need to be explicit about, because Nancy, out of the box, has sensible defaults. For instance, you don't have to configure all your Nancy modules (introduced in the recipes Building and running your first Nancy application (Simple), Nancy testing – your first Nancy tests (Intermediate), and Routes and model binding (Intermediate)); instead, by convention, any Nancy module in your application code is automatically picked up by the framework.
  • Everything, including the core pieces of the framework, can be extended with your custom extension or even swapped out completely, if needed. We will see examples of this in the recipes Routes and model binding (Intermediate) and Content negotiation and more model binding (Advanced).
  • Everything is highly testable. This is not a Test Driven Development (TDD) book, but I will say that I very much prefer to use TDD for the vast majority of my code, which means that for me, testability is a huge deal. Nancy allows a very nice TDD flow.
  • Nancy is not tied to any particular platform beyond the client profile, Base Class Library (BCL). This means that Nancy runs on IIS, in a command-line application, in a WPF application, on Azure, and on Mono, just to name a few.
The result of the super duper happy path is that Nancy, for the most part, does exactly what I expected and wanted without much code. This gives Nancy applications a nice, lightweight feeling.

Sweet spot

The question remains, when to use Nancy? The short answer is that Nancy is suitable for all the .NET based web development. A slightly longer answer is that I find Nancy making the most sense for web applications with multiple...

Inhaltsverzeichnis

Zitierstile für Instant Nancy Web Development

APA 6 Citation

Horsdal, C. (2013). Instant Nancy Web Development (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/390190/instant-nancy-web-development-pdf (Original work published 2013)

Chicago Citation

Horsdal, Christian. (2013) 2013. Instant Nancy Web Development. 1st ed. Packt Publishing. https://www.perlego.com/book/390190/instant-nancy-web-development-pdf.

Harvard Citation

Horsdal, C. (2013) Instant Nancy Web Development. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/390190/instant-nancy-web-development-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Horsdal, Christian. Instant Nancy Web Development. 1st ed. Packt Publishing, 2013. Web. 14 Oct. 2022.