Chain of Responsibility design pattern with Dynamic handlers

This is the Chain of responsibility pattern with dynamic handler which can handler. With this we can assign dynamic handler for the request without touching the main handler.

The following is the image shows the list of projects I have used in the demo project.
1. PatternTest –> is the actual client which will use the design pattern
2. Core –> is the Main project which will have default implementation
3. AddOn –> this is the first add on which will extend the core functionality like that we have AddOnTwo and AddOnThree project.
1. PatternTest
In this Project we have two important files ManageHandlers.cs and Handler.xml. These two files provide the dynamic behaviour.

  • ManageHandler.cs: This file contains the code that will load the handlers for the main request. This will take the handler details from Handler.xml file
  • Handler.xml: This file contains the details about dynamic handlers. Assembly path name and class name (Including the namespace).
2. Core
In this Project we have the main business logic. It will deals with the required logic for default implementation for all the possible scenario.
3. AddOn One, Two and Three
These projects deals with specific scenario. These will extend the core functionality and provide the additional functionality. The execution of these add ons will be controlled from the Core module it self using the Handler.xml file.

Link to the Sample Project is here Download

Advertisements
Posted in Design patterns, Visual Studio | Leave a comment

AX 2012 CU7 faster compilation

To perform the faster compilation of AX, follow the steps below

Go to following server configuration window

“Control Panel\System and Security\Administrative Tools\Microsoft Dynamics AX 2012 Server Configuration.lnk”

Enable the feature hot swapping assemblies


Go to command prompt (open as Administrator) enter the following command

axbuild.exe  xppcompileall  /s=01 /altbin=”C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin”

/s=01  is AX instance number as you seen in the above window

/altbin  is the AX server deployment location


Reference

Posted in Microsoft Dynamics AX | Leave a comment

Reset SQL Server password


To reset the password, we need to set SQL server mode as Single use mode. To do that open a command prompt as an administrator

Type the following commands without the quotes (“ “)

  1. “net stop mssqlserver” and press enter. (mssqlserver is your server instance name)
  2. “net start mssqlserver /m” and press enter
  3. “sqlcmd” and press enter
  4. “CREATE LOGIN tempuser WITH PASSWORD = ‘Password123’ “ and press enter
  5. “GO” and press enter
  6. “sp_addsrvrolemember ‘tempuser’, ‘sysadmin’ “ and press enter
  7. “GO” and press enter
  8. “quit” and press enter
  9. “net stop mssqlserver” and press enter
  10. “net start mssqlserver” and press enter

Now you can login with “tempuser” account with the “Password123” as password and reset sa user account password.




Posted in SQL Server | Leave a comment

Formula one calendar 2014

Hi friends,

Formula 2014 calendar is available to download. Add this to your google or outlook calendar to get the remainder on the race timings
http://www.f1calendar.com/download/f1-calendar_p1_p2_p3_q_gp.ics?t=1393763379 

Posted in Uncategorized | Leave a comment
“Time is too slow for those who wait,
Too swift for those who fear,
Too long for those who grieve,
Too short for those who rejoice,
But for those who love, time is eternity”- Henry van dyke.
Posted in Uncategorized | Leave a comment

Under standing your own code

The following is the good message to read for the beginners of the programming
Understanding your own code

Posted in Uncategorized | Leave a comment