Gerasimos (Makis) Maropoulos
bda36145e5
some cleanup, and remove the test 'testwebocket2' package at all; A lower-level fast websocket impl based on gobwas/ws will be published on a different repo, it is a WIP
...
Former-commit-id: b680974c593196ce20865ed12778929ced6afea1
2019-02-22 21:24:10 +02:00
Gerasimos (Makis) Maropoulos
9cfaff07d6
add support for mvc and hero dynamic dependencies to understand the error type as a second output value as requested at: https://github.com/kataras/iris/issues/1187
...
Former-commit-id: 49e29c06aaaa22743354981342c29fc9d5953d0e
2019-02-16 00:42:26 +02:00
Gerasimos (Makis) Maropoulos
443776c423
add a warning on mvc if someone didn't read the examples or the godocs and .Register dependencies after .Handle
...
a developer sent a direct question message from our facebook page: https://www.facebook.com/iris.framework/
Former-commit-id: ebd7b4bc9078d4952799b4498ce4dfb0ed4c8072
2019-01-20 14:06:06 +02:00
Gerasimos (Makis) Maropoulos
02d94041f9
fix grammar and misspell
...
Former-commit-id: 1816619f891df77a5d1925d43c25243dcadbceb5
2018-11-29 04:01:05 +02:00
Gerasimos (Makis) Maropoulos
3962710d3d
Version 11 released. Read https://github.com/kataras/iris/blob/master/HISTORY.md#su-21-october-2018--v1100
...
Former-commit-id: fe6305deed00e170bf4d39a12c0644fe686e0a24
2018-10-21 19:20:05 +03:00
Gerasimos Maropoulos
4993918a12
remove the complicated fallback handlers, that didn't work and not approve the coblexity addition of the https://github.com/kataras/iris/pull/919 , RouteExists accepts first argument the Context, add new AllowMethods per party and fix cors by 048e2be034
https://github.com/kataras/iris/issues/922 , rel: https://github.com/iris-contrib/middleware/issues/36 , https://github.com/iris-contrib/middleware/issues/34 , https://github.com/iris-contrib/middleware/issues/32 , https://github.com/iris-contrib/middleware/issues/30 , https://github.com/kataras/iris/pull/909
...
Former-commit-id: 5576c44b64014fb00dd79e618b815b5f52b705e4
2018-03-10 14:22:56 +02:00
Frédéric Meyer
66209cae4f
Save
...
Former-commit-id: 592e9cddf3511fc08e87f19ad39fdaac479b453f
2018-02-21 08:18:53 +03:00
Gerasimos (Makis) Maropoulos
617258890e
add GetRoute
for MVC Controllers. Give the chance to change rsome route's properties like Name (used for reverse routing in templates, optionally).
...
Former-commit-id: 5ee9b1f97ff3c98cd8e5faddd23a87bbafb8e2e0
2017-12-30 22:04:26 +02:00
Gerasimos (Makis) Maropoulos
685954d341
add a simple context#YAML function to render yaml data and make sure that the cookie's values are url escaped and unescaped when retrieve from client's headers
...
Former-commit-id: cad1e09679f6b646c12bb6ffdeba62738bdeef5d
2017-12-27 15:38:06 +02:00
Gerasimos (Makis) Maropoulos
19e9ed330d
add sharable package-level hero dependencies with the mvc controllers instances
...
Former-commit-id: 6c53190e40fa42d242a73eb80361830b65f0d077
2017-12-27 15:09:52 +02:00
Gerasimos (Makis) Maropoulos
b4827c2b5e
fix examples link in the /mvc and a controller test
...
Former-commit-id: 1384d7297f79f47a395701433034c57ad361f5ab
2017-12-27 04:20:42 +02:00
Gerasimos (Makis) Maropoulos
b282e7c563
Replace controller's .Register with .Handle and AddDependencies with .Register in order to be aligned with the 'hero' package, all examples and docs are updated, it's crazy how I can't stop even on Christmas
...
Former-commit-id: 3b42963e9806e327ee42942cf156bda6059eaf8f
2017-12-27 04:15:41 +02:00
Gerasimos (Makis) Maropoulos
38ff34ee1e
fix trailing parenthesis on the mvc/ideas/1/main.go which will be removed at the next commits, this was my dream and I made it reality in just 50 hours :P
...
Former-commit-id: 9c01ab4d684897815dccb02ab6515f568b22a1cc
2017-12-25 21:00:14 +02:00
Gerasimos (Makis) Maropoulos
2ab1456414
split of the mvc and the new hero package is completed, now handlers with input and output binding feature is a different feature than the mvc, however the mvc controller's methods can use the hero dependency injection as before (v10+)
...
Former-commit-id: d67f5a5ed9033286bcc4c04f6be612823cba2a57
2017-12-25 20:57:04 +02:00
Gerasimos (Makis) Maropoulos
46505f62db
create a new package, name it as hero, I was thinking super or superb but hero is better name for what it does - the goal is to split the new 'mvc handlers' from the mvc system because they are not the same, users should know that they can use these type of rich binded handlers without controllers as well, like a normal handler and that I implemented here, the old files exist on the mvc package but will be removed at the next commit, I have to decide if we want type aliases for Result or no
...
Former-commit-id: cb775edc72bedc88aeab4c5a6de6bfc6bd56fae2
2017-12-25 20:05:32 +02:00
Gerasimos (Makis) Maropoulos
e1c65d23fb
finish the first state of the vuejs todo mvc example, a simple rest api - todo: websocket and live updates between browser tabs with the same session id
...
Former-commit-id: 0bd859420cff87014479c44a471ec273c621c1a2
2017-12-23 17:07:39 +02:00
Gerasimos (Makis) Maropoulos
a5a87706c1
misspell fix
...
Former-commit-id: e301671f86118ad6ac686fd3e43b3cba92dbbff1
2017-12-22 11:08:16 +02:00
Gerasimos (Makis) Maropoulos
12ef034ea1
add some comment docs at the mvc/controller.go
...
Former-commit-id: 6ff3c8694c3e581c3e28fc706bddbc6759492280
2017-12-22 11:07:13 +02:00
Gerasimos (Makis) Maropoulos
ef3a09c126
update the documents for the new MVC API and some of its new features but not finished yet, README big examples and _examples/mvc/login is are yet updated and I'm thinking of removing the big examples on README.md, they exist on the _examples/mvc updated.
...
Former-commit-id: c2938d4bcaa3520744526f7975ee3cce632499b3
2017-12-22 10:18:31 +02:00
Gerasimos (Makis) Maropoulos
254a4ede95
add explanation why the 'globalVisitorsController' example is a Singleton, because it was not clear for new gophers previously.
...
Former-commit-id: 9267c415e53eeb00adadf6fde9e0aeeb415cf24a
2017-12-20 18:09:31 +02:00
Gerasimos (Makis) Maropoulos
b78698f6c0
fix all _examples to the newest mvc, add comments to those examples and add a package-level .Configure in order to make it easier for new users. Add a deprecated panic if app.Controller is used with a small tutorial and future resource link so they can re-write their mvc app's definitions
...
Former-commit-id: bf07696041be9e3d178ce3c42ccec2df4bfdb2af
2017-12-20 08:33:53 +02:00
Gerasimos (Makis) Maropoulos
fd0f3ed6cb
fix check for singleton on fillStruct - no problem let's set all the static values on the first value although it may never be needed if request-scoped/stateless (No Singleton di.State)
...
Former-commit-id: a72bcd720d900fdc009cabb1e4a0b455026710fd
2017-12-20 00:09:17 +02:00
Gerasimos (Makis) Maropoulos
6285622cfa
controller's struct: if unexported field(s) is set-ed manually (binder cannot do that) and no other dynamic dependency(depends on context) then tag the controller as singleton, use a single controller instance to serve all clients (the controller's methods are per-request of course but its(controller's) fields will be 'global'- users should be careful because parallel access of those fields are up to them by using mutex or atomic or values that are safe for concurrent access.
...
Former-commit-id: dfafcb3a37a9b33d713bf47f16dd60764b026a08
2017-12-20 00:01:50 +02:00
Gerasimos (Makis) Maropoulos
c15763c556
ok make it cleaner, it's working well and blazing fast but I have to do a lot cleaning and commenting and docs as well before push it to master --- hope at christmas day, also thinking some internal ideas - the whole code is not ready to be readen by a third person yet.
...
Former-commit-id: 0b3fb2841d5032ff47bdca42a6f4ccfeb789ce3c
2017-12-19 23:40:42 +02:00
Gerasimos (Makis) Maropoulos
20ba72aecf
fix typo
...
Former-commit-id: b6f9de4cf8d62210ffefba5d33dc8372d236748d
2017-12-18 06:47:05 +02:00
Gerasimos (Makis) Maropoulos
4fb46bf1f3
fix mvc/ideas/1/main.go->AfterActivation
...
Former-commit-id: bf3d8227793fba76f0f7349d82d1200275ac9147
2017-12-18 02:24:53 +02:00
Gerasimos (Makis) Maropoulos
d5a38a0cd6
more checks about creating new instance of controller on each request - this time if all bindings are static then set them to the initial-devpassed controller and if the total number of lengths are equal with these static dependencies then we ignore the injector and use the initial controller on each request - maximize the performance when simple controller is used - need more cleanup before new release but I hope until Christmas iris developers will be amazed
...
Former-commit-id: 32ed69368d1df2c25cdb712bb7f0cf47b2e36c05
2017-12-18 00:16:10 +02:00
Gerasimos (Makis) Maropoulos
40b40fa7d3
don't create new controller instance when all fields are set-ed by the end-dev - but we keep show those fields' values as Dependencies on the BeforeActivate in order to the future custom controllers authors to be able to check if something is added as dependecy or even manually set-ed before bind their own dependecies, otherwise they could override the manually set-ing
...
Former-commit-id: 72d3a0f1299781ee9a5e3e35e4a543354f8cd63d
2017-12-17 06:34:16 +02:00
Gerasimos (Makis) Maropoulos
6120e755e8
update mvc/README.md
...
Former-commit-id: 1aa80921e6b28d0492046424292e727c4e99e6b0
2017-12-16 23:27:04 +02:00
Gerasimos (Makis) Maropoulos
e67621b8ec
grammar fixes(?)
...
Former-commit-id: bf2ff1df8c841643eb2ebfc8524ba869d02c99b3
2017-12-16 23:12:49 +02:00
Gerasimos (Makis) Maropoulos
68cc6641d4
Add session.Destroy (before I've added: Increment & Decrement entry helpers as well) | Improve the debug messages for the controllers
...
Former-commit-id: f5f17b05252a5032ace1e2d0fdd2304fc4004635
2017-12-16 23:09:00 +02:00
Gerasimos (Makis) Maropoulos
b8cafce6b9
add simple tests for _examples/mvc/hello-world and session-controller
...
Former-commit-id: d88a792ba57cd869d2888f41bca6eb3e5b4f7d49
2017-12-16 21:27:20 +02:00
Gerasimos (Makis) Maropoulos
a25c0557de
don't create a new controller instance if it doesn't have struct dependencies and the fields length is 0 - 0.4MB/s difference from the raw handlers now.
...
Former-commit-id: f808291fe84bc2cdd83f60f62f8b3140204110a5
2017-12-16 17:57:20 +02:00
Gerasimos (Makis) Maropoulos
34664aa311
OK, my dream-idea is implemented. TODO: Some examples and doc.go is not updated yet, comments on the mvc/di subpackage, the tutorial/vuejs-todo-mvc is running but not finished yet (it's using browser's localstorage and it should be replaced by the http requests that are registered via iris mvc
...
Former-commit-id: 0ea7e01ce1d78bcb78b40f3b0f5c03ad7c9abaea
2017-12-16 06:38:28 +02:00
Gerasimos (Makis) Maropoulos
55dfd195e0
remove the old 'mvc' folder - examples are not changed yet - add the 'di' package inside the mvc2 package - which will be renamed to 'mvc' on the next commit - new mvc.Application and some dublications removed - The new version will be version 9 because it will contain breaking changes (not to the end-developer's controllers but to the API they register them) - get ready for 'Christmas Edition' for believers
...
Former-commit-id: c7114233dee90ee308c0a3e77ec2ad0c361094b8
2017-12-15 20:28:06 +02:00
Gerasimos (Makis) Maropoulos
ed79f0c3cd
ok the new mvc system works great, all tests done and almost x3 smaller LOC used plus new three awesome features:) - next commit will be commenting out and replace the mvc package with the new mvc2
...
Former-commit-id: 552095d29256a1116849cc6054c82001e790e705
2017-12-10 07:00:51 +02:00
kataras
dd5de52f34
implement a way to add controller functions as handlers with the existing rules respected but it's a bit dirty I will change the implementation and move the mvc2 to mvc and make the api builder's PartyFunc to be a critical part of the controller and the mvc2.Mvc bind values should be also respected to the controller and more
...
Former-commit-id: e452a916da80d886535b8ae9625d0ba8e2b58d6e
2017-11-27 21:39:57 +02:00
Gerasimos (Makis) Maropoulos
13975a5d81
Nothing in codebase, just some MVC examples enhancements
...
Former-commit-id: 81f1121da0e7632ef3a0f7b78d6784ee1690eb7e
2017-10-12 21:24:11 +03:00
Gerasimos (Makis) Maropoulos
32d14db46d
Update the _examples/mvc/login example - add a Path property at mvc.Response
and add a context.Proceed
helper function
...
Former-commit-id: b898901fe4a324e888a6e09c93530cf7a551cf2a
2017-10-12 16:28:41 +03:00
Gerasimos (Makis) Maropoulos
b0f8329768
Update to version 8.5.2 | Read HISTORY.md: https://github.com/kataras/iris/blob/master/HISTORY.md#th-12-october-2017--v852
...
https://github.com/kataras/iris/blob/master/HISTORY.md#th-12-october-2017--v852
Former-commit-id: 2501cf6066812c2aac158d8d6cd4e992a2b538f9
2017-10-12 03:51:06 +03:00
Gerasimos (Makis) Maropoulos
501c9d18d9
add some minor comments for the view/django's origin type getters pushed by https://github.com/kataras/iris/pull/765
...
Former-commit-id: 2d406337901d5d22636490bd8de3939a33cee882
2017-10-11 01:28:26 +03:00
Gerasimos (Makis) Maropoulos
de3fc8ae46
Update to version 8.5.1. It contains a minor fix. Read HISTORY.md
...
https://github.com/kataras/iris/blob/master/HISTORY.md#tu-10-october-2017--v851
Former-commit-id: af1424c691613ccde911bef7d1371aa52e6abb79
2017-10-10 16:58:14 +03:00
Gerasimos (Makis) Maropoulos
713e5c3362
Minor changes. The important: v8.5.0 released, read https://github.com/kataras/iris/blob/master/HISTORY.md#mo-09-october-2017--v850
...
Former-commit-id: d79204bb6ff8e495378637481e022b014d7f7bed
2017-10-10 05:25:09 +03:00
Gerasimos (Makis) Maropoulos
7ab607aab2
minor https://github.com/kataras/iris#quick-mvc-tutorial-3
...
Former-commit-id: 0f0667f7e460dc241f3a8fcca50cc6caf228d081
2017-10-10 05:17:53 +03:00
Gerasimos (Makis) Maropoulos
82b5a1d4ed
Enhance the MVC "using-method-result" example. Prev: update to version 8.5.0
...
Prev Commit: 49ee8f2d75
[formerly 6a3579f2500fc715d7dc606478960946dcade61d]
Changelog: https://github.com/kataras/iris/blob/master/HISTORY.md#mo-09-october-2017--v850
This example is updated with the current commit: https://github.com/kataras/iris/tree/master/_examples/mvc/using-output-result
Former-commit-id: 29486ef014b3667fa1c7c66e11c8e95c76a37e57
2017-10-10 04:46:32 +03:00
Gerasimos (Makis) Maropoulos
49ee8f2d75
Update to version 8.5.0 | NEW: MVC Output Result | Read HISTORY.md
...
Former-commit-id: 6a3579f2500fc715d7dc606478960946dcade61d
2017-10-09 15:26:46 +03:00
Gerasimos (Makis) Maropoulos
e5600fcf0d
Update to version 8.4.5 | Read https://github.com/kataras/iris/blob/master/HISTORY.md#fr-06-october-2017--v845 for more.
...
Former-commit-id: 4e30bf6a74acb7d463c7fcf1e9e08ca3147117a7
2017-10-06 08:23:03 +03:00
Gerasimos (Makis) Maropoulos
4fb78bbcd9
Update sessions/sessiondb/badger to its latest version and SessionController is able to initialize itself if session manager is not provided by the caller-dev.
...
Changes:
Update the badger database using transactions, as supported from yesterday via: 06242925c2
Add a custom `OnActivate` via mvc/activator/activate_listener.go, this can be used to perform any custom actions when the app registers the supported Controllers. See mvc/session_controller.go for the excellent use case.
errors.Reporter.AddErr returns true if the error is added to the stack, otherwise false
Former-commit-id: c896a2d186a4315643f3c5fdb4325f7ee48a9e0a
2017-10-06 01:19:10 +03:00
Gerasimos (Makis) Maropoulos
ab8235d398
MVC: Add support for ByBy
as requested https://github.com/kataras/iris/issues/751
...
Former-commit-id: 78c2453c56000c2268e11e68d7b530251e2beedd
2017-09-22 15:16:24 +03:00
Gerasimos (Makis) Maropoulos
69b5327ecc
Update to Version 8.4.2 | Read HISTORY.md
...
https://github.com/kataras/iris/blob/master/HISTORY.md#fr-15-september-2017--v842
Former-commit-id: 0ee4cc1d93ef7f26e5d402fdfbe07062aff5b08c
2017-09-15 15:05:35 +03:00