Alfresco the open platform for social content management launches the Alfresco Community 4, the most significant release of the platform to date. Alfresco open source 4 highlights, a wealth of new user features and UI enhancements that enable faster user adoption, along with improved tools to allow developers to create social and cloud-scale, content-rich applications. They also separated their content indexing processes from content management and replaced this functionality with their own indexing solution. Alfresco Community 4 significantly increases overall system performance.
Alfresco 4 also includes functions to publish content and status updates to social sites, such as YouTube, Facebook, LinkedIn, Twitter, Flickr and SlideShare which will be a welcome addition to users as the use of public social media rises. Other new features for cloud-scale performance, open platform for social channel publishing and user experience include:
High-performance Indexing: The New Alfresco Index Server that is based on Apache Solr extensively improves the performance by separating indexing from content processes.
Integrated workflow: It includes the automation of content-focused business processes with Activiti, which is the leading open source Java-based BPMN 2.0 business process server.
Enhanced clustering: This feature is being introduced to increase the reliability and scalability, including added support for clustered CIFS.
Simpler Process: Social content publishing, part of an enterprise content workflow, simplifies to much an extent the problem of multi-channel publishing. It also control publishing with existing review and approve workflows along with built-in content security.
Fewer Tools leads to lesser errors: This feature offers embedded social publishing into an organization’s core content and collaboration tool, which eliminates the need for social-specific tools and error-prone “copy-and-paste” to external tools.
Drag and Drop Simplicity: Drag and drop streamlines the movement of files around on HTML5 enabled browsers.
Additional support for audio, video, Adobe Creative Suite & Apple iWork documents: The support delivers inline preview and metadata extraction for more file types.
Social Features: The new added social features on Alfresco 4 enables to ‘Follow’ influential content creators as well as ‘liking’ the favorite content.
Cloud Collaboration: This includes Google Docs integration to collaborate in real time.
Mobile Support: The mobile support offers new, free iOS apps available from iTunes, along with continued support for WebDAV and CMIS standards for new mobile use cases.
Extensibility: For developers and partners, Alfresco web interface is now much easier to extend and customize.
Alfresco Community edition 4 is available for download from Alfresco’s website.
Context: Upload a file(filename.txt/tif/gif , certificate etc..) in java using selenium, tried with the attachfile Selenium api method [selenium.attachFile(fieldLocator, fileLocator)] but it is not uploading the file.
Solution: We would like to share our experience on the selenium file upload.
First we tried to upload the file using the selenium attachFile api.
void attachFile(java.lang.String fieldLocator, java.lang.String fileLocator)
where,
fieldLocator - an element locator
fileLocator - a URL pointing to the specified file
But it did not work. As we know that selenium is an automated test cases and it should run either on local machine or remote machine. Due to security restriction in the browser, JavaScript cannot fill in a path in the respective file input field by default. That’s might be the root cause of file not uploading.
After extensive search on net, got partial hint to use “type” instead of “attachFile”.
The syntax is as follows: void type(java.lang.String locator, java.lang.String value)
We unsuccessfully tried to put various appropriate file path values. Finally, we got the success when we implemented the value as file.toURI.toURL().toString().
where toURI provides the absolute path and toURL construct a URL from the URI followed by make it as string type.
Example is as follows :
// Create a file object
File file = new File(”");
// Get the absolute path of application
String pathOfApplication = file.getAbsolutePath();
// Get absolute path of the file
String absolutePathOfFile = pathOfApplication + File.separatorChar + directoryName + File.separatorChar + uploadFileName;
// Where directoryName is the directory which resides in the path of application, which contains the file to be uploaded (uploadFileName)
// Create a new file having reference of absolute path
File absFile = new File(absolutePathOfFile);
// Selenium command
selenium.type(”fieldLocator “, absFile.toURI().toURL().toString());
There may be other solutions but the above implemented solution works fine for us.
1. Open file [LIFRAY_SDK]/themes/{theme-name}/docroot/_diffs/templates/portal_normal.vm
2. Add $theme.search() at your desired location.
3. Build and deploy the theme.
4. A search text box will appear where the code was placed
In case you need to customize the search functionality to search only specific content types, follow the steps below.
1. Open file [LIFERAY_HOME]/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/portal-ext.properties
2. Add following lines:
com.liferay.portlet.blogs.util.BlogsOpenSearchImpl=true
com.liferay.portlet.bookmarks.util.BookmarksOpenSearchImpl=true
com.liferay.portlet.calendar.util.CalendarOpenSearchImpl=true
com.liferay.portlet.directory.util.DirectoryOpenSearchImpl=true
com.liferay.portlet.documentlibrary.util.DLOpenSearchImpl=true
com.liferay.portlet.imagegallery.util.IGOpenSearchImpl=true
com.liferay.portlet.journal.util.JournalOpenSearchImpl=true
com.liferay.portlet.messageboards.util.MBOpenSearchImpl=true
com.liferay.portlet.wiki.util.WikiOpenSearchImpl=true
3. Change values to “false” for those you do not want to include in search result.
For example, to search only “Web Content”, leave “com.liferay.portlet.journal.util.JournalOpenSearchImpl” to “true” and make other values to false.
Enjoy the customized search in Liferay ![]()
Introduction:
Windows Communication Foundation (WCF) is a communication frame work for building service-oriented applications. With WCF, data can be sent from one service endpoint to other. The data sent can be a single character or word sent as XML or a stream of binary data.
Creating and Consuming a Sample WCF Service:
There are three main steps involved in creating and using the WCF services.
Step 1: Create a wcf service
In WCF, all the services are exposed as contracts. A contract is a neutral and standard way of describing what the service does. Mainly there are four types of contracts:
Step 2: Binding and Hosting
Each service has its own end points. Clients communicate with this end point only. End points describe three things:
Every service should be associated with a unique address. Address mainly contain the following two key factors:
Hosting:
Every service must be hosted in a host process. Hosting can be done by using:
IIS Hosting
IIS hosting is the same as hosting the traditional web service hosting. It can be done by creating a virtual directory and supplying a .svc file.
Hosting with Windows Activation Service (WAS)
WAS is part of IIS 7.0. It comes with VISTA OS. The hosting with Windows Activation Service is same as hosting with IIS. The only difference between these two is that IIS supports for HTTP bindings only. Whereas WAS supports for all transport schemas.
Self Hosting
In this technique the developer is responsible for providing and managing the life cycle of host process. In this the host service must be running before the client call the service. To host this service we use the .NET class ServiceHost. We have to create an instance of ServiceHost. Constructors of this class take two parameters: service type, base address. (Base address can be empty set.)
Add the Service End points to the host:
We will use the AddServiceEndpoint() method to add an end point to the host. The end point contains three things: type of service, type of binding and service Name. So, AddServiceEndpoint() method accepts these three required parameters.
Consuming by creating the channel factory:
We can consume this service by creating the channel factory manually. While creating the channel, we will have to provide the same binding type and end point address where the service is hosted.
General Guidelines
Essentials:
Service Contracts:
Data Contracts:
Operations And Calls:
Transactions:
Security:
Some of the guidelines listed above can safely be ignored when applying special circumstances. But make sure you fully understand about serialization, deserialization, and schema mechanisms involved before you deviate from the guidelines.
Further Reading:
http://msdn.microsoft.com/en-us/netframework/aa663324
http://msdn.microsoft.com/en-us/library/ms731082.aspx
http://wcftutorial.net/
http://en.wikipedia.org/wiki/Service-oriented_architecture
http://msdn.microsoft.com/en-us/library/aa480021.aspx
http://www.service-architecture.com/
http://www.webopedia.com/TERM/S/Service_Oriented_Architecture.html
http://www.javaworld.com/javaworld/jw-06-2005/jw-0613-soa.html
http://www.youtube.com/watch?v=sbd_1G8Kqjs
http://www.soapatterns.org/
http://www.cio.com/topic/3016/Service_Oriented_Architecture_SOA
http://looselycoupled.com/glossary/SOA
Selenium is a free open source software testing framework which provides tools to author, record, edit and play tests for automating user-interface tests for web applications. These tests can be run on most of the modern browsers and operation systems like Windows, Linux, and Macintosh. These test scripts can be written in a number of most common programming languages including C#, Java, Groovy, Perl, PHP, Python and Ruby.
PHPUnit is a unit testing framework for testing PHP applications. Selenium tests can be written using PHP language and integrated with PHPUnit framework for screen shot captures and easy reporting.
Following are steps to automate web browser testing using Selenium and PHPUnit.
Fire up Selenium IDE in Firefox browser:
(NOTE: you must have the Selenium IDE add-on installed to proceed)
Installing PHPUnit
To install PHPUnit you need to use the PEAR installer. The PEAR channel (pear.phpunit.de) is used to distribute PHPUnit so make sure that it is registered with your local PEAR environment:
Selenium RC installation
Selenium RC is a Java based command line server that starts browser and runs commands you pass from your tests.
Climax: Using PHPUnit
It is time to test our PHP script that we had exported earlier using Selenium IDE. Launch your command prompt in windows & run this command:
phpunit filename.php
where filename.php is the name of your PHP file
This will start the test. Each test command from your file will be sent to the Selenium server, which does the job of launching the appropriate browser (in our case, Mozilla Firefox), open web page and perform the same recorded actions which you performed and close the browser after the test completes.
You can also add your conditional codes in the PHP script file to add more flexibility say, to catch certain exceptions.
Things to remember for future
Also, keep in mind that the PHP file which the Selenium IDE has may contain certain HTML codes which may not work when you are executing your script. For example, you clicked on a button, Selenium recorded it, converted the action into the PHP code before exporting it to a PHP file. Now when you are running the script in PHPUnit, you may or may not encounter the error that the HTML element was not found.
In that case, you will have to manually write the correct code so your script is able to find that button in the web page when you execute it again.
Emails are an integral part of any system and thus becomes an important functionality to be regression tested. Testing emails has been difficult because of it being non real time in nature. Sometimes emails take 5-10 minutes to get into the mailbox and thus create problems.
Because of this automated regression testing emails using Selenium is not fool proof either. One of the ways to approach it is that we check the inbox for mail until a time limit of say 10 minutes and based on that complete your test case. In normal scenario mails should reach inbox within 10 minutes. Companies running their own exchange server can actually manage this more predictably..
Here is what can be followed as a concept to regression test emails:-
Let’s assume system sends an email during registration for confirming user’s email address. For testing purpose we would consider that email is being sent to your company’s email-id that is available on web.
You can put this in a loop to verify email for another 5-10 minutes and if email is not received then fail the test case.
Web Application Automation: Why open source Selenium can be a good choice?
In Agile development practice, code is evolved on daily basis with dispersed teams across globe. Maintaining quality of the product is a major concern. To maintain quality of the product continuous regression tests need to be executed to ensure predictive behavior of the product with each release. Generally companies are maintaining a set of manual test cases and run them with each product releases. With each product release new features are added and hence these test scripts are updated with new test cases and hence they becomes huge. Time of execute these huge test scripts with each product release would put adherence to the release timelines which would significantly impact time of market of the product. Hence a need arises to automate these repetitive test cycles to reduce this time and increase time to market. A good open source tool Selenium will help in automating this repetitive task. Following are advantages of using selenium over other available tools in the market.
You can find more information about Selenium and download it from below link
http://seleniumhq.org/
When you want to include custom JavaScript and CSS file in pages (Velocity Templates) specific to your custom plug-in module, please follow these steps:
1. Place the js/css file into desired directory (let it - includes/effects/js/ )
2. Place the following entry into atlassian-plugin.xml
<web-resource key=”resources” name=”resources” >
<resource type=”download” name=”report.js” location=”includes/effects/js/report.js” />
<resource type=”download” name=”report.css” location=”includes/effects/css/report.css” />
————
<context>custum-resources</context>
</web-resource>
3. Add the following line in template file where you want to include above JS/CSS (Velocity template)
$webResourceManager.requireResourcesForContext(”custum-resources”)
Are you not able to enhance a product easily because the design is not allowing you to do?
Are you not able to integrate new interfaces/services?
Are you not able to connect to multiple databases?
Above are some typical problems that come during maintenance of existing applications to incorporate new business requirement. These are also some common requirements while defining scalable framework for new application and products so that future changes can be incorporated with minimal design changes. To address above concerns there are industry proven pattern available which is named as “Inversion of Control (IoC)” or “Dependency Injection Pattern (DI)” by Martin Fowler or “Unity Application Block” in Enterprise Library 4.1 by Microsoft.
The purpose of this pattern is to reduce coupling between software components and build loosely coupled applications. It provides a way to handle dependencies between objects. Traditional approach was to hard-code objects and their dependencies. For instances application can hard-code single/multiple database driver which would enable it to connect to a particular database but what if business requirement changes to connect to different family of database. This would require changes to existing code to connect to new database which can introduce more defects into code and above all there will be two pieces of code which need to be modified for any changes in the way application interacts with database.
This pattern offers a solution to this problem, Instead of hard-coding the dependencies, a component/object just lists the necessary services in configuration files (In our case database drivers and Unity Framework or DI framework will provide (create, initialize and setup) these services (database drivers) to objects or software components at runtime. These services can be changed or modified later based on business requirements which makes code scalable and maintainable in future.
Benefits of above pattern is to reduce common code to create, initialize and setup dependencies or objects, this is handled automatically by pattern framework using configuration files. Configuration files also provides flexibility to incorporate alternate implementations or a given service/component or object. This is also useful during unit testing as it is easy to inject fake implementations of a service (If actual services are paid or inaccessible from development environment) into objects being tested by changing configuration files.
References:-
HTML 5 is a response when web applications are most popular in the market using HTML and XML features. People want to access applications anywhere or from any system which is driving market to look closely at browser side enhancements.
HTML 5 is having many syntactical features. These include the <video>, <audio> , <header> , <canvas> and much more elements. These features enable developers to represent multimedia and graphics content in a much more sophisticated way. No flashes, images and urls to reduce the performance of a web application.
HTML 5 features include:
1. Storage Events
2. Dataset (data-* attributes)
3. Drag/ Drop
4. GeoLocation
5. Offline Detection
6. Offline Application using Manifest
7. Storage
8. Web SQL Database Storage
HTML 5 together with JQuery enrich the developers to make the application extremely animated and rich which was taking lots of effort with classic application.
Happy Programming with HTML 5 ! ![]()