26
2014 CAMP © 2014 BP3 Global Inc. All Rights Reserved All Information is Proprietary and Confidential DEVELOPING IN BRAZOS

Bpm camp brazos control development best practices

Embed Size (px)

Citation preview

2 0 1 4CAMP© 2014 BP3 Global Inc. All Rights Reserved

All Information is Proprietary and Confidential

DEVELOPING IN BRAZOS

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

ENHANCEMENT ANALYSIS

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

ENHANCEMENT ANALYSIS• Make sure the functionality is currently not available on the latest

version.!

• Is the enhancement approaching the problem with the right pattern?!

• Will it empower usability?!

• What alternatives can be provided if the enhancement request is not being approached correctly?!

• E.g. Hiding Section border configuration

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

IT'S NOT ONLY ABOUT FUNCTIONALITY

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

WHERE DOES IT BELONG?• Is there value on making it available to all customers?!

• If yes, then it's a development for BP3 Brazos toolkit!

• If no, then it's a extension to the BP3 Brazos toolkit!

!

How to handle extensions on the BP3 Brazos toolkit was already approached.

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

COACH VIEWS

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

COACH VIEWSWhat are Coach Views?!

• The Coach View Structure!

• Overview (Boundary, Template)!

• Behavior (Scripts, Dependencies, Header, Events)!

• Load, Unload, View, Change, Collaboration, Validate!

• Variables !

• Layout (Custom HTML, Content box with/without manage it's content)!

• Templates and Coach views collections

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

LEVERAGE EVENT LIFECYCLE

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

COACH VIEWS - LEVERAGING EVENT LIFECYCLE

• Load is to be called once.!

• View changes only the look and feel. Change events should only call it when there are changes on that area.!

• Change handles the changes. Ideally targets only the specific changes necessary (don't load what's not necessary)!

• Unload is to be used for any event that might outlive the destruction of the object (e.g. binding handlers or events outside of the scope of the Coach view)

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

FIRST STEPS

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

FIRST STEPS• Is the functionality available on the Libraries already used? !

• Jquery-latest.js documentation contains libraries used!

• If yes, let's leverage it.!

• Bootstrap and Jquery can also be used to accelerate development. (Seletors, search, sort)!

• Copy the current Brazos control to a toolkit where you can perform the development.

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

CODE DEVELOPMENT

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

CODE DEVELOPMENTSoftware engineering best practices are also applied on coach views:!

• Encapsulate modules as functions!

• Reuse functions!

• Inside a coach view and across coach views!

• Comment it, indent it!

• Keep it simple (as much as possible)!

• Avoid direct communication when using Coach Views, use the variables instead

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

DEMO - CHECKBOX POPULATION FROM AJAX

DEMOAdding the ability to fetch the checkbox data from an Ajax

call

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

PERFORMANCE, WHAT 'S THAT?

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

PERFORMANCE? WHAT'S THAT?Yes, there is such a thing and if the points already described are covered you shouldn't get any surprise:!

• Function reuse!

• Keep it simple!

• Event Lifecycle (Change event should affect specific changes, properly unload coach views)!

• Ideally the time complexity of a function shouldn't be more than O(n)!

• Use Javascript functions or Jquery Libraries before you build your own.!

• Careful with cycles inside cycles!

• Use break and break labels (multiple nesting levels), return and exit to increase performance on cycles!

• Careful with event handling, make sure you remove useless events from the controls or page.

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

MEASURE PERFORMANCE

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

NETWORK PERFORMANCE

Measure the Network Performance: Can you avoid some calls? Can you minify the files to decrease the cost?

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

JAVASCRIPT PERFORMANCE

Use a profiler to measure it (e.g from Firefox)

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

UNIT TEST

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

UNIT TEST

!

• Testing is as important as developing. It will ensure the quality of delivery!!

• The Unit tests are on "BP3 Brazos UT" and you can improve the existing one or create a new one (for new controls)!

• The Unit test should also be used to make sure the implementation didn't regress any configuration

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

UNIT TEST• The basic configuration for a Unit Test should be the following:

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

UNIT TEST

DEMOUpgrading the Unit test and perform regression tests

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

LET'S DELIVER IT?

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

DELIVER

ttps://www.blueworkslive.com/scr/processes/400002f3fb9de32#bpmn

© 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential © 2014 BP3 Global Inc. All Rights Reserved // All Information is Proprietary and Confidential 2 0 1 4CAMP

Q&A