Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 09 15:07
    sneiland labeled #510
  • Sep 09 15:07
    sneiland assigned #510
  • Sep 06 15:53
    charlesr1971 commented #510
  • Sep 06 09:47
    charlesr1971 commented #510
  • Sep 05 09:21
    charlesr1971 edited #510
  • Sep 05 09:19
    charlesr1971 edited #510
  • Sep 04 22:10
    charlesr1971 commented #510
  • Sep 04 22:07
    charlesr1971 commented #510
  • Sep 04 21:49
    charlesr1971 commented #510
  • Sep 04 21:14
    tonyjunkes commented #510
  • Sep 04 20:04
    charlesr1971 commented #510
  • Sep 04 20:03
    charlesr1971 commented #510
  • Sep 04 12:29
    charlesr1971 edited #510
  • Sep 04 12:19
    charlesr1971 edited #510
  • Sep 04 12:18
    charlesr1971 edited #510
  • Sep 04 11:41
    charlesr1971 commented #510
  • Sep 04 10:31
    mjclemente commented #510
  • Sep 04 08:12
    charlesr1971 edited #510
  • Sep 03 22:56
    sneiland commented #510
  • Sep 03 22:49
    charlesr1971 edited #510
Sean Corfield
@seancorfield
[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
Tony Junkes
@tonyjunkes
Just realized that 2 of my own project's Travis builds were getting logged in the Gitter activities feed (doesn't show in the main feed at least!). That's from me copying some of FW/1's Travis file to use as a base template for my own projects. I clearly did not remove everything that didn't pertain to my own needs so just wanted to drop in and say oops and sorry about that! I will make sure I remove the entries from my build files, so I don't pollute the feed further.
Sean Corfield
@seancorfield
LOL! You win a prize for the first actual message here in almost a year @tonyjunkes ! :)