Presentation is loading. Please wait.

Presentation is loading. Please wait.

Build Joomla! business apps with ChronoForms Russell Searle 19 Jan 2013.

Similar presentations


Presentation on theme: "Build Joomla! business apps with ChronoForms Russell Searle 19 Jan 2013."— Presentation transcript:

1 Build Joomla! business apps with ChronoForms Russell Searle 19 Jan 2013

2 Introduction Requirements Analysis and modelling Design Development Testing Deployment

3 Why build business apps? Businesses automate and connect business processes -> significant cost reductions = improve profitability Use Joomla! as a framework, it has all the services and elements Attract bigger clients for longer term engagements and more repeat business Work on more interesting projects More demanding custom development work attracts higher rates Produce higher value applications and sites Possibly reduce need to interface / integrate separate customer apps

4 Elements of business apps FeatureChronoForms product FormsChronoForms ViewsChronoConnectivity Workflow: mailChronoForms Workflow: state ChronoForms, ChronoConnectivity

5 ChronoForms product range ChronoForms Builds chainable CRUD forms for any data Simple form controls, rich set of actions, fully programmable ChronoConnectivity Builds views of any data Front-end and back-end views in one view object ChronoForums A beta-version forum built on CF, similar to phpBB V3 For sites that need a modified or customised forum Reference installation for CF features and techniques ChronoContact A simplified contact form builder

6 ChronoForms features Drag and drop form builder Wizards for basic and complex forms Basic set of configurable input elements, plus custom element Extensive set of configurable form actions A CF form does not have to have a UI! Custom callable events Pluggable architecture Extremely customisable and programmable Suits web developers: HTML, PHP, JavaScript, CSS, AJAX Developed by Max (ChronoMan), supported by Max and Bob Janes (author of Packt book, custom actions and tutorials)Max Bob Janes

7 Two types of forms CCK Vertical data organisation Multiple physical records per logical record Fixed table and column names, fixed key and indexes RS Form! Pro organises main tables vertically Form builder RSForm! Pro Table #__reform_submission_values SubmissionValueIdFormIdSubmissionIdFieldNameFieldValue 111nameJoe Blow 211emailjoe@blow@mail.com 311address11 Fred Street 411address2 511suburbCarlton 611stateVic 711postcode3084 811countryAU 911phone03 5555 1234

8 Two types of forms CCK Horizontal data organisation One physical record per logical record Custom table and column names, custom key and indexes ChronoForms organises data horizontally Form builder ChronoForms Table #__chronoforms_data_mailusers nameemailaddress1address2suburbstatepostcodecountryphone Joe Blowjoe@blow@mail.com1 Fred Street CarltonVic3084AU03 5555 1234

9 Comparison of forms CCKs FeatureVertical storageHorizontal storage Flexibility Very flexible Rigid structure Adaptability Highly adaptable Slow to adapt Extensibility Easy, fast extension Painstaking extension Efficiency, performance? OK for small-medium DBs High performance Scalability Limited, constrained Practically unlimited Joins and views Hopeless Practically unlimited Report production Poor reporting support Strong reporting features Processing complexity Limited to simple apps Highly complex DBs/apps Data typing Weak typing Strong typing

10 Requirements Introduction Requirements Analysis and modelling Design Development Testing Deployment

11 CFDemo organisation chart CEO Finance Fred Sales Sarah Sam HR Helen Payroll CFDem o

12 Business process The new online leave application process works as follows: To gain access to online Leave Application facilities, you must log in to the CFDemo application as one of the CFDemo employees. Begin the leave application process by clicking the Apply for Leave link in one of these places:Apply for Leave The Apply for Leave option in the HR drop-down menu from the top menu barApply for Leave The Apply for Leave option in the HR section menu in the left sidebarApply for Leave You will be asked which type of leave you are applying for: Annual, Sick, Long Service or Bereavement leave. If you are a manager who has the authority to submit leave applications on behalf of your staff, you will also be asked whether you are submitting the leave application for yourself, or on behalf of one of your staff members. Fill out and submit the Leave Application form. Required values have labels marked with *. There are pop-up calendars for the starting and ending leave dates. Please be sure to enter the correct number of working days off. You must apply for a minimum of one day's leave. For sick leave applications, please upload a scanned copy of your doctors certificate. For bereavement applications, please identify your relationship to your deceased relative. When you submit the form, three e-mails are sent: You receive an acknowledgement e-mail at your registered e-mail address. The Payroll Administrator will receive a request to check and confirm your available balance of the type of leave you have requested. The manager who approves your leave applications will receive a copy of your application, for planning purposes. When the Payroll Administrator checks your leave balance, another e-mail is sent to the manager who approves your leave applications: Your manager will be asked to review and approve your leave application. The manager may refuse your application, but if so, he or she must record a reason. If your manager is unable to review your leave application for some reason, the Payroll Administrator can review and update your application on behalf of your manager. When your manager reviews and updates your leave application, two more e-mails are sent: You receive an e-mail advising the manager's decision. If your leave application is refused, please discuss the matter with your manager. If your application is for Long Service leave, the Managing Director will also receive a copy of your manager's decision on your leave application. The e-mail to you is also copied to the Payroll Administrator, for management purposes.

13 More business rules CFDemo managers may have staff who are not employees, e.g. casuals, contractors. In general these staff do not have trusted CFDemo e-mail addresses. Managers are expected to apply for leave on behalf of these staff members, and to communicate directly with them about their leave applications. For this reason, the LeaveApplicationProxy form requires entry of the applicants name but it does not allow entry of an e-mail address, and proxy leave applications do not attempt to notify the leave applicant at any stage of the work flow. There are four types of leave but in each case, there are several options for the way that wages may be paid during the employees absence. This attribute is referred to as the Leave Option. It is selected during the initial leave application but can be changed later by the Payroll Administrator. Each type of leave also has different attributes, as follows: Annual Leave. This is the basic form of leave, there are no additional fields on the Leave Application form. Sick Leave. Applicants are expected to provide a doctors certificate for all sick leave. This can be uploaded on the initial leave application, or the leave applicant can provide it later and the Payroll Administrator or the Approving Manager can upload it to the application at a later stage, even after leave has been approved. Long Service Leave. There are no additional fields on the Leave Application form, but the CEO is copied in on the leave approval email notification. Bereavement Leave: The leave applicant must specify his or her relationship to the deceased person, and only a specified set of relationships are accepted for the granting of Bereavement Leave. In addition, the leave days credit must be paid for from one pf the normal leave balances that are due to the applicant. If the Approver Manager refuses a Leave Application, he or she must provide a reason for doing so, but that reason is not communicated in email notifications. The system does not attempt to maintain the leave days balances for employees, the Payroll Administrator handles that separately with other systems. Managers need a Leave Schedule report so they can review planned or past absences from their departments. The Payroll Administrator needs the ability to review, update and delete all Leave Applications at any time. No mail notifications are sent when the Payroll Administrator updates Leave Applications outside the normal work flow.

14 Analysis and modelling Introduction Requirements Analysis and modelling Design Development Testing Deployment

15 Analysis process Business analysis is skilled, demanding, high-value work Analysts think in terms of processes, structures, models Good modelling tools can generate schemas and code Products of analysis Business process narrative Process and partial data models Requirements Functional spec Test cases Partial database schema Basic classes in various target languages

16 Simplified JSD analysis A simplified method, based on Jackson System DevelopmentJackson System Development 1. Obtain a written narrative description of the business process, including objects, inputs, outputs and actors 2. Get four highlighters 3. Highlight all nouns in colour #1: these are candidate entities, or candidate master tables 4. Highlight all verbs in colour #2: these are candidate actions, transactions or relationships 5. Highlight all adjectives in colour #3: these may be candidate attributes for related entities 6. Highlight all adverbs in colour #4: these may be candidate conditions or modifiers

17 Analysis methods UML: Unified Modelling Language UML Key product of OMG: Object Management GroupOMG UML provides standards and specs for modelling business and application processes, structure, behaviour and architecture UML tools produce various diagrams Users can understand and react to UML diagrams Most useful behavioural diagrams for analysis: Use cases Activity Sequence Interaction Communication

18 Analysis tools Common UML tools: Microsoft Visio Very commonly used, but doesnt do code generation NetBeans UML plugin Eclipse Model Development Tools IntelliJ IDEA UML Designer Visual Paradigm for UML Enterprise Architect Dia

19 CFDemo use case

20 Design Introduction Requirements Analysis and modelling Design Development Testing Deployment

21 Design methods and tools Use some more UML, continue from analysis work Most useful structural diagrams for design: Class Object Package For web sites, page layout and form styling may also be required, but this is usually a separate stream of work

22 Data model The data model is the single most important product If the data model is sound, there will always be a reasonable solution for functional requirements, and support cost and effort will be predictable If the data design is incomplete, wrong or weak, the application will have a high life-cycle cost, it will cause trouble and pain, and it will eventually break Make every effort to align the data model with the real world Entities Relationships Indexes Foreign keys Attributes Constraints Stored procedures Triggers

