-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 10 #849
Merged
Version 10 #849
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t results every time (based on the context) and static services (interface as input(to give the devs the chance make better and most testable code) and struct or both are structs)
…unc-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
…ting 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
fix route url reverse and add OnPing at websocket
…er LOC used plus new three awesome features:) - next commit will be commenting out and replace the mvc package with the new mvc2
…y simple string representatin of the current request
…plify the code, we need more steps to simplify it enough before pushing to master
…'s input field and we can bind directly via the targetStruct binder, next step is to implement that behavior
…ept 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
…dler's function - worked
… outside of Iris too - worked but unfished
…'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
…ot 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
…ndencies and the fields length is 0 - 0.4MB/s difference from the raw handlers now.
…elpers as well) | Improve the debug messages for the controllers
….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
…that the cookie's values are url escaped and unescaped when retrieve from client's headers
…eplace it with a better configurable option inside the main configuration, this makes things clear and it allows users to prevent any unwanted client behavior without digging into the framework's internals
…oute's properties like Name (used for reverse routing in templates, optionally).
…3:59 an article will be published same time with the dev branch merge to master
…se dates from 2017 to 2017-2018
…lation by community and the rest.... let's hope someone will help us more here
…, which will be published to other sites soon
github-actions bot
pushed a commit
to goproxies/github.com-kataras-iris
that referenced
this pull request
Jul 27, 2020
Former-commit-id: cf65444356bf636997128593661367c89906beee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Happy New Year
We must thanks Mrs. Diana for our awesome new logo!
You can contact her for any design-related enquiries or explore and send a direct message via instagram.
At this version we have many internal improvements but just two major changes and one big feature, called hero.
Hero
The new package hero contains features for binding any object or function that
handlers
may use, these are called dependencies. Hero funcs can also return any type of values, these values will be dispatched to the client.Below you will see some screenshots we prepared for you in order to be easier to understand:
1. Path Parameters - Built'n Dependencies
2. Services - Static Dependencies
3. Per-Request - Dynamic Dependencies
hero funcs
are very easy to understand and when you start using them you never go back.Examples:
MVC
You have to understand the
hero
package in order to use themvc
, becausemvc
uses thehero
internally for the controller's methods you use as routes, the same rules applied to those controller's methods of yours as well.With this version you can register any controller's methods as routes manually, you can get a route based on a method name and change its
Name
(useful for reverse routing inside templates), you can use any dependencies registered fromhero.Register
ormvc.New(iris.Party).Register
per mvc application or per-controller, you can still useBeginRequest
andEndRequest
, you can catchBeforeActivation(b mvc.BeforeActivation)
to add dependencies per controller andAfterActivation(a mvc.AfterActivation)
to make any post-validations, singleton controllers when no dynamic dependencies are used, Websocket controller, as simple as awebsocket.Connection
dependency and more...Examples:
If you used MVC before then read very carefully: MVC CONTAINS SOME BREAKING CHANGES BUT YOU CAN DO A LOT MORE AND EVEN FASTER THAN BEFORE
PLEASE READ THE EXAMPLES CAREFULLY, WE'VE MADE THEM FOR YOU
Old examples are here as well. Compare the two different versions of each example to understand what you win if you upgrade now.
context#PostMaxMemory
Remove the old static variable
context.DefaultMaxMemory
and replace it with the configurationWithPostMaxMemory
.If you used that old static field you will have to change that single line.
Usage:
context#UploadFormFiles
New method to upload multiple files, should be used for common upload actions, it's just a helper function.
Example can be found here.
context#View
Just a minor addition, add a second optional variadic argument to the
context#view
method to accept a single value for template binding.When you just want one value and not key-value pairs, you used to use an empty string on the
ViewData
, which is fine, especially if you preload these from a previous handler/middleware in the request handlers chain.Same as:
context#YAML
Add a new
context#YAML
function, it renders a yaml from a structured value.Session#GetString
sessions/session#GetString
can now return a filled value even if the stored value is a type of integer, just like the memstore, the context's temp store, the context's path parameters and the context's url parameters.The −277,389 you see is because some vendors that are duplicated are being removed, so downloading should be a little bit faster now.