Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 12 14:06
    atuttle opened #517
  • Feb 09 21:09
    sneiland closed #509
  • Feb 09 21:08

    sneiland on develop

    Issue-509: Add option to ignore… Revert to using invoke, add tes… Merge branch 'develop' into iss… and 1 more (compare)

  • Feb 09 21:08
    sneiland closed #514
  • Feb 09 21:08
    sneiland closed #515
  • Feb 09 20:03
  • Feb 09 19:54
    Travis framework-one/fw1 (issue/509) passed (755)
  • Feb 09 19:46
    sneiland synchronize #514
  • Feb 09 19:46

    sneiland on 509

    Add adobe 2018 and specify dist… Merge pull request #516 from fr… Merge branch 'develop' into iss… (compare)

  • Feb 09 19:45

    sneiland on develop

    Add adobe 2018 and specify dist… Merge pull request #516 from fr… (compare)

  • Feb 09 19:45
    sneiland closed #516
  • Feb 09 19:45
    Travis framework-one/fw1@e160e75 (issue/515) passed (752)
  • Feb 09 19:35
    Travis framework-one/fw1@e160e75 (issue/515) errored (752)
  • Feb 09 19:32
    sneiland opened #516
  • Feb 09 19:31

    sneiland on 515

    Add adobe 2018 and specify dist… (compare)

  • Feb 09 19:29
    sneiland opened #515
  • Feb 09 18:40
    sneiland commented #513
  • Feb 09 18:38
  • Feb 09 18:30
    Travis framework-one/fw1 (issue/509) errored (750)
  • Feb 09 18:21
    sneiland opened #514
