Successfully reported this slideshow.

Code Reusability

500 views

Published on

In this session I’ll show how we managed to create two manufacturing applications with around 50% of the code reused. Although it’s the same business line, the products are entirely different. You’ll see how we designed the database, middle tier, services and UI in the way that it’s possible to reuse it again and again.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Code Reusability

  1. 1. CODE REUSABILITY…in a real world scenarioDanijel MalikTwitter: @DanijelMalikEmail: danijel@artifis.si LEVEL 400
  2. 2. AGENDA• How to design reusable components• Implementation• Deploy in an elegant fashion
  3. 3. ABOUT ME
  4. 4. REMEMBER THE LEGO?
  5. 5. WHAT WE KNOW ABOUT CODEREUSABILITY? • It’s complex to design, hard to write and almost impossible to maintain • It breaks when you need it the most • It always ends up as framework
  6. 6. A PROBLEM OR A CHALLENGE? • What’s the story? • Two manufacturing systems • Deadline approaching fast • …but we had an idea 
  7. 7. ARCHITECTUREToolId CustomerId Customer Specific TablesDescriptio FirstNamen …… CustomX Common Tables MLToolId ProductIdDescriptio Namen System … XM… CustomX L MLContainerId InvoiceId NumberDescriptio …n CustomX… ML
  8. 8. ARCHITECTUREPROS CONS• No schema • Inability to use changes standard tools for• More reuse of a querying + base system reporting • Performance issues around serializing (solvable)
  9. 9. ARCHITECTURE Customer User Interface Customer Business Customer Business Facade Business Facade Facade Customer Customer Business Business Facade Business Logic Logic Customer Data Data Access Access SQL Oracle Db2 Server
  10. 10. YEAH BABY! NOW WE’VE GOT OUROWN FRAMEWORK TOO• It is focused on a business problem eg. Manufacturing Execution Systems• It is extensible as much as you need
  11. 11. LET’S SEE IT RUNNINGDEMO
  12. 12. HOW ABOUT NEW VERSIONS KID,HUH?• Source Control (TFS)• We have everything, but?• Ever heard about NuGet?• NuGet Server
  13. 13. LET’S SEE IT RUNNINGDEMO
  14. 14. SUMMARY• We have seen how to design reusable components• Great example of implementation in a new system• An elegant way to package & deploy them
  15. 15. THANK YOU!

×