Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reuse.. To don’t reinvent the wheel

Similar presentations


Presentation on theme: "Reuse.. To don’t reinvent the wheel"— Presentation transcript:

1 Reuse.. To don’t reinvent the wheel
Software Reuse & Components Based Development Reuse.. To don’t reinvent the wheel 2015 September * Bilal Abdul-Razzaq Software Reuse & Component-Based Development (SE441)

2 Software Reuse & Component-Based Development (SE441)
@ The Beginning In most engineering disciplines, systems are designed by composing existing components that have been used in other systems (System Reuse). في معظم العلوم الهندسية، يتم تصميم النظم بالاستفادة من مكونات موجودة مسبقاً، سبق استخدامها في نظم أخرى (إعادة الاستخدام). Systems Reuse:: to achieve better systems, more quickly and at lower cost. إعادة الاستخدام :: لإنجاز نظم أفضل، بشكل أسرع، وبتكلفة أقل. Software Reuse & Component-Based Development (SE441)

3 Software Reuse & Component-Based Development (SE441)
What is Software Reuse ? Software reuse is the process of implementing or updating software systems using existing software assets. تعريف إعادة الاستخدام: هي عملية تطوير أو تحديث نظام برمجي باستخدام أصول برمجية موجودة مسبقاً. A good software reuse process facilitates the increase of productivity, quality, and reliability, and the decrease of costs and implementation time. عملية إعادة الاستخدام الجيدة: تزيد الانتاجية ، تزيد الجودة، تزيد الموثوقية في المنتج البرمجي، وفي نفس الوقت تقلل التكلفة ومدة التطوير. Software Reuse & Component-Based Development (SE441)

4 Software Assets الأصول البرمجية
A reusable component may be one or a set of the following Software assets: المكونات التي يمكن إعادة استخدامها، قد تكون واحدة أو مجموعة من المكونات(الأصول) البرمجية التالية: البرامج * Code. مواصفات النظام * Software specifications. التصميم * Designs. حالات وسيناريوهات الاختبار * Tests cases & test scenarios. هيكلية قاعدة البيانات * Database schema. النسخ التجريبية من نظم سابقة* Prototypes. خطط التطوير * Plans. التوثيق * Documentation. بيئات العمل * Frameworks. النماذج الجاهزة * Templates. Systematic Software Reuse = Reusable “Assets” Software Reuse & Component-Based Development (SE441)

5 فوائد إعادة الاستخدام Reuse benefits -
Why? Benefit Reused software, that has been tried and tested in working systems, should be more dependable than new software. The initial use of the software reveals any design and implementation faults. These are then fixed, thus reducing the number of failures when the software is reused. البرنامج الذي يتم إعادة استخدامه وقد سبق تجريبه واختباره في نظم عاملة سيكون أكثر موثوقية من برنامج جديد. استخدام البرنامج لأول مرة عادة يكشف أية عيوب في التصميم أو التطبيق، وهذه العيوب بطبيعة الحال سيكون قد سبق تصحيحها وبالتالي تقل احتماليات حدوث مشاكل عند إعادة الاستخدام. 1. Increased Dependability زيادة الموثوقية If software exists, there is less uncertainty in the costs of reusing that software than in the costs of development. This is an important factor for project management as it reduces the margin of error in project cost estimation. This is particularly true when relatively large software components such as sub- systems are reused. في مشروع ما، لو أن البرامج المراد استخدامها أو بعضها موجودة مسبقاً فإن ذلك سيسهل عملية التسعير (لأن سعر الموجود مسبقاً ويراد استخدامه سيكون معروف وليس كالذي سيطور من جديد وسيتم تقدير سعره مع العرضة للخطأ). هذا عامل مهم في إدارة المشاريع البرمجية حيث يقلل حجم المخاطرة في تقدير سعر المشروع. ويظهر ذلك أكثر وضوحاً في النظم الكبيرة عند إعادة استخدام بعض مكوناتها (sub-systems). 2. Reduced process risk تقليل نسبة المخاطرة في عملية التطوير Software Reuse & Component-Based Development (SE441)

6 فوائد إعادة الاستخدام -Reuse benefits
Why? Benefit Instead of application specialists doing the same work on different projects, these specialists can develop reusable software. بدلاً من أن يقوم مهندسو البرمجيات بإعادة عملهم في مشاريع مختلفة، يمكنهم أن يطوروا برامج قابلة لإعادة الاستخدام، بينما هم يتفرغوا للأعمال الجديدة. 3. Effective use of specialists الاستغلال الأمثل للكفاءات Some standards, such as user interface standards, can be implemented as a set of standard reusable components. For example, if menus in a user interfaces are implemented using reusable components, all applications present the same menu formats to users. The use of standard user interfaces improves dependability as users are less likely to make mistakes when presented with a familiar interface. بعض المقاييس، كمقاييس واجهات الاستخدام مثلاً، يمكن تطبيقها كمجموعة من المكونات القياسية القابلة لإعادة الاستخدام. مثال: لو أن القوائم في نظام ما تم تطبيقها بحيث تكون قابلة لإعادة الاستخدام، فإن جميع التطبيقات التالية ستكون فيها القوائم بنفس الأسلوب. وهذا الشيء كفيل بأن يحسن المنتج ويسهل من استخدامه واستحسانه بالنسبة للمستخدم الذي سيعتاد على هذا الأسلوب في العرض. مثال (قوائم العرض في برامج Microsoft Office). 4. Standards compliance فائدة الالتزام بالمقاييس Software Reuse & Component-Based Development (SE441)

