Tag Archives: apps

HTML5 vs. Apps: Here’s Why The Debate Matters, And Who Will Win

HTML5 is a new technology that allows developers to build rich web-based apps that run on any device via a standard web browser.

Many think it will save the web, rendering native platform-dependent apps obsolete.

So, which will win? Native apps or HTML5?

A recent report from BI Intelligence explains why we think HTML5 will win out, and what an HTML future will look like for consumers, developers, and brands.

Here’s why the Apps-vs-HTML5 debate matters:

+ Distribution: Native apps are distributed through app stores and markets controlled by the owners of the platforms. HTML5 is distributed through the rules of the open web: the link economy.

+ Monetization: Native apps come with one-click purchase options built into mobile platforms. HTML5 apps will tend to be monetized more through advertising, because payments will be less user-friendly.

+ Platform power and network effects: Developers have to conform with Apple’s rules. Apple’s market share, meanwhile, creates network effects and lock-in. If and when developers can build excellent iPhone and iPad functionality on the web using HTML5, developers can cut Apple out of the loop. This will reduce the network effects of Apple’s platform.

+ Functionality: Right now, native apps can do a lot more than HTML5 apps. HTML5 apps will get better, but not as fast as some HTML5 advocates think.

In full, the special report analyzes:

+ What HTML5 is, giving an overview of how it is a technology done by committee.

+ Why the HTML5-vs-Apps debate matters, breaking down its impact on distribution, monetization, platform power and network effects, and functionality.

+ The pluses and minuses of HTML5 vs. native apps, comparing each by cost, user experience, features, distribution, and monetization.

+ How and when HTML5 will take over, laying out how it has all the hallmarks of a disruptive technology.

+ The success of an HTML5 pioneer, The Financial Times.

+ What an HTML5 future will look like, with the promise of richer and more interactive experiences.

Source: http://www.businessinsider.com/html5-vs-apps-heres-why-the-debate-matters-and-who-will-win-2012-12

Did you like this? Share it:

Mastering UI for Beginners

You know the situation: you’re about to get on an airplane for five hours and you just hope to not get stuck next to the loud snorer or the crying baby. Fortunately for me, my last flight yielded a more interesting fellow traveler.

As I was beginning to nod off around 20,000 feet, I noticed out of the corner of my bleary eyes that my seatmate blueprint_uiwas tapping away on an iPad app that I had never seen before. My fellow flyer was actually using Blueprint, an iOS UI design tool. After striking up a conversation, I learned that the man busy toiling in app interfaces was no master developer but rather a middle school teacher who had an idea or two.

Frustrated with a manual methodology for tracking students in his classroom, he began jotting ideas on napkins on how to make the process more efficient by creating his own app. He tracked down a developer and got to work. After a successful launch in the Apple App Store, my new acquaintance is now on the path to creating his next app. This time though, he is using the more refined method of Blueprint to map out his idea.

This amazes me. The power to create and design apps isn’t just for developers anymore. Now it is within reach of the everyman. No longer can someone sit on the couch, watch a commercial and say, “well, yeah but I thought about that five years ago.” Instead, they can take matters into their own hands (or finger tips!) and start designing.

Now, with the help of tools like Blueprint, App Cooker and iMockups, developers can gain clear guidance from passionate consumers with great ideas. Here’s to the people and the potential for exciting apps in the future.

source: http://blog.utest.com/mastering-ui-for-beginners/2012/07/

Did you like this? Share it:

How to Do Automation Testing of iPhone Applications

Why automation? It saves precious time spent in running manually one and the same tests over and over again with each new build of the application. And secondly, it improves the stability of the application and decreases regression bugs by making it easy to run tests after each non-trivial code change or even at the end of each development day.

How about automation testing of mobile applications? Well, this area has always been foggy.

There are lot of tools for web application testing and some of them could fit automation testing of mobile applications either independently, or with an extension. For example, you could use M-eux Test as an extension on top of HP’s Quick Test Professional (QTP). M-eux Test recognizes and activates the GUI objects on the screen of the mobile device while utilizing best automation testing practices already incorporated into QTP. The restriction of M-eux Test comes from the lack of supported OSs – in fact, it supports only Windows Mobile apps (6.x and 5.0 Mobile PC).

What happens if you want to test an iPhone app? Recently Gorilla Logic, an enterprise IT consulting services company has launched free functional testing tool for iPhone apps named FoneMonkey. It provides the ability to capture, edit, and replay user interface tests on iPhone, thus covering the functionality of an iPhone app with automation tests.

Further, FoneMonkey provides options for integrated script editing while playing a recorded scenario, and modifiable assertion checks. Sounds familiar?

I think FoneMonkey will quickly become a standard for iPhone test automation. Besides, the people from Gorilla Logic are handling issues and change requests in no time, there is an extensive and easy-to-follow documentation, and a dedicated forum hosted by the company. If you are into the mobile application development business, I could highly recommend you the tool!

Source:http://www.bianor.com/blog/how-to-do-automation-testing-of-iphone-applications/

Did you like this? Share it:

Avoiding consumer testing: Why mobile performance testing is critical

