Download DelphiMVCFramework - The official guide by Daniele Teti

DelphiMVCFramework - The official guide by Daniele Teti

DelphiMVCFramework - The official guide by Daniele Teti
DelphiMVCFramework - The official guide by Daniele Teti


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.

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.

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
What you’ll learn
DMVCFramework is “batteries included”
Installation of DelphiMVCFramework 3.2.1-carbon
Your first RESTful server with DelphiMVCFramework
Your first DMVCFramework-style “Hello World”
Built-in System Actions
What’s Next
Chapter 2: Controllers and routing
The Router
MVCPath attribute
Handling Parameters
Query-String parameters
URL mapped parameters
Multiple Paths for a Single Action
More about URL Mapped parameters
Strongly Typed Actions
MVCHTTPMethod attribute
MVCProduces attribute
MVCConsumes attribute
MVCDoc attribute
Action Filters
What’s Next
Chapter 3: Renders
What you’ll learn
The Rendering Phase
Rendering Data Must be Simple!
Rendering Objects and List of Objects
Customize Objects Serialization
Rendering TStream descendants
Rendering Nested Objects
Serializing TDataset descendants
Rendering Dictionaries
Rendering images, pdf and other binary contents
Rendering Exceptions
Rendering Custom Data Structures
Support HATEOAS in your APIs
Deserialization
Deserialize Simple Objects
Deserializing List of Object
Deserializing Hierarchical Structures
The IMVCList Interface
Sending Binary Contents
Using multipart/form-data
Custom Type Serializers
Using custom serializer
What’s Next
Chapter 4: Municipal Library System - The Database
What you’ll learn
The Municipal Library System
The Database
What’s Next
Chapter 5: Municipal Library System - The APIs
What you’ll learn
APIs design Overview
Design an API for the Books Lending System
The actual APIs
What’s next
Chapter 6: Municipal Library System - Creating APIs using Datasets
What you’ll learn
The CRUD acronym
Implementing the API using datasets
What’s Next
Chapter 7: Municipal Library System - Creating APIs with MVCActiveRecord
What you’ll learn
The ActiveRecord Design Pattern
ActiveRecord in MVCFramework a.k.a. MVCActiveRecord
What’s Next
Chapter 8: Municipal Library System - Complete APIs with MVCActiveRecord
What you’ll learn
WebModule Configuration
Establish a Database Connection
TAuthorsController
TControllerBase
Handling pagination in TCustomersController.GetCustomers
Terminate a lending
Users management with TUsersController
What’s Next
Chapter 9: Authentication & authorization
What you’ll learn
Authentication vs Authorization
The Authentication/Authorization Subsystem
Securing an API
HTTP Basic Authentication
JSON Web Token Authentication and Authorization
Accessing Logged User Information
What’s Next
Chapter 10: Middlewares
What you’ll learn
What’s a middleware?
The IMVCMiddleware Interface
Built-In Middleware
CORS Middleware
Compression Middleware
Analytics Middleware
Trace Middleware
Static Files Middleware
What’s Next
Chapter 11: Municipal Library System - Authentication and Authorization
What you’ll learn
How to choose an authentication schema
Defining a roles system
Create a Python client
What’s Next
Chapter 12: JSON-RPC: why, when and how use it
What you’ll learn
JSON-RPC Overview
JSON-RPC 2.0 Requests
JSON-RPC 2.0 Notifications
Response Error Object
JSON-RPC vs REST
Publishing PODOs
The MVCInheritable Attribute
Inspecting the published methods
Defining Hooks
What’s Next
Chapter 13: Document and test your REST API with the Swagger middleware
What you’ll learn
How to use
MVCSwagSummary attribute
MVCSwagAuthentication attribute
MVCSwagParam attribute
MVCSwagResponses attribute
MVCSwagJSONSchemaField attribute
MVCSwagIgnorePath attribute
Simple Swagger Tutorial
What’s Next
Chapter 14: Tips and Tricks
Tip #1: Redirecting users to a different URL only when are using browser
Tip #2: Don’t load system controllers
Tip #3: Remove X-Powered-By Header
Tip #4: Change or remove the Server Header
Tip #5: Testing API using Python
Tip #6: Storing users password
Tip #7: Use RQL for simple query

Only for V.I.P
Warning! You are not allowed to view this text.