Commit Graph

1004 Commits

Author SHA1 Message Date
Gerasimos (Makis) Maropoulos
d95304148e Merge branch 'master' into dev
Former-commit-id: fe6617f679a0434794838f4becab2997ff88c435
2017-12-18 07:25:00 +02:00
Gerasimos (Makis) Maropoulos
d88e49abaf Last year we had HTTP/2 at Christmas, this year I will give you even better gift
Former-commit-id: 4f384a18b564e7c0f0a48bc74fec05280aa13d76
2017-12-18 07:22:55 +02:00
Gerasimos (Makis) Maropoulos
20ba72aecf fix typo
Former-commit-id: b6f9de4cf8d62210ffefba5d33dc8372d236748d
2017-12-18 06:47:05 +02:00
Cody Oss
e4aa414add fix a typo
Former-commit-id: 266f99ad325eb0463c76fb3f6123dc0cdaba1aad
2017-12-17 21:45:11 -06: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
Wing Gao
c6b12ab754 need a better way to replace an existed cookie
Former-commit-id: bee4a686d50e61e607e7f86c1dee93a877cd1413
2017-12-15 22:42:18 +08:00
Wing Gao
859a62bf01 fix cookie expire equals to -1 when call UpdateExpiration
Former-commit-id: 69107db0f9be87db2057c6d261bd896c0358bc45
2017-12-15 21:46:18 +08:00
Gerasimos (Makis) Maropoulos
4e15f4ea88 create one generic package for dependency injection which can be used outside of Iris too - worked but unfished
Former-commit-id: a9d600321c07d7c9f39105416f14ae91528a16a3
2017-12-14 23:04:42 +02:00
Gerasimos (Makis) Maropoulos
a5fac270cf Merge branch 'master' into dev
Former-commit-id: d9d3c857d953c379f724bdb1d0473f91758f7cfe
2017-12-14 14:21:03 +02:00
Gerasimos (Makis) Maropoulos
434b07675e add example for the simple context#WriteGzip
Former-commit-id: 3b4e0834370ebde5e4796b3d75cdbd5c2c25093f
2017-12-14 14:15:29 +02:00
Gerasimos (Makis) Maropoulos
3349fd5c91 Merge branch 'master' into dev
Former-commit-id: a95af68b60eee434994d8bfa55ad26d587f4fe89
2017-12-14 06:16:01 +02:00
Gerasimos (Makis) Maropoulos
22504f01ef add a simple hero template example as requested at https://github.com/kataras/iris/issues/840
Former-commit-id: 1c65190d21a5febbbbad1b2b565f82f749278d48
2017-12-14 06:11:37 +02:00
Gerasimos (Makis) Maropoulos
0b2dcc76f5 start of the vue + mvc example and a simple session binding
Former-commit-id: 994f00952352c93d270ad197cb843f3222fb37c0
2017-12-14 05:56:23 +02:00
Gerasimos (Makis) Maropoulos
d72c649441 add test for binding a whole function as an input argument on the handler's function - worked
Former-commit-id: 410ffdf44057ce57d5d280aa80ef0c9884f275b2
2017-12-14 03:30:39 +02:00
Gerasimos (Makis) Maropoulos
43c330f338 Merge branch 'master' into dev
Former-commit-id: 451baf594a5fb7f288291cdd73b86998cb364af4
2017-12-13 14:46:45 +02:00
Gerasimos (Makis) Maropoulos
ea863914dc update the vendor json library which is used when 'WithOptimizations' passed on 'app.Run' and resolve https://github.com/kataras/iris/pull/839#issuecomment-351374343
Former-commit-id: ad3354717d593393a3f3aec863ec92f1f7e1c829
2017-12-13 14:37:02 +02:00
Gerasimos (Makis) Maropoulos
8dcbdc0741 performance close to handlers if no bindings but even if bindings except service (new feature is that we can bind functions as well) is x1.1 faster than the previous mvc implementation - make BaseController (so and C) optionally but not break the existing APIs that using iris.C or mvc.C
Former-commit-id: a26a8f836894c061e0f435df8ac1c2c534f0ee48
2017-12-13 06:17:28 +02:00
Gerasimos (Makis) Maropoulos
257f1318c9 add some comments but I just released that we may not need controller's input field and we can bind directly via the targetStruct binder, next step is to implement that behavior
Former-commit-id: e2ed23e7c4f52237cf87148d9a85d01e89d479be
2017-12-12 14:33:39 +02:00
Gerasimos (Makis) Maropoulos
689b671bf9 split the controller's method lexer and parser to another file to simplify the code, we need more steps to simplify it enough before pushing to master
Former-commit-id: ee968d822088bec428e4b7cee24ca7690d0bf504
2017-12-11 06:51:52 +02:00
Gerasimos (Makis) Maropoulos
297c581e30 add an overview of the new semantics at the mvc2/README.md
Former-commit-id: 6efc702fd4a74787c7fe271e231de283670a25e0
2017-12-11 06:24:55 +02:00
Gerasimos (Makis) Maropoulos
aa18b62f64 add a ridiculous simple 'context#String' func which will return a very simple string representatin of the current request
Former-commit-id: e8a17f006516d77aa466b64c8065ed8f07b332e4
2017-12-10 07:26:01 +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
e02da3d442 Add context#IsMobile
Former-commit-id: 571ad7c7a2baf4ec58ba6395003aa9c3bedd1f73
2017-12-04 08:13:45 +02:00
kataras
20f68416a7 add context#IsMobile
Former-commit-id: 2f857e2b57a10233d4c9ea5ec365b84c1b8b1c76
2017-12-04 08:12:34 +02:00
kataras
2d80d73ad7 Merge branch 'master' into dev
fix route url reverse and add OnPing at websocket


Former-commit-id: ac8317f8a2516f00150d52f27e48953f49cf76d4
2017-12-04 05:08:10 +02:00
kataras
a7b2a90e3b cm
Former-commit-id: 8f99121b81dc76c04d5910117885d9286873f26c
2017-12-04 05:08:05 +02:00
kataras
7043f352d9 made it work but looking for another approach
Former-commit-id: e61c4573543c57b8d6d4ef2583e40f52c391402f
2017-12-04 05:06:03 +02:00
Gerasimos (Makis) Maropoulos
27097df7b4 Merge pull request #828 from honux/master
Fixed a bug on router/path

Former-commit-id: 80f58dd112aa8d13b703f847b91063ca2c504432
2017-12-04 04:59:15 +02:00
honux
c15b7725da Merge pull request #2 from honux/honux-patch-2
Fix subfolder templating issue

Former-commit-id: 2c26fbf9508e94277c04cf48a6713459502720cd
2017-12-03 23:21:46 -02:00
honux
412c513e5f Fix subfolder templating issue
Fixed issue https://github.com/kataras/iris/issues/830

Former-commit-id: 1be9b65fd51322c927ebfdcb835ef1df5b018a5a
2017-12-03 23:21:11 -02:00
honux
3dd9854e70 Merge pull request #1 from honux/honux-patch-1
Fixed a bug on router/path

Former-commit-id: feafcdafc60ed095e5abfd996e5b206872162771
2017-12-02 18:02:39 -02:00
honux
9197fd7349 Fixed a bug on router/path
- Stored the args length on a variable instead of three consecutive calls to the len method on "toStringSlice" function;
- Improved readability on "toStringSlice" function;
- Fixed a bug on "URL", which all routes without parameters would not return the full uri (just the path);

Former-commit-id: 3ddd8869087aa9046bdb874f98985b76daaa249e
2017-12-02 17:45:43 -02:00
Gerasimos (Makis) Maropoulos
988cb2cab6 Merge pull request #826 from jerson/patch-7
Websocket: added OnPing to Connection
Former-commit-id: f480187714186cbba08cd545df6a50f31e2e9bb2
2017-12-02 16:20:10 +02:00
Gerson Alexander Pardo Gamez
80b86136f4 Websocket: added OnPing to Connection
see issue #825

Former-commit-id: c7c97d40e352f4e550ea96eb482e71c3c50c8c09
2017-12-01 17:48:37 -05: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
kataras
9d63e3194f implement a simple path param binder
Former-commit-id: 2edc7f115332b7afe42d6b0b1b7b6edd4a44a121
2017-11-25 14:04:35 +02:00
kataras
4818d184b1 remove codesponsor as http://mailchi.mp/f9b57b5ea377/code-sponsor-is-shutting-down-on-december-8
Former-commit-id: 94c7c2e2770b02e1c93e2e830606dac204d5b0f6
2017-11-24 20:13:10 +02:00
kataras
2448a60e04 remove codesponsor as http://mailchi.mp/f9b57b5ea377/code-sponsor-is-shutting-down-on-december-8
Former-commit-id: 20132129f693fb3f21368372a8d00624d57b5858
2017-11-24 20:11:32 +02:00
kataras
5a3be2ab58 simplify by join the bind registration(ctx-transformer-to-something-func-binder and service one, which just sets the struct as it's) to one named 'In' and create a 'Child' which will return a new mvc instance with binders inheritanced from the parent one and add a simple test to the mvc_test.go - will have more later on
Former-commit-id: 81ae99390c683a61e1b0bac58725a04b9a3eebbb
2017-11-24 17:34:35 +02:00
kataras
29835d9a8e black-box the MakeHandler, works perfectly.
Former-commit-id: d325be0e953efc2f841c69f62233b34d4a58ab62
2017-11-24 15:10:30 +02:00
kataras
bfec1d174f implement the makeHandler and structure the high-level mvc's API
Former-commit-id: 412118eae436981711ef57821f2d85b77a5d1a12
2017-11-24 12:32:35 +02:00