7 فوائد إعادة الاستخدام Reuse benefits -
Why? Benefit Bringing a system to market as early as possible is often more important than overall development costs. Reusing software can speed up system production because both development and validation time should be reduced. في كثير من الحالات يكون توقيت طرح المنتج البرمجي في السوق أهم بكثير من تكلفة تطوير المنتج (لأسباب تنافسية مثلاً)، وبالتالي تلجأ الشركة المطورة لإعادة الاستخدام توفيراً للوقت ولو على حساب التكلفة. في هذه الحالة إعادة الاستخدام توفر حلاً جيداً حيث سيقل وقت التطوير وكذلك وقت التأكد من صحة أدائه. 5. Accelerated development سرعة التطوير As a developer uses already pre-defined components, hence, the activities associated with components specification, design and implementation are now replaced with finding components, their adaptation to suit new requirements, and their integration. حينما يستخدم المطورون مكونات موجودة مسبقاً، فإن وقت وتكلفة (وصف المكونات والتصميم والتطبيق) يستبدل بوقت وتكلفة ربطها بالنظام الجديد وتكييفها مع المتطلبات الجديدة، أثبتت التجارب أن الثانية تكلف وقتاً ومالاً أقل من الأولى. 6. Savings in costs and time توفير المال والوقت Software Reuse & Component-Based Development (SE441)

8 مشاكل إعادة الاستخدامReuse problems
Why? Problem If the source code of a reused software system or component is not available then maintenance costs may be increased. لو أن الشيفرة البرمجية المفتوحة للبرنامج أو الجزئية المراد إعادة استخدامها غير موجودة فإن تكاليف الصيانة ستزيد. 1. Increased maintenance costs زيادة تكاليف الصيانة CASE toolsets may not support development with reuse. It may be difficult or impossible to integrate these tools with a component library system. The software process assumed by these tools may not take reuse into account. أداة البرمجة المستخدمة في النظام قيد التطوير ربما لا تدعم عملية إعادة الاستخدام، ذلك سيجعل من الصعب أو المستحيل الاتصال بمكتبة دوال أو مكونات برمجية مستوردة حيث لم يصمم النظام لذلك من الأساس. 2. Lack of tool support أدوات التطوير لا تدعم المكونات المراد إعادة استخدامها Some software engineers sometimes prefer to re-write components as they believe that they can improve on the reusable component. هناك بعض مهندسي النظم يفضلون أن يقوموا بإعادة كتابة المكونات لثقتهم بأنهم يمكن أن يبرمجوا ما هو أفضل. 3. Not-Invented-Here (NIH) syndrome عقدة (هذا البرنامج لم يبرمج هنا) Software Reuse & Component-Based Development (SE441)

9 مشاكل إعادة الاستخدامReuse problems
Why? Problem Software components have to be discovered in a library, understood and, sometimes, adapted to work in a new environment. المكونات المراد إعادة استخدامها يجب أن يتم البحث عنها وإيجادها في مكتبات الدوال البرمجية، ثم يحتاج المطور إلى فهمها وتركيبها مع باقي مكونات النظام. مهندسو النظام يجب أن يكونوا على ثقة بأنهم سيجدو المكون أو الدالة المطلوبة، وهذا في حد ذاته يعتبر عبئاً على فريق التطوير. 4. Finding, understanding and adapting reusable Components إيجاد، فهم، تركيب وتهيئة المكونات المعاد استخدامها Software Reuse & Component-Based Development (SE441)

10 - Software reuse levelsمستويات إعادة الاستخدام
software units that are reused may be of different three sizes: يمكن إعادة الاستخدام على ثلاثة مستويات (من حيث الحجم): إعادة استخدام تطبيق كامل● Application system reuse: The whole of an application system may be reused either by incorporating it without change into other systems (COTS reuse) or by developing application families (Product Line). يمكن إعادة استخدام (تطبيق كامل) سواء بدمجه في تطبيق جديد بدون أي تعديلات أو بتطوير ما يسمى بـ(خطوط المنتجات البرمجية – مثل MS Office). إعادة استخدام مكونات برمجية● Component reuse: Components of an application: from sub-systems to single objects may be reused. إعادة استخدام جزئي لـ (مكون\مكونات) من التطبيق: يمكن إعادة الاستخدام جزئياً بدايةً من ( نظام فرعي) و نزولاً إلى كائن واحد. إعادة استخدام كائن أو دالة ● Object and function reuse: Software components that implement a single well defined object or function may be reused. مكونات برمجية لكائن أو دالة. Software Reuse & Component-Based Development (SE441)