Mixing mobile device users’ high expectations for application performance with widespread enterprise adoption of mobile networks increases the risks of high-profile failures. In addition, today’s growing demand for rapid, precise mobile application distribution across many devices, operating systems and networks raises the stakes for mobile application development and quality assurance managers. This high-risk scenario requires mastering new and time-tested approaches to pre-deployment performance testing now more than ever.

“You don’t want your end users to be your testers. This is a terrible idea. Before mobile and social media, this might have been okay because the negative feedback would be more muted and not be ‘viral’ in the sense of infecting your brand before you had a chance to administer the cure,” says Dave Berg, senior director of product management for Shunra.

Theresa Lanowitz, founder of voke, inc., agrees that software performance directly links to a company’s overall reputation and it is best to avoid consumer testing. “The software that runs your company is now inextricably linked to your brand. So your brand is reflected through the software you are putting out there; your brand is reflected through the software that your customers are using,” she explains.

Recent research findings

Even smaller issues can negatively impact the brand. For example, according to research cited by Aberdeen Senior Research Analyst Jim Rapoza, 7% of users abandon applications after just one second of delay in performance. 11% abandon at two seconds, 18% at three, 25% at four and 50% at five seconds.

New voke research explores the factors that are affecting the testing market, such as cloud and mobility.  Lanowitz says, “The testing of software at every stage of the lifecycle with all aspects of the supply chain is a standard and required practice, and continues to grow in importance.”

The growing urgency of application performance testing is reflected in recent Aberdeen research as well, which shows that 18% of businesses are currently performing application testing, while 54% plan to in the next year, according to Rapoza.

Testers now must act “in the strategic role of customer advocate and help deliver higher quality software throughout the enterprise by placing a laser focus on assessing the risk associated with every piece of software,” says Lanowitz. After all, it’s not just about producing quality applications, but also satisfying the expectations of end users and preserving the integrity of the company.

Cost benefit of doing pre-deployment testing

Conducting pre-deployment performance testing is critical, and it’s also much less costly. “It is easier, more cost-effective, and protects your brand to performance test before deployment,” says Berg.

Shunra surveys have pointed to the fact that “60% of the total cost in an application’s lifecycle come from remediating performance related issues after the app has been deployed,” according to Shunra CEO Gary Jackson. “If you cut that number down just a few points, you will see astronomical savings and ROI on the pre-deployment testing you preformed. It is close to 100-to-1 in cost savings.”

The costs can really add up, “because it’s not just a matter of having to bring an app down, or bring a newer version down in order to rebuild it and retest it, it’s also the lost user opportunity; one bad experience will often drive your users away,” adds Rapoza.

Available tools

Fortunately, the market is responding with various tool and service offerings that address each layer of software performance.

Lanowitz discusses the proliferation of mobile test vendors and their willingness to partner with each other. “You have a whole host of mobile testing companies coming out. What they’re doing a really great job of is, they’re building this incredibly complex matrix that will allow you to test your mobile application from anywhere in the world into any geography. So you can do your testing from Bangalore, and say, ‘Okay, I have to make sure this will run perfectly in Chicago, in the United States, on these carriers.’”

Did you like this? Share it:

The secrets to making money with mobile apps

A couple years ago, it was clear a Gold Rush mentality was brewing as the iPhone proved that people really, really wanted mobile apps. Lots of developers jumped in to claim their fortune, as did many students and regular folks lured by the promise of easy money through cookie-cutter apps created for them by forms-based websites. The Gold Rush fever has cooled, but not the desire for mobile apps, nor have the opportunities for real developers to make real money from mobile.

Forrester Research estimates that $17.5 billion worth of mobile apps will be sold this year across all platforms. Subtracting the cut that Apple, Google, and others get for placement in their app stores, that’s at least $13 billion for developers to pocket. But how to ensure you get the biggest slice of the pie? Ilya Laurs, founder of the app store GetJar, believes he knows the answer to that key question, based on analyzing the sales and revenues of thousands of mobile apps.

Laurs presented his analysis recently at the CIO Global Forum, an invitation-only, off-the-record thought leadership event for CIOs. And he’s agreed to share it with you. Before I get into the details, note that the vast majority of apps analyzed are consumer apps, so sales through an enterprise app store, such as the one Apple provides for employee app distribution, may not fit these patterns. Also, Laurs could not analyze Apple App Store sales data, but believes from anecdotal evidence that the basic model for making money "generally holds true" for iOS apps as it is for apps on other platforms.

Laurs’ analysis boils down to what he calls the user engagement model. In a nutshell, it means what you charge for an app should be based largely on how users engage with it.

For example, if people use your apps just a few times, an ad-supported model makes no sense, as you’ll earn just pennies per user. Better to charge 99 cents or $3.99 or whatever up front. Even though sales at the paid price will be a fraction of the free, ad-supported version, the total revenues are likely to be larger.

Conversely, if the user engagement is expected to be high, such as for a news, sports scores, social feeds, or other information-stream-oriented app, the advertising model makes much more sense. You’ll make more money from the many more impressions — sales-speak for the ads actually presented to app users — over the app’s lifetime even at a few cents per impression than if you charged a one-time up-front fee. Just beware, Laurs notes, that it’s often difficult to get paid by the ad networks.

