Leanpub Header

Skip to main content

DelphiMVCFramework

Leverage the power of REST and JSON-RPC using the most popular framework for Delphi

Learn how to use the most popular RESTful and JSON-RPC framework for Delphi

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
582
Readers
280
Pages
45,331Words
About

About

About the Book

DelphiMVCFramework is a solid and proven framework to build websolutions. If you ever think to build a distributed system, DelphiMVCFramework is one of the best choice you could do.

Price

Pick Your Price...

Minimum price

$35.00

$65.00

You pay

$65.00

Author earns

$52.00
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 3)

3
The author will earn $36.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

DANIELE TETI

Daniele Teti is a software architect, trainer, books author and consultant with over 20 years of experience. Daniele is a well-known Delphi and programming expert in the developer community and is a regular speaker for italian and international conferences. Daniele is the author of the best-selling "Delphi Cookbook" books serie published by PacktPub. He's the main developer and drives the development of the most popular Delphi open source project on github: DelphiMVCFramework. Among DelphiMVCFramework Daniele is the lead developer for other well know OS projects like ColumbusEgg4Delphi, DelphiREDISClient, DelphiSTOMPClient and many others. He is also a huge fan of design patterns, machine learning and AI. Daniele is the CEO of bit Time Professionals, an Italian company specializing in high-level consultancy, training, development and machine learning systems.

Translations

Translations

Contents

Table of Contents

Foreword

Reviewers

Collaborators

Translations

What users say about DMVCFramework

Fetching This Book’s Code

Using This Book’s Code

Book Release Notes

Chapter 1: Getting Started with DelphiMVCFramework

  1. What you’ll learn
  2. DMVCFramework is “batteries included”
  3. Installation of DelphiMVCFramework 3.2.1-carbon
  4. Your first RESTful server with DelphiMVCFramework
  5. Your first DMVCFramework-style “Hello World”
  6. Built-in System Actions
  7. What’s Next

Chapter 2: Controllers and routing

  1. The Router
  2. MVCPath attribute
  3. Handling Parameters
  4. Query-String parameters
  5. URL mapped parameters
  6. Multiple Paths for a Single Action
  7. More about URL Mapped parameters
  8. Strongly Typed Actions
  9. MVCHTTPMethod attribute
  10. MVCProduces attribute
  11. MVCConsumes attribute
  12. MVCDoc attribute
  13. Action Filters
  14. What’s Next

Chapter 3: Renders

  1. What you’ll learn
  2. The Rendering Phase
  3. Rendering Data Must be Simple!
  4. Rendering Objects and List of Objects
  5. Customize Objects Serialization
  6. Rendering TStream descendants
  7. Rendering Nested Objects
  8. Serializing TDataset descendants
  9. Rendering Dictionaries
  10. Rendering images, pdf and other binary contents
  11. Rendering Exceptions
  12. Rendering Custom Data Structures
  13. Support HATEOAS in your APIs
  14. Deserialization
  15. Deserialize Simple Objects
  16. Deserializing List of Object
  17. Deserializing Hierarchical Structures
  18. The IMVCList Interface
  19. Sending Binary Contents
  20. Using multipart/form-data
  21. Custom Type Serializers
  22. Using custom serializer
  23. What’s Next

Chapter 4: Municipal Library System - The Database

  1. What you’ll learn
  2. The Municipal Library System
  3. The Database
  4. What’s Next

Chapter 5: Municipal Library System - The APIs

  1. What you’ll learn
  2. APIs design Overview
  3. Design an API for the Books Lending System
  4. The actual APIs
  5. What’s next

Chapter 6: Municipal Library System - Creating APIs using Datasets

  1. What you’ll learn
  2. The CRUD acronym
  3. Implementing the API using datasets
  4. What’s Next

Chapter 7: Municipal Library System - Creating APIs with MVCActiveRecord

  1. What you’ll learn
  2. The ActiveRecord Design Pattern
  3. ActiveRecord in MVCFramework a.k.a. MVCActiveRecord
  4. What’s Next

Chapter 8: Municipal Library System - Complete APIs with MVCActiveRecord

  1. What you’ll learn
  2. WebModule Configuration
  3. Establish a Database Connection
  4. TAuthorsController
  5. TControllerBase
  6. Handling pagination in TCustomersController.GetCustomers
  7. Terminate a lending
  8. Users management with TUsersController
  9. What’s Next

Chapter 9: Authentication & authorization

  1. What you’ll learn
  2. Authentication vs Authorization
  3. The Authentication/Authorization Subsystem
  4. Securing an API
  5. HTTP Basic Authentication
  6. JSON Web Token Authentication and Authorization
  7. Accessing Logged User Information
  8. What’s Next

Chapter 10: Middlewares

  1. What you’ll learn
  2. What’s a middleware?
  3. The IMVCMiddleware Interface
  4. Built-In Middleware
  5. CORS Middleware
  6. Compression Middleware
  7. Analytics Middleware
  8. Trace Middleware
  9. Static Files Middleware
  10. What’s Next

Chapter 11: Municipal Library System - Authentication and Authorization

  1. What you’ll learn
  2. How to choose an authentication schema
  3. Defining a roles system
  4. Create a Python client
  5. What’s Next

Chapter 12: JSON-RPC: why, when and how use it

  1. What you’ll learn
  2. JSON-RPC Overview
  3. JSON-RPC 2.0 Requests
  4. JSON-RPC 2.0 Notifications
  5. Response Error Object
  6. JSON-RPC vs REST
  7. Publishing PODOs
  8. The MVCInheritable Attribute
  9. Inspecting the published methods
  10. Defining Hooks
  11. What’s Next

Chapter 13: Document and test your REST API with the Swagger middleware

  1. What you’ll learn
  2. How to use
  3. MVCSwagSummary attribute
  4. MVCSwagAuthentication attribute
  5. MVCSwagParam attribute
  6. MVCSwagResponses attribute
  7. MVCSwagJSONSchemaField attribute
  8. MVCSwagIgnorePath attribute
  9. Simple Swagger Tutorial
  10. What’s Next

Chapter 14: Tips and Tricks

  1. Tip #1: Redirecting users to a different URL only when are using browser
  2. Tip #2: Don’t load system controllers
  3. Tip #3: Remove X-Powered-By Header
  4. Tip #4: Change or remove the Server Header
  5. Tip #5: Testing API using Python
  6. Tip #6: Storing users password
  7. Tip #7: Use RQL for simple query

Contributors

About the Contributors

Nirav Kaku

Marco Cotroneo

Alessio Festuccia

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub