Book Image

Programming Microsoft Dynamics NAV 2009

Book Image

Programming Microsoft Dynamics NAV 2009

Overview of this book

Microsoft Dynamics NAV is a well established Enterprise Resource Planning (ERP) application, part of the Microsoft Dynamics family. Dynamics NAV is installed worldwide, with well over one million users. Version 2009 contains many major new features and structures, requiring even experienced Dynamics NAV developers to refresh their NAV development knowledge. Renowned for its challenging learning curve, Dynamics NAV is a complex piece of software with a unique design structure. For developers learning to modify or enhance Dynamics NAV for vital business purposes, the task can sometimes be intimidating. This book is an in-depth step-by-step guide to programming NAV, designed to ease you through the complexities of NAV application development. You will learn the skills and develop the confidence to tackle your own critical NAV applications. This book will act as your experienced NAV programming mentor, helping you to become productive as a NAV developer much more quickly. NAV development is quite complex, with a steep learning curve. This book makes it easy for you. From basic NAV terminology and concept definitions, through the essential building blocks of NAV data structure and objects, you will gain an understanding of the fundamental underlying concepts of NAV. You will learn practical details about NAV object construction and the tools available, including table, page, and report design. You will learn how to use NAV's tools to effectively navigate through the various features of objects, including properties, triggers, and C/AL code, and receive practical guidance on ways to develop and test in the unique NAV C/SIDE development environment. Extensive guidance on software design for NAV is provided along with tips for efficient design of new NAV applications or enhancing existing applications. With its comprehensive collection of NAV information and distillation of years of NAV development experience, this book is not only designed to help you learn, but to act as a reference as well.
Table of Contents (18 chapters)
Programming Microsoft® Dynamics™ NAV 2009
Credits
About the Author
Acknowledgement
About the Reviewers
Foreword
Preface
Index

Significant changes in NAV 2009


Even though the NAV 2009 release doesn't contain any significant changes in the business application functionality, the changes in the infrastructure are major. We will discuss those briefly now and in detail in the later chapters.

Two-tier versus three-tier

The two-tier (Classic Client) system has all the business logic in the client (first tier) and the database management in the database (second tier). The database can either be the Classic C/SIDE database or a SQL Server database. This is the mode of all NAV releases until Version 2009. The three-tier system, new with NAV 2009, has the Role Tailored Client as the first tier (minimal logic), the NAV Service Tier as the second tier (where all the business logic now resides), and the SQL Server database as the third tier.

Both the two-tier and the three-tier configurations are shown in the following image. In both cases, the database is SQL Server (a stand-alone two-tier configuration could have a Classic NAV database server). The server tier performs the same role in both instances. For the two-tier configuration, the Classic Clients handle authentication, object management, presentation/rending, and the processing of all code, triggers, and validation.

For the three-tier configuration, the Role Tailored Clients are limited to some state tracking, simple data type validation and, of course, all the presentation and rendering for the new user interface. The NAV Service tier (NAV Servers) handles authentication, object management, the processing of all code, triggers and validation, plus offers web services support.

The following image illustrates a possible configuration of the NAV 2009 system. It has both the two-tier and three-tier options running in parallel. The three-tier option has multiple NAV Servers installed for capacity reasons (one NAV Server is projected to handle 40 to 60 users). Finally, the NAV Service tier is providing web services to support Internet-based access to the system from mobile devices.

Role Tailored Client

The new Role Tailored Client (RTC) is quite different in look and feel from the Classic Client. The RTC brings with it a completely new approach to designing and coding for the user interface. As the name implies, the orientation of the new client is to present a user interface that focuses on the specific role of the individual user. We will spend quite a bit of time studying the design and development for the new client.

SSRS-compatible report viewer

The new RTC supports reporting through the use of Visual Studio report designer and a Report Renderer/Viewer that replicates much of the functionality of SQL Server Reporting Services. RTC reports provide a host of new capabilities. RTC reports can be dynamically sorted in review (on-screen) mode, include graphics and expand (detail)/collapse (summary) displays, have drill-down and drill-through capabilities, and generate PDF or .xls (that is, Excel) files. We will spend quite a bit of time in Chapter 5, Reports, studying the Reporting Services for NAV 2009.

Web services

Web services is a new major feature of the NAV 2009 three-tier implementation. There isn't much to learn within NAV about web services because the implementation design is incredibly simple. Publishing a page or codeunit as a web service only requires a single record entry in the appropriate table.

Web services is very powerful, because it allows us to take advantage of the NAV Service Tier and expose NAV business logic, user authentication, and data access/validation to external processes. It is the new API for any application that has the ability to consume web services provided by another application.