
Nested Web Application Components Framework A Comparison to Competing Software Component Models Svebor Prstačić and Mario Žagar Faculty of Electrical Engineering and Computing, University of Zagreb, Unska 3, Zagreb, Croatia Keywords: Componentization, Framework, Component Nesting, Web Content Management System, Web Application, Comparison, Component based Software Engineering. Abstract: There are many approaches and component models for Web application component development, of varying complexity, for different platforms using different technologies. All of which have a common problem – constrained component reusability. In this article, we summarize common software component reusability shortcomings of the most popular frameworks and component models they provide, and compare against the solution our own approach “framework as a component” provides to improve reusability. 1 INTRODUCTION tectural units – that provide a specific functionality to users, ie. a reusable forum application, built from In software engineering, there is no shortage of many classes, class libraries, user interface tem- component models. Almost every development plates, functions etc. Each such component can be framework, complex application or system defines thought of as a Web application in itself, and our, its own component model and provides ways to im- previously introduced, framework (Prstačić et al., plement components. Unfortunately, this makes 2011) focuses on improving such components' reuse. component implementation simple, and component We defined a component model such that com- portability and reuse difficult. Components, once ponents can nest, even recursively, and be more easi- implemented, exist only inside a single framework ly reused even within other applications built using that defines them (Wallace, 2010). As a conse- different frameworks. Our testbed implementation is quence, similar or identical functionality is imple- done in PHP, but the model can be applied to other mented over and over again using many different technologies as well. frameworks because none of the existing frame- The framework in question is designed to be works focus on or try to provide inter-framework simple to reuse and integrate into an arbitrary Web interoperability. application, as a component. Such an application we Reusable components are inherently abstract, and call the host application, ie. a blog application could harder to engineer, so making complex components be easily extended to provide commenting function- reusable is very hard. As a result, most components ality for blog posts, and to enable attaching photo forgo reusability for ease of maintenance and im- galleries to blog posts. The same same commenting plementation (Schmidt, 1999). This makes reuse of component could be simply reused to provide com- components, even across applications that are creat- menting functionality for the photo gallery compo- ed using the same framework complex or even im- nent. possible. When such integration of the framework and the Component based software engineering defines host application is achieved, all the components im- two component model types: models that define plemented for our framework become reusable in the components as objects in object-oriented program- host application, which considerably improves those ming, and the more complex components that con- components' reusability. Because of this property, stitute of multiple classes or other code constructs we call our framework the extensions framework and (Lau and Wang, 2007; Broy et al., 1998). These, components built for it extensions. more complex components, can be defined as archi- In this paper we identify accepted component prop- erties defined in the literature, that contribute to Prstaciˇ c´ S. and Žagar M.. 149 Nested Web Application Components Framework - A Comparison to Competing Software Component Models. DOI: 10.5220/0004421401490156 In Proceedings of the 8th International Conference on Evaluation of Novel Approaches to Software Engineering (ENASE-2013), pages 149-156 ISBN: 978-989-8565-62-4 Copyright c 2013 SCITEPRESS (Science and Technology Publications, Lda.) ENASE2013-8thInternationalConferenceonEvaluationofNovelSoftwareApproachestoSoftwareEngineering components' reusability, and compare our own re- classes. Reuse of such components is easiest to sults in this area, to some of the most popular com- achieve, but functionality that such components pro- ponent models and approaches to component reuse vide is minimal compared to an architectural unit that they provide. type of components. To enable component reusability in other appli- cations or frameworks, software adapters (Bishop, 2 SOFTWARE COMPONENT 2007) can be employed. Software adapters translate required interfaces of one component to provided MODELS interfaces of another component. This is obviously inefficient and potentially very complex and has led One of the pervasive needs of software development to implementation of very simmilar components for is increase of speed and reliability of both software various frameworks. development process, and the software created. Ben- efits that component-based software development 2.1 Nested Framework Component (CBD) promises through reuse of well tested com- Model ponents, with well documented and defined func- tionality, it should be possible to create new soft- Our framework makes runtime and design-time as- ware, combining and connecting existing software sembly of components possible, which is discussed components instead of implementing the same func- further in section 4. It makes assembly of nested tionality over and over again. Unfortunately, current components possible, ie. a forum component that component models fail to deliver on promises of extends the functionality of that same forum compo- CBD (Lau and Wang, 2007; Bose, 2011). This is nent. This makes possible the creation of a forum to evident in many very similar components that have debate a single forum post or topic, which is dubi- been implemented over and over again for most ously useful in itself, but in some cases could be, ie. popular frameworks in existence – a simple Google using a commenting application nesting to enable query for a word “forum” in addition to the frame- comment replies, while the component itself pro- work name of choice will always yield results. vides only the simple, basic functionality. This is because software components are always To achieve this, it provides both abstract classes built for a specific framework or application that and objects as base building blocks for component uses a component model, which defines what a development. Use of these building blocks, for ex- software component is, how it can be constructed, ample, provides simple access to host application's composed or assembled and finally deployed (Wal- execution context (Prstačić et al., 2011) with rele- lace, 2010; Lau and Wang, 2007; Crnković et al., vant data commonly found in Web applications 2011). Depending on the framework, components (Prstačić et al., 2012) – user session, current user can vary in possible complexity and functionality. data, current user permissions etc., are all translated If a component is built for a specific application, by the framework and provided to extensions in a it can be thought of as an architectural unit, and such form that they can use. Integration of the framework a component can span through many layers of the into the host application involves implementation of application, consisting of many classes and other abstract classes that are essential to providing this code or binary constructs. Components built for a translated execution context. specific application are easy to reuse, but only inside Once implemented, components can be used to other instances of the same application. extend existing applications, that were built using a Similarly, components built for a specific different framework, with minimal effort. This is framework are also architectural units, or even ap- possible because our framework is designed and plications themselves. When reuse of such compo- built as a component that is ready to be integrated nents is intended inside another application, that into arbitrary Web applications that we call host ap- uses the same framework, required programming plications. When this integration is achieved, reusing effort can be significant. The more complex the any component of the framework is possible using a component, the harder reuse is. Although reuse can single line of code, as discussed further in section be complex, it is significantly less complex than 4.2. reusing architectural unit type components built for a specific application, inside another application. Thirdly, in object oriented programming, the most simple components are classes, or libraries of 150 NestedWebApplicationComponentsFramework-AComparisontoCompetingSoftwareComponentModels 3 POPULAR COMPONENT 3.1.1 ASP.NET MVC 3 MODELS PROVIDED ASP.NET MVC 3 (Prstačić et al., 2011; MSDN, BY THIRD PARTY 2003) is the newest component model available in FRAMEWORKS ASP.NET. It provides an alternative way to define Web application components: a “Razor” template There are many component models in existence, and engine, which strongly resembles Smarty (Prstačić et frameworks built to provide component based Web al., 2012; Smarty, 2012) for PHP, both in syntax and application development. Each defines what a com- the way it is used. Razor also provides “HTML ponent is, and even a superficial
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-