Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 03 15:19
    sneiland commented #513
  • Apr 03 07:06
    mjhagen commented #513
  • Apr 03 04:28
    sneiland commented #513
  • Apr 03 04:24
  • Mar 29 22:50
    sneiland review_requested #519
  • Mar 25 13:27
  • Mar 25 13:23
    LordBrom edited #519
  • Mar 25 13:20
    LordBrom opened #519
  • Mar 22 20:54
    sneiland closed #517
  • Mar 22 20:54
    sneiland commented #517
  • Mar 22 20:25
    sneiland assigned #517
  • Mar 22 20:14
    sneiland commented #518
  • Mar 22 20:13
    sneiland labeled #518
  • Mar 17 23:53
    nicholaswguidry edited #518
  • Mar 17 23:53
    nicholaswguidry opened #518
  • Feb 28 22:45
    dependabot[bot] labeled #37
  • Feb 28 22:45
    dependabot[bot] opened #37
  • Feb 28 22:45

    dependabot[bot] on bundler

    Bump rake from 10.4.2 to 12.3.3… (compare)

  • Feb 12 14:06
    atuttle opened #517
  • Feb 09 21:09
    sneiland closed #509
Sean Corfield
@seancorfield
[clockworkrebel, cfml] It seems that there's something strange going on with the bean factory in each subsystem. Or maybe it's that it's somehow using the parent bean factory
[clockworkrebel, cfml] I'm new to this framework and so my understanding of how this is supposed to work is probably not quite right
Sean Corfield
@seancorfield
[Sean Corfield, cfml] @jtreher I was looking over the handful of open issues in the FW/1 GitHub repo and noticed this which sounds a lot like your issue framework-one/fw1#423
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.