Commit Graph

365 Commits

Author SHA1 Message Date
Daniele Teti
85eef8920f Added server side session with file persistence 2023-08-12 01:24:10 +02:00
Daniele Teti
8631a155ff - Added IMVCResponse with related helper methods "MVCResponse(...)"
- IMVCObjectDictionary can be serialized as attribute and not only as root object (required to serialize IMVCObjectDictionary from TMVCResponse)
2023-08-04 13:09:05 +02:00
Daniele Teti
7e451ae1d6 Added specific rendering case for TMVCResponse and its child classes 2023-08-03 17:04:28 +02:00
Daniele Teti
34bddfc8fd Improved TMVCResponse to better suit the new functional actions 2023-07-20 16:40:39 +02:00
Daniele Teti
61d021b92a Improved dataset handling for functional actions. 2023-07-19 11:10:21 +02:00
Daniele Teti
e6fc21dff9 Merge branch 'master' into feature_642_functions_as_action
# Conflicts:
#	packages/d113/dmvcframework_group.groupproj
#	sources/MVCFramework.Commons.pas
2023-07-18 13:44:14 +02:00
Daniele Teti
7a3ad403f8 Added RenderFile and RenderStream as aliases for SendFile and SendStream 2023-07-07 20:27:24 +02:00
Daniele Teti
93ee4225f4 Small improvements on shutdown 2023-06-06 17:34:24 +02:00
Daniele Teti
607a30a3f0 https://github.com/danieleteti/delphimvcframework/issues/664 2023-06-04 18:19:50 +02:00
Daniele Teti
a05060b18c https://github.com/danieleteti/delphimvcframework/issues/663
Reverted commit ba537b2ad9 related to issue https://github.com/danieleteti/delphimvcframework/issues/658
2023-05-26 18:46:59 +02:00
Daniele Teti
ba537b2ad9 https://github.com/danieleteti/delphimvcframework/issues/658 2023-05-18 16:52:35 +02:00
Daniele Teti
d122bf300d (WIP) 2023-05-18 09:09:05 +02:00
Daniele Teti
2d5f4c5f36 Merge branch 'master' into feature_642_functions_as_action
# Conflicts:
#	README.md
2023-04-21 16:41:21 +02:00
Daniele Teti
29949afa17 Improved logic behind "EnterInShutdownState" 2023-03-24 11:37:12 +01:00
Daniele Teti
19c9cd3df4 Added support for records and array of record in function/action return 2023-03-14 08:56:00 +01:00
Daniele Teti
cae4396c18 Works: PODO, TObjectList<T>, TStream, string, enum, bool, nested objects 2023-02-05 00:36:01 +01:00
Daniele Teti
fc9fffb9e7 Updated copyright message, removing some warnings 2023-01-17 08:52:26 +01:00
Daniele Teti
ab13c307d7 Added WarningThreshold in Profiler 2022-12-06 16:10:55 +01:00
Daniele Teti
4a25c05811 https://github.com/danieleteti/delphimvcframework/issues/590 2022-11-24 08:53:27 +01:00
Daniele Teti
82ca77ab60 Renamed "Render(AErrorCode: Integer etc" in "RenderStatusMessage(etc..." 2022-10-26 19:31:54 +02:00
Daniele Teti
1a9f1deba3 + New built-in Profiler (check Profiling sample), new Context.ActionQualifiedName property 2022-10-20 17:29:04 +02:00
Daniele Teti
78d2532e98 Improved loggin in StaticFile Middleware 2022-10-09 17:15:25 +02:00
Daniele Teti
f54f74522c - Default error responses contains the official "reason string" associated to the HTTP status code (this can be a breaking change for some generic client which doesn't correctly interpret the http status code)
- Added static method `HTTP_STATUS.ReasonStringFor(HTTPStatusCode)` wich returns the standard `ReasonString` for a given HTTP status code.
- Improved handling of `TMVCErrorResponse` information
- mid-air-collision handling now uses SHA1 instead of MD5
- Added `MVCFramework.Commons.MVC_HTTP_STATUS_CODES` const array containing all the HTTP status codes wich its `ReasonString`
2022-10-09 15:45:59 +02:00
Daniele Teti
ee6075d6a2 Improved MVCARAntitiesGenerator (WIP), Improved TMVCActiveRecord.Merge method 2022-08-28 13:06:16 +02:00
Daniele Teti
0f3bae84b9 Automated support to avoid "mid-air collisions". New methods SetETag and CheckIfMatch allows a better security without adding complexity to the controller code - check avoid_mid_air_collisions_sample.dproj sample and see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag#avoiding_mid-air_collisions for more info about mid-air collisions. 2022-08-18 01:45:49 +02:00
Daniele Teti
3998c1288b While not strictly required nor defined, DMVCFramework supports sending body data for all HTTP VERBS - see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET 2022-08-17 12:59:40 +02:00
Daniele Teti
821180ea75 Updated LoggerPro, improved Wizard, general code cleaning 2022-08-13 00:21:00 +02:00
Daniele Teti
b109c6fed8 https://github.com/danieleteti/delphimvcframework/issues/335 2022-08-02 17:07:14 +02:00
Daniele Teti
64a1bb22fa Merge branch 'feature_jsonrpc_records' 2022-07-25 15:42:37 +02:00
Daniele Teti
8ed42ee797 + Added example for serialize single record in controller 2022-07-18 18:04:36 +02:00
João Antônio Duarte
140b70ba33 + Adjustments for Delphi Seattle/Berlin compatibility 2022-07-15 15:42:29 -03:00
Daniele Teti
6d0ef7d5a6 + Implemented unit test for GUID support (WIP) 2022-06-23 14:34:01 +02:00
Daniele Teti
eea09f1d94 Merge branch 'master' of https://github.com/marcelojaloto/delphimvcframework into marcelojaloto-master 2022-06-15 17:01:42 +02:00
Daniele Teti
617d6ffa4a https://github.com/danieleteti/delphimvcframework/issues/514 (partial) 2022-06-15 12:02:11 +02:00
Marcelo Jaloto
c069a618f6 Simple improvement for when serializing the TMVCResponse object to a Json string; 2022-05-31 15:43:22 -03:00
Daniele Teti
594b3a36a9 https://github.com/danieleteti/delphimvcframework/issues/538 (WIP) 2022-03-31 16:43:32 +02:00
Daniele Teti
98fd21ac8f https://github.com/danieleteti/delphimvcframework/issues/530 2022-03-25 11:49:22 +01:00
Daniele Teti
578a581f4b https://github.com/danieleteti/delphimvcframework/issues/539 2022-03-25 11:25:31 +01:00
Daniele Teti
78ef7c01a9 https://github.com/danieleteti/delphimvcframework/issues/544 2022-03-25 11:02:09 +01:00
Daniele Teti
c2d3cbc859 https://github.com/danieleteti/delphimvcframework/issues/542 2022-03-25 10:49:12 +01:00
Daniele Teti
a8ce1bb25b + Updated copyright for 2022 2022-01-04 15:44:47 +01:00
Daniele Teti
f1fa322632 + CustomIntfObject support 2021-12-30 00:45:19 +01:00
Daniele Teti
810282b89e + added eLua server side view support. eLua views requires Lua dlls so the LuaViewEngine is not included in the core but in the sample folder 2021-12-30 00:36:35 +01:00
Daniele Teti
f3e8def287 + Added "LogException", fixed some IFDEFs to correctly compile on mobile platforms 2021-12-27 10:13:23 +01:00
Daniele Teti
d2157919fe + added overloaded constructors to all MVCFrom* attributes (allows to pass a default values as string, integer and boolean) 2021-10-07 10:08:53 +02:00
Daniele Teti
ddf1ba1aca - Improved lazy loading for Context.Data property 2021-09-26 18:17:13 +02:00
Daniele Teti
444e085d4f + request content type are decoded only for mtPut, mtPost, mtPatch
+ added XMLDoc comment to rest client methods which directly maps HTTP VERBS
2021-08-13 17:06:15 +02:00
Daniele Teti
c7bb9858ef [+] Added Context.Request.Query method which returns the RawWebRequest property 2021-07-03 11:30:05 +02:00
Daniele Teti
afc593fe4e MVCFromBody can inject raw body as string into actions parameter 2021-06-12 18:30:07 +02:00
Daniele Teti
0a3e0243ba [+] Now the injectable parameters can be defined with a default value 2021-04-21 18:19:51 +02:00
Daniele Teti
0f5587361f [+] Added MVCFromBodyAttribute, MVCFromQueryStringAttribute, MVCFromHeaderAttribute, MVCFromCookieAttribute] 2021-04-21 12:22:09 +02:00
Daniele Teti
e4a3ed87da Removed the standard log line in case of CustomExceptionHandling; now the custom handler can write all, and only, the logs it needs 2021-03-24 10:58:20 +01:00
Daniele Teti
4139fc4a26 [+] Added URLEncode, URLDecode 2021-02-25 10:50:57 +01:00
Daniele Teti
c55bfea9da [+] Small improvement in custom type serialisers 2021-02-15 18:28:45 +01:00
Daniele Teti
4b8491a47c [+] Small optimizations in router and core 2021-02-03 16:04:36 +01:00
João Antônio Duarte
65d03ad065 fix for https://github.com/danieleteti/delphimvcframework/issues/472 2021-01-28 11:56:20 -03:00
Daniele Teti
77ad5ecd10 [+] fix for nil objects in lists during serialization
[+] preparing for 3.2.2-nitrogen
2021-01-27 20:25:35 +01:00
João Antônio Duarte
f826315b46 The TMVCWebRequest.GetParams method failed to look for a field in the body's content when there was some url encoding character. Fixed to check body content only if content-type is application/x-www-form-urlencoded 2020-10-21 16:45:07 -03:00
Daniele Teti
f63cc4469b Improved StaticFilesMiddleware 2020-09-16 15:56:14 +02:00
Daniele Teti
2ae2068807 Improved TMVCStaticFilesMiddleware 2020-09-14 15:52:50 +02:00
Daniele Teti
3755348925 Improved static files middleware 2020-09-11 18:14:28 +02:00
Daniele Teti
a0aea669ee
Merge pull request #416 from osaris/feature_rootnode_bodyaslistof
Handle RootNode when deserializing a collection of objects (BodyAsListOf)
2020-09-08 16:22:28 +02:00
Daniele Teti
b27db6122e Improved EMVCException rendering, added unit tests (202 so far) 2020-09-08 15:25:44 +02:00
Raphaël Emourgeon
fd4a545952 Handle RootNode when deserializing a collection of objects (BodyAsListOf). 2020-09-07 11:28:53 +02:00
Daniele Teti
ae1eda03e1 Added GetFrameworkType method 2020-08-22 15:37:08 +02:00
Daniele Teti
7576ab8bf8 Added the ability to deserialize an object starting from an arbitrary node in the JSON (or other format) present in the request body.
Improved the primary key type handling for manual handling in MVCActiveRecord.
Improved activerecord_showcase sample.
2020-08-13 17:40:02 +02:00
Daniele Teti
465de5cbab TMVCRenderer methods used by TEntityProcessor become public again 2020-08-09 09:38:54 +02:00
Daniele Teti
a3464c38d0 Small router improvements. 2020-08-08 01:03:37 +02:00
Daniele Teti
0d7fa465fc TableName is no more serialized in ActiveRecord 2020-07-18 20:14:58 +02:00
Daniele Teti
e6a7c80ef6 Improved caching and add X-Powered-By optional header 2020-06-29 19:11:41 +02:00
Daniele Teti
aaa34ca410 Added "TMVCActiveRecord.SelectOneByRQL", Removed "Context.Request.HeaderNames" 2020-06-22 15:24:20 +02:00
Daniele Teti
af91c92563 Added Context.Request.HeaderNames: TArray<String> 2020-06-20 19:41:12 +02:00
Daniele Teti
516101ebb8 https://github.com/danieleteti/delphimvcframework/issues/388 2020-05-28 22:35:45 +02:00
Daniele Teti
371d09194a UnitTest // Delphi 10.4 Sydney support 2020-05-27 11:28:22 +02:00
Daniele Teti
028089969a TMVCEngine.Config property is now read-only. Can be changed only in the anonymous method injected in the constructor. (All the samples have been updated - from an idea of @Spinettato a.k.a. Danielino) 2020-05-11 23:39:43 +02:00
spinettaro@gmail.com
570146d313 improved exception handling in OnBeforeDispatch in term of Status code
added correct HTTP STATUS CODE when MAX_REQUEST_SIZE exception is raised
2020-05-09 15:56:54 +01:00
Daniele Teti
b259b72153 Removed debug logs 2020-04-30 11:27:27 +02:00
Daniele Teti
89d723fbde Added new sample to show hot to use StaticFilesMiddleware in SPA web applications. Added ability to don't load system controller using Config[TMVCConfigKey.LoadSystemControllers] := 'false'; in the configuration block. 2020-04-29 17:53:29 +02:00
João Antônio Duarte
fafb73823a Change to OnAfterRouting to be executed after exception handling 2020-04-28 19:08:54 -03:00
João Antônio Duarte
87db1f09a5 Added OnAfterRouting method to IMVCMiddleware 2020-04-27 20:36:45 -03:00
João Antônio Duarte
7dde0cf7d9 Correction of exception raised when middleware tried to map url with invalid characters as path to a file 2020-04-24 21:55:36 -03:00
João Antônio Duarte
faa892df7f Settings for static files removed from the TMVCEngine core 2020-04-24 21:20:46 -03:00
João Antônio Duarte
e029e52907 Settings of static files added as parameters in the middleware constructor 2020-04-24 20:48:07 -03:00
João Antônio Duarte
ebcda178ff Merge remote-tracking branch 'upstream/master' into middleware_staticfiles 2020-04-24 19:13:44 -03:00
Daniele Teti
ba2be8f7e1 Updated some samples 2020-04-24 14:48:30 +02:00
João Antônio Duarte
2e105ec59f The static file server that was at the core of TMVCEngine has been moved to TMVCStaticFilesMiddleware middleware 2020-04-23 21:48:39 -03:00
Daniele Teti
e437d33434 https://github.com/danieleteti/delphimvcframework/issues/355 2020-04-12 12:38:00 +02:00
João Antônio Duarte
91f2bebcfc
Added support for guid path parameters (#353) 2020-04-09 11:04:45 -03:00
Daniele Teti
18e988d604 https://github.com/danieleteti/delphimvcframework/issues/356 2020-04-08 13:00:32 +02:00
Daniele Teti
4a1ef47bd3 "404 Not Found" exceptions now contains the requested URL (as in the log) 2020-04-07 10:37:33 +02:00
Daniele Teti
36ca9d43dc https://github.com/danieleteti/delphimvcframework/issues/337 2020-04-03 11:56:14 +02:00
Daniele Teti
2273c88b00 Added MediaTypes TMVCMediaType.IMAGE_X_ICON 2020-04-02 15:28:06 +02:00
Daniele Teti
1fd7740048 Added JSONRPC Hooks - Renamed RenderXXX Methods 2020-03-30 13:30:45 +02:00
Daniele Teti
992262d152 Added "OnRouterLog" configuration - Fixed packages to include "MVCFramework.Nullables.pas" 2020-02-26 13:10:41 +01:00
Andrea Ciotti
13571aa584 Configurable log for requests 2020-02-24 10:37:37 +01:00
Daniele Teti
92dcbd8b40 FIXED a Vulnerability bug which affects some deployment configurations. 2020-02-13 23:33:30 +01:00
Daniele Teti
3388354743 Serialization support for all the types in MVCFramework.Nullables 2020-02-03 10:51:40 +01:00
Daniele Teti
3233ea123f Fixed a mleak in caso of disconnection while the request is running (https://github.com/danieleteti/delphimvcframework/issues/323) 2020-01-24 10:09:14 +01:00
Daniele Teti
8144baf40c Nulls support in MVCActiveRecord (check activerecord_showcase sample) 2020-01-06 16:49:18 +01:00
Daniele Teti
b097121ee7 First working version of nullable support for mvcactiverecord 2020-01-04 12:54:38 +01:00