Sean Corfield
@seancorfield
[Ross, cfml] I have a tricky situation here, where I have a bean that needs to access a bean in a subsystem
[Ross, cfml] what’s the approved method of accessing the subsystem bean within my other one?
[Ross, cfml] (the answer can be ’do what you’re doing in a service, if need be)
[Ross, cfml] the scenario is that I have a client bean where I’m calculating an ‘age class’, e.g. ‘18-25’, based on the client’s DOB
[Ross, cfml] the list of age classes are a list in my lookups table, so lookup bean
[Ross, cfml] (lookups is a subsystem)
Sean Corfield
@seancorfield
[John Whish, cfml] This is probably over simplifying it, but if a bean in your main application has a dependancy on a bean in the subsystem, then can't you move the subsystem bean to your main application as it's now a dependancy of the main application?
Sean Corfield
@seancorfield
[jtreher, cfml] I'm just reporting back that we have not been able to resolve our issues with reloading the application under load. We are currently reverting everything and are going to try to upgrade just DI/1 to see how it fares there to help isolate the issue. It totally seems related to the legacy subsystems.
[Ross, cfml] @aliaspooryorik no
[Ross, cfml] at least, that’s not an option in this instance
Sean Corfield
@seancorfield
[lramirez, cfml] While I don’t know the full circumstances I think making a service is the right call here.
Sean Corfield
@seancorfield
[Carl Von Stetten, cfml] @salted a service is probably the best solution. However, while frowned upon, you can access another subsystem's bean factory to get your bean. Do you have access to the framework from wherever you are trying to access your lookup bean?
[Ross, cfml] If I dip down to the application yes, but id rather not do that obviously
[Carl Von Stetten, cfml] Can you pass fw as a property into the "client" bean?
[Carl Von Stetten, cfml] Admittedly, this would feel really dirty, so the service approach would probably be better.
[Carl Von Stetten, cfml] I've done this in some controllers where I need to grab a bean from another subsystem.
Sean Corfield
@seancorfield
[Sean Corfield, cfml] @jtreher One thing you might try is preloading the subsystems in setupApplication(): for ( s in ["list", "of", "subsystems"] ) setupSubsystem( s ); That should solve the lazy-loading under load issue (you may need an application scope lock around that tho').
[Sean Corfield, cfml] Kinda brute force but worth a try.
[Sean Corfield, cfml] @salted If one of your subsystems has a dependency on a bean in another subsystem, that's definitely something you need to correct -- by moving the bean to the parent (main) app context. Cross-subsystem dependencies indicate a broken design, sorry.
[Ross, cfml] We use our subsystems as modules essentially so it's not an option in this case, but thanks for the pointer I will bring that up
[Kevin Miller, cfml] this may have already been covered but what about a main service that can marshal requests for beans generically to act as a bridge for all areas of the app to leverage
Sean Corfield
@seancorfield
[Kevin Miller, cfml] a beanfactory in practice i guess, so maybe that's superfluous. just thinking its best that if you're going to do something like that it only breaks the decoupling in one spot
Sean Corfield
@seancorfield
[jtreher, cfml] @seancorfield I did try that.
Sean Corfield
@seancorfield
[Sean Corfield, cfml] @jtreher Bummer that didn't work. Not sure what to suggest at this point.
Sean Corfield
@seancorfield
[github-fw1]
[framework-one/fw1] Issue created by mjclemente
framework-one/fw1#503
Sean Corfield
@seancorfield
[John Whish, cfml] Interesting ticket @mjclemente - what would you name the key though if a JSON array?
[John Whish, cfml] JSON can be as simple as false or "hello" so they would fail as well.
[Kannan.P, cfml] Is any having basic idea about FW1 with Vue js ? If yes could you please send some reference link to me ? Thank in advance.
Sean Corfield
@seancorfield
[John Whish, cfml] FW/1 can return JSON - so you can build an API which Vue consumes.
Sean Corfield
@seancorfield
[Kannan.P, cfml] @aliaspooryorik Thanks a lot for your info,. I will take a look on that link.
Sean Corfield
@seancorfield
[github-fw1]
[framework-one/fw1] Pull request submitted by mjclemente
framework-one/fw1#504
Sean Corfield
@seancorfield
[github-fw1]
[framework-one/fw1] Issue closed: framework-one/fw1#503 by seancorfield

[github-fw1]
[framework-one/fw1] Pull request closed: framework-one/fw1#504 by seancorfield

[github-fw1]
[fw1:develop] 2 new commits by Matthew J Clemente and 1 other

[Sean Corfield, cfml] @mjclemente ++ Thank you for the issue and PR!
[watney, cfml] `@seancorfield gives karma to @mjclemente. They now have 13 karma. #38 overall.`
[Matthew Clemente, cfml] Thanks @seancorfield!
Sean Corfield
@seancorfield
[Carl Von Stetten, cfml] Having major issues trying to use FW/1 4.2 as a REST API backend for an Angular 5 app. When attempting to do POST or PUT (and maybe PATCH and DELETE, although we haven't tried that yet), Angular does an OPTIONS request to verify what methods are available. No matter what we do, the OPTIONS request always response with Access-Control-Allow-Methods →OPTIONS,POST,GET, and Angular throws an error that PUT (and curiously POST) wasn't allowed. For reference, here's a portion of the FW/1 settings from app.cfc:
variables.framework = { action = 'action', defaultSection = 'main', defaultItem = 'default', reloadApplicationOnEveryRequest = true, generateSES = true, SESOmitIndex = true, diEngine = "di1", diComponent = "framework.ioc", diLocations = [ "/model", "/controllers", "/sharedModel" ], diConfig = { }, routes = [ { "$RESOURCES" = "actor,movie,movieToActor" } ], resourceRouteTemplates = [ { method = 'get', httpMethods = [ '$GET' ] }, { method = 'post', httpMethods = [ '$POST' ] }, { method = 'get', httpMethods = [ '$GET' ], includeId = true }, { method = 'put', httpMethods = [ '$PUT' ], includeId = true }, { method = 'patch', httpMethods = [ '$PATCH' ], includeId = true }, { method = 'delete', httpMethods = [ '$DELETE' ], includeId = true }, { method = 'error', httpMethods = [ '$*' ] } ], decodeRequestBody = true, preflightOptions = true };
[Carl Von Stetten, cfml] Doing an OPTIONS request in Postman also returns only OPTIONS,POST,GET in the Access-Control-Allow-Methods response. But at lease we can hit POST/PUT/PATCH/DELETE directly in Postman and get back the expected results.
Sean Corfield
@seancorfield
[Carl Von Stetten, cfml] Is there something else we need to do to get FW/1 to show all the available methods in the OPTIONS response?
Sean Corfield
@seancorfield
[Sean Corfield, cfml] The way OPTIONS responds is to say the methods that are allowed are the ones that would match for all verbs for the route that OPTIONS was called for.
[Sean Corfield, cfml] resp.setHeader( "Access-Control-Allow-Methods", "OPTIONS," & uCase( structKeyList( request._fw1.routeMethodsMatched ) ) );
[Sean Corfield, cfml] The resourceRouteTemplates machinery generates a bunch of different routes and so each of those distinct routes will have a different set of verbs that work with them -- and therefore each route will respond differently to OPTIONS.
Sean Corfield
@seancorfield
[Sean Corfield, cfml] (I didn't write any of the auto-expanding resource stuff, BTW)
[Sean Corfield, cfml] To debug, I think you can dump the expanded route map...? I'm not sure what happens when you override the default routes.
Sean Corfield
@seancorfield
[Carl Von Stetten, cfml] @kanna2591 suggested I try sticking to the FW/1 defaults, so I reverted my controller back to using the default method names (default,show, create, update, and destroy) and removed the custom resourceRouteTemplates config setting. Here's my current app.cfc and actor.cfc: https://gist.github.com/cfvonner/1f9dfd96d43a33a178b03f98c9666fb2
[Carl Von Stetten, cfml] I'm still only seeing OPTIONS,POST,GET returned in the Access-Control-Allow-Methods header.
Sean Corfield
@seancorfield
[Sean Corfield, cfml] @cfvonner Can you create a GitHub issue and link to that Gist? That way I'll remember to take a look later on...
[Carl Von Stetten, cfml] Yup, will do.
Sean Corfield
@seancorfield
[github-fw1]
[framework-one/fw1] Issue created by cfvonner
framework-one/fw1#505