Giter Club home page Giter Club logo

Comments (20)

mdbs99 avatar mdbs99 commented on July 19, 2024

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.

silvioprog avatar silvioprog commented on July 19, 2024

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.

andersonsc10 avatar andersonsc10 commented on July 19, 2024

hello leledumbo, can you show an example of this feature? may be in another language.

from brookframework.

jcmoraisjr avatar jcmoraisjr commented on July 19, 2024

Don't you have the same approach using class inheritance? Or I completely missed the point.

from brookframework.

leledumbo avatar leledumbo commented on July 19, 2024

@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.

silvioprog avatar silvioprog commented on July 19, 2024

Nice friend. Can you send me a small demo with Kohana using this idea? I know PHP too hehe... :)

from brookframework.

jcmoraisjr avatar jcmoraisjr commented on July 19, 2024

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.

leledumbo avatar leledumbo commented on July 19, 2024

@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.

leledumbo avatar leledumbo commented on July 19, 2024

@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.

silvioprog avatar silvioprog commented on July 19, 2024

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.

silvioprog avatar silvioprog commented on July 19, 2024

Some news friend? :)

from brookframework.

leledumbo avatar leledumbo commented on July 19, 2024

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.

silvioprog avatar silvioprog commented on July 19, 2024

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.

leledumbo avatar leledumbo commented on July 19, 2024

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.

silvioprog avatar silvioprog commented on July 19, 2024

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.

leledumbo avatar leledumbo commented on July 19, 2024

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.

silvioprog avatar silvioprog commented on July 19, 2024

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.

silvioprog avatar silvioprog commented on July 19, 2024

Done. Please see the two commits:

1 - 7cfe88c
2 - e8e9997

Please close this issue if it is OK. :)

Thank you very much! 👍

from brookframework.

silvioprog avatar silvioprog commented on July 19, 2024

Can I close this issue friend? What did you think about this feature has been implemented directly in TBrookAction?

from brookframework.

leledumbo avatar leledumbo commented on July 19, 2024

OK, case closed

from brookframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.