1 / 13

Macromedia MAX 2003

Macromedia MAX 2003. Mach-II Intro. Stephen Rittler CounterMarch Systems. Agenda. Genesis of Mach-ii Components of a Mach application Overview of a request/response cycle with Mach A peek under the covers of a functioning Mach application. Components. Mach-ii.xml <properties>

vachel
Download Presentation

Macromedia MAX 2003

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Macromedia MAX 2003 Mach-II Intro Stephen Rittler CounterMarch Systems

  2. Agenda • Genesis of Mach-ii • Components of a Mach application • Overview of a request/response cycle with Mach • A peek under the covers of a functioning Mach application

  3. Components • Mach-ii.xml • <properties> • <event-handler> • <page-view> • <listener> • Plugins and filters

  4. Mach-ii.xml • The “controller” • Defines application flow • Lots of fun to work with in a development team!

  5. Properties • The area of the XML file where you stash variables that you used to drop in Application.cfm <properties> <property name="applicationRoot" value="" /> <property name="defaultEvent" value="showWelcome" /> <property name="eventParameter" value="event" /> <property name="parameterPrecedence" value="form" /> <property name="maxEvents" value="10" /> <property name="exceptionEvent" value="exception" /> <property name="systemEventID" value="14" /> <property name="dsn" value=“{noneofyourbusiness}" /> <property name="dsn_ems" value="{noneofyourbusiness}" /> <property name="dsn_campus" value="{noneofyourbusiness}" /> <property name="dsn_forms" value="{noneofyourbusiness}" /> <property name="adminEmail" value="srittler@countermarch.com" /> <property name="senderEmailAddress" value="alumni@lehigh.edu" /> </properties>

  6. Event handlers • Each action that a user takes (and some that are done implicitly) is an event • Each “event” is mapped to an “event-handler” in the xml file • Inside each event-handler are the data retrieval and display tags related to that event <event-handler event="ems_showCategories" access="public"> <notify listener="categoryManager" method="getCategories" resultKey="request.qCategories" /> <view-page name="ems_showCategories" contentKey="request.content" /> <view-page name="ems_appNavigation" contentKey="request.appNavigation" /> <view-page name="baseTemplate" /> </event-handler>

  7. Page-view • A page-view is just display logic and any user input fields • There is no data retrieval in the view template. All data is passed in via request variables {real, live code demo}

  8. Listeners • The “data go-getters” • They sit out there in application scope and wait to be called on {real, live code demo}

  9. Plugins and Filters Stolen from Sean Corfield: • Rule of thumb: if you need to do it on every single request, event handler, or view, you should use a plugin. • If you need to perform some operation on data provided to certain events or listener methods, you should use a filter. The inner workings of plugins and filters are beyond the scope of today’s workshop. They are a great way to implement a login/security framework though!

  10. Let’s look at an application! • Reviewing the request/response cycle

  11. Lessons Learned • We’ve been developing applications using Mach-ii for a little over a year now • We were not Fusebox developers; learned from scratch with the Amkor guys (you rock!) • Spin-up time was FAST • Solid naming conventions are key to maintainability • Fundamentals of OOP are important • More learning in this area is warranted • Version control software is vital. The XML file changes frequently, especially on a large development team

  12. Q and A • Questions? Comments?

  13. Resources http://www.mach-ii.info/ http://tutorial345.easycfm.com/ http://livedocs.macromedia.com/wtg/public/machiidevguide/

More Related