NEW TRENDS IN THE APPLICATIONS. PRACTICAL EXAMPLE OF WEB 2.0 SERVICE. WALDEMAR KARWOWSKI ARKADIUSZ ORŁOWSKI Department of Informatics SGGW

Summary The paper is concerned with new technological solutions for internet applications known as Web 2.0. Both technological aspect and networking aspect of Web 2.0 sites are described. Characteristic well known examples of such sites are listed, and their typical features, like “look and feel”, are presented. Next, paper is focused mainly on technologies connected with Web 2.0; it is discussed how in web system we can put into practice XML, CSS, XHTML, AJAX, syndication and Web Services. It is explained how mentioned technologies maximally improve system usability. In the last part of the paper it is described practical example of Web 2.0 service realization. The target of this system was to create great place for bikers to exchange their experiences, show photos and find actual information about equipment. Requirements, design and implementation issues of web site for bikers are discussed. It is put emphasis on creation platform and Web 2.0 technologies utilized in the project. Finally some conclusions and experience from system realization are presented..

Keywords: Web 2.0, AJAX, community service

1. Introduction Nowadays Internet stays an important medium of information exchange and platform for business activity. Many people every day take advantage of conveniences given by Internet. A lot of them are sending emails, students are looking for study materials, online shops clients are searching and purchasing needed goods, bank clients are making financial transactions, bloggers are writing and sharing their opinions about various matter and many other particular groups of users are performing their specific activities. Traditional standalone applications, like for example computer games, have new Internet forms and network versions. Access to Internet is wider and easier available every year. Those tendencies have been stable for last years and have changed way of using computer programs. Polish universities are involved in Internet from its beginning in our country. Warsaw University of Life Sciences (SGGW) is not an exception, it has Informatics Centre, university network and access to Internet. University staff and students use many computer programs but sometimes users are not satisfied from them, there are sometimes special needs for programs with specific functions. New ideas came up form both the staff and students, especially scientific circle members. Many ideas were finalized as master thesis, for example information exchange system for students [1], portal for organizers of scientific conferences [2] and application for discussion and communication [3]. Mentioned systems were made with open source technologies using PHP and mySQL with traditional client server architecture. One thing 48 Waldemar Karwowski, Arkadiusz Orłowski NEW TRENDS IN THE INTERNET APPLICATIONS. PRACTICAL EXAMPLE OF WEB 2.0 SERVICE. is noticeable, all realized services include new ideas like tools for potential users to co-create website together with administrator. Last years new term appeared Web 2.0, and at the same need to implement this idea, that is to develop a working system on web server, which is designed in accordance with new trend. This project should take into consideration both technological aspect and networking aspect. People connected with the project are interested in biking and it was decided to prepare service for bikers [4].

2. Web 2.0 new trend in the Internet Web 2.0 is new technology buzzword. Everybody has probably heard it. But what exactly is this Web 2.0? Is it, as the name seems to suggest, a new specification of the Internet? No it is not. Are there new technology, new platforms, applications and languages connected with new term? The second answer is only partially no, because old platforms and languages are used in a new way and there are new software libraries and tools supporting Web 2.0 development. We can describe Web 2.0 as a set of new trends in the Internet applications. There are all economic, social, and technology tendencies that together form the basis for the next generation of the Internet - a more mature medium characterized by user participation, openness, and network effects. The term was coined in 2004 by O’Reilly’s worker Dale Dougherty during a brainstorming session and after then propagated by Tim O’Reilly [5]. Since 2004 Web 2.0 Conference has been placed every year with many attendants, presentations and articles. But from the other side there are many opponents of Web 2.0. Some technology experts, have questioned whether one can use the term in a meaningful way, since many of the technology components of Web 2.0 have existed since the early days of the Internet. They claim that it is set of unrelated ideas and techniques originally brought together under the Web 2.0 banner. Others say it is only marketing “piece of jargon”, which can mean whatever a salesperson wants it to mean. Even we can partially agree with opponents opinions, we have to conclude that there is something new, some additional value which brings about success of Web 2.0 services and companies. There is no precision definition according to scientific standards but we can quote definition (here we have to point out that Wikipedia itself is well known example of Web 2.0 service). “In studying and/or promoting web-technology, the phrase Web 2.0 can refer to a trend in web design and development – a perceived second generation of web-based communities and hosted services (such as social- networking sites, wikis, blogs, and ) which aim to facilitate creativity, collaboration, and sharing between users.” In this definition we have neologisms (or rather jargon terms) like blogs or folksonomies. First term stays for web logs, second is explained in Wikipedia as the practice and method of collaboratively creating and managing tags to categorise content, is not only generated by experts but also by creators and consumers of the content. Of course immediately we conclude that from our scientific point of view such categories are valueless because lack of terminological control produces unreliable results and the informal definitions. Of course for specific communities, like for example bikers, such terminology makes sense. We have not precision definition of Web 2.0 but according to Tim O’Reilly and other web analysts we can present a list of principles to consider when evaluating if a site can be considered Web 2.0 or not. A good Web 2.0 site should: provide services, not just a packaged software, and ensure cost-effective scalability, be based on unique and hard-to-recreate data sources that get richer as people use them, trust users as co-developers, POLISH ASSOCIATION FOR 49 Series: Studies & Proceedings No. 24, 2009

