Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up Application.cfc / index.cfm.

  • Loading branch information...
commit f3eef94da26723b10846df50420466114d24478a 1 parent f7fb92d
@seancorfield authored
Showing with 4 additions and 57 deletions.
  1. +0 −56 Application.cfc
  2. +4 −1 index.cfm
View
56 Application.cfc
@@ -3,59 +3,3 @@
// used to test search via mapping:
this.mappings[ "/goldfish/trumpets" ] = expandPath( "/tests/extrabeans" );
}
-
-/*
-// this.mappings[ '/goldfish/trumpets' ] = expandPath( '/extrabeans' );
-// function setupApplication() {
-// var xbf = new ioc( '/goldfish/trumpets',
-// {
-// constants = { magicValue = 42 },
-// singulars = { sheep = 'bean' }
-// }
-// );
-// // demonstrate passing expanded path under webroot:
-// var svcPath = expandPath( 'services' );
-// var bf = new ioc( '/model, #svcPath#', { transients = [ 'fish' ] } );
-// bf.setParent( xbf );
- bf.onLoad( variables.loader );
-// setBeanFactory( bf );
-//
- // programmatically declare another bean:
- bf.declareBean( 'declaredBean', 'declared.things.example', false );
-//
-// // used to track creation of transient beans for illustration purposes:
-// structDelete( application, 'itemCount' );
-// }
-//
- function loader( any ioc ) {
-// ioc.addBean( 'myconfig1',
-// new ioc( '' )
-// .addBean( 'config', '/some/xml/file.xml' )
-// .declareBean( 'configObject', 'declared.things.myconfig' )
-// .injectProperties( 'configObject',
-// { name = "MyConfig" } ) );
-// ioc.addBean( 'myconfig2',
-// ioc.injectProperties(
-// new declared.things.myconfig( '/some/other/file.xml' ),
-// { name = "MyConfigBean" } ) );
- }
-<h2>Welcome to InjectOne!</h2>
-<cfset bf = getBeanFactory() />
-<cfset item = bf.getBean('item') />
-<cfdump var="#item#" label="Item Bean"/>
-<cfdump var="#item.getNewItem()#" label="New Item From Bean-Aware Item Bean"/>
-<cfset user1 = bf.getBean('userfish') />
-<cfdump var="#user1#" label="User 1 Bean"/>
-<cfdump var="#user1.getItem()#" label="User 1's Item Bean - should be null, transient not injected"/>
-<cfset user2 = bf.getBean('userfish') />
-<cfdump var="#user2#" label="User 2 Bean"/>
-<cfdump var="#user2.getItem()#" label="User 2's Item Bean - should be null, transient not injected"/>
-<cfdump var="#bf.getBean('userservice')#" label="User Service"/>
-<cfdump var="#bf.getBean('product')#" label="Product Service"/>
-<cfdump var="#bf.getBean('userfish').product.getUserService()#" label="bf.getBean('userfish').product.getUserService()"/>
-<cfdump var="#bf.getBean('magicvalue')#" label="bf.getBean('magicvalue')"/>
-<cfdump var="#bf.getBean('item')#" label="bf.getBean('item') - transient"/>
-<cfset bf.getBean('myconfig1').explain() />
-<cfset bf.getBean('myconfig2').explain() />
-<cfdump var="#bf.getBeanInfo()#"/>
-*/
View
5 index.cfm
@@ -1 +1,4 @@
-
+<h1>Welcome to DI/1!</h1>
+<p>DI/1 is a lightweight, convention-over-configuration dependency injection framework a.k.a. bean factory.</p>
+<p>All you need is <tt>ioc.cfc</tt>. See <a href="https://github.com/seancorfield/di1/wiki">the DI/1 wiki</a> for detailed documentation.</p>
+<p>If you want to run the test suite, install <a href="http://mxunit.org">MXUnit</a> and run the Ant script.</p>
Please sign in to comment.
Something went wrong with that request. Please try again.