11 Software Reuse & Component-Based Development (SE441)
The reuse landscape المشهد العام للتقنيات التي تتضمن أسلوب إعادة الاستخدام ● As mentioned, Reuse is possible at a range of levels from simple functions to complete application systems. كما ذكر، إعادة الاستخدام ممكن أن تتم على عدة مستويات تبدأ من إعادة استخدام دالة واحدة وصولاً إلى إعادة استخدام نظام كامل. ● The reuse landscape covers a range of possible reuse techniques. هناك العديد من التقنيات التي تستخدم فكرة إعادة الاستخدام، نقدمها فيما يلي: Software Reuse & Component-Based Development (SE441)

12 The Reuse Landscape Design Patterns Component Frameworks
Application Product Lines Aspect-Oriented Software Development Component Based Development COTS Integration Configurable Vertical Applications Legacy System Wrapping Program Libraries Service Oriented Systems Program Generators Software Reuse & Component-Based Development (SE441)

13 Software Reuse & Component-Based Development (SE441)
Reuse techniques Description Technique Generic abstractions that occur across applications are represented as design patterns that show abstract and concrete objects and interactions. تجريد لتصميم عام (نمط) يستخدم لوصف مشكلة عامة متكررة الحدوث. Design patterns أنماط التصميم Systems are developed by integrating components (collections of objects). نظم يتم تطويرها بتكامل جزئيات برمجية، بعضها أو جميعها مكون مسبقاً. Component-based Development التطوير المبني على تكامل مجموعة مكونات Collections of abstract and concrete classes that can be adapted and extended to create application systems. مجموعات (حزم) من الكلاس يمكن الاتصال بها وإعادة استخدامها في عملية تكوين تطبيقات برمجية جديدة (مثل .Net Framework ) Application frameworks بيئات (منصات) التطبيق Legacy systems that can be ‘wrapped’ by defining a set of interfaces and providing access to these legacy systems through these interfaces. النظم البرمجية القديمة يمكن إعادة استخدامها بتغليفها من خلال نظم وسيطة. Legacy system wrapping تغليف النظم القديمة Software Reuse & Component-Based Development (SE441)

14 Software Reuse & Component-Based Development (SE441)
Reuse techniques Description Technique Systems are developed by linking shared services that may be externally provided. نظم يتم تطبيقها بربط مجموعة من الخدمات الخدمة: هي برمجية مستقلة يتم الاتصال بها من خلال بروتوكولات خاصة وتقدم خدمات معينة معرفة مسبقاً، يكون استخدامها عادة في الشبكات خصوصاً الانترنت. Service-oriented systems التطبيقات المبنية على الخدمات An application type is generalized around a common architecture so that it can be adapted in different ways for different customers. نوع معين من التطبيقات يتم تنفيذها بناءً على تصميم عام مشترك، وبالتالي يمكن إعادة استخدامها بتكييفها حسب طلب الزبون. Application product lines خطوط المنتجات البرمجية Systems are developed by integrating existing application systems. COTS integration النظم التجارية الجاهزة Software Reuse & Component-Based Development (SE441)

15 Software Reuse & Component-Based Development (SE441)
Reuse techniques Description Technique A generic system is designed so that it can be configured to the needs of specific system customers. برنامج (جاهز) مصمم بحيث يمكن إعداده (ومن ثم إعادة استخدامه) بما يتوافق مع احتياجات زبون معين. Configurable vertical applications A generator system embeds knowledge of a particular types of application and can generate systems or system fragments in that domain. برنامج يولد برامج، يكون محتوياً على (قاعدة معرفة) في مجال معين من التطبيقات بحيث يمكنها توليد برامج في هذا المجال. Program generators Shared components are woven into an application at different places when the program is compiled. Aspect-oriented software development Software Reuse & Component-Based Development (SE441)

16 Software Reuse & Component-Based Development (SE441)
Planning for Effective SW Reuse التخطيط لعملية إعادة استخدام فعالة (جيدة) Software development processes have to be adapted to take reuse into account. In particular, there has to be a requirements refinement stage where the requirements for the system are modified to reflect the reusable software that is available. The design and implementation stages of the system may also include explicit activities to look for and evaluate candidate components for reuse. مراحل تطوير النظام المخطط لإعادة استخدامه يجب أن يتم تكييفها بحيث تؤخذ إعادة الاستخدام بعين الاعتبار. يجب أن يتم تنقيح متطلبات النظام بحيث تصاغ المتطلبات لتعكس ما يمكن إعادة استخدامه من النظام كجزء أو ككل. مراحل التصميم والتطبيق يجب أن تتضمن الإشارة الواضحة للمكونات الممكن إعادة استخدامها. Software Reuse & Component-Based Development (SE441)

17 Software Reuse & Component-Based Development (SE441)
“which is the most appropriate technique to use in a particular situation?” كيف تحدد ما هي تقنية إعادة الاستخدام المناسبة لحالة معينة؟ This depends on the requirements for the system being developed, the technology and reusable assets available, and the expertise of the development team. يعتمد ذلك على متطلبات النظام قيد التطوير، الأصول البرمجية والتقنيات المتاحة، و خبرات فريق التطوير. Key factors that should be considered when planning reuse are: هناك 6 عوامل أساسية يجب أخذها بعين الاعتبار عن التخطيط لإعادة الاستخدام: Software Reuse & Component-Based Development (SE441)

18 Software Reuse & Component-Based Development (SE441)
“which is the most appropriate technique to use in a particular situation?” .. Cont’d كيف تحدد ما هي تقنية إعادة الاستخدام المناسبة لحالة معينة؟ 1. The development schedule for the software: If the software has to be developed quickly, you should try to reuse off-the-shelf systems rather than individual components. الإطار الزمني لعملية التطوير: لو كان النظام البرمجي يجب تطويره سريعاً، سيكون من الأفضل إعادة استخدام برامج تجارية جاهزة (لو توفرت) بدلاً من إعادة استخدام مكونات مفردة (متفرقة). 2. The expected software lifetime: If you are developing a long-lifetime system, you should focus on the maintainability of the system. “you will have to adapt the system to new requirements, which will mean making changes to parts of the system. If you do not have access to the source code you may prefer to avoid off-the-shelf (COTS).” المدة المفترضة لطول عمر النظام (كم سيستمر في التشغيل): لو كان النظام سيتمر لمدة طويلة في التشغيل، يجب التركيز عند اختيار تقنية إعادة الاستخدام على إمكانيات الصيانة والتعديل المستقبلية التي سوف يحتاجها النظام لا محالة. لو كانت التقنية التي ستستخدم في إعادة الاستخدام لا توفر الشيفرة البرمجية المفتوحة (برامج COTS) فإن التعديلات حينها لن تكون ممكنة وبالتالي يجب تجنب هذا النوع من تقنيات إعادة الاستخدام في هذه الحالة. Software Reuse & Component-Based Development (SE441)

19 Software Reuse & Component-Based Development (SE441)
“which is the most appropriate technique to use in a particular situation?” .. Cont’d 3. The background, skills, and experience of the development team: All reuse technologies are fairly complex. If the development team has skills in a particular area, this is probably where you should focus. خلفية، ومهارات، وخبرات فريق التطوير. 4. The criticality of the software and its non-functional requirements: For a critical system that has to be certified by an external regulator, you may have to create a “dependability case”. This is difficult if you don’t have access to the source code. If your software has stringent performance requirements, it may be impossible to use strategies such as generator-based reuse, where you generate the code from a reusable domain specific representation of a system. These systems often generate relatively inefficient code ما هي درجة حساسية النظام ومتطلباته غير الوظيفية: لو كان النظام يجب أن يتم اعتماده من خلال (حالة اعتماد) سيكون من الصعب عمل ذلك لو لم يكن هناك إمكانية وصول للشيفرة المصدرية. كذلك لو كانت هناك متطلبات خاصة بجودة الشيفرة المصدرية فلن يمكن استخدام برامج (توليد البرامج) حيث أن هذه البرامج عادة ما تولد برامج ليست على كفاءة عالية. Software Reuse & Component-Based Development (SE441)

20 Software Reuse & Component-Based Development (SE441)
“which is the most appropriate technique to use in a particular situation?” .. Cont’d 5. The application domain: In some application domains, such as manufacturing and medical information systems, there are several generic products that may be reused by configuring them to a local situation. If you are working in such a domain, you should always consider these as an option. المجال: في بعض المجالات (كالتصنيع، أوالمجال الطبي) يوجد العديد من التطبيقات الجاهزة التي يمكن استخدامها في حالات معينة بعد إجراء الإعدادات الخاصة بالزبون. يجب جعلها كخيار عند التخطيط لإعادة الاستخدام. 6. The platform on which the system will run: Some components models, such as .NET, are specific to Microsoft platforms. Similarly, generic application systems may be platform-specific and you may only be able to reuse these if your system is designed for the same platform. البيئة التي سيتم تشغيل النظام فيها: بعض المكونات البرمجية و النماذج، كـ .NET مخصصة مثلاً لبيئة ميكروسوفت. لن يمكن إعادة استخدامها في بيئة اخرى كـ Linux. Software Reuse & Component-Based Development (SE441)