harness , leverage the long tail through customer self-service, • be potentially deployable on any device, • provide users with lightweight user interfaces, development models, and business models. We can give, after Tim O’Reilly, examples of Web 2.0 services in compare to traditional services: Web 1.0 Web 2.0 DoubleClick AdSense Ofoto Flickr Akamai BitTorrent mp3.com Napster Britannica Online Wikipedia personal websites blogging evite upcoming.org and EVDB domain name speculation search engine optimization page views cost per click screen scraping web services publishing participation content management systems wikis directories (taxonomy) tagging ("") stickiness syndication Source: What Is Web 2.0. Design Patterns and Business Models for the Next Generation of Software by Tim O'Reilly 09/30/2005 Above table is chaotic for scientist, samples of websites (Britannica versus Wikipedia) are mixed with some techniques (personal websites versus blogging) etc. but idea seems to be understandable. Finally there are visible symptoms of change: better access to the Internet, more broadband connections, wireless networks, mobile devices with Internet access etc. The main characteristic of Web 2.0 from ordinary user view is a democratic medium, allowing anyone to author unique content, publish it, and engage the Internet community in a conversation about it. Users can own the data on a Web 2.0 site and exercise control over that data. These sites may have an “architecture of participation” that encourages users to add value to the application as they use it. Web 2.0 sites offer a rich, user-friendly interface and may also have social-networking aspects. Web 2.0 services and activities like blogging are more popular. Additionally applications have specific “look and feel”, rounded corners, big fonts, bright colours. For companies new trend means a new business model on the Internet. Web 2.0 companies give services which are more personalized with users as co-developers. Web 2.0 can provide an proper solution to the needs of highly dispersed organizations, and very noticeable, Web 2.0 companies take bigger part of business. Google seems to be a symbol of new style business, its idea is to earn money on advertisements and offer software for free. Web 2.0 commercial sites have many features of free community services. New way of doing business by offering Software as a Service (SaaS) is present in different areas. In information management area we have Wikipedia, it is best example of free community service. In content management area we can find iTunes, YouTube, Yahoo! and iGoogle; in VoIP best known is Skype. Skype offers both free and pay services, of course we have many commercial examples: is a leader in customer acquisition; in electronic commerce best known are Amazon.com and eBay; services for payments are supported by PayPal 50 Waldemar Karwowski, Arkadiusz Orłowski NEW TRENDS IN THE INTERNET APPLICATIONS. PRACTICAL EXAMPLE OF WEB 2.0 SERVICE. and Bill Me Later. We have many examples in Poland too, blogs are very popular, today every politician has own electronic diary. Popularity of “Nasza Klasa” service is growing every day. Commercial services are more personalized every year, for example mBank gives clients opportunity to comment, discuss etc.

