Microsoft Dynamics GP 2015 Developer's Preview: Dexterity Service Patterns - Part 5


In my previous article (see Microsoft Dynamics GP 2015 Developer's Preview: Dexterity Service Patterns - Part 4), we discussed the merits of the Wrapped Window pattern and how it can save time by avoiding refactoring of complex business logic embedded on Dexterity forms. I also provided an intro on the Decoupled Logic pattern and why this is the preferred method for exposing Dexterity services as it provides the best performance. However, we also came to the conclusion that refactoring is only feasible in cases where decoupling the business logic from the UI will yield a reasonably increase in performance, without negatively impacting development and product release timelines.

We also looked into the Decoupled Logic pattern considerations and today we will accompany these with sample code to clarify the meaning of each.

Decoupled Logic Considerations
  • In decoupled logic mode, there is no implicit data types validation or conversion. Unlike the Window Wrapped pattern where the map statement manages casing, signed versus unsigned precision, and nulls during the binding of window fields to our instantiated class properties; in the Decoupled Logic pattern we must perform all the conversion and validations.
     
  • Check for valid value for decimals
(Click to enlarge)
     

  • Check for a valid value for a drop-down or radio group
(Click to enlarge)
     
  • Force strings to upper case as needed, for example, items, customers, vendors, etc. (see first example).
  • Set default values as needed as user may pass a null value as a parameter to a service procedure
    

There you have it! Working with services and .NET interop is quite frankly not that complicated so long you understand the patterns and some of the rules governing them. So finally, we will put this all together in a final installment that will complete this series.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Comments

Jim Lawhead said…
Hi...I can't find this information anywhere. Do you know if eConnect will supported on Dynamics GP 2015?
Mariano Gomez said…
Jim,

eConnect will be around for the foreseeable future. David Musgrave and I presented a session at reIMAGINE 2014 and we addressed this concern. You have to keep in mind that eConnect has over 400 XML nodes. They are a bit less than 1/3 of those being released as services. So it will be a few releases before Microsoft catches up with all the nodes being exposed by eConnect.

However, as we also mentioned in our presentation, you shouldn't wait until last minute to become familiar with the new services architecture and you should start planning on transitioning your eConnect projects over the next couple of years.

MG.-
Jim Lawhead said…
M.G.

thanks for the quick reply.

Is that presentation online anywhere?

thanks

jim
Mariano Gomez said…
Jim,

The presentation is available on this blog - scroll down a couple articles to the reIMAGINE 2014 wrap up post or click here to access it directly. Locate the Downloads section within the article.

You can also download the presentation from the Dynamic Partner Connections website. You will need to sign in, then click the drop down next to your profile image and select the Communities option. reIMAGINE 2014 should appear in a list below. Click on the Libraries option.

Hope this helps.

MG.-

Popular posts from this blog

DBMS: 12 Microsoft Dynamics GP: 0 error when updating to Microsoft Dynamics GP 2013 R2

Do I have to use those "Z-" currency IDs in GP?

Microsoft Dynamics GP Scrolling Windows and Line Sequence Numbers