21 Software Reuse & Component-Based Development (SE441)
Object-Oriented Programming & Reuse ((Perhaps the greatest promise of using object-((oriented paradigm is the code reuse Class Notion: Class is a set of attributes and operations. Attributes describe the characteristics of a set of objects on which operations can be performed. Encapsulation (Information Hiding): Is a Self containment of implementing details. That is the ability to minimize the exposure of implementation details of an object to its clients. Inheritance: Is the ability to extend, modify, and redefine attributes and operations of an existing class(es). Polymorphism: Is the association of a name with objects of different classes that are related through inheritance. Classes may provide different implementations for the same method. Software Reuse & Component-Based Development (SE441)

22 What is a “Component Software”?
Component software: Software designed to work as a component of a larger application. A good analogy is the way personal computers are built up from a collection of standard components: (Memory chips, CPUs, buses, keyboards, disk drives, monitors, etc.) Because all of the interfaces between components are standardized, it is possible to mix components from different manufacturers in a single system. المكونات البرمجية: برنامج مصمم ليعمل كمكون (وحدة) برمجية في نظام أكبر. كمثال: الكمبيوترات الشخصية مكونة من عدة مكونات قياسية: ذاكرة، معالجات، ناقلات بيانات، لوحات مفاتيح، أقراص تخزين.. لأن جميع البرامج الوسيطة (Interfaces) موحدة وفق مقاييس عالمية، فإنه من الممكن تشغيل مجموعة من هذه المكونات (Components) معاً رغم اختلاف الشركات المصنعة. Software Reuse & Component-Based Development (SE441)

23 What is a “Component Software”? .. Cont’d
The goal of component software is to standardize the interfaces between software components so that they too can work together seamlessly. الهدف من المكونات البرمجية هو عمل برامج وسيطة قياسية للتواصل فيما بينها، وبالتالي يمكن أن تعمل معاً رغم اختلاف مصادرها وربما اللغات التي برمجت بها. Many analysts believe that component software is the natural extension of object-oriented programming. يرى الكثير من المختصين بأن المكونات (Components) هي التمدد الطبيعي لـ (Object-Oriented Programming). Software Reuse & Component-Based Development (SE441)

24 Software Reuse & Component-Based Development (SE441)

25 examples Software components types من أنواع المكونات البرمجية
* Web services that are developed according to service standards and which are available for remote invocation. خدمات الويب: يتم تطويرها وفق مقاييس معينة ويتم الاتصال بها وطلب الخدمة منها عن بعد. * Collections of objects that are developed as a package to be integrated with a component framework such as .NET or J2EE. مجموعات من الكلاس: تم تطويرها كحزمة لتتكامل مع بيئة تطوير مثل بيئة .NET أو J2EE. * Stand-alone software systems (COTS) that are configured for use in a particular environment. البرمجيات الجاهزة: التي تعمل على أجهزة لوحدها دون الحاجة لأنظمة أخرى. Software Reuse & Component-Based Development (SE441)

26 Software Reuse & Component-Based Development (SE441)
COTS Product Reuse إعادة استخدام البرامج التجارية الجاهزة (COTS:: Faster development & Lower Cost) * A commercial-off-the-shelf (COTS) product is a software system that can be adapted to the needs of different customers without changing the source code of the system. البرامج التجارية الجاهزة هي برمجيات يمكن تكييفها بما يتوافق مع احتياجات زبائن مختلفين دون الحاجة لتغيير (الشيفرة البرمجية). * Because this software is designed for general use, it usually includes many features and functions. It therefore has the potential to be reused in different environments and as part of different applications. لأن هذا النوع من البرمجيات مصمم للاستخدام العام ليس مخصص لزبون معين، فهو في العادة يتضمن الكثير من الوظائف والخصائص. وبالتالي تزيد إمكانية إعادة استخدامه ضمن تطبيقات جديدة. Software Reuse & Component-Based Development (SE441)

27 COTS product reuse إعادة استخدام البرامج التجارية الجاهزة
There are two types of COTS product reuse, namely: هناك طريقتان لإعادة استخدام البرامج التجارية الجاهزة: * COTS-solution systems. * COTS-integrated systems. COTS — The COTS term is applied to almost all retail software. COTS components can be anything from an operating system to a word processor, a language compiler, or a component that is invisibly integrated into a software program. هو مصطلح ينطبق تقريباً على جميع البرمجيات التي تباع جاهزة في السوق. المكونات (الوحدات) البرمجية الجاهزة قد تكون (نظام تشغيل) وقد تكون (معالج نصوص) وقد تكون (مترجم في إحدى لغات البرمجة) وقد تكون (مكون برمجي غير ظاهر للمستخدم مدمج في أحد البرامج). Software Reuse & Component-Based Development (SE441)

28 COTS-solution systems الحلول التجارية الجاهزة
* COTS-solution systems consist of a generic application from a single vendor that is configured to customer requirements. ((الحلول التجارية الجاهزة)) تتكون من تطبيقات جاهزة مصدرها (مصنعها) واحد، يتم تخصيص إعداداتها بما يتوافق مع متطلبات المستفيد. * COTS-solution may be designed to support a particular business type, business activity, or sometimes, a complete business enterprise. الحلول التجارية الجاهزة قد تكون مصممة لدعم نشاط معين في مؤسسة، أو أحياناً لميكنة أعمال مؤسسة كاملة. For example, a COTS-solution system may be produced for dentists that handles appointments, dental records, patient recall, etc. مثال: نظام الحل التجاري الجاهز في عيادة أسنان سيهتم بـ: مواعيد المرضى، السجلات الطبية، تذكير المرضى بمواعيد المراجعة ... Software Reuse & Component-Based Development (SE441)

29 COTS Integration تكامل (ربط) أكثر من برنامج تجاري جاهز
COTS-integrated systems are applications that include two or more COTS products or, sometimes, legacy application systems. You may use this approach when there is no single COTS system that meets all of your needs or when you wish to integrate a new COTS product with systems that you already use. The COTS products may interact through their APIs (Application Programming Interfaces) or service interfaces if these are defined. البرامج التجارية الجاهزة المرتبطة: هي تطبيقات تتضمن اثنين أو أكثر من البرامج التجارية الجاهزة. تكون الحاجة لهذه الطريقة عندما يكون ليس هناك برنامج تجاري واحد يقدم حلاً لمتطلبات معينة في مشروع ما، أو عندما تكون هناك رغبة في عمل ربط مع برنامج قديم موجود فعلاً ولا يراد الاستغناء عنه. البرامج التجارية الجاهزة يتم التواصل معها أو بينها من خلال ما يسمى بالواجهة الوسيطة للبرمجة (API). Software Reuse & Component-Based Development (SE441)

30 Application Programming Interface (API)
API stands for Application programming interface (API) is defined as: The allowance and processes to give programs access to connect and essentially, communicate with other programs. Their APIs are their languages. هي الكيفية التي يتم بها السماح لبرنامج ما بالربط والتواصل مع برنامج آخر. API هي لغة التفاهم المشتركة بين البرنامجين. It's a software-to-software interface that allow for separate parties to talk to each other without any previous user knowledge or intervention. It runs the processes behind the scenes. For example: Many online stores use these to allow you to enter your credit card information, and then the store uses the API to send the information to a remote application that will verify whether or not the information is correct. واجهة وسيطة تسمح بتواصل برنامج بآخر حتى وإن كان كل منهما في مكان أو بيئة مختلفة، بدون معرفة أو تدخل مسبق من قبل المستخدم. مثال: الكثير من الأسواق الإلكترونية يستخدم API ليمكن المستخدم من إدخال بيانات الدفع الإلكتروني، ومن ثم يقوم موقع السوق الإلكتروني من خلال استخدام API بإرسال البيانات المدخلة إلى برنامج آخر موجود على سيرفر آخر للتأكد من صحة بيانات بطاقة الدفع المدخلة. Software Reuse & Component-Based Development (SE441)

31 Software Reuse & Component-Based Development (SE441)
مثال على موقع ويب اسمه ConvertApi.com يقدم خدمات تحويل الملفات من صيغة إلى أخرى، يتواصل زبائن الموقع معه ويحصلون على الخدمة من خلال الـ API Software Reuse & Component-Based Development (SE441)

32 Software Reuse & Component-Based Development (SE441)
To develop systems using COTS products, you have to make a number of design choices لتطوير نظم باستخدام برامج جاهزة، يجب أخذ مجموعة من الاعتبارات أثناء التصميم 1. Which COTS products offer the most appropriate functionality? Typically, there will be several COTS products available, which can be combined in different ways. If you don’t already have experience with a COTS product, it can be difficult to decide which product is the most suitable. ما هو البرنامج الجاهز الذي يوفر الوظائف (Functionality) الأنسب؟ عادة ما يكون هناك أكثر من برنامج جاهز يلبي المطلوب (مع اختلافات بينهم بالطبع). لو لم تكن هناك خبرة كافية بالتعامل مع البرامج الجاهزة فسيكون من الصعب اختيار الأنسب. 2. How will data be exchanged? Different products normally use unique data structures and formats. You have to write adaptors that convert from one representation to another. These adaptors are run-time systems that operate alongside the COTS products. كيف سيتم تبادل البيانات؟ في العادة سيكون كل برامج يستخدم هياكل بيانات وصيغ ملفات معينة خاصة به تختلف عن غيره. يجب عمل برامج للتحويل من صيغة لأخرى، وهكذا.. برامج التحويل هذه لا يراها المستخدم ولكنها تعمل في وقت التنفيذ (run-time) إلى جانب المهام الأخرى للبرنامج التجاري الجاهز. Software Reuse & Component-Based Development (SE441)

33 - COTS Integration exampleمثال على ربط (تكامل) البرامج الجاهزة
Consider the following scenario as an illustration of COTS integration: * A large organization Intends to develop a procurement system that allows staff to place orders from their desk. * By introducing this system across the organization, the company estimates that it can save $5 million per year. * By centralizing buying, the new procurement system can ensure that orders are always made from suppliers who offer the best prices and should reduce the paperwork costs associated with orders. * As with manual systems, the system involves choosing the goods available from a supplier, creating an order, having the order approved, sending the order to a supplier, receiving the goods, and confirming that payment should be made. The company has a legacy ordering system that is used by a central procurement office. السيناريو التالي يصف (COTS Integration): منظمة كبيرة تسعى لتطوير (منظومة مشتريات) تسمح للموظفين بأن يدخلوا الطلبات كل من مكانه. لو تم عمل هذه المنظومة فإن المنظمة ستوفر ما يعادل 5 مليون دولار سنوياً. بعمل آلية مركزية للشراء، ستضمن المنظومة الجديدة بأن المشتريات ستتم من الموردين الذين يقدمون أقل الأسعار، كما أن المنظومة ستقلص من تكاليف العمل الورقي. كما في النظام اليدوي، النظام يشمل اختيار البضائع من المورد، تكوين أمر الشراء، اعتماد الطلب، ارسال الطلب للمورد، استلام البضائع، والتأكد بأن عملية الدفع سوف تتم بالشكل المطلوب. الشركة لديها منظومة قديمة (Legacy) خاصة بأوامر الشراء تستخدم من قبل مكتب المشتريات الرئيسي. Software Reuse & Component-Based Development (SE441)

34 COTS Integration example.. Cont’d
The legacy order processing software is integrated with an existing Invoicing and Delivery system. منظومة أوامر الشراء القديمة (Legacy) متكاملة مع منظومة قديمة أخرى خاصة بالفوترة وتسجيل عمليات توصيل واستلام البضاعة. To create the new ordering system, the legacy system is integrated with a (web based e-commerce platform) and an ( system) that handles communications with users. لتكوين منظومة أوامر الشراء الجديدة:: المنظومة القديمة ستربط مع (موقع تجارة الكترونية) و (منظومة إدارة بريد الكتروني - إيميل) للتواصل مع المستخدمين. Software Reuse & Component-Based Development (SE441)

35 COTS integrated procurement System
Software Reuse & Component-Based Development (SE441)

36 COTS Integration example.. Cont’d
* This procurement system is a client–server based and, on the client, standard web browsing and software are used. منظومة المشتريات ستكون بطريقة (Client-Server)، في طرف الـ Client سيستخدم متصفح ويب ومنظومة إيميل. * On the server, the e-commerce platform has to integrate with the existing ordering system through an adaptor. على الـ Server منظومة التجارة الإلكترونية ستربط مع منظومة أوامر الشراء القديمة من خلال (Adaptor). * The e-commerce system has its own format for orders, confirmations of delivery, and so forth, and these have to be converted into the format used by the ordering system. منظومة التجارة الإلكترونية عندها صيغ خاصة بأوامر الشراء، تأكيد الاستلام، ..إلخ، وهذه يجب تحويلها إلى الصيغ التي تتعامل معها منظومة أوامر المشتريات القديمة. * The e-commerce system uses the system to send notifications to users, but the ordering system was never designed for this. Therefore, another adaptor has to be written to convert the notifications from the ordering system into messages. منظومة التجارة الإلكترونية تستخدم منظومة الإيميل للتواصل مع المستخدمين. ولكن منظومة أوامر الشراء القديمة لا تدعم هذه الميزة. الحل هو عمل (Adaptor) آخر لتحويل الرسائل المراد إرسالها إلى رسائل إيميل. Software Reuse & Component-Based Development (SE441)

37 Software Reuse & Component-Based Development (SE441)
* COTS integration can be simplified if a service-oriented approach is used. التطبيقات ذات التوجه الخدمي (Service Oriented) تعتبر مثال واضح على تكامل البرامج الجاهزة. حيث يتم فيها ربط (تكامل) أكثر من برنامج لتقديم حل معينة. * Essentially, a service-oriented approach means allowing access to the application system’s functionality through a standard service interface, with a service for each discrete unit of functionality. فكرة Service Oriented توفر إمكانية الوصول واستخدام وظائف في تطبيق معين من خلال واجهة (وسيطة) قياسية،، كل وظيفة يقدمها البرنامج لها خدمة (Service) خاصة بها. * Essentially, you have to program a wrapper that hides the application and provides externally visible services. يتم برمجة برنامج غلاف (وسيط) يخفي التطبيق ويوفر خدمات خارجية لتمكن المستخدمين من التواصل والاستفادة من الخدمات. This approach is particularly valuable for legacy systems that have to be integrated with newer application systems. هذا الأسلوب مناسب جداً في حالة إعادة استخدام تطبيقات برمجية قديمة، لربطها بتطبيقات جديدة(حديثة). Software Reuse & Component-Based Development (SE441)

38 Software Reuse & Component-Based Development (SE441)
COTS Integration Integrating COTS products is the same as integrating any other components. تكامل البرامج الجاهزة يعتمد على نفس فكرة تكامل أية مكونات برمجية أخرى. * You have to understand the system interfaces and use them exclusively to communicate with the software. يجب فهم البرامج الوسيطة (Interfaces) لربط (تكامل)البرامج * You have to design a system architecture that allows the COTS systems to operate together. يجب تصميم معمارية (بنية) النظام التي تشرح-تصف كيف ستعمل البرامج الجاهزة سوية. Software Reuse & Component-Based Development (SE441)

39 service-oriented approach Application wrapping
Software Reuse & Component-Based Development (SE441)

40 Four important COTS system integration problems:
1. Lack of control over functionality and performance: Although the published interface of a product may appear to offer the required facilities, these may not be properly implemented or may perform poorly. عدم إمكانية التحكم في التفاصيل البرمجية لوظائف برنامج COTS، وكذلك أدائه: رغم أن البرنامج يُقدم على أنه يوفر الخدمات المطلوبة، إلا أن تلك المهام قد تكون مبرمجة بطريقة غير كفؤة أو سيئة الأداء. 2. Problems with COTS system interoperability: It is sometimes difficult to get COTS products to work together because each product embeds its own assumptions about how it will be used. مشكلة التشغيل في بيئات (نظم تشغيل) مختلفة. Software Reuse & Component-Based Development (SE441)

41 four important COTS system integration problems:
3. No control over system evolution: Vendors of COTS products make their own decisions on system changes, in response to market pressures. For PC products, new versions are often produced frequently and may not be compatible with all previous versions. previous versions may become unavailable and unsupported. عدم القدرة على التحكم في أية تغييرات برمجية تطرأ على البرنامج: الشركات المزودة للبرامج الجاهزة (COTS) تغير من برامجها حسب تطورات السوق. إصدارات جديدة قد لا تتوافق مع الإصدارات القديمة. كما أن الإصدارات القديمة قد لا تعود متوفرة أو غير مدعومة. 4. Support from COTS vendors: Vendor support is particularly important when problems arise as developers do not have access to the source code of the system. Although vendors may commit to providing support, changing market and economic circumstances may make it difficult for (commitment. example(discontinue الحصول على الدعم الفني مهم جداً لأغراض الصيانة، قد تكون مشكلة كبيرة بسبب عدم القدرة على الوصول للشيفرة البرمجية في برامج COTS. كما قد يتغير مالك الشركة، أو يوقف إصدار البرنامج لأسباب لها علاقة بمتغيرات السوق. Software Reuse & Component-Based Development (SE441)

42 Software Reuse & Component-Based Development (SE441)
ERP ERP provides an integrated view of core business processes, often in real-time, using common databases maintained by a database management system. ERP عبارة عن مجموعة متكاملة من التطبيقات تستخدم قاعدة بيانات مشتركة. ERP systems track business resources—cash, raw materials, production capacity—and the status of business commitments: orders, purchase orders, and payroll. تسجل جميع الموارد في المؤسسة، السيولة المالية، المواد الخام، الإنتاج، أوامر الشراء، المرتبات... The applications that make up the system share data across the various departments (manufacturing, purchasing, sales, accounting, etc.) that provide the data التطبيقات المكونة للـ ERP تشترك البيانات بين الأقسام المختلفة في المؤسسة (التصنيع، المشتريات، المبيعات، الحسابات،..) Software Reuse & Component-Based Development (SE441)

43 The key features of ERP architecture
1. A number of modules to support different business functions. These are large grain modules that may support entire departments or divisions of the business. مجموعة من البرمجيات لدعم مختلف الأعمال التجارية والإدارية. For example: the modules that have been selected for inclusion in some ERP system are a module to support purchasing, a module to support supply chain management, a logistics module to support the delivery of goods, and a customer relationship management (CRM) module to maintain customer information. Software Reuse & Component-Based Development (SE441)

44 The key features of ERP architecture
2. A defined set of business processes, associated with each module, which relate to activities in that module. مجموعة من العمليات والقيود الخاصة بكل برنامج. For example, there may be a definition of the ordering process that defines how orders are created and approved. 3. A common database that maintains information about all related business functions. This means that it should not be necessary to replicate information, such as customer details, in different parts of the business. قاعدة بيانات مشتركة. ذلك يعني أن البيانات لن تتكرر في البرامج المختلفة. Software Reuse & Component-Based Development (SE441)

45 The key features of ERP architecture
4. A set of business rules that apply to all data in the database. Therefore, when data is input from one function, these rules should ensure that it is consistent with the data required by other functions. For example, there may be a business rule that all expense claims have to be approved by someone more senior than the person making the claim. مجموعة من القواعد التي تنطبق على جميع البيانات في قاعدة البيانات. Software Reuse & Component-Based Development (SE441)

46 Architecture of ERP system
Software Reuse & Component-Based Development (SE441)

47 Software Reuse & Component-Based Development (SE441)

48 Software Reuse & Component-Based Development (SE441)
ERP configuration 1. Selecting the required functionality from the system (e.g., by deciding what modules should be included). 2. Establishing a data model that defines how the organization’s data will be structured in the system database & Defining business rules that apply to that data. 3. Defining the expected interactions with external systems. 4. Designing the input forms and the output reports generated by the system. 5. Designing new business processes that conform to the underlying process model supported by the system. 6. Setting parameters that define how the system is deployed on its underlying platform. Software Reuse & Component-Based Development (SE441)

49 Software Product lines
Software product lines, refers to software engineering methods, tools and techniques for creating a collection of similar software systems from a shared set of software assets using a common means of production. Carnegie Mellon Software Engineering Institute defines a software product line as "a set of software-intensive systems that share a common, managed set of features satisfying the specific needs of a particular market segment or mission and that are developed from a common set of core assets in a prescribed way." Software Reuse & Component-Based Development (SE441)


Download ppt "Reuse.. To don’t reinvent the wheel"

Similar presentations


Ads by Google