Which begs the question: What about high-engagement apps that aren’t about information streams, where ads would be a turnoff? I’m talking games such as Angry Birds Space and Draw Something. The secret there, Laurs says, is to combine a relatively low up-front price (perhaps 99 cents to $4.99) with app purchases for virtual goods (such as powers and hints in games) and additional functions (such as bookmarking of your favorite teams for a sports app or ad removal to convert a free trial app to a paid one). Another advantage of in-app purchases is that billing is usually easy, either through the app store’s own system or through an established provider such as PayPal that users likely already have a relationship with

Then there are highly useful apps that don’t really support the notion of an in-app purchase or advertising. Those should cost more because they are more valuable. Examples in the iOS world are Quickoffice, iPhoto, Keynote, and GoodReader.

In some cases, a subscription model makes sense. Certainly, for a high-quality magazine like The Economist, which doesn’t repeat the same news everyone else has, a subscription is worth the reader’s money. Outside of media, I suspect the subscription model is a harder sell, though we’ll certainly see it with services such as the CloudOn Office virtual environment (currently offered for free as a teaser). We also see it with Quickoffice Connect, an attempt to get people to subscribe to the Quickoffice Office-editing suite rather than buying it just one time. However, Quickoffice Connect is a cautionary tale, as the subscription offering is a poor product that will hinder Quickoffice’s future attempts to convert users to ongoing payments — the same issue we see with Adobe’s attempt to convert its Creative Suite users into subscribers for a product that hasn’t justified its frequent upgrades for some time.

Laurs has created what he calls a user engagement model representing this app pricing strategy, as shown below.

Source:

http://www.javaworld.com/javaworld/jw-05-2012/120522-making-money-with-mobile.html?page=1

Did you like this? Share it:

Use Memcached for Java enterprise performance, Part 2: Database-driven web apps

However you slice it traditional caching requires performance trade-offs that some enterprise applications cannot afford. Find out for yourself why Memcached is a go-to solution for Java developers whose applications need serious scale. After first setting up spymemcached as your open source Java client for Memcached, you’ll use it in two powerful application scenarios: first configuring Memcached as second-level cache for Hibernate (via hibernate-memcached), and then using it to cache the HTML generated for each web page.

We concluded the first half of this tutorial with a look at using Telnet and the Memcached protocol to store and retrieve cache entries in a Memcached server. Accessing Memcached via Telnet is especially useful for debugging, but if you want to use Memcached in a Java enterprise application you’ll need to use a Memcached Java client.

We’ll use spymemcached, a very popular Memcached Java client, for the introductory purposes of this tutorial. Listing 1 shows spymemcached’s main class, MemcachedClient.

Listing 1. MemcachedClient
public static void main(String[] args) throws Exception{
    if(args.length < 2){
        System.out.println("Please specify command line options");
        return;
    }
    MemcachedClient memcachedClient = new MemcachedClient(AddrUtil.getAddresses("127.0.0.1:11211"));
    if(commandName.equals("get")){
        String keyName= args[1];
        System.out.println("Key Name " +keyName);
        System.out.println("Value of key " +memcachedClient.get(keyName));
    }else if(commandName.equals("set")){
        String keyName =args[1];
        String value=args[2];
        System.out.println("Key Name " +keyName + " value=" + value);
        Future<Boolean> result= memcachedClient.set(keyName, 0, value);
        System.out.println("Result of set " + result.get());
    }else if(commandName.equals("add")){
        String keyName =args[1];
        String value=args[2];
        System.out.println("Key Name " +keyName + " value=" + value);
        Future<Boolean> result= memcachedClient.add(keyName, 0, value);
        System.out.println("Result of add " + result.get());
    }else if(commandName.equals("replace")){
        String keyName =args[1];
        String value=args[2];
        System.out.println("Key Name " +keyName + " value=" + value);
        Future<Boolean> result= memcachedClient.replace(keyName, 0, value);
        System.out.println("Result of replace " + result.get());
    }else if(commandName.equals("delete")){
        String keyName =args[1];
        System.out.println("Key Name " +keyName );
        Future<Boolean> result= memcachedClient.delete(keyName);
        System.out.println("Result of delete " + result.get());
    }else{
        System.out.println("Command not found");
    }
    memcachedClient.shutdown();

}

In Listing 1, we first create a MemcachedClient object with hostname:portname as its argument. Once we have the object we can start calling its methods to set and get cache entries. Note that MemcachedClient has equivalent methods for every method supported by the Memcached protocol:

  • MemcachedClient.set() is used to store a Java object into the Memcached server. In Listing 1, we stored an instance of a Contact object with the string contactId-1. The second parameter of this set method is time-in-seconds.
  • MemcachedClient.get() is used to get the value of the key from a Memcached server. In Listing 1 the value of the key is an object of Contact.java, so the client will first retrieve the value and then deserialize it and return the object. The get() method returns null if the value is not found or is expired.
  • MemcachedClient.add() is used to add an object to the cache only if it does not already exist. In Listing 1 the contactId-1 key exists in the cache already, so it won’t be added.
  • MemcachedClient.replace() replaces an object with the value for the given key (if there is already such a value). In Listing 1, contactId-1 is already in the cache, so its value would be replaced.
  • MemcachedClient.delete() deletes a given key from the cache. In Listing 1, the call is used to delete the contactId-1 key.
