Web 2.0, a phrase coined by O’Reilly Media in 2004, refers to the second generation of web-based services—such as social networking sites, wikis, communication tools, and folksonomies—that emphasize online collaboration and sharing among users
Web 2.0 is the network as platform, spanning all connected devices; Web 2.0 applications are those that make the most of the intrinsic advantages of that platform: delivering software as a continually-updated service that gets better the more people use it, consuming and remixing data from multiple sources, including individual users, while providing their own data and services in a form that allows remixing by others, creating network effects through an “architecture of participation,” and going beyond the page metaphor of Web 1.0 to deliver rich user experiences.
Implementation of Web 2.0 standards can improve the performance of the applications, and the user friendliness. It will also help in the future enhancements and addition of new functionalities to the existing application, without the risk of affecting the available functionalities.
These technologies that can help applications to reach Web 2.0 standards and help in improving their performance too.
Object Relational Mapping (ORM)
Aspect Oriented Programming (AOP)
System Oriented Architecture (SOA)
In the following sections we will have a brief look how these technologies can be used to improve the applications.
Rich Internet applications (RIA) are web applications that have the features and functionality of traditional desktop applications. These technologies allow a web-page to request an update for some part of its content, and to alter that part in the browser, without needing to refresh the whole page at the same time.
Some of the benefits of using RIA
• More responsive – The interface behaviors are typically much more responsive than those of a standard Web browser that must always interact with the server.
• Client/Server balance. The demand for client and server computing resources is better balanced. This frees server resources, allowing the same server hardware to handle more client sessions concurrently.
• Asynchronous communication. The client engine can interact with the server asynchronously that is, without waiting for the user to perform an interface action like clicking on a button or link. This option allows RIA designers to move data between the client and the server without making the user wait. The most common application of this is prefetching, in which an application anticipates a future need for certain data, and downloads it to the client before the user requests it, thereby speeding up a subsequent response
• Network efficiency. The network traffic may also be significantly reduced because an application-specific client engine can be more intelligent than a standard Web browser when deciding what data needs to be exchanged with servers. This can speed up individual requests or responses because less data is being transferred for each interaction, and overall network load is reduced.
Some of the widely used RIA technologies are Ajax, OpenLazlo and Flex. Some areas where RIA technologies can be used in the applications are
• Dropdown Population :
In certain scenarios, the value selected in a drop down affects the values that are available in another. In such conditions, the conventional methods is to submit a request and then populate the other drop down. Ajax can be implemented in such scenarios. The prefetching property will be useful.
• Page Reloading:
There are scenarios when a small section of the page needs to be altered or populated with values based on another field. Rather than reloading the whole page, which increases the server load and the network traffic, the section that needs to be altered alone can be reloaded.
• Client side Validations:
Shifting the validations like the mandatory fields and invalid data types can reduce the server load and also ease network traffic. RAI technologies provide interactive features that facilitate in the validation and displaying the corresponding messages.
Interoperability has highest priority.
* When all major platforms could access the Web using Web browsers, different platforms could interact. For these platforms to work together, Web applications were developed.
Web services take Web applications to the next level.
* Using Web services your application can publish its function or message to the rest of the world.
* Web services use XML to code and decode your data and SOAP to transport it using open protocols.
* Web services help solve the interoperability problem by giving different applications a way to link their data.
* Using Web services you can exchange data between different applications and different platforms
Object-Relational mapping is a programming technique for converting data between incompatible type systems in databases and Object-oriented programming languages. The ORM creates a virtual object database which can be used from within the programming language.
In object-oriented (OO) programming, data management tasks are typically implemented by manipulating objects, which are almost always non-scalar values. However, many popular database products, such as SQL DBMS products, can only store and manipulate scalar values such as integers and strings, organized within tables. The programmer must either convert the object values into groups of simpler values for storage in the database (and convert them back upon retrieval), or only use simple scalar values within the program. Object-relational mapping is used to implement the first approach.
• Applications have an open architecture and are fully scalable. Business objects can be implemented in a variety of configurations from client/server to n-tier.
• Applications built with business objects are also much more maintainable. The architecture separates responsibility into loosely coupled layers (i.e., user interface, business objects, and data storage). Business objects can be loosely coupled to the user interface using the model-view-controller (MVC) architecture. MVC is a modular approach to GUI construction that separates the user interface, control of user input (i.e., event handling), and business objects into three different components that interact together. Because of this separation of responsibility applications can be modified more easily when the business needs change.
• Business object models are based on procedures already established by the organization. Experts in the problem domain who are not necessarily developers can design the model. Developers can then implement it using any object-oriented language.
• Business objects can be implemented as components that are reusable by different client applications. Clients can have different user views (GUI interfaces) of the same object depending on purpose.
In ORM the tables will be mapped to Business Objects. The transition from the tables to the objects is handled by the ORM tools.
Added advantages of using ORM tools
*Event handlers. They fire on insert or update of the specified table. This feature is useful when audit records needs to be maintained when a particular table is updated.
* Transaction management.
* Connection pooling.
Some of the widely used ORM tools are Hibernate and Toplink. Apache has introduced their ORM tool Cayenne
In software engineering, the programming paradigms of aspect-oriented programming (AOP) aid programmers in the separation of concerns, specifically cross-cutting concerns, as an advance in modularization.
Aspect-Oriented Programming (AOP) complements OO programming by allowing the developer to dynamically modify the static OO model to create a system that can grow to meet new requirements. Just as objects in the real world can change their states during their lifecycles, an application can adopt new characteristics as it develops. AOP allows us to dynamically modify our static model to include the code required to fulfill the secondary requirements without having to modify the original static model.
Areas where AOP can be included are logging, transaction management and auditing. Some of the advantages of implementing AOP
• It helps in separating the modules. For example for Logging. It can be developed as a separate module and later made to crosscut the required modules.
• Ease of debugging
• Enhancements and new modules can be added, without affecting the existing modules and affecting their performance.
Some of the popular frameworks that support AOP are AspectJ and Spring.
Service-oriented architecture (SOA) is an evolution of distributed computing based on the request/reply design paradigm for synchronous and asynchronous applications. It helps in loose coupling between services which are implemented in different applications.
Service-oriented architectures have the following key characteristics:
• SOA services have self-describing interfaces in platform-independent XML documents. Web Services Description Language (WSDL) is the standard used to describe the services.
• SOA services communicate with messages formally defined via XML Schema (also called XSD). Communication among consumers and providers or services typically happens in heterogeneous environments, with little or no knowledge about the provider. Messages between services can be viewed as key business documents processed in an enterprise.
• SOA services are maintained in the enterprise by a registry that acts as a directory listing. Applications can look up the services in the registry and invoke the service. Universal Description, Definition, and Integration (UDDI) is the standard used for service registry.
• Each SOA service has a quality of service (QoS) associated with it. Some of the key QoS elements are security requirements, such as authentication and authorization, reliable messaging, and policies regarding who can invoke services
SOA is usually implemented using web services. But it can also be implemented using technologies like RMI and JINI.