Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second review of gpii.express module... #2

Merged
merged 40 commits into from
Apr 7, 2015

Conversation

the-t-in-rtf
Copy link
Contributor

I have completed another round of updates since our last discussion, and am submitting my work for review.

The biggest change is that gpii.express is now responsible for wiring all middleware and components together.

…last conversation with Antranig. Attempted to migrate to using distributeOptions instead of component inspection. This works fine for middleware components (which are not nested), but does not work for router components (which can be nested). Will have to keep the previous approach until I either get advice for the group or can talk with Antranig again.
Conflicts:
	src/js/json.js
	src/js/urlencoded.js
…dependency from test "reqView" class. Added configuration and tests to test middleware being inappropriately exposed from either a child or a sibling.
…ving middleware isolation, per feedback from Antranig on the mailing list.
… This is required to support GET /path/:param style bindings.
…f all-tests.js to use the IoC test framework.
@@ -1 +1,2 @@
placeholder, please ignore.
# gpii-express
A fluid module to load express.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fleshed out a little by explaining the particular goals and strategy of the integration. For example - our desire to have containment structure of Infusion component trees to mirror the mounting structure of express routers and middleware, the ability to access Infusion's facilities for inspecting and advising compound structures by integrators who want to bundle and modify existing apps, etc. Should also contrast this with Kettle, and emphasise that, for now, this is a less ambitious and more concrete integration that doesn't give access to any fresh request-scoped material (IoC components) beyond those which express already supplies - that is, its native request and response objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that was boilerplate that I obviously missed updating. This has now been greatly expanded.

component.options.router.use(component.options.path, childComponent.getMiddleware());
}
else {
fluid.fail(new Error({message: "A component must expose a router in order to work with child middleware components."}));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply fluid.fail("A component etc." .... is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@the-t-in-rtf
Copy link
Contributor Author

@amb26, we are nearly done, I think. I could use feedback on the testCaseHolder, I couldn't wire in the two common steps to each sequence without encountering errors. The non-working configuration is there, but commented out.

@the-t-in-rtf
Copy link
Contributor Author

Antranig's comments via Skype:

[3/31/15, 3:43:34 PM] Antranig Basman: Yes, you'll get horribly confused trying to nest your test defs inside an expander
[3/31/15, 3:43:51 PM] Antranig Basman: Instead you should use the "moduleSource" option where you get to write an arbitrary function returning your test cases rather than "module"
[3/31/15, 3:44:32 PM] Antranig Basman: Well
[3/31/15, 3:44:43 PM] Antranig Basman: Either that or just write a function which returns the config wholesale
[3/31/15, 3:44:58 PM] Antranig Basman: https://github.com/fluid-project/kettle/blob/master/lib/test/KettleTestUtils.js#L472
[3/31/15, 3:45:00 PM] Antranig Basman: Is a good example

@the-t-in-rtf
Copy link
Contributor Author

The testCaseHolder has now been updated to wire in the common setup test sequence steps automatically.

@amb26 amb26 merged commit d2b57d7 into fluid-project:master Apr 7, 2015
@amb26
Copy link
Member

amb26 commented Apr 7, 2015

Congratulations, ADTKINS on having reached this great milestone on such a long and tortuous road :)

@the-t-in-rtf the-t-in-rtf deleted the second-review branch September 2, 2015 11:05
@the-t-in-rtf the-t-in-rtf restored the second-review branch February 8, 2016 10:02
@the-t-in-rtf the-t-in-rtf deleted the second-review branch April 21, 2017 14:32
@the-t-in-rtf the-t-in-rtf restored the second-review branch June 5, 2018 11:37
@the-t-in-rtf the-t-in-rtf deleted the second-review branch June 5, 2018 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants