The wiki allows for anonymous no-login contributions so you don't need a Trac account. You can set your name and email in the prefs (cookies) and Askimet will give you better karma (when it checks for spam):
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/prefs Don't fear the wiki! It's all open and ready to go without any login credentials. .pjf Adam Ness said the following on 06/18/2009 07:57 PM: > Sure. It looks like I need a login to edit the wiki though.. Can you > provide? > > On Thu, Jun 18, 2009 at 5:23 PM, Peter J. Farrell <[email protected] > <mailto:[email protected]>> wrote: > > > Adam, this is a nice example of evolution of code. Would you consider > taking a little time to put this on the wiki? > > .Peter > > Adam Ness said the following on 06/18/2009 06:31 PM: > > I'd like to "thumbs up" this for Matt... One of the core ideas that > > helped me learn OO was "refactoring" basically taking code, and just > > getting it working to start, and then slowly pulling "common" > bits out > > and clarifying it so that it fits the architecture. Basically, > > Mach-II is a framework, that gives you lots of hooks to hang things > > off of. Don't feel like you need to fill all of the hooks on your > > first application in mach-ii. Do what's comfortable for you, and as > > you do, you'll see where some bits of your code should hang on > nearby > > hooks, instead of being tied all up to the same hook. Lemme give an > > example of evolution: > > > > --- Rev 1 --- > > mach-ii.xml > > ----------------- > > <event-handler event="listUsers" > > > <view-page name="listUsers" /> > > </event-handler> > > > > <page-view name="listUsers" page="views/listUsers.cfm" /> > > > > views/listUsers.cfm > > ---------------------------- > > <html> > > <head>....</head> > > <body> > > <cfquery name="qryfoo">SELECT * from users</cfquery> > > <cfoutput query="qryFoo"> > > <a > > > href="index.cfm?event=editUser&id=#qryFoo.ID#">#qryFoo.name#</a><br /> > > </body> > > </html> > > > > Well, that's not great, as you can see, but it's simple to clean > > things up a bit: > > > > --- Rev 2 --- > > mach-ii.xml > > ----------------- > > <listener name="userListener" type="listener.userListener" /> > > <event-handler event="listUsers"> > > <notify listener="userListener" method="getUsers" > > resultArg="qryFoo" /> > > <view-page name="listUsers" /> > > </event-handler> > > <page-view name="listUsers" page="views/listUsers.cfm" /> > > > > listener/userListener.cfc > > ----------------------------------- > > <cffunction name="getUsers" returntype="query"> > > <cfset var qryFoo = "" /> > > <cfquery datasource="bar" name="qryFoo"> > > SELECT * from users > > </cfquery> > > <cfreturn qryFoo /> > > </cffunction> > > > > views/listUsers.cfm > > ---------------------------- > > <cfset qryFoo = event.getArg("qryFoo") /> > > <html> > > <head>....</head> > > <body> > > <cfoutput query="qryFoo"> > > <a > > > href="index.cfm?event=editUser&id=#qryFoo.ID#">#qryFoo.name#</a><br /> > > </body> > > </html> > > > > And so on. Rev 3, you might move your query into a DAO. Rev 4 you > > might introduce exit events instead of hardcoading editUser into > your > > view file, etc.. I'm a big fan of not implementing anything > until you > > need to. Mach-II gives you the flexibility to change just a few > small > > things in a few small places, and allow you to implement things > as you > > need to. It's got lots of "hooks" you can hang things on, but you > > don't need to populate those hooks until the need arises. > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ -~----------~----~----~----~------~----~------~--~---
