Comments (20)
Is it like "filters"?
http://docs.oracle.com/javaee/6/tutorial/doc/bnagb.html
http://msdn.microsoft.com/en-us/library/ms524610%28v=vs.90%29.aspx
from brookframework.
Interesting 👍 .
Can you make a patch implementing this idea? Is interesting because we need to evaluate if it will not interfere in the current way as the currently routes works.
from brookframework.
hello leledumbo, can you show an example of this feature? may be in another language.
from brookframework.
Don't you have the same approach using class inheritance? Or I completely missed the point.
from brookframework.
@silvioprog
I'm on my way there, still stuck in making the rendering more than 1 level without the need to explicitly call inherited
@andersonsc10:
it's called template controller in a php framework named kohana, it's 1 level only though
@jcmoraisjr:
how?
from brookframework.
Nice friend. Can you send me a small demo with Kohana using this idea? I know PHP too hehe... :)
from brookframework.
Writing abstract classes with the template and common parts, calling virtual methods with body and non default parts. Or, as I said before, I completely missed the point.
from brookframework.
@silvioprog:
Will do when I get home
@jcmoraisjr:
yes, that's exactly how it's done. but it won't work for >1 level
from brookframework.
@silvioprog:
luckily I don't have to create one, somebody already does it: https://github.com/kerkness/kohana-demo
check classes/controller, demo.php is the base controller, other controllers inherit from it and only change the part they need to change
from brookframework.
Thanks. :)
It's a little big for me to test it now, I'm kinda out of time. I'll wait for the example in Pascal hehe...
from brookframework.
Some news friend? :)
from brookframework.
Looks like 1 level is the best that can be done, do take a look at TLayout and its relationship with TMain and TAboutUs in my "secret project" where you have access to ;)
Sent from my Android phone with mail.com Mail. Please excuse my brevity.
Silvio Clecio [email protected] wrote:
Some news friend? :)
—
Reply to this email directly or view it on GitHub.
from brookframework.
Looks like 1 level is the best that can be done, do take a look at TLayout and its relationship with TMain and TAboutUs in my "secret project" where you have access to ;)
Hehehe... I'll see it today at home. :)
So, but you have plans to implement it directly in Brook? You could create some patches so we can test it.
from brookframework.
So, but you have plans to implement it directly in Brook? You could create some patches so we can test it.
Yes, actually even it's already available (just need to commit then push). And oh, I actually make it N levels but inherited
must be inserted explicitly in both Before and After method.
EDIT: Committed and pushed with an example demo
from brookframework.
Hello @leledumbo, I saw this commit: 325a425.
What you think about add the methods DoBeforeRequest and DoAfterRequest directly in TBrookAction instead create the TTemplateAction action?
from brookframework.
What you think about add the methods DoBeforeRequest and DoAfterRequest directly in TBrookAction instead create the TTemplateAction action?
Hmm... I guess that's OK, even Kohana (which I based my implementation on) do it that way. TTemplateAction should actually provide configurable automatic rendering (only?).
from brookframework.
Yes, and TTemplateAction can be implemented directly on your project, because it is a very simple classe. :)
I'll add DoBeforeRequest and DoAfterRequest in TBrookAction now ...
from brookframework.
Done. Please see the two commits:
Please close this issue if it is OK. :)
Thank you very much! 👍
from brookframework.
Can I close this issue friend? What did you think about this feature has been implemented directly in TBrookAction?
from brookframework.
OK, case closed
from brookframework.
Related Issues (20)
- Why plugins projects on github to brookframework is closing? HOT 4
- Telegram plugin for brookframework HOT 15
- i18n HOT 4
- Version 4 ? HOT 14
- libbrook.pas in Source HOT 3
- tardigrade demos throwing errors in libbrook HOT 4
- Server requirements? HOT 4
- dopf & LastInsertID HOT 4
- httprouter.lpr throwing error HOT 2
- How am I supposed to free worker thread in brook daemon? HOT 9
- Use legacy application with tardigrade HOT 19
- CPU Activity is high for tardigrade projects BROOK4 HOT 4
- More documentation HOT 1
- Can't get POST request data HOT 13
- Brookframework with sagui (legacy) HOT 11
- HTTP Client HOT 1
- Where did the captcha plugin for 4.0 go? HOT 1
- Some suggestion about JTemplate? HOT 3
- [IDEA] New repository HOT 1
- EBrookHTTPServer: Failed to send data in request for HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brookframework.