23 Data modelling Make the effort to build a data model for any non-trivial application Build a fully normalised model (3NF)fully normalised model You can always de-normalise it later if necessary for performance, reporting or data warehousing But not vice versa: difficult and expensive to normalise a non-normal database Elaborate BAs partial data models and schema Or start with entities and attributes from simplified JSD analysis methodsimplified JSD analysis method Refine until you can prove that use cases are satisfied

24 Data modelling tools Microsoft Visio Very commonly used, but doesnt do code generation MySQL Workbench 5.x phpMyAdmin also includes a basic data modeller phpMyAdmin You have to set up phpMyAdmin configuration storage. This is a bit tricky, but its worth doing.phpMyAdmin configuration storage IBM Data Studio Many other database clients have data modelling features Many UML analysis tools also have data modelling featuresUML analysis tools

25 CFDemo data model

26 Data design Actors Applicant Approver Delegate (dropped) PayrollAdmin ManagingDirector Entities = Tables LeaveDefinition LeaveRule LeaveApplication Relations LeaveApplication -> LeaveDefinition LeaveApplication -> LeaveRule Major Attributes LeaveDefinition name, value, description LeaveRule rule, factors x 4, results x 2 LeaveApplication applicantType leaveType leaveOption stage checkBalance approved All actors etc …

27 Forms design Leave Application Forms List StageProcess SeqNameTypeUse CaseNext Seq Control1LeaveDefinitionFormDefines entity-level parameters for Leave Application forms2, 3 2LeaveDefinitionListViewList Leave Definitions for add or update3 Control3LeaveRuleFormDefines combination rules to populate LeaveApplication forms4, 5 4LeaveRuleListViewList Leave Rules for add or update5 Apply5LeaveApplicationMasterSwitchPresent Approver options or Applicant Leave Type option6 or 7 6LeaveApproverOptionsFormApprover chooses Leave Type and either LeaveApplicationSelf or LeaveApplicationProxy8 or 9 7LeaveApplicantOptionsFormApplicant chooses Leave Type9 9LeaveApplicationSelfFormLeave Application for Self10 8LeaveApplicationProxyFormLeave Application for Employee10 CheckBalance10LeaveCheckBalanceFormPayroll Administrator approves available Leave Balance11, 12 11LeaveCheckBalanceListViewPayroll Administrator reviews and updates all Leave Applications awaiting Leave Balance approval12 ApproveLeave12LeaveApprovalFormApprover approves Leave Application13, 14 13LeaveApprovalListViewApprover reviews and updates all Applications awaiting his/her Leave approval14 Control14LeaveApplicationAllFormPayroll Administrator updates any Leave Application15 LeaveListViewPayroll Administrator reviews and updates all Leave Applicationsend

28 Development Introduction Requirements Analysis and modelling Design Development Testing Deployment

29 Final HR Leave Application product Demonstration

30 Testing Introduction Requirements Analysis and modelling Design Development Testing Deployment

31 Testing ChronoForms Use a good IDE and copy/paste code to/from CF elements and actions; helps to get syntax right Have a test plan and a suite of unit tests Test in pieces; test incrementally; test as you go Test boundary conditions Use the Debugger action freely Use Firebug to debug HTML, CSS, JavaScript PHP debuggers like Xdebug, Zend Debugger are useful but its not easy to drill down to deep code in Joomla! Use Selenium to automate unit test suite

32 Deployment Introduction Requirements Analysis and modelling Design Development Testing Deployment

33 Deploying ChronoForms Exporting an application: Survey your forms and list any custom actions used Identify any related groups and access levels Backup CF and CC forms from CF / CC managers Export database tables with phpMyAdmin or other MySQL client Deploying an application: Install custom actions required for your app Create required groups and access levels Import database tables with phpMyAdmin / MySQL client Change table prefixes of imported tables Restore CF and CC forms in CF / CC Managers Work through all forms and connections and update database table names Check any static email addresses and embedded URLs Recreate menus and menu items

34 References ChronoForms product site: http://www.chronoengine.com/ Bob Janes support site: http://greyhead.net/ My CFDemo case study site: http://cfdemo.psicom.com.au/ Bob Janes ChronoForms 3.1 Cookbook: http://www.packtpub.com/chronoforms-31-joomla-site- cookbook/book http://www.packtpub.com/chronoforms-31-joomla-site- cookbook/book MooTools: http://mootools.net/ FormCheck class: http://mootools.floor.ch/docs/formcheck/files/formcheck-js.html


Download ppt "Build Joomla! business apps with ChronoForms Russell Searle 19 Jan 2013."

Similar presentations


Ads by Google