3. Web 2.0 technology issues Web 2.0 applications have specific characteristics. Important question is how to prepare good Web 2.0 service? We need proper tools to do it. Development web 2.0 teams have turned toward new application development technologies and tools. Commonly used programming languages like Java, C#, and C++ are powerful but complex and enterprise development tools take time to acquire, install, and configure. Dynamic scripting languages like Perl, PHP, Python, and Ruby are finding a home at the assembly layer of Web 2.0 applications. Evolving technology infrastructure of Web 2.0 is sometimes complex and includes server-software, content-syndication, messaging- protocols, standards-oriented browsers with plug-ins and extensions, and various client- applications. Web 2.0 websites typically include some of the following techniques: • Rich Internet application techniques, often AJAX-based, • Semantically valid XHTML and HTML markup, • extending pages with additional semantics, • Cascading Style Sheets to aid in the separation of presentation and content, • REST and/or XML- and/or JSON-based APIs, • Syndication, aggregation and notification of data in RSS or Atom feeds, • Mashups, merging content from different sources, client- and server-side, • Weblog-publishing tools, • Wiki or forum software, etc., to support user-generated content. Let us shortly describe main techniques. AJAX is an acronym for Asynchronous JavaScript and XML. It is a development technique for creating interactive web applications. Unlike classic web pages, which must load in their entirety if content changes, Ajax allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. The Document Object Model is accessed with a client-side JavaScript to dynamically display and interact with the information presented. The XMLHttpRequest object is used to exchange data asynchronously with the web server. As the format for transferring data between the server and client typically XML is used. CSS helps in presentation. Figure 1 presents how it all works together. POLISH ASSOCIATION FOR KNOWLEDGE MANAGEMENT 51 Series: Studies & Proceedings No. 24, 2009

Fig. 1. Schema of AJAX page updating Source: Google AJAX tutorial Microformats are designed for humans first and machines second, they are a set of simple, open data formats built upon existing and widely adopted standards [6]. Microformats enable the publishing of higher fidelity information on the Web, providing the fastest and simplest way to support feeds and APIs for website. Microformats are small bits of HTML that represent things like people, events, tags, etc. in web pages. For example hCard is a simple, open, distributed format for representing people, companies, organizations, and places. XFN (XHTML Friends Network) is a simple way to represent human relationships using hyperlinks. Other microformats are hCalendar, VoteLinks, hReview, rel-license, rel-tag and others. REST (Representational State Transfer) is a style of software architecture for distributed hypermedia systems such as the . REST strictly refers to a collection of network architecture principles that outline how resources are defined and addressed. REST’s client-server separation of concerns simplifies component implementation, reduces the complexity of connector semantics, improves the effectiveness of performance tuning, and increases the scalability of pure server components. REST enables intermediate processing by constraining to be self-descriptive: interaction is stateless between requests, standard methods and media types are used to indicate semantics and exchange information, and responses explicitly indicate cacheability. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language. A mashup is a web application that combines data from more than one source into a single integrated tool; an example is the use of cartographic data from to add location information to real-estate data from Craigslist, thereby creating a new and distinct web service that was not originally provided by either source. Most important tools are tools with free license, like Appcelerator, OpenLaszlo, Sajax, Xajax, Rico, Dojo toolkit and others. Google tries to maintain a healthy relationship with the open source software development community. place for code hosting, providing infrastructure and create new open source software developers through programs like the . More this company releases Google-created code and delivers free tools for developers and programmers can integrate Google services into their solutions. Let us list main Google tools. 52 Waldemar Karwowski, Arkadiusz Orłowski NEW TRENDS IN THE INTERNET APPLICATIONS. PRACTICAL EXAMPLE OF WEB 2.0 SERVICE.

Google Analytics for tracking total page views, unique visitors, and AdWords conversions on site, for searching public source code, Google tool which enables web applications to work offline, Google Mashup Editor which helps quickly write code for simple web applications and mashups and for java programmers, it enables to build AJAX applications in the Java language. Additionally there are many APIs like Google Data APIs, Data API, Google's AJAX APIs, OpenSocial (developed by Google in conjunction with members of the web community) and others. Additionally Google supports materials for educators: tutorials, presentations, sample codes etc. Other commercial companies observe new trends and prepare their own Web 2.0 style software tools. IBM has prepared Web 2.0 Starter Toolkit for IBM DB2 which is a conveniently packaged set of products and technologies. The kit enables the quick creation of DB2 Web services and feeds using PHP technology. Other products are IBM mashup starter kit and Lotus Quickr which is the “fastest way to share content with teams”. IBM supports open source projects e.g. Project Zero (projectzero.org). Microsoft criticized Web 2.0 ideas but lately it has prepared Community Kit for SharePoint 2007, a web add-on that enables services, such as enhancing a blog's look, better wiki tools, and a tag cloud feature. Next product ASP.NET AJAX is a framework for building next generation, cross-platform, browsing experiences. Microsoft Silverlight is a browser plug-in that allows web applications to be developed with features like animation, vector graphics, and audio-video playback - features that characterize a rich internet application. Popfly - a tool built on Microsoft Silverlight, which provides a fun and easy way for anyone to build and share “mashups,” gadgets, web pages and applications. Others companies have their tools like Adobe Flex or Sun BluePrints AJAX Components. Web 2.0 is much more than just pasting a new user interface onto an old application. It’s a way of thinking, a new perspective on the entire business of software - from concept through delivery, from marketing through support. Web 2.0 developing process is not traditional. It generally base on ready components and agile methodologies and has many iterations. There are no traditional releases and versions. In the Internet era, users think in terms of services not packaged software, and they expect these services to just be there and to improve over time. No versions, no installations, no upgrades needed. When devices and programs are connected to the Internet, applications are no longer software artefacts, they are ongoing services. This has significant impact on the entire software development and delivery process. Instead monolithic releases adding features on a regular basis as part of the normal user experience. It is called perpetual beta. For development organizations, success relies on adoption of the perpetual beta development model in which software is continuously refined and improved, users become co- developers, and operations - the daily care and feeding of online services - become a core competency. POLISH ASSOCIATION FOR KNOWLEDGE MANAGEMENT 53 Series: Studies & Proceedings No. 24, 2009

Fig. 2. Web 2.0 development process Source: John Musser with Tim O’Reilly & the O’Reilly Radar Team Web 2.0 Principles and Best Practices, 2006

4. Community service for bikers According to new trend Department of Informatics decided to design and implement system of Web 2.0 style. First we had to choose type of service. Community service seemed to be more interesting and natural, we resigned from commercial type service although it is possible to implement such system in university environment. As we said at the beginning of this article it was decided to prepare service for bikers. The main objective of system was formulated the following: to create great place for cyclist to exchange theirs experiences and show theirs pursuits, show photos and find actual information about meetings and cyclist equipment. During the projecting process we put huge emphasis on creation platform, which should attract a lot of long- term users, who will come back gladly. After than basic assumptions of the system were recorded. Firstly, of course, that user interface of the system should be designed in accordance with Web 2.0 trend with specific “look and feel”. Secondly, because it is a community service all content will be filled by users, role of administrator should be minimized. Thirdly in the system there should be put into practice technologies such as AJAX, Web Services, XHTML, CSS etc. Finally we assumed that system should be implemented only with free license tools and languages. Because team consisted from student, supervisor and one additional scientific worker as consultant we did 54 Waldemar Karwowski, Arkadiusz Orłowski NEW TRENDS IN THE INTERNET APPLICATIONS. PRACTICAL EXAMPLE OF WEB 2.0 SERVICE. not utilize specific methodology for software process but in practice it was close to extreme programming. During whole process we intensively used UML notation to design and document our system. After basic assumptions were made we defined expected functionality. Main points are listed below. Everybody who has valid email address can register in the system as user and store in the system own profile and data. There are only three system roles: administrator, user and guest. Guests can see only main page of system. Full access to the service is available for logged users. Users will have possibility to specify friendship with other users. Every user can indicate friends and specify for them level of friendship from 1 (randomly met person) to 5 (good acquaintance). According to level of friendship users will have an insight into friend profiles. Every user can establish what will be visible for good friends and what for accidental acquaintance. Users can place articles and messages in the system. There are three types of messages placed in calendars: - private - only accessible by owner, intended for owner personal events and plans; - friendly - visible for friends (all levels), for example information about planned bike excursion with friends; - public - it gives possibility to place messages for every registered person, for example about meetings, biker competitions etc. Private emailing to other users will be supported. Every user will have possibility to create topic groups (forums) for information exchange among group members about specific issues. Users can notify administrator about unacceptable materials etc. Generally we assume that administrator has a little influence for content. But to avoid bad jokes and bad users behaviour administrator has rights as below. Approve article – administrator must check article before publishing and can remove published materials (for example after user notification). Add product in bike equipment catalogue (in the future it is possible to widen this right to other users). Remove user – only administrator can temporary block or permanently remove user who breaks regulations. Additionally administrator will have access to statistics about users activities etc. All requirements were described using UML use case diagrams and complemented with written scenarios. During design process main classes were identified and described using UML class diagram. Next, according to use case scenarios, all actions and interactions between objects were described by UML sequence and activity diagrams. We decided to use traditional relational data base and stored data was described with ERD diagrams and mapped with classes. Final decision about used language and database was made when design was ready. But as we mentioned earlier from the beginning we tended to PHP 5 and mySQL, and finally decided to use them as the best known technologies (but Ruby on Rails was significant PHP competitor). Together with PHP we have chosen PHPLib free library with additional functionality [7]. From this library we use DB_Sql, class which is base class for all classes responsible for data storing and retrieving. For AJAX implementation was used freely available mintAjax library [8], it was more useful for us than advAjax. Statistics module uses functionality. General POLISH ASSOCIATION FOR KNOWLEDGE MANAGEMENT 55 Series: Studies & Proceedings No. 24, 2009

system architecture is close to MVC pattern (Model-View-Controller). Presentation layer is separated from application logic. Pages were created with XHTML, CSS and XML. All subpages are generated with templates. Service is designed according to SEO (Search Engine Optimization) standard, it means indexation by search engines is very easy. Because correct XHTML syntax is very important all pages were checked by W3C validator. At the end mod-rewrite technology was applied to transform all links into friendly forms (i.e. address http://domena.com/index.php?id=user&user_id=adam_kowalski is replaced by http://domena.com/user/adam_kowalski). In regard to security issues, especially to avoid SQL injection attack all forms were protected by adding slashes (we use PHP addslashes( $value ) function) before every danger element like quotation mark etc. System was only shortly tested, because of perpetual beta rule real testing are performing by users..

6. Conclusions Web 2.0 is not new Internet standard but gathers new tendencies and really brings added value. Small community services, like service for bikers are possible to be implemented with free license tools. System was possible to realize by small team one student with cooperation of two people from academic staff. Because users cooperation are crucial in Web 2.0 service cyclical polls are planned and the future of the service depends on users opinions.

Bibliography 1. Sulkowski P., Rusek M., Karwowski W., System Napis.pl, Monografia „Systemy Informatyczne w Zarz=dzaniu”, redakcja naukowa: W. Karwowski i A. Orłowski, Wydawnictwo SGGW, Warszawa, 2007, str. 99-109. 2. Karwowski W., Jakubiec A. Web site for Scientific Conference, Monography „Information Systems In Management”, Wydawnictwo SGGW, Warszawa, 2008. 3. Karwowski W., Mazur P., Orłowski A. System „PAKD”, Studia i Materiały Polskiego Stowarzyszenia Zarz=dzania Wiedz= nr 13, Bydgoszcz 2008, str. 74-81. 4. Całka Piotr. Master thesis “WEB 2.0 New trends in the Internet. Design and implementation of community service for selected group of users (cyclists)” SGGW, Warszawa 2007 (in Polish) 5. O'Reilly T., What Is Web 2.0. Design Patterns and Business Models for the Next Generation of Software 2005.

Arkadiusz Orłowski Waldemar Karwowski Department of Informatics Warsaw University of Life Sciences - SGGW Nowoursynowska 159, 02-776 Warszawa, Poland e-mail: [email protected] [email protected]