MemcachedClient.set()

You can use MemcachedClient.set() to store a simple string or a complex object. When you store a complex object, MemcachedClient will first serialize the object and then store it. As a result, every object that you store in Memcached must be serializable, and the key must also be a string. In Listing 1, the set() method returns an object of Future<Boolean>. When we call the set method, it is executed asynchronously, so the control moves to the next line without waiting for a response from the Memcached server. If you needed to know the result of the set operation, then you would call setResult.get() on the Future object instance.

Spying under the hood: spymemcached

Before we move on to the web application exercise, let’s look under the hood to see how spymemcached works. Figure 1 is a sequence diagram showing what happens in spymemcached when a client issues a get().

Figure 1. get() under the hood (click to enlarge)

Spymemcached is an asynchronous, single-threaded Memcached client. When you call any caching-related method on spymemcached’s MemcachedClient, it will be handled asynchronously. The client call method handles writing the details of the operation that should be performed into a queue and returning the control back to the client making the call. The actual interaction with the Memcached server, meanwhile, is handled by a separate thread that runs in the background.

Notice that the sequence diagram in Figure 1 has two different threads. The first thread shows the method sequence for what happens when a client makes a get() call. The second thread displays a method sequence for the daemon thread that communicates with the Memcached server. Both threads are worth a closer look.

Sequence of events in a client thread

When you call MemcachedClient‘s get() method it takes the arguments and forwards control to the asyncGet() method on the object of Memcached class. The asyncGet() method then forwards control to either AsciiOperationFactory or BinaryOperationFactory, depending on the Memcached protocol your client uses to communicate with the server. AsciiOperationFactory is the default value.

The AsciiOperationFactory constructs an object of the command-specific operation object. In this case, since the client issued a get command, it creates an object of GetOperationImpl and returns it. The MemcachedClient.asyncGet() method then takes care of attaching a callback function to the operation. This function will be called when MemcachedClient gets data back from the server and returns a java.util.concurrent.Future object. The client uses the java.util.concurrent.Future to retrieve the data returned from server.

Once MemcachedClient has the object of GetOperationImpl, it first tries to validate the key by ensuring that the length of the key is less than 250 characters and does not contain any special characters. Once the key is validated, the next task is to figure out which server the request should go to. For that MemcachedClient passes control to an instance of the NodeLocator class with the key. The NodeLocator class calls the HashAlgorithm.hash(key) method to get the hashCode for the key. By default, NodeLocator will call the hashCode() method on the key, which is a String object. Once it has the hashCode it will divide that by the number of servers; for example, if the hashCode were 10 and the number of servers three, then the remainder would be one. So the cache entry would be located in Server 1. The MemcachedNode object representing Server 1 would be selected. The MemcachedConnection object would then add the get operation to the queue of Server 1 and return control to the client code.

Sequence of events in daemon threads

If you take a look at the MemcachedClient source code, you will notice that it implements the java.lang.Thread interface. When you create a new instance of the MemcachedClient it kicks off a new thread by calling a start() method on the current object, at which point the JVM will call a MemcachedClient run() method from the newly created thread.

Inside the run() method, MemcachedClient checks the value of the running flag. If it is true, MemcachedClient calls the handleIO() method of the MemcachedConnection object. handleIo() looks at the current job queue to get a list of pending tasks and tries to optimize them. For example, if more than one get() request is pending then this method will combine them into one call. The handleIO() method uses the java.nio methods to communicate with the server. When you call the MemcachedClient shutdown() method, it changes the value of the running flag to false, which results in stopping the run() method and the background daemon thread. It also closes the connection with the Memcached server.

Using Memcached in an enterprise web application

This section introduces you to integrating Memcached into an enterprise architecture. Using the Contact web application introduced in Listing 1, we’ll add, remove, update, and view records in a CONTACT table. Next I’ll show you how to use Memcached to alleviate database load by configuring it as second-level cache for Hibernate. Finally, I’ll explain how to use Memcached to store custom Java objects and cache the HTML generated for each web page.

Start by downloading ManageContact-NoCaching.zip. The ManageContact application contains a ContactServlet that looks at incoming requests and decides what database interaction is required to execute each one. It then forwards control to ContactDAO in order to execute the required database interaction. ContactDAO uses Hibernate to execute select, insert, and update functions on the Contact table. When control is returned to ContactServlet, it forwards control to the appropriate JSP in order to generate markup on the web page. The ManageContact application has a Maven script that takes care of downloading all of the necessary dependencies; you can execute a mvn install command to download these dependencies and then run the application in an embedded Glassfish server. Once the server is started you should be able to access the application at http://localhost:8080/ManageContact/contact.

Enter hibernate-memcached

Most web applications spend a good chunk of their time interacting with databases. Caching data can help you speed up that interaction, as well reduce load on your database. Hibernate provides a nice interface for caching that allows you to use your own caching framework. You instruct Hibernate on which caching framework to use by specifying the name of a class that implements org.hibernate.cache.CacheProvider with the property hibernate.cache.provider_class. From there, you have two options: you can either create your own class that implements the org.hibernate.cache.CacheProvider interface and stores the cache entries in the Memcached server, or you can use the hibernate-memcached framework, which is an open source framework based on the spymemcached client. hibernate-memcached supports entity and query caching.

Configure hibernate-memcached as a caching framework

By default caching is disabled in hibernate-memcached, so our first step is to enable Hibernate’s second-level cache. We’ll also need to configure Memcached as a caching implementation for Hibernate. We can handle both of these requirements in the Hibernate configuration file (hibernate.cfg.xml), which is used to configure application-level settings for Hibernate:

Listing 2. Hibernate config
<property name="cache.provider_class">com.googlecode.hibernate.Memcached.MemcachedCacheProvider</property>
 <property name="hibernate.Memcached.servers">localhost:11211</property>
 <property name="hibernate.Memcached.cacheTimeSeconds">300</property>
 <property name="hibernate.Memcached.connectionFactory">BinaryConnectionFactory</property>

Now let’s take a closer look at each of the properties set. You can enable the second-level cache by setting a value of cache.provider_class to com.googlecode.hibernate.Memcached.MemcachedCacheProvider. The properties that start with "hibernate.Memcached" are specific to the Memcached provider:

  • cache.provider_class: The value of this property defines which class should be used as a cache implementation. In this case we set it to com.googlecode.hibernate.Memcached.MemcacheddCacheProvider, which is provided by the hibernate-memcached framework and uses Memcached as a caching framework.
  • hibernate.Memcached.server: The properties starting with hibernate.Memcached are used by the hibernate-memcached framework. The value of hibernate.Memcached.server should be a space-delimited list of Memcached instances in host:port format. This Memcached server is running on my localhost at port 11211, so I set the value to localhost:11211, which is the default value.
  • hibernate.Memcached.cacheTimeSeconds: The value of this property defines the default number of seconds that each item should be cached. I want the CONTACT record to be cached for 300 second.
  • hibernate.Memcached.connectionFactory: This is the "simple" name of the spyMemcached ConnectionFactory class. It must be one of DefaultConnectionFactory, KetamaConnectionFactory, or BinaryConnectionFactory. The BinaryConnectionFactory performs much better by using a binary protocol
More configuration properties

See "Adding hibernate-memcached to your application" on the hibernate-memcached wiki for a list of all the configuration properties supported by hibernate-memcached.

Develop a caching strategy

Once you have enabled caching your next step is to choose which data you want to cache and what caching strategy you will use. In my case, I want to cache the data from my CONTACT table. Since that will be regularly updated, I set my cache strategy to read-write by adding a cache element in the Contact.hbm.xml, like this:

Listing 3. Configure the caching strategy
<hibernate-mapping package="com.javaworld.Memcached">
    <class name="Contact" table="CONTACT"  >
    <cache usage="read-write"/>
        <id name="contactId" column="CONTACTID">
            <generator class="increment"/>
        </id>
        <property name="firstName" column="FIRSTNAME"/>
        <property name="lastName" column="LASTNAME"/>
        <property name="email" column="EMAIl"/>
    </class>
</hibernate-mapping>

After you’ve updated your own Contact.hbm.xml file (which you can download with the article source), start the Memcached server by executing a Memcached -vv command. This will start Memcached in verbose mode so that it prints every client interaction on the console. Next, execute mvn clean install to start the application. Go to http://localhost:8080/ManageContact/contact and add couple of records. When you click on the record to go to the details, you should notice that no SQL query is executed; instead those records are coming back from the cache. On the Memcached server console, you should see an interaction similar to what is shown in Figure 2.

Figure 2. A view from the Memcached console (click to enlarge)

Using Memcached for server responses

So far you’ve seen how to reduce the load on your database by using Memcached as a second-level cache in Hibernate. Not all application scenarios are quite so simple, however. For instance, how should you handle web pages that process and display data from a web service? You’ll find your application using CPU-intensive logic to build markup for every response, which probably would be better off cached. If you cache the generated markup then the next request for that markup will return from the cache instead of going to a servlet.

The first step is to build a simple Servlet filter to intercept the request. Start by copying the CachingResponseWrapper.java and CachingResponseWriter.java into a com.javaworld.Memcached.filter package. Together these two classes will collect the responses generated by ContactServlet into a String.

Next, create a CacheFilter.java in the com.javaworld.Memcached.filter package and change its doFilter() method so that it looks like this:

Listing 4. CacheFilter.java
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        log.debug("Inside CachingFilter.doFilter() " );
        try {
            HttpServletRequest httpServletRequest = (HttpServletRequest)request;
            HttpServletResponse httpServletResponse = (HttpServletResponse)response;
            ObjectPool<MemcachedClient> MemcachedClientPool = MemcachedHelper.getMemcachedConnectionPool();
            MemcachedClient  MemcachedClient = MemcachedClientPool.borrowObject();
            StringBuffer cacheKeyBuffer = new StringBuffer();
            cacheKeyBuffer.append(httpServletRequest.getContextPath());
            cacheKeyBuffer.append(httpServletRequest.getServletPath());
            if(httpServletRequest.getQueryString() != null){
                cacheKeyBuffer.append("?");
                cacheKeyBuffer.append(httpServletRequest.getQueryString());
            }
            
            String cacheKey = httpServletResponse.encodeURL(cacheKeyBuffer.toString());
            System.out.println ("Get Path Info  " + cacheKey);
            String cachedResponse =(String) MemcachedClient.get(cacheKey);
            
            if( cachedResponse == null){
                System.out.println("Response is not cached forwarding control to servlet");
                CachingResponseWrapper cachingResponseWrapper =new CachingResponseWrapper((HttpServletResponse)response);
                chain.doFilter(request, cachingResponseWrapper);
                CachingResponseWriter collectResponseWriter = (CachingResponseWriter)cachingResponseWrapper.getWriter();
                String collectedResponseStr = collectResponseWriter.getCollectedResponse();//.replaceAll("\n", "") ;
                System.out.println( "Set value in the Memcached for key " + httpServletResponse.encodeURL(collectedResponseStr));
                
                System.out.println("Result of set" + MemcachedClient.set(cacheKey, 0, collectedResponseStr).get());
                //MemcachedClient.flush().get();
            }else{
                System.out.println("Returning cached response ");
                response.setContentType("text/html");
                response.getWriter().println(cachedResponse);
            }
            //MemcachedClient.flush().get();
            MemcachedClientPool.returnObject(MemcachedClient);
        } catch (NoSuchElementException e) {
            e.printStackTrace();
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Note that in the doFilter() method you’re first building the URL that the client used to access the ContactServlet; this URL is used as a key for caching. Once the URL is built, you’ll execute MemcachedClient.get(cacheKey) to check if the response for the given URL is already cached. If it is, then return it; if it isn’t, then wrap the response object into a CachingResponseWriter and pass control to a servlet that will generate the necessary markup. After the control returns from the servlet, call a collectResponseWriter.getCollectedResponse() method. This method will return the response generated by the servlet as a String. Take that response and save it in your cache with its URL as the key. The next time this query is used, the response will come from your cache and not from the servlet.

source:

http://www.javaworld.com/javaworld/jw-05-2012/120515-memcached-for-java-enterprise-performance-2.html?page=1

Did you like this? Share it:

20 iPad Business Apps Every CIO Should Want

image   

So you’ve just bought a fleet of new iPads. What now?

Let’s say you’re a CIO who has just caved to employee demands and has ordered a fleet of shiny new iPads that will be dished out to workers in the near future. You’re probably wondering whether these tablets will be employed for productive uses or whether you’ve just shelled out a large pile of cash just to give your employees access to “Fruit Ninja” while they’re at work.

Well fear not! While the iPad gets all sorts of attention for its consumer applications it also has a rich selection of productivity apps that deliver a multitude of key functions, including sales force support, cloud storage, business intelligence and more. In this slideshow we’ll give you a look at 20 apps that every CIO new to the…

LLP_1SX5LJ(UD4$@SOMN$FI

BIRT Mobile Viewer

Developer: Actuate

Price: Free

BIRT, which stands for “Business Intelligence and Reporting Tools,” is a business intelligence app that gives workers access to business reports, KPIs, documents and dashboards that they’d typically access through their desktop computers. The app also promises “seamless continuity among desktop and iOS mobile devices,” meaning anything you save onto your desktop on BIRT will be ready for you on your iPad when you go home.

[Q0X{0SA4])(51TUG1D0F%J

MobileIron MyPhone@Work Client

Developer: MobileIron

Price: Free

This app gives users access to MobileIron’s Virtual Smartphone Platform, which lets them quickly connect to their corporate network, test local connection speeds and report connectivity problems to IT. From an IT department’s perspective, the Virtual Smartphone Platform lets them enforce enterprise mobile data policies such as encryption and remote wipe, and also to screen third-party applications by publishing a list of recommended apps while simultaneously blocking known malicious apps via a blacklist.

I3(YP4~X]2W2C21(71%}IK9

ZP MDM

Developer: Zenprise

Price: Free

Like MobileIron, Zenprise specializes in developing mobile device management platforms that give users secure access to corporate email, contacts and calendars while giving IT departments an efficient way to manage mobile devices. The ZP MDM also lets users access corporate intranet services by utilizing VPN capabilities and lets users remotely lock and track any lost devices.

_Z_YC8UXYI$C{TDJ_QGIC$U

VMWare View for iPad

Developer: VMWare

Price: Free

VMWare’s View app gives you access to your Windows work desktop from the comfort of your iPad by connecting it to either your company’s LAN or WAN. The app lets you access your desktop from any wireless connection, whether it’s 3G or Wi-Fi. The app also has a “trackpad” feature that simulates a standard mouse and keyboard experience.

S9A4R`D[5`AX5~9(OQS]9W9

AirWatch MDM Agent

Developer: AirWatch LLC

Price: Free

Yes, it’s another mobile device management application, this one from AirWatch. In addition to all the usual MDM features (i.e., IT policy enforcement, over-the-air enrollment, remote lock and wipe, etc.), AirWatch also features GPS tracking and mapping, intelligent notifications, and centralized, over-the-air configurations management.

7YEG_{JX01GE6F8LD$H3(C5

BoardVantage Collaborate

Developer: BoardVantage

Price: Free

BoardVantage isn’t just any collaboration app: It’s a collaboration app for boards of directors. That means it has more extensive security policies to meet regulatory requirements, and is thus SAS70 Type II-certified. If you’re a CIO looking to buy iPads for other higher-ups in the company, this is an app you’ll definitely want to explore. Although the app is free to download, it does require a subscription to use.

QV]XG6EGSXNKC8MDHMJXG{O

Dropbox

Developer: Dropbox

Price: Free

Ah, who doesn’t love Dropbox? Your employees will be happy to upload any documents, presentations, pictures and videos onto Dropbox where they’ll be able to access them from anywhere. The app automatically saves any documents you’ve created onto any device that has Dropbox installed, so when you change something at home it will appear that way when you go to work the next morning.

X23WKK[Z@10E[%CNTQ@5GQ1

MicroStrategy Mobile for iPad

Developer: MicroStrategy Inc.

Price: Free

MicroStrategy Mobile is a business intelligence app that comes with all the usual fixings, including access to business reports, KPIs, documents and dashboards. This particular version has been customized for the iPad’s multitouch screen, thus giving users the ability to use multitouch when editing graphs, charts, maps and other key visual aids.

L{EY3GDF$NAWC0MJX[4U}H1

Spotfire

Developer: TIBCO Software

Price: Free

Spotfire specializes in helping users visualize large and complex volumes of data by letting them aggregate and plug it into a filter to create bar charts, scatter plots, tree maps, box plots, map charts and any number of different visuals depending on your needs. The app can directly access corporate data sources such as spread sheets, meaning you won’t have to manually enter in data for all the nice charts you’re designing.

 

(@)IJSQ{OB8)5PDSB9PWR~D

VabletLite

Developer: Meiotic

Price: Free

Vablet is a collaboration tool that lets you push content (documents, pictures, videos, PDFs, spreadsheets, etc.) out to any devices on your enterprise network. The app also gives IT departments the ability to wipe content and block devices from accessing the network in the event they are stolen or go missing. Data on the app is encrypted with Apple’s Data Protection API and can be pushed out to devices using a variety of secure protocols, including HTTPS, STFP, SSH and VPN.

{R`JAZ7YK(C3YE1B}[L1Z)4

Cisco WebEx Meetings

Developer: Cisco

Price: Free

Cisco’s hugely popular online meeting application comes to the iPad and includes features such as voice-activated video switching and Cisco TelePresence WebEx OneTouch support. Simply put, this is the first app you’ll want to download if your employees engage in frequent remote meetings with one another.

PY4PKUYN2}BM]5$]HX5_8KX

SyncPad

Thirtynine LLC

Price: $9.99

This collaboration tool bills itself as a “remote whiteboard” where users can create virtual meeting rooms and then use the whiteboard to outline their ideas to their coworkers. Clearing off your whiteboard is a snap as well, as you just need to tap on a trash bin icon to wipe the slate clean. The app comes complete with Dropbox integration, meaning you can store your whiteboard presentations in the cloud for later retrieval.

N4OUS(5W6J1F4(Q_X@31HK2

Huddle v2

Developer: Huddle.net

Price: Free

As you may have guessed by its name, Huddle is a collaboration tool that lets users huddle together virtually to get work done. Huddle can automatically sync documents to your devices for offline viewing as well so you’ll still be able to review the work your team has done even if you aren’t in range of a Wi-Fi connection.

 

)B$RVM}X8RON0`(SDVW}LJB

Citrix Receiver

Developer: Citrix Systems

Price: Free

Like VMware’s View app, the Citrix Receiver gives you access to your Windows work desktop from the comfort of your iPad by connecting it to either your company’s LAN or WAN. Citrix also helps you keep your data secure by ensuring your applications and data remain on the corporate network and aren’t downloaded onto your device.

 

(5%`[H99DZFO$4J6PM{YR~B

Yammer

Developer: Geni

Price: Free

If your employees are going to be collaborating through social media on their work projects, wouldn’t you like to know that they’re using secure, enterprise-friendly social media instead of the very public Facebook or Twitter? That’s where Yammer comes in as it lets users collaborate more privately and securely than other big-name social networks.

 

F@K)@{4%`NZ5G1_4Z2X46(N

Socialcast

Developer: Socialcast

Price: Free

Socialcast, acquired in 2011 by VMware, is another enterprise-centered social networking website that has several features familiar to social networking fans, including likes, mentions and following. You can also call or email your coworkers on the app just by clicking on their employee profiles.

B2V[N[(%HY~W`[(J``OS)3L

Box

Developer: Box.net

Price: Free

Box is just what it sounds like: It’s an online storage box! For your stuff! But it also has some other killer features including file-level encryption, automatic log-outs when you close the app, the ability to open files stored on other apps on your device and the ability to wirelessly stream your files using AirPlay.

2AOM]`5X$W[0{9}{V{YXSGG

Roambi Analytics Visualizer

Developer: MeLLmo

Price: Free

Roambi is a business intelligence app that gives you plenty of options for ways to display your business reports and analytics. The free version is compatible with Excel documents, CSV and HTML. If you get a $99.99-per-year subscription, you can also get access to Google Docs and Salesforce CRM.

ZPDEPS4220SB(CWVYVIPZQO

QlikView

Developer: QlikTech

Price: Free

Qlikview lets you search across all the data that you’ve stored while simultaneously providing you with analysis that allows you to make associations across data that you might not otherwise have considered. Using the app requires access to the QlikView server. QlikView makes different versions of its business intelligence app for different industries including consumer marketing, financial services, healthcare and government.

Source:

http://www.cio.com/slideshow/detail/38602/20-iPad-Business-Apps-Every-CIO-Should-Want#slide1

Did you like this? Share it:

Bug Hunter Hacks Chrome at CanSecWest; Earns Top Reward From Google

During Google’s Pwnium contest at the CanSecWest security conference in Vancouver on Wednesday, Russian bug hunter Sergey Glazunov demonstrated a Chrome exploit that completely defeats the browser’s much touted security sandbox.

Chrome is viewed as one of the most secure Web browsers by the security community, primarily because of its sandboxed architecture, which restricts how it interacts with the OS and significantly limits what attackers can do if they exploit a vulnerability.

A panel of security experts from Accuvant and Coverity, who analyzed the defensive capabilities of modern browsers in depth, said last week at the RSA security conference in San Francisco that Chrome’s sandbox prevents processes from doing much of anything on the system.

However, there is a consensus in the security community that while sandboxing is a strong anti-exploitation mechanism, it does not provide a perfect defense and a determined attacker can theoretically defeat it, although with a lot of work.

For this year’s CanSecWest conference, Google decided to run a contest called Pwnium in parallel with TippingPoint’s well known Pwn2Own contest, which rewards security researchers for finding and exploiting unpatched remote code execution (RCE) vulnerabilities in browsers.

Pwnium has a maximum prize pool of US$1 million and rewards various types of Chrome exploits. The largest prize is $60,000 and is awarded to researchers who demonstrate persistent RCE exploits that target only vulnerabilities in Google Chrome’s code.

Read More:

http://www.pcworld.com/businesscenter/article/251506/bug_hunter_

hacks_chrome_at_cansecwest_earns_top_reward_from_google.html

Did you like this? Share it:

HP Beefs Up App Testing Tools For Virtual, Mobile Environments

Hewlett-Packard on Tuesday launched Application Lifecycle Intelligence (ALI) version 2.5, a set of software development tools that speeds up the testing process for apps in mobile and virtual environments.

ALI 2.5 now works with a wider range of development environments and software configuration management systems. When software code is changed, there are requirements that need to be validated, and ALI 2.5 takes artifacts and provides traceable information between them.

"This is valuable in virtual environments, where testing and development need to be built and torn down when validating bunch of changes," Matthew Morgan, senior director of product and solution marketing for HP Software, said in an interview.

Change-based testing is common in Agile software development environments, and ALI 2.5 will be available through all HP software resellers, said Morgan. "Partners can wrap in their own value-added expertise on how to be successful in an Agile environment," he said. "There is also a change based testing component."

HP is also integrating its functionality for testing mobile apps using real devices in the cloud. While HP’s existing LoadRunner in the Cloud product is for testing apps, the new HP Testing for Mobility Services handles the other side of the equation: functionally validating apps to ensure that they work as intended.

Source: http://www.crn.com/news/applications-os/232700030/hp-beefs-up-app-testing-tools-for-virtual-mobile-environments.htm;jsessionid=hGhoYfEm8D+fRHV9Y+C73Q**.ecappj01

Did you like this? Share it:

To Achieve Parameterization When Using Loadrunner to Test Appeon Web Apps

When you use Loadrunner to test Appeon Web apps, because the Appeon Web library (an IE plug-in) of the client and the HTTP of Appeon Server interact with binary data, the foot scripts recorded by Loadrunner are different from the web apps based on HTML. So it is hard to parameterize, for all you see in Loadrunner is just binary data.

So is it impossible to do the parametric test? The answer is “no”.

To make it specific, we can parameterize on the Powerbuilder application layer. I will explain it in the following part.

For instance, our Powerbuilder apps are used to insert records in the table. The primary key columns perhaps are supposed to be input or generated.

Before the stress test, little modifications should be made to PB apps. More specifically, the columns which block data submission are to be parameterized. For example, the primary keys can be generated applying the Oracle sequence, so as to avoid violating the primary key constraints when updating data. After the modifications, data of PB apps should be translated and released to Appeon Server, and then you can record foot scripts and do testing normally. This is the meaning of parameterization on the Powerbuilder application layer. Of course, during the parameterization on the PB application layer, the practical is different from the theoretical to some extent, but we can reduce the difference and the effects to the minimum, and apply this method only when necessary.

After the stress testing, just comment out those PB codes specially for the parameterization.

Did you like this? Share it: