atuttle / Taffy

:candy: The REST Web Service framework for ColdFusion and Lucee
http://taffy.io
Other
226 stars 117 forks source link

adjust to allow full FW/1 as framework beanfactory #429

Open brianharcourt opened 2 years ago

brianharcourt commented 2 years ago

My implemention instantiates FW1 as:

    application.endPoints = new framework.aop(variables.diLocation,variables.diConfig);
    variables.framework.beanFactory = application.endPoints;

To get it operating I needed to make these changes:

netlify[bot] commented 2 years ago

Deploy Preview for taffy-docs canceled.

Name Link
Latest commit ab72131e8e058c9ee1ec38f2cfb79641553f0818
Latest deploy log https://app.netlify.com/sites/taffy-docs/deploys/624c4f20b6a1700008c29b05
atuttle commented 2 years ago

I've not used it, but since you're referencing framework.aop I assume this is actually AOP/1 instead of FW/1 or DI/1?

brianharcourt commented 2 years ago

Ah - maybe I'm deploying FW/1 sub-optimally. I'm using it to get aop but I thought I was deploying the whole framework. FW/1 suggests that deploying the framework involves extends=framework.one but I'm extending taffy.core.api. The only way I could get aop was to instantiate as shown. If I tinker further I'll report here.

atuttle commented 2 years ago

AOP is a feature/addon for dependency injection. Indeed, aop.cfc extends DI/1:

https://github.com/framework-one/aop1/blob/bdc7b916a818bd2731c8d51122fe09f098258bba/aop.cfc#L1

Taffy supports using DI/1 as its bean factory but I've never tried it with AOP/1, which should work as a drop-in replacement for DI/1.

netlify[bot] commented 1 year ago

Deploy Preview for taffy-docs canceled.

Name Link
Latest commit ecef9477d0664525c0be9f3df6f1808e77df0541
Latest deploy log https://app.netlify.com/sites/taffy-docs/deploys/64bf32045d9ee10008afffe1