PHP Development and support for Jcommunity
Transcription
PHP Development and support for Jcommunity
École Polytechnique de l’Université de Tours 64, Avenue Jean Portalis 37200 TOURS, FRANCE Tél. +33 (0)2 47 36 14 14 Fax +33 (0)2 47 36 14 22 www.polytech.univ-tours.fr Département Informatique 4ème année 2007-2008 Rapport de stage (Internship report) PHP Development and support for Jcommunity Étudiant : Jonathan COURTOIS [email protected] Encadrants : Ben CAUBERE [email protected] Carl ESSWEIN [email protected] Université François-Rabelais, Tours Version du 5 septembre 2008 Table des matières Greetings 6 Introduction 7 1 Presentation of the work environment 1.1 Ireland . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Galway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Joobisoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 9 9 2 Subject 2.1 Before my arrival . . . . . . . . . . 2.2 Training . . . . . . . . . . . . . . . 2.3 Objectives to achieve . . . . . . . . 2.4 jCommunity . . . . . . . . . . . . . 2.4.1 Presentation . . . . . . . . . 2.4.2 The working of jCommunity 2.5 jStudio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 11 11 12 12 12 15 3 Required elements for understanding 3.1 Content Management Systems . . 3.1.1 Definition . . . . . . . . . 3.1.2 Extension . . . . . . . . . 3.1.3 Joomla ! . . . . . . . . . . 3.1.4 PHP and OOP . . . . . . 3.2 The MVC pattern . . . . . . . . . 3.2.1 Generalities . . . . . . . . 3.2.2 Model . . . . . . . . . . . 3.2.3 View . . . . . . . . . . . . 3.2.4 Controller . . . . . . . . . 3.2.5 In our case . . . . . . . . . 3.3 The Joobi software suite . . . . . 3.4 jStudio and the library . . . . . . . 3.4.1 The library . . . . . . . . . 3.4.2 The Joobi framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 16 17 18 18 19 19 20 20 20 21 22 23 23 24 4 Realization 4.1 Training part . . . . . . . . . . . 4.2 Support part . . . . . . . . . . . 4.3 Development part . . . . . . . . 4.3.1 Tools . . . . . . . . . . . 4.3.2 Database Design . . . . 4.3.3 jCommunity development 4.3.4 jStudio development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 27 28 28 28 29 29 36 Development for Jcommunity . . . . . . . III TABLE DES MATIÈRES Conclusion 38 A Liens utiles A.1 Webographie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Bibliographie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 40 40 B Screenshots 41 IV Development for Jcommunity Table des figures 1.1 1.2 1.3 Map of Ireland . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Map of county Galway with Galway city highlighted . . . . . . . . . . . . . . . . . . . . . Logo of the company Joobisoft Solutions Ltd. . . . . . . . . . . . . . . . . . . . . . . . . 8 9 10 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 Login jCommunity . . . . . . . Registration page . . . . . . . Profile page . . . . . . . . . . Inbox . . . . . . . . . . . . . . Members . . . . . . . . . . . . Roles . . . . . . . . . . . . . . View to add a filter . . . . . . Management of the registration . . . . . . . . . . . . . . . . . . . . . page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 13 13 14 14 14 15 15 3.1 3.2 3.3 3.4 Logo Joomla ! . . . . . . . . . Joomla tiered architecture . . . MVC basic scheme . . . . . . Detailed structure of Joobisoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 19 20 23 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 Part of CB plugins listing . . . . . . . . . . Various debug display . . . . . . . . . . . . Database Design of jCommunity . . . . . . Connection list . . . . . . . . . . . . . . . . Example of members listing . . . . . . . . . Listing of widgets . . . . . . . . . . . . . . Acajoom tab in the profile . . . . . . . . . Acajoom picklist in the registration page . . IP tab in the profile . . . . . . . . . . . . . IP recording preferences on jCommunity . . Random members module . . . . . . . . . . Profile completed module . . . . . . . . . . Menu module . . . . . . . . . . . . . . . . My group listing in the frontend . . . . . . Group information in the backend . . . . . Conversation with my improvements . . . . Example of using search plugin in members Files automaticly created in the tree and not PHP editor in jStudio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the SVN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . repository yet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 28 29 30 30 31 31 31 32 32 33 33 33 34 35 35 36 36 37 B.1 B.2 B.3 B.4 B.5 jCommunity main page (dashboard) . . . . . . jCommunity features list at my arrival (part 1) . jCommunity features list at my arrival (part 2) . Example of support on joobi forum . . . . . . . jStudio, listing of views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 42 43 44 45 Development for Jcommunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . add to . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Greetings First of all, I would like to thank the people at Polytech’Tours especially Jean-Louis Bouquard and Carl Esswein, who efficiently answered my questions and requests, and helped me find a grant to go to Ireland. I would also like to sincerely thank the Joobi team, a really kind and helpful group of people. Chris K., Ben Caubere and Pierre de la Celle, who welcomed me into the company and helped during all my internship. Adrien Barborier, Nicolas Claverie, for all the help they gave me concerning the projects I was working on. And also the other interns : Renaud, Maud and Jonattan. 6 Development for Jcommunity Introduction As part of my studies, I had to do an internship for a 3 month period in order to apply for the second year of engineering school (Polytech’Tours), specialty computing. I wanted to do my internship in an Anglo-Saxon country in order to improve my English skills. So I’ve looked for companies based in United Kingdom and Ireland. One day, in January, I received an email from Joobi where they wanted to interview me through Skype. So, I did this interview with Pierre de la Celle. The next day, I’ve received a confirmation email saying that I was accepted. It was the beginning of a new adventure. I did this training as a Joomla ! components developer. Joomla !, as we will see further, is a Content Management System 1 (CMS) providing its users powerful tools to quickly and easily develop websites and components that go along. During this internship, I was in charge of developing new features for the product jCommunity and manage the client support of this same product. After a month and a half, when my skills had increased, I was also put in charge of adding new features to jStudio, the main product to develop the others. This report is divided into four main parts. First of all, there is a brief overview of the work environment. Ireland, Galway City and Joobisoft are successively presented. Then, I describe my main assignments during this internship. The next part is devoted to a presentation of work tools. Explanations about everything that needs to be detailed for a better understanding of the report are detailed in this section. Besides, I develop the realization of jCommunity/jStudio improvements. 1. Content Management System : family of software aiming at the conception and dynamic updating of websites. Development for Jcommunity 7 CHAPITRE 1 Presentation of the work environment I had the opportunity to spend the 3 months of my 4th year Engineering internship in Ireland. A lot of reasons made me choose this internship offer and, for the first part of this report, it seems important for me to briefly present the context of my training in Ireland. The Republic of Ireland ; Galway, the city where I stayed ; and finally the company I worked in, are presented here. 1.1 Ireland Ireland is the third largest island in Europe, and the twentieth largest in the world. It lies to the north-west of Continental Europe. Politically, the Republic of Ireland (known as Eire) covers five sixths of the island, while Northern Ireland (aka Ulster), part of the United Kingdom, covering the remainder in the north-east. The population of the island is slightly under six million, with more than 4 million for the Republic of Ireland. Since the early 1990s as the result of a prodigious economic boom known as the ”Celtic Tiger”, Ireland became one of the richest European countries, while it was one of the poorest in 1988. Mainly thanks to a low a corporate taxation rate, European aid, industrial policies and demographics, a lot of international companies established themselves in Ireland. As a result, Ireland became one of the wealthiest per capita countries in the world, showing an average wealth per head of nearly 150,000 e. Figure 1.1 – Map of Ireland 8 Development for Jcommunity Galway 1.2 Galway Galway is the only big city in the province of Connacht in Ireland and capital of County Galway. The city is located on the west coast of Ireland. In Irish, Galway is also called Cathair na Gaillimhe, which is a translation of ”City of Galway”. The population of Galway city and environs, as of 2006, is 72,729, of which 72,414 live in the city limits and 315 live in the city’s environs in County Galway. Galway City (that is, the population inside the city limits) is the third largest in the Republic of Ireland, or fifth on the island of Ireland. However, the population of the wider urban area, is fourth largest in the Republic of Ireland (sixth on the island) after Dublin, (Belfast,) Cork, Limerick (and Derry). The City is Ireland’s fastest growing city. Galway City has a strong local economy with complementary business sectors, including manufacturing industry, tourism, retail and distribution, education, healthcare and services that include financial, construction, cultural, and professional. Most of the people employed in Galway work in either the commerce or professional sector ; with a large number also employed in manufacturing. Most industry and manufacturing in Galway, like the rest of Ireland, is hi-tech due to the Celtic Tiger economic boom. Figure 1.2 – Map of county Galway with Galway city highlighted 1.3 Joobisoft Joobisoft Solutions Ltd., formerly Acajoom Services was a company founded by Chris K in September 2007. Chris K., whom on his demand I’m not able to reveal his last name, graduated from a French engineer school. He has worked in different places, including ten years in the USA. Then, at the beginning of 2006, he moved to Ireland and decided to start his own business in the web development field. After the release of his first Joomla ! component, he decided to found Joobisoft with the 3 students who just finished their internships in Acajoom Services. The name Acajoom Services comes from the first Joomla ! component created by Chris K. This component is able to send automatic newsletters. It’s quite a ”simple” component (in terms of what it does), but because no similar component existed and still does not exist for Joomla !, Acajoom became a great success. It still is one of the most downloaded components on the official Joomla ! website. Most of the Development for Jcommunity 9 Chapitre 1. Presentation of the work environment profits made by the company still come from Acajoom. Of course, other components are under development. Among others, jCommunity, a users and communities management tool, which is the component on which I worked ; and jStore, a product and orders management software, are about to be released. When I arrived in June, the persons in the company were the 4 funders and shareholders, and 4 interns. Seven of them worked in Galway offices, and one was teleworking from Japan. As a start-up, it’s difficult for Joobisoft to hire ”real” employees. The founders do not have the employee status, because insurance costs for companies could be high. To stay legal, the trick is to hire interns that stay from 3 to 6 months. As students, they are still covered and do not need any company insurance. Therefore, Joobisoft is a young company : the employees’ average age is 26. Figure 1.3 – Logo of the company Joobisoft Solutions Ltd. 10 Development for Jcommunity CHAPITRE 2 Subject 2.1 Before my arrival When I contacted the company to offer my skills as an intern and they accepted, the subject was ”Developing a Web Application”, without further explanation. During my interview and some e-mails conversations I had before the beginning of the internship, I learned that the Joobisoft team’s ”Web Applications” were running under Joomla ! CMS. They sell components working under Joomla, and have the idea to adapt them to other CMS (typo3, drupal, ...). 2.2 Training I spent the first two weeks of the internship in a training performed by Ben (one of the four funders, responsible for jCommunity, the component on which I’ll work). This training mainly consisted in generalities about websites and a presentation of Joobisoft development tools : • Installation and configuration of the websites we were working on. • Generalities about PHP 1 and SQL 2 syntax they use. • How to use the Joobi library. • How to use jStudio, a component developed by the team and fully integrated with the library. This component helps in the creation of Joomla ! components, modules, plugins through a user interface. For this training, I was also assigned to a complete research about Community Builder, the direct concurrent of jCommunity. It’s a free joomla component which propose a simple management of user. It is based on the shortcomings of this component that came jCommunity. 2.3 Objectives to achieve The points below represent lacks in my knowledge, and milestones I had to achieve in order to complete the development process. • • • • • • • • • Learn more about CMSs Study the Joomla ! architecture Learn about the libray and the Joobi framework Learn about and use the library functions to develop the component Develop new options and content for Plus and Pro versions Design the right database architecture for these developments Learn about widgets and their fonctionnalities Develop some widgets to interact with anothers application (Acajoom, Modules, FireBoard, ...) Package, install and release the product (jCommunity) 1. PHP : Hypertext PreProcessor : free script language for the creation of dynamic web pages through a HTTP server. Thanks to the fullness of its library, PHP is sometimes considered as a real platform, more than just a simple language. 2. SQL : Structured Query Language : pseudo-language for querying and manipulating databases. Development for Jcommunity 11 Chapitre 2. Subject 2.4 jCommunity 2.4.1 Presentation After my training, I was working in jCommunity. It’s an application to create communities, manage users and contacts on your website. It’s a very user friendly interface, scalable and a powerful application compare to Community Builder. I was in charge to support jCommunity on Joobisoft forum support during all my internship. At the same time, I developped some part of the application : implement new one and upgrade another. You can see a list of features of jCommunity at my arrival (Voir Annexe B). jCommunity like the others joobi applications is divided in 3 kind of versions : • the Core (free version) • the Plus (about 40 e) • the PRO (about 80 e) 2.4.2 The working of jCommunity In Joomla !, every components has 2 parts. The frontend part, which concerns visitors to a web site and registers members, and a backend part which is built for managers and administrators. jCommunity doesn’t execpt to this rule. I will quickly present to you, this 2 parts of jCommunity as they were at my arrival. Frontend Login jCommunity : First of all, jCommunity has its own login module. Members can register, login, logout and find their lost password through this module. Figure 2.1 – Login jCommunity Registration : Then the register page allow visitors to register the web site. They can normally register through different pages customized by an administrator (For example, Student, Worker, Senior, ...). Here you can see a default registration page. 12 Development for Jcommunity jCommunity Figure 2.2 – Registration page Profile : When you are registred, you have your own profile page. Everybody can see it, and you can of course modify some fields on it. An example of my profile, follows just below. Figure 2.3 – Profile page Development for Jcommunity 13 Chapitre 2. Subject Inbox : The only feature present on the frontend of jCommunity was the conversation. You can send a private message to another members, and receive reply from him. A simple fonctionnality without outbox, trash, etc. Figure 2.4 – Inbox Backend Members : The main important part in the backend is the member management. An administrator can see all members, search a member, lock him, reset his password, send him a new password, etc. Figure 2.5 – Members Roles : You can manage members roles in the PRO version (add, edit, delete). The role allow a user to see a view, or execute an action. Figure 2.6 – Roles 14 Development for Jcommunity jStudio Properties : A manager or a administrator can create properties. A property is an element which can add to a user page (registration, profile, etc.) For example if you want than your new members add their adress in the registration page. You can create 3 new properties. The property adress, the property zipcode and the property city. This 3 properties will correspond to 3 differents fields in the registration page or in the profile if the administrator add them. Lists and filters : A administrator can also create differents lists of users. He can select which properties he want show (name, e-mail, photo, etc.) and after make a filter for the members in that list. The filter can be for example ”gender = 2” (correspond to the women). In the frontend, you will see a list of name, e-mail and photo about all women registers. Figure 2.7 – View to add a filter User views : The last important feature in the backend is the user view. A manager or a administrator can manage users view like the registration page, the profile, etc. He can add new properties, hide anothers, change the ordering, etc. Figure 2.8 – Management of the registration page 2.5 jStudio During my internship, I also worked on jStudio, an application based on the Joobi library design to create anothers components. For example, jCommunity is for the most part entirely created from jStudio. We will more detail jStudio on the next chapter when we’ll develop the library framework. Development for Jcommunity 15 CHAPITRE 3 Required elements for understanding 3.1 3.1.1 Content Management Systems Definition Nowadays, when we talk about websites, CMS is a term that often comes in conversation. A CMS consists in a family of design tools and dynamic updating of websites. They share the same functionalities : • They allow several persons to work on the same document. • They can separate operations of content management and form management. • They can organize content through the use of FAQs, documents, knowledge bases, blogs and forums. • Some CMSs include version control. Because of the separation between content and presentation / displaying, editors can focus on the content. The edition of website is then highly simplified, for example thanks to WYSIWYG (What You See Is What You Get) tools. Such tools provide a graphical interface for shaping and displaying, similar to word processing software such as Microsoft Word or Open Office. At last, CMSs provides advanced user management functions through the administration interface, which means that administrators can easily decide which user has access to which system functionalities. One of the multiples CMS aspects is the Web Content Management System, which eases the tasks required to publish web content to web sites. To that extend, CMSs are used to manage and control a large, dynamic collection of web material (HTML documents and their associated images). A Web CMS facilitates document control, auditing, editing, and time-line management. A CMS often runs on the website’s server. Most systems provide control access for various ranks of users such as : • Administrators • Copy editors • Senior editors • Content creators... Access is usually done via a web browser program (such as Mozilla Firefox, Internet Explorer...), possibly combined with some use of FTP 1 for uploading content. Content creators submit their documents to the system. Copy editors comment, accept, or reject documents. Layout editors organize content and lay out the website. The editor in chief is then responsible for publishing the work to the live site. The content management system controls and helps managing each step of this workflow, including the technical task of publishing the documents to one or more live web servers. 1. File Transfer Protocol : a network protocol used to transfer data from one computer to another through a network, such as the Internet. 16 Development for Jcommunity Content Management Systems The content and all other information related to the site is usually stored in a server-based relational database system. The CMS typically keeps a record of previous website versions and in-progress versions. The pages controlled and published through the content management system can then be seen by visitors on the website. In larger organizations these server based documents need to communicate with desktop applications, and Open Document Management APIs perform the necessary ”translations”. They have made substantial cost and time savings to document management overall, and assist in smooth flow of documents through enterprises, applications and processes. Lately CMS systems have been associated with Customer Relationship Management 2 software programs. Because of that, some software companies are beginning to create software platforms that bundle CMS and CRM functions. 3.1.2 Extension Clearly, the main asset of using CMSs is the use and integration of extensions. From a more concrete point of view, we can say that CMSs provide a frame for websites. After that, CMS users are able to install extensions that integrate themselves into the CMS. Each CMS has its own way of integrating extensions. Drupal, a well-known CMS doesn’t make any difference between extensions. They are all called modules which may or may not implement the possible functionalities. To be clearer, if an extension requires having items in the main menu, a specific function, which will return the menu items to be added, has to be defined in the main module file. Typo3, another well-known CMS, makes the distinction between extensions : • Components : They include modules for the administration of the website. • Plugins : They are for the public part of the website. But fundamentally, modules and plugins share the same functionalities. The Joomla ! family CMS (as we will detail in the next part) has decided to divide the functionalities into 3 main types : Modules Those are views which can be activated and displayed at the desired position on the website. They usually don’t have much code. One example would the login module of Joomla !, which displays two input boxes to enter the user name and the password. The module will trigger the login process of Joomla and will then display the log out button if the login has succeeded. Another example module is the one which displays a calendar. Plugins They are pieces of code which can be triggered from anywhere in the CMS for specific tasks. Plugins are previously known as Mambots, since Joomla ! comes from a fork with Mambo CMS. They extend Joomla with new functionalities. However, they do not generate any kind of output on the page. 2. Customer Relationship Management : a process, mediated by the use of information technologies, which focuses on created a two-ways exchange between customers and companies. Companies have then a precise knowledge of customers’ needs. Development for Jcommunity 17 Chapitre 3. Required elements for understanding Components Components are the main type of extensions. A big part of a component is in the administration part of the website, called backend. But the component may probably have some views for the website public part (the frontend). jBackup is an example of Joomla ! component, only available in backend. 3.1.3 Joomla ! I feel the need the provide more details about Joomla !, as it will help understanding some aspects presented later in the report. Mambo is the oldest CMS of the Joomla family. We are talking of the Joomla ! family, because Joomla ! and Elxis are two other CMS built upon Mambo. Mambo has gone through an evolution, from a proprietary product engineered by Miro programmers in 2000, to a release in the Open Source community under GPL in April 2001, and finally to a mature product under the protection of a non-profit foundation. Elxis (the company) decided to create a fork of Mambo few years ago. Elxis added some features which are now also available in Mambo. The code base is really similar between those two. Figure 3.1 – Logo Joomla ! Joomla ! forked from Mambo 3 years ago, when some rumors about the commercialization of Mambo appeared. As Mambo right now, Joomla ! is also a community-driven project. The major version of Joomla ! (1.0.x series) became a big success thanks to good Public Relations from Open Source Matters, the legal entity behind Joomla !. For two years, the Joomla ! core team is rebuilding completely the framework and the CMS to use the Model-View-Controller pattern. Joomla ! 1.5 is a three tiered system. The bottom tier is the framework level and is made of the libraries and plugins. The second tier is the application level and consists in the JApplication class. Currently there are three applications shipped with Joomla : JInstallation, JAdministrator and JSite. The application acts as the main controller for the page. The third tier is the extension level. This level is where all components, modules, and templates are executed and rendered. To conclude this part, it seems important to stress the fact that although CMS offer powerful tools for web developers, at the end they just represent just a tool. As we will figure out later, the Joobisoft policy is not to focus on Joomla ! CMS. Indeed, even if more and more people have their websites running under Joomla !, it would be quite a miscalculation to stay on Joomla ! and thereby close the doors to other development tools. Especially at a time when, in the web development business, things evolve pretty fast. 3.1.4 PHP and OOP As you may know web development is mainly done in PHP for small to medium businesses, while big businesses may prefer heavy systems with Java or .Net technologies. 18 Development for Jcommunity The MVC pattern Figure 3.2 – Joomla tiered architecture At the beginning, PHP was a scripting language without OOP or type handling and thus had a bad reputation. But over the years, PHP has evolved, and the version 5, the latest version, is fully object-oriented, and is way more powerful than its predecessors. However, there are still a lot of servers using old version. PHP 4 is still widely used, thus, Joobisoft software have to supports both PHP 4 and 5 versions. In order to do that, some tricks have to be used to emulate some behaviour of OOP with are present in PHP5 but not in PHP4. While Mambo, Elxis and Joomla 1.0 don’t use the possibilities of OOP in PHP5, Joomla ! 1.5 has this capability. OOP 3 also enables better modeling. The abstract characteristics of a ”thing” are gathered into a class. Doing so, an object is an exemplar of a class. All the object abilities are called methods. Function is a more common term used for methods. As described later, the Joobisoft framework widely uses OOP. All this provides a great flexibility and, at the same time, a lot of structured development opportunities. As developers, Joobisoft team members were able to instantiate a class to create an object, and then easily use its methods. Moreover, both OOP and relational DBMS 4 are extremely common in software. They share a lot of similarities. 3.2 3.2.1 The MVC pattern Generalities Model-View-Controller 5 (MVC) is a classic design pattern often used where there is a need to be able to maintain multiple views of the same data. The main purpose of MVC is to have a clean separation of objects into three categories : models for maintaining data, views for displaying them, and controllers for handling events. The main advantage of such a pattern is that, thanks to this separation, multiple views and controllers can interface with the same model. Even new types of views and controllers that never existed before can interface with a model without forcing a change in the model design. The overall result is better clearness and flexibility. 3. OOP : Object-Oriented Programming : a programming paradigm that uses objects. Objects represent a concept, an idea or any real-world entity. 4. DBMS : Database Management System : set of programs for the access and management of databases (research, insertion and updating of data) 5. Model-View-Controller : architecture and conception method that divides the human-computer interaction into a data model, a view (presentation and user interface), and a controller (events handling and synchronization). Development for Jcommunity 19 Chapitre 3. Required elements for understanding Figure 3.3 – MVC basic scheme (plain lines for direct associations, dashed lines for indirect ones) MVC is quite peculiar : it differs from other architecture in the way that there are no layers. In opposition to, for example, to a three-tier architecture. In a three-tier architecture, the data tier, the logic tier and the presentation tier are layers : they can only interact with layers located directly above / below them, and upper layers control lower layers. In MVC architecture there are some cases where the view can directly consult the model, without using the controller. However, if a modification has to be done on the model, the view must use the controller to handle the operations. 3.2.2 Model A model is an object representing data. The model manages the behavior and data of the application domain, responds to requests for information about its state and responds to instructions to change state. The model has no specific knowledge of either its controllers or its views. The system itself maintains links between model and views and notifies the views when the model changes state. A model can have more than one view. 3.2.3 View The view is what the user sees. It’s an interface with which the user interacts. The first purpose of a view is to present the results returned by the model (through a listing for example, cf. further). The view renders the contents of a model. It accesses data through the model and specifies how that data should be presented. Then, the view is also in charge of receiving all the user’s actions (clicks, buttons or forms). The different events are sent to the controller. The view is responsible for mapping graphics onto a device. A view typically has a one to one correspondence with a display surface and knows how to render it. Of course, in our case, the view is built in HTML, but any other presentation ”language” is suitable. 3.2.4 Controller The controller receives events from the user, triggers the actions to perform and synchronizes the view and the model. In other words, it’s responsible for mapping user’s action to application response. 20 Development for Jcommunity The MVC pattern The controller translates interactions into actions to be performed by the model. In most GUIs 6 , those interactions are for example button clicks or menu selections. More precisely, in our case (Web application), they appear as HTTP 7 GET and POST requests. A controller offers facilities to change the state of the model. The controller interprets the mouse or keyboard inputs from the user, commanding the model and/or the view to change as appropriate : it’s the key to make the user able to interact with the application. 3.2.5 In our case During my development for jCommunity, I had to handle the three aspects of the MVC pattern in order to manage the navigation through the different views of the component. jStudio has integrated the MVC pattern, as you can see on the screenshot in annex. In the horizontal menu at the top of every view of jStudio, three links are always present. This facilitates the understanding of the development process. In fact, the developer first creates the models he needs. Then he takes care of the views (forms, listings, form elements and listing elements), and find a suitable layout. Using this theory, the development of components is greatly simplified. In practice, what usually happens is that the developer wants a bigger control of the development process. But in all cases he does not have to worry about it, because the basic frame is built by the library and jStudio. Actually, this helped a lot in the development for jCommunity. The first development phases were about creating models, views and controllers, as explained in the Realization paragraph. 6. GUI : Graphical User Interface : a type of user interface which allows people to interact with electronic devices like computers. 7. HTTP : HyperText Transfer Protocol : a communication protocol for the transfer of information. It’s mainly used as a way to publish and retrieve hypertext pages over the Internet. Development for Jcommunity 21 Chapitre 3. Required elements for understanding 3.3 The Joobi software suite jCommunity is a component of users management for a website. Also this component manages the integrity of the recording and the moderation processes for the proper working of any websites which manage the users. jStudio is the key element to create the different components based on the Joobi library. Being unsure on the commercial distribution, Joobi Solutions prefers to use the component in intern in order to create his own components. jSetup (new name of jTools) allows to get a list of the components installed and not installed. Also, it installs the components and/or upgrades the installed components. jStore is the component of the software suite of Joobi allowing to create, manage an ecommerce store very simple, secured and entirely customizable. jNews is the perfect complement of jCommunity allowing to create, schedule and manage the newsletter and their subscriptions. According to the versions, an auto responder, the embedded multimedia become possible. In answer to the free application like vBulletin, phpBB or SimpleMachines, Joobi offers also his forum, with a perfect integration to the other components of the software suite, an advanced customization, a modern security and moderation, original and intuitive. To create some modern and attractive pages on community websites, jWiki allows you to create a wiki where all actors can participate. It is a component which stands out from the other ones by his simplicity and his administration. 22 Development for Jcommunity jStudio and the library 3.4 3.4.1 jStudio and the library The library The version 1.0 of Joomla ! is an Open Source project distributed under GPL 8 . Regardless the content of GPL, the Joomla ! development team always was reluctant to all commercial extensions (that is to say not free), using their CMS. That’s why on April 7th 2007, Joomla ! announced a major change in the license for Joomla ! 1.5, the new version. Any commercial and/or not Open Source extension is not allowed to use Joomla functions. Any part of code of Joomla ! used in any application have to be done from a document under GPL. Therefore, the Joobisoft team faced a problem beyond its control. To stay legal, they were not able to use Joomla ! functions in their code anymore. At that time three options were available : • To change the host CMS, and then loose then Joomla ! potential market. • To publish their code under GPL. But then the risk for the code to be copied was very high. • To re-write all the Joomla ! functions used. So they decide to develop their own library of functions. Figure 3.4 – Detailed structure of Joobisoft 8. General Public License : widely used free software license Development for Jcommunity 23 Chapitre 3. Required elements for understanding 3.4.2 The Joobi framework Although Joobisoft is a small start-up, the architecture and work development environment is wellorganized. Libray functions The Joobi library provides three main types of functions : • All functions for the interaction with databases. That is to say, queries functions for the insertion of data, managing and consulting databases. Doing so, Joobisoft components are not dependant with MySQL. In theory, other DBMSs are supposed to be compatible, although there are not implemented yet. • Functions for the displaying, and for managing the display of HTML elements. The auto-generation of listing, forms, menus, buttons... are taken care of in those functions. • Functions for the installation of components, and their translation into other languages. Nodes All Joobi applications are divided into nodes. The closest most suitable definition for a node would be ”functional module”. Most often, a node represents a table or a set of tables in the database. A node tends to represent a physical entity. For my concern, in jCommunity, I manipulated three main kinds of objects : members, connections and groups,. That’s why there was a members node, a connection node and a category node. In the end the use of nodes also enables the sorting and ordering of components functions and classes, as described in the file system below. The file system For more clearness, PHP classes are as much divided as possible. The file system, as present at the root of the SVN 9 , is divided into the following way : api This folder contains all content under GPL. The translation of Joobi functions to Joomla ! ones is in that folder, and the system constants as well. Theoretically, Joobi components work with all CMSs, and this folder is the bridge between Joobi components and CMSs (mostly Joomla ! for the moment). It also means that in the other folders, there is nothing related to Joomla !. app In this folder are located all the elements required for the definition and installation of applications. For example : special install functions, logos... node This folder contains all the nodes, divided into their respective folders. For example, I had to create or work on folders members, connection, category, role and list. Even nodes are structured : in each node, there are folders called class (specific node functions), model (actions to perform when the model is changed), controller (special operations executed when controllers are called), module (a module display in the frontend using node functions), plugin (functions executed when the user make an action, for example : login, search, ...), button (customized button elements), form (customized form elements), listing (customized 9. SVN : Subversion : a version control system to maintain current and historical versions of files such s source code, web pages and documentation. 24 Development for Jcommunity jStudio and the library listing elements), filter (customized filter elements), install (specifications for the installation), etc. Each of these folders contains the PHP files required for the functioning of nodes. inc All external included libraries are in this folder. For legal reason, Joobisoft is only allowed to used ”free” libraries, under GPL or MIT 10 license. lib This is the core of the Joobi Library. user All data that belong to users, such as CSS 11 , logos, icons and customizable elements. installer The general installation functions For security issues, functions in node, installer and lib folders are obfuscated 12 and encoded, so that they’re not accessible by users. The reason why I detail this architecture is to emphasize the fact that I did not need to modify anything in order for me to develop in my component. In that way jStudio, integrated in the library, allows a higher level of abstraction. It becomes then very easy for developers to build their components and add functionnality. They don’t have to worry about lower levels/layers. Moreover the gain in terms of time and thoughts is quite important. To that extend, the quantity of programming required becomes quite low. It’s all about manipulating PHP objects emanating from the library. jStudio jStudio is the key element for being able to build applications based on the library. jStudio is capable of building views that are compatible with the library. It also handles the creation of tables, columns, and then the views related to those different tables. Although the first versions were not stable, the component was (and still is) massively used by the team for developing their applications. jStudio is still under a constant evolution, thanks to bug reports and feature requests sent by its first users (Joobi developers). At the very end, jStudio aims at being sold as a commercial Joomla ! component. The key word here is consistency : developers are strongly encouraged of using jStudio for creating their views. Actually, it’s the only way to make their components compatible with the rest, and to drastically lighten the programming tasks and their integration. But sometimes, the writing of specific pieces of code (customized form elements for example) can’t be avoided. Above are described the different kinds of views and page elements that are common in web development. jStudio user interface integrates views where the user is able to properly create these elements. (cf. screenshot in annex) Form, listing, show 10. MIT License or X11 license : A free software license compatible with GPL 11. CSS : Cascading Style Sheets : a style sheet language mainly used to describe the presentation (colors, fonts, layout, etc.) of HTML web pages. 12. Obfuscation : Process that makes the concerned code very hard to understand by human being. Development for Jcommunity 25 Chapitre 3. Required elements for understanding A form is a view where the user can enter required data in different fields. In jcommunity case, the user had to enter the registration information for example. Several HTML elements are used : input boxes, picklists, radio buttons, multi-select dropdowns... A listing is a list of elements. Basically, a listing lists some entries in a given table (list of members, list of connections, list of groups) and displays them in a view with some filters (e.g. only display connections that belong to a certain person). A show is a form that the user cannot interact with. There is nothing to submit, it’s just a way of presenting data. A show can include both listing and forms. Pick list, filter, wizard, themes Basically, a filter adds a ’WHERE’ clause on the SQL requests performed to display a listing. Which means, in other words, that it allows elements which gather certain conditions to be displayed. (e.g. only the one that are published, or those which were created two days ago, etc.) Wizards are little pieces of help displayed in some views. Wizards are more important than they seem to be at first sight. They are displayed at the top of forms, listings or shows that require some help in order to be fully and quickly understandable by the user, especially those who discover the software. As a matter of fact, let’s consider this example : a given user would like to test or any Joobi software on his website. He does not bother to read the documentation, and wants to quickly figure out how things work. Otherwise, he might give up and go somewhere else. So it’s important for his eye to be caught by wizards, which will explain to him in a few words what to do and where to click. After creating a wizard, a button is automatically generated. This button hides / shows the wizard, so that the user can switch the wizard off if he wants to. Pick-lists are form elements which provide the user with a choice. He can select one (single-choice pick lists) or several (multi-select dropdowns) values. Themes are to be used with forms and shows. They consist in a HTML table, which represent the layout of the show and how it is rendered. Thanks to tags (middle, topleft, bottom, right... used in the HTML table) and with the appropriate theme, it possible to build nice and clear shows by tagging show elements (which can be forms, listing...) During the realization of features for jCommunity, I was brought to use each of those elements. 26 Development for Jcommunity CHAPITRE 4 Realization 4.1 Training part During the first two weeks of my internship, I was assigned to make some research about Community Builder (CB). It’s a joomla component to manage user as jCommunity. That’s why it’s the direct concurrent of our component. CB was the only component to create a community and manage users before the arrival of jCommunity and the simple version is really poor about functionnalities. But there are a lot of plugins to improve Community Builder, some are free and a lot are paid. jCommunity come to offer Joomla users a community management, base on a friendly and intuitive design. With these 3 versions (Core, Plus and PRO), it offers a wide range of functionalities. My work was first to learn about CB and to know how it works. It was the best way to answer customers about differents between Community Builder and our product. And secondly to find the most commonly used plugins by CB users, to think about improvements of jCommunity. I realized a Excel file containing all CB plugins, with the name, the description, the version, the extension types, the user rate, the version of joomla they support, if it’s a free plugin or not, and of course, the views and download of the plugin. You can see a part of this file just below. Figure 4.1 – Part of CB plugins listing Based on this file, I listed all the functionnalities which seemed interresting has my eyes. I have talked a lot with my internship responsable on the features that I could develop. Some of them was very difficult to implement because of the joobi library and others was already develop. Starting from this, we choose the most important features jCommunity needed right now, and then, my development part began. Development for Jcommunity 27 Chapitre 4. Realization 4.2 Support part During all my internship, I was in charge with Ben, the responsable of jCommunity, to answer to the customer on joobisoft forum. Questions are mainly about : • Difference between Commmunity Builder and jCommunity. • List of features available and future features. • How integrate jCommunity on their website. • Bug during installation or using jCommunity on their website. However, jCommunity is a new application just release one month before my arrival, and not a lot of advertisement was done. That’s why the support was a small part during my internship. You can see an example of support on Annexe B 4.3 4.3.1 Development part Tools During my internship, I had to use several tools to design and implement web applications. The first one I had to use is Eclipse. Eclipse is a software framework and development platform which was primarily build in Java for developing Java. Thanks to its plugin system, Eclipse is versatile and now, can be used for a lot more than just Java programming. For example, it has some PHP plugins which enables it to be a IDE 1 of choice for PHP programming. Also, some bundle packages are available which include already the plugins you need for specific use. At Joobisoft, we use one of those bundles named EasyEclipse, which includes everything you need for PHP programming. Since the framework files are common to every developer we had to use a versioning tool. We use the well-known SVN 2 , as a plugin is already bundled in EasyEclipse. The SVN server is hosted on a server in-house. The server is also accessible from outside through SSH tunnels. For database design we used an Eclipse plugin named Azzurri Clay Database Design, which generate xml files to save the diagrams. And for the debugging, we also use a free php class very usefull. You just write debug() in your code with a string ; an array or an object as parameter and you will show your parameter in the page if this part of code is execute. And we use the same class to show database queries when we need them. (a) Debug in an array (b) Debug in an object (c) Debug in a query Figure 4.2 – Various debug display 1. Integrated Development Environment 2. SVN : Subversion : is an open source version control system 28 Development for Jcommunity Development part 4.3.2 Database Design First of all, I wanted to design the database of my improvements in the jCommunity database design, but this one was very old compare to the actual database of the joobi library and jCommunity. So I redesigned all the Database Design of jCommunity in Azzuri Clay and I easily had my new improvements. Here you can see the actual database of jCommunity. Figure 4.3 – Database Design of jCommunity 4.3.3 jCommunity development jCommunity was my main project during my internship, therefore I develop a lot of improvement for it. I will explain them separately in chronological order. Development for Jcommunity 29 Chapitre 4. Realization Connections My first development was the Connections management. It was one of the features in jCommunity list not implemented yet (cf. list of features : Annexe B). Connections mean connect a members to another. In clear, each members have one default list, and can create severals lists. In their lists, they can add members like friends, collegues, family, etc. By default the connections are desactivate for each members, when you activate your connections, you can select some options. The most important is if you want than the others members can connect to you without request or not. If you activate the request, when somebody want connect to you, he need to wait that you accept is request. With you connections lists, you can easily find your contact, view their profile, and send them a private message by our conversation feature. Figure 4.4 – Connection list If you want connect to someone, you need to find members. You have to way to do this. The first is to use the joomla search module, I created a special plugin attached to it during my internship, for search in members tables. We will explain it in a next part. The second way is to look at a public members list. A administrator can add the column connection to this listing. With this column, you can directly connect to someone, request someone, or see people you already requested or connected. You can see an example of members listing just below. Figure 4.5 – Example of members listing Widgets My second assignment was to create some widgets for jCommunity. A widget is a set of view in jCommunity connected to another component or a seperate part of the same component. The two first widgets already implemented when I began my internship was ”Fireboard widget” and ”Joomla Content widget”. ”Fireboard” is a joomla forum, and ”Joomla Content” represent the content members wrote. With these widgets, you can see in each members profiles, a listing of all topics (Fireboard) and contents (Joomla) wrote by members. The interristing functionnality of a widget is that you can turn on and off views in Jcommunity. 30 Development for Jcommunity Development part Figure 4.6 – Listing of widgets My first widget was for Acajoom, the first component create by Joobi Solution. It’s goal is to send newsletters, and for that you can subscribe or unsubscribe members to these newsletters. When Acajoom and jCommunity are both installed in a joomla website, a administrator can turn on the widget. Members of the website can easily subscribe and unsubscribe to existing newsletters in acajoom directly in their profile. By the way, when a visitor register to the website, they can subscribe as well during the registration process. Figure 4.7 – Acajoom tab in the profile Figure 4.8 – Acajoom picklist in the registration page The second widget was to show ip recording in the administration part. When somebody login in a website, his IP is record in the website database. But before this widget, they were never used. In addition to this widget, I create a listing in the backend profile of members to see all login IP. When the IP widget is turn on/off, a manager or a administrator can see this listing in each members profile. Development for Jcommunity 31 Chapitre 4. Realization Figure 4.9 – IP tab in the profile At the same time, I created 2 jCommunity preferences. The first is to record IP or not during the login process, and the second one is to define how many time the IP will be keep in the database. Indeed, when one thousand members connect daily on a website, the table which is in charge of registering IP can quickly become huge, it is therefore necessary to provide an opportunity for the administrator to make a regulary remove on old recordings IP. Figure 4.10 – IP recording preferences on jCommunity Modules After a good grip of the library, I created some modules like the ”jCommunity module” I presented in the ”The working of jCommunity” section. A moddule is a separate part of the website, you can show a module in a different place (right, left, top, bottom). The two first ones was the ”random members” and ”last members” modules. They show members informations in a box (last members registred, or members selected randomly). A lot of parameters can be defined in the module page. How many members you want show, which informations (name, e-mail, username), if you want the picture or not, if you want a link to the profile or not, etc. 32 Development for Jcommunity Development part Figure 4.11 – Random members module A funny feature but not a necessary one, was to create a ”profile completed module”, to show for each members how many percent they completed their profile. For this module, I added a class in the ”inc” folder for the first time to create the pourcentage bar. I needed to be careful, because we only used PHP classes under GPL licence because the company sell our product. I secured it and changed a lot of part of this class to adapt it to the library. Figure 4.12 – Profile completed module My last module to date was a menu for the frontend. Before this menu, we just added some links for jCommunity features (profile, connection, conversation, etc.) in the ”jCommunity login module”. But with all new features I developed and all futur features we was think about, the login module was becoming very huge and his objectif have changed. That’s why I created a menu module to add all links about jCommunity and futur release components. In fact, you can see also jSubscriber link in the screenshot just below, because it was a new component in development with jCommunity when I wrote this report. Figure 4.13 – Menu module For all modules, I created an associate widget to turn on/off all modules link to jCommunity. It’s really easy for the administrator to control their module directly through jSetup, and don’t need to touch to Joomla modules system everytime. Development for Jcommunity 33 Chapitre 4. Realization Groups The most important feature I implemented during my internship is the groups management. There is two different kind of groups, users groups which can be created by all registred members and can be manage in the frontend, and groups using by administrators in the backend to manage some members. When a group is created (users groups and normal groups), the following actions are carried out in that order : • Creation of 3 roles for this group : Member, Moderator, Administrator. • Add the creator to this group • Give to the creator member the administrator role of this group. • Copy the theme associate to the view of the group • Copy the view which show the group in the frontend • Update copied view by changing all menus roles with new groups roles. Figure 4.14 – My group listing in the frontend The two important things to understand is why we create new roles and why we always copy the show view. In fact, roles are dependent to a group, you can easily be an administrator of a group, a moderator of a second, and just a member of a third. For this reason, when we create a group, we create also automatically 3 roles (we could imagine more roles in the future) and update the access right of all menu for this role. For example, the menu edit for this group will be only display if you are administrator of this group. Actually there is only one administrator by group but the management had been think for many administrator. The administrator can promote members to moderators and demote moderators to members. He is the only one who can delete the group. A moderator can also edit the group information and accept pending members (members who request the group). Members can only create subgroup to this group and become administrator of this subgroup. We also copy the theme and the view which show the group in the frontend to allow the administrator to modify them for the future. For the moment it’s not implement yet, but we can imagine than the administrator could change the position of the information in the show of this group. It could also hide some informations to visitors or members, etc. For this futur features, it seems important to already seperate each groups. 34 Development for Jcommunity Development part Figure 4.15 – Group information in the backend Like the connections you can directly join or request a group depend of his preferences. But you can also invite a member in a group through a member listing (see ”Example of members listing” above). This member will be able to accept or decline the invitation when he will login to the website. Conversations The conversation feature contained only an inbox view to display messages the member received. That’s why during my internship, I added some functionnalities and all menus and functions to manage them : • Outbox • Archive • Spam • Trash Archive and Spam functionnalities will be two PRO features. This means that only a customer who buy a PRO version will have this features in his website. Figure 4.16 – Conversation with my improvements Search Plugins A search module already existed in the CMS joomla, and some plugins to search in joomla content, news, feeds, etc, was already implemented. I was in charge for this assignment to create a general search Development for Jcommunity 35 Chapitre 4. Realization plugin which could be adapt for all joobi components. I created mine for jCommunity and members table and then I adapted it to the two components already finish, jStore and jTicket. Figure 4.17 – Example of using search plugin in members 4.3.4 jStudio development Extension management During all my internship I created a lot of plugins, modules, widgets, form entry, etc, this means a lot of extension. But the processing to create an extension like a widget was really complicated. I needed to create two XML files (one for joomla 1.x and one for 1.5) for the installation of the widget, XML files for the form entry and finally the PHP file. But all this files are similare, I just needed to complete them. So I decided with Ben, my internship manager, to create an automatic process to do all this stuff for me. I created by myself a new class to do generate the files, and some actions (which is like a plugin for the joobi library) in the extension creation processing to do it automaticly. After that when I created an extension through jStudio, I only wrote some parameters in the form element and the files were automaticly created and the extension installed (for module and plugin). Figure 4.18 – Files automaticly created in the tree and not add to the SVN repository yet 36 Development for Jcommunity Development part PHP Editor My last assignment during my internship, and one of the biggest was to allow developer to edit php file directly in jStudio. Actually we write the PHP file through Eclipse, but the company will work with many developer in different place on the world. So it could be a very good think to edit all php file online. I was in charge to : • Find a javascript 3 php editor. • Include it on the library. • Load the existing file in this editor during a edit action • Create the file if it’s a new action • Record the content on the file when the user click on the save button. Some part of the file (header and footer) can’t be edited and are generated automatically during the save action. If the class extend to another and need to import another class file, it is done automatically as well. With that feature in jStudio, all files can be directly edited on jStudio and saved in the online server. Many developers would be able to work in the same files. But if they try to access a file at the same time, there is a checkout which prevent the second one to change it. Here you can see the result of weeks work. Figure 4.19 – PHP editor in jStudio 3. Script programming language mainly used in dynamic web pages. It enables more interactive interfaces. Development for Jcommunity 37 Conclusion During this internship in Joobisoft, my main assignment was to develop and improve some features of two existings products, jCommunity and jStudio. I first had to get familiar with the development tools and then improve some existing parts of the components. Finally, I developped many others components (modules, plugins, widgets, etc.) for the project jCommunity. In parallel, I was in charge to support the release product upwind of consumers. From the pure technical aspect, the work acheived during the internship for the jStudio product, helped a lot to bring to the applications developped with the joobi library to another level with some powerful functionnalities added like PHP editing online. But it also helps to speed the development process of an application by auto-generating some parts of the application like the files tree, the basic xml files, etc. Then for me, this internship was a really benefit for several points. First, this internship brought me a lot of experience on many domains of computer science such as web applications development, security, server administration, etc. I even discovered some of these which I didn’t studied in the engineer formation of Polytech’Tours. I learn also a lot on how to manage a project. However, I do not place this internship on the same level as a traditional training spent in France. It brought me a huge number of other concrete advantages necessary to the concept of an Engineer today. Even if it is useless to enumerate them exhaustively, it is necessary to show some of them. First of all, everybody agrees that the use of English language is really important in working relationship, especially in our field of work. In fact, in France, I wasn’t practising much oral in the daily life, since I didn’t need it. But in Ireland, I had to use it, first for my work, but also when speaking with people since none of them would speak french. Therefore I feel the need to emphasize that from this point of view this abroad internship was incredibly beneficial. This aspect is not only useful abroad, but also in France due to the amount of documentation written in English in computer science. Moreover, in the actual global world, it would be impossible for an engineer to communicate at work only in our mother tongue. The second non-technical point is adaptation. In a world of permanent change, it is important for an engineer to have the capabilities to adapt himself to new environments, collaborators and working methods. The contact in Galway with people from several nationalities and a environment quite different from the one in France intended to increase notably this capability. The third aspect is the benefits I had from this internship in a cultural aspect. Ireland is a country growing really fast. Long gone are the days when Ireland was one of the poorest countries in Europe and its natives fled to all corners of the globe in search of refuge. Today it is cool to be Irish and evocative images of Ireland now pervade popular culture across the globe. The Ireland of the new millennium is a modern, progressive European nation whose ’Celtic Tiger’ economy is booming, but it is not only Irish eyes that are smiling as more and more tourists discover Ireland for themselves. 38 Development for Jcommunity Finally, I would say that this internship is a very good experience in the course of my studies and probably help me to make better work for my last study year in Polytech’Tours (project managements, developments, etc.). Development for Jcommunity 39 ANNEXE A Liens utiles A.1 Webographie – – – – – – – – – – Joobi, Just use it ! http://www.joobisoft.com Joomla !, because open source matters http://www.joomla.org Open Source Matters, Inc. http://www.opensourcematters.com Joomla/Mambo Community Builder http://www.joomlapolis.com The PHP Group. PHP Hypertext PreProcessor http://www.php.net MySQL, The world’s most popular open source database http://www.mysql.com W3 Schools. The best things in life are free http://www.w3schools.com Wikipedia, The free Encyclopedia http://en.wikipedia.org CSO Ireland. Census 2006 Preliminary Report http://www.cso.ie/census/2006 preliminaryreport.htm RTE News. Ireland ranked second in global wealth table http://www.rte.ie/news/2006/0710/economy. html – Breaking News. Galway fastest growing city in Ireland http://www.breakingnews.ie/ireland/?jp= 308068&rss=rss2 A.2 Bibliographie – Learning Joomla ! Extension Development : Creating Modules, Components, and Plugins with PHP, Joseph LeBlanc, Broché – PHP 5 : L’Ouvrage de référence sur la nouvelle version de PHP, Leon Atkinson, Broché – MySQL 5 : Installation, mise en oeuvre, administration et programmation, Cyril Thibaud, Broché 40 Development for Jcommunity ANNEXE B Screenshots Figure B.1 – jCommunity main page (dashboard) Development for Jcommunity 41 Annexe B. Screenshots Figure B.2 – jCommunity features list at my arrival (part 1) 42 Development for Jcommunity Figure B.3 – jCommunity features list at my arrival (part 2) Development for Jcommunity 43 Annexe B. Screenshots Figure B.4 – Example of support on joobi forum 44 Development for Jcommunity Figure B.5 – jStudio, listing of views Development for Jcommunity 45 PHP Development and support for Jcommunity Département Informatique 4ème année 2007-2008 Rapport de stage (Internship report) Abstract : This internship took place in Joobisoft Solutions Limited, a software company based in Galway, Ireland, from June 16th 2008 to September 19th 2008. The subject of this internship was to improve and support a Web application (jCommunity), mainly using PHP. This component, which runs on websites using Joomla! Content Management System (CMS), aims at create communities, manage users and contacts on a website. The different steps for the project were: • To find the software improvements, and establish the list of functionalities. • To find a suitable design for these improvements. Then develop them. • To test the entire component with other company products, including the installation process. Keywords : PHP development, Joomla!, Content Management System, Joobi, jCommunity, jStudio Résumé: Ce stage s’est déroulé à Joobisoft Solutions Limited, société de logiciels basée à Galway, en Irlande, du 16 Juin 2008 au 19 Septembre 2008. Le sujet de ce stage était d’améliorer une application web utilisant principalement PHP (jCommunity) ainsi que de faire de l’assistance technique auprès de ses utilisateurs. Ce composant qui fonctionne sur des sites internet utilisant Joomla!, un Système de Gestion de Contenu (SGC), vise a créer une communauté, gérer des utilisateurs et des contacts sur un site internet. Les différentes étapes de ce projet étaient: • Trouver des améliorations au composant existant, et établir une liste des fonctionnalités. • Réfléchir au design de ces améliorations et les développer. • Tester le composant dans son ensemble, y compris le processus d’installation chez les utilisateurs. Mots clefs: jStudio Développement en PHP, Joomla!, Système de Gestion de Contenu, Joobi, jCommunity, Étudiant : Jonathan COURTOIS [email protected] Encadrants : Ben CAUBERE [email protected] Carl ESSWEIN [email protected] Université François-Rabelais, Tours