Code Monkey home page Code Monkey logo

Comments (3)

ddspringle avatar ddspringle commented on July 17, 2024

Current test suite passes. Will add prc specific testing before release. Merging this PR. Thanks Kevin!

from fw1.

charlesr1971 avatar charlesr1971 commented on July 17, 2024

Similar to how the current rc scope works, add a prc scope which behaves similarly but is not subject to population by any user input. Data stored in the prc scope can only have been added by the application itself and can be considered 'safe' to read and modify as it is never the result of anything other than application code.

Great idea. Just like Coldbox. Maybe we could introduce the event object argument etc, with all the associated helper methods.

from fw1.

charlesr1971 avatar charlesr1971 commented on July 17, 2024

Hi Guys

I was talking to Sean Corfield, a few months ago about adding a backward compatible enhancement to the redirect() method:

https://cfml.slack.com/archives/C06TA3B3L/p1709743825550009

Here is the gist of my idea:

I have created a redirect:

variables.fw.redirect(action='question.form',append="questionid");

Which displays:

https://www.foo.com/question/form/questionid/31

But I also have a route:

generateSES = true,
SESOmitIndex = true,
routes = [
    {"$*/question/edit/questionid/([0-9]+)/?$" = "/question/form/questionid/\1"},

Surely, the redirect() & buildURL() methods, should add the route conversion as well? So, I would expect the following to be displayed in the address bar:

https://www.foo.com/question/edit/questionid/31

Have I uncovered a bug, or maybe these methods do not analyze the routes, when converting links into SES links.

And Sean replied:

Routing is unidirectional: it's applied inbound on requests, not outbound on responses (so redirect() and buildURL() do not consider route mappings).

It's an interesting potential enhancement -- but no one's maintaining FW/1 these days so it is very unlikely to get added, unless you decide to implement it and submit a PR.

New signature:

This is what I reckon the new signature for the redirect() method could be:

public void function redirect( 
    string action,
    string preserve = “none”,
    string append = “none”,
    string path = see below,
    any queryString = ‘’,
    string statusCode = ‘302’,
    string header = ‘’,
    boolean applyRoute = false
)

So the new param would be applyRoute

from fw1.

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.