| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
36 Articles match "Books"
See all articles with
"Books"
| The Latest from Maurice de Bejeir | MORE | | Integrating the #WebAPI HttpClient and ApiController in a single test Testing the getting of books The code used to test getting the books from the ApiController is actually quite similar to testing just the client code. In this case it uses an in memory repository so I know exactly that the same set of 5 books are returned every time. 11: var books = client.GetBooks(); 12: 13: // Assert. The test of adding a new book. Adding a new book in an integration test is just as simple: 1: [TestMethod]. 13: var response = client.PostBook(book); 14: 15: // Assert. 17: client.PutBook(book); 18: 19: // Assert. Maurice de Bejeir - Monday, May 27, 2013 Maurice de Beijer: Integrating the #WebAPI HttpClient and ApiController in a single test Testing the getting of books The code used to test getting the books from the ApiController is actually quite similar to testing just the client code. In this case it uses an in memory repository so I know exactly that the same set of 5 books are returned every time. 11: var books = client.GetBooks(); 12: 13: // Assert. The test of adding a new book. Adding a new book in an integration test is just as simple: 1: [TestMethod]. 13: var response = client.PostBook(book); 14: 15: // Assert. 17: client.PutBook(book); 18: 19: // Assert. Sweet The Problem Solver - Monday, May 27, 2013 Unit testing code depending on the ASP.NET WebApi HttpClient In this case the client application contains the following class to load books from the REST WebAPI controller: 1: public class BooksClient. 19: 20: public Book GetBook( int id). 27: 28: public Tuple PostBook(Book book). 30: var response = _httpClient.PostAsJsonAsync(BaseUrl.ToString(), book).Result; This class uses the HttpClient to request the data from the service and extracts the books from the body before returning them. The GetBooks() function gets all books from the REST service. 5: var books = new []. 14: {. Result; 18: }. 21: {. Maurice de Bejeir - Monday, May 20, 2013 | | The Best from Maurice de Bejeir | MORE | | Understanding Map - Reduce 14: public string Book { get; set; }. Each order line contains the books title, the quantity and the amount it was sold for. In this case the books title and the price it was sold for. 3: public string Book { get; set; }. 11: Book = line.Book, 12: Amount = line.Price. 7: Book = line.Book, 8: Amount = line.Price. 7: Book = grp.Key, 8: Amount = grp.Sum(item => item.Amount). Quite a few people seem to be intimidated by the concept of Map-Reduce. Basic principle The basic Map-Reduce consists of two steps. Simple right? Again pretty simple right? The Problem Solver - Monday, December 3, 2012 Using the WCF Web API in an ASP.NET MVC application All we can do is retrieve a list of books or get an individual one. Book GetBook( int id). {. These steps, and adding the required IBooksRepository and its implementation, result in a working service the URL “books” maps to the collection of all books and the URL “books/3” maps to the book with id 3 using the template. Warning: This post is based on a prerelease version of the WCF Web API In my previous blog post I showed how to add to and use the new WCF Web API a console application using NuGet. just prefer the MVC approach, you might not. repo = repo; }. The Problem Solver - Monday, June 13, 2011 Using SignalR for real time data updates In the following code the clients starts the communications hub and passed the loadBooks callback to load the books as soon as the communications are initialized. $( function () {. then( function (books) {. each(books, function () {. appendTo(ul); renderBook(newLi, this ); }); }); }; function renderBook(li, book) {. var books = _repo.GetBooks(); return books; }. }. e.preventDefault(); var form = $( this ); var book = {. val(). }; hub.updateBook(book); }); hub.bookUpdated = function (book) {. public void updateBook(Book book). {. The Problem Solver - Wednesday, July 25, 2012 | - Book review: Silverlight 4 in Action
Reviewing this book took some time as it weighs in at a hefty 798 pages, who ever said that Silverlight was a small products? That is a lot of material but then the book doesn't assume any prior knowledge of Silverlight at all. The book is divided into 25 chapters in 3 different sections. In these cases the book is a nice point to get started but no more than that and getting additional information on the Internet is pretty much a requirement. Pete has a pretty solid coverage of the material the book will help you understand what you need to know. Enjoy! The Problem Solver - Wednesday, September 29, 2010 - Using HTTP status codes in a REST service
Book GetBook( int id). {. If I request the books resource using the URL [link] I get the following. However if I use the URL [link] to get a book with id 999 which doesn’t exist I see the following: Not exactly what I want, there is no book found and yet it returns a null book resource. Using the HttpResponseMessage we can set all sorts of headers but in this case we are only interested in setting the HttpStatusCode to NotFound if the requested book doesn’t exist. HttpResponseMessage result; var book = _repo.GetBook(id); if (book != Enjoy! The Problem Solver - Wednesday, July 20, 2011 - Unit testing a ASP.NET WebAPI controller
Testing a simple ApiController that gets data Suppose we have the following ASP.NET WebAPI Controller with two Get methods, the first returns the complete list of books and the second returns the book with the requested ID. 14: 15: // GET api/books. 24: var book = _repo.GetBook(id); 25: 26: if (book == null ). 30: 31: return Request.CreateResponse(HttpStatusCode.OK, book); 32: }. The Get() method that returns all books is easy enough to test. There are no dependencies on WebAPI bits, all it does is return a enumeration of books. 8: 9: }. The Problem Solver - Sunday, May 12, 2013 - Unit testing code depending on the ASP.NET #WebApi HttpClient
In this case the client application contains the following class to load books from the REST WebAPI controller: 1: public class BooksClient. 19: 20: public Book GetBook( int id). 27: 28: public Tuple PostBook(Book book). 30: var response = _httpClient.PostAsJsonAsync(BaseUrl.ToString(), book).Result; This class uses the HttpClient to request the data from the service and extracts the books from the body before returning them. The GetBooks() function gets all books from the REST service. 5: var books = new []. 14: {. Result; 18: }. 21: {. The Problem Solver - Monday, May 20, 2013 - Maurice de Beijer: Integrating the #WebAPI HttpClient and ApiController in a single test
Testing the getting of books The code used to test getting the books from the ApiController is actually quite similar to testing just the client code. In this case it uses an in memory repository so I know exactly that the same set of 5 books are returned every time. 11: var books = client.GetBooks(); 12: 13: // Assert. The test of adding a new book. Adding a new book in an integration test is just as simple: 1: [TestMethod]. 13: var response = client.PostBook(book); 14: 15: // Assert. 17: client.PutBook(book); 18: 19: // Assert. Sweet The Problem Solver - Monday, May 27, 2013 - How to get started with Knockout.js
then( function (books) {. $.each(books, each(books, function () {. $( " " ).text( then( function (books) {. var html = tmpl( "books_tmpl" , { books: books }); $( "#books" ).html(html); var book = books[i];%> by. Once you get into doing more client side JavaScript code with business applications and REST services you are going to run into the question of how to construct the client side HTML required to show the data to the users. click( function () {. $.getJSON( getJSON( "/services/books" ).then( The Problem Solver - Monday, February 6, 2012 - Getting started with RavenDB in an ASP.NET MVC application
In this demo I am going to use a simple book application to show how simple it is to get started with RavenDB. The book class is pretty basic and looks like this; 1: namespace RavenMvc.Models. 3: public class Book. list of books application. Showing a lost of books is real simple. 4: // GET: /Books/. 9: var books = session.Query ().ToList(); ToList(); 10: return View(books); 11: }. Instead RavenDB will just check to see of it knows about books and if so return them. Loading a single book. 2: // GET: /Books/Details/5. The Problem Solver - Sunday, November 25, 2012 %>
288 Articles match "Books"
See all articles with
"Books"
| The Latest from DevelopMentor | MORE | | Integrating the #WebAPI HttpClient and ApiController in a single test Testing the getting of books The code used to test getting the books from the ApiController is actually quite similar to testing just the client code. In this case it uses an in memory repository so I know exactly that the same set of 5 books are returned every time. 11: var books = client.GetBooks(); 12: 13: // Assert. The test of adding a new book. Adding a new book in an integration test is just as simple: 1: [TestMethod]. 13: var response = client.PostBook(book); 14: 15: // Assert. 17: client.PutBook(book); 18: 19: // Assert. Maurice de Bejeir - Monday, May 27, 2013 Maurice de Beijer: Integrating the #WebAPI HttpClient and ApiController in a single test Testing the getting of books The code used to test getting the books from the ApiController is actually quite similar to testing just the client code. In this case it uses an in memory repository so I know exactly that the same set of 5 books are returned every time. 11: var books = client.GetBooks(); 12: 13: // Assert. The test of adding a new book. Adding a new book in an integration test is just as simple: 1: [TestMethod]. 13: var response = client.PostBook(book); 14: 15: // Assert. 17: client.PutBook(book); 18: 19: // Assert. Sweet The Problem Solver - Monday, May 27, 2013 Unit testing code depending on the ASP.NET WebApi HttpClient In this case the client application contains the following class to load books from the REST WebAPI controller: 1: public class BooksClient. 19: 20: public Book GetBook( int id). 27: 28: public Tuple PostBook(Book book). 30: var response = _httpClient.PostAsJsonAsync(BaseUrl.ToString(), book).Result; This class uses the HttpClient to request the data from the service and extracts the books from the body before returning them. The GetBooks() function gets all books from the REST service. 5: var books = new []. 14: {. Result; 18: }. 21: {. Maurice de Bejeir - Monday, May 20, 2013 | -
| The Best from DevelopMentor | MORE | - How to rip audio books
So i listen to a lot of audio books, and here's how i create the mp3 of them. Make sure the book is UNABRIDGED 1) get a ipod - i prefer the nano. link] 4) set your encoding bitrate to 64k & stereo, this is a very high quality audio book. Overview we are going to create bite size files about 30 minutes each. then label them, and create the id tags. finally we'll attach a picture. link] Ripping 2) download audiograbber & install. link] 3) download lame encoder & install. To do this double click a track. select the Sectors>Last. And there you go Llewellyn Falco - Sunday, July 6, 2008 - Book review: Silverlight 4 in Action
Reviewing this book took some time as it weighs in at a hefty 798 pages, who ever said that Silverlight was a small products? That is a lot of material but then the book doesn't assume any prior knowledge of Silverlight at all. The book is divided into 25 chapters in 3 different sections. In these cases the book is a nice point to get started but no more than that and getting additional information on the Internet is pretty much a requirement. Pete has a pretty solid coverage of the material the book will help you understand what you need to know. Enjoy! The Problem Solver - Wednesday, September 29, 2010 - Books on Windows Phone 7 development
Here are some books for people that are looking to get into Windows Phone 7 development (some are pre-order only at this time): Microsoft XNA Framework Programming for Windows Phone 7. Microsoft Silverlight Programming for Windows Phone 7. Windows Phone 7 Plain & Simple. Developing Windows Phone 7 Applications. Windows Phone 7 The Blomsma Code - Thursday, December 2, 2010 - Using SignalR for real time data updates
In the following code the clients starts the communications hub and passed the loadBooks callback to load the books as soon as the communications are initialized. $( function () {. then( function (books) {. each(books, function () {. appendTo(ul); renderBook(newLi, this ); }); }); }; function renderBook(li, book) {. var books = _repo.GetBooks(); return books; }. }. e.preventDefault(); var form = $( this ); var book = {. val(). }; hub.updateBook(book); }); hub.bookUpdated = function (book) {. public void updateBook(Book book). {. The Problem Solver - Wednesday, July 25, 2012 - Understanding Map - Reduce
14: public string Book { get; set; }. Each order line contains the books title, the quantity and the amount it was sold for. In this case the books title and the price it was sold for. 3: public string Book { get; set; }. 11: Book = line.Book, 12: Amount = line.Price. 7: Book = line.Book, 8: Amount = line.Price. 7: Book = grp.Key, 8: Amount = grp.Sum(item => item.Amount). Quite a few people seem to be intimidated by the concept of Map-Reduce. Basic principle The basic Map-Reduce consists of two steps. Simple right? Again pretty simple right? The Problem Solver - Monday, December 3, 2012 %>
| | |