Sunday, September 22, 2013

Google goes flat and fancy for logo and homepage


Google has reveled new logo and new homepage. Here are how google has gone under change year by year.


The last one which is marked as present logo, now converted to past. The new flat look is very flat and simple.

Google new logo

Also, it looks like yahoo!'s new logo which was refreshed before some days.

Yahoo new logo

Google also changed its popular homepage to new look.



Still, the new look and homepage are not reflecting for India users.

Wednesday, April 10, 2013

Add around advice to servlet in GAE using AspectJ

Today, we will discuss about how to incorporate AspectJ in Google App Engine project. The AspectJ advices will be shown with example code.

1. First of all, download and install Google App Engine plugin for Eclipse. I am using eclipse juno.

2. Install AspectJ package (AJDT-AspectJ Development toolkit) in eclipse using this link.

3. Now, we have to add AspectJ support to Google App Engine. To add AspectJ support,

a). Go to lib folder of project and copy-paste two aspectJ library files to it.

Download latest aspectj-*.*.* from here. (As of now its aspectj-1.7.2.jar, I am using 1.7.1 version)
Download latest aspectjrt.jar from here. Both file just copy paste in shown folder. Don't do it from outside of eclipse. Use eclipse IDE for copy paste.



b). Now right click on project and go to configure and select > Convert to AspectJ project.


c). Nowthere will be already one default class in GAE project.

Sample code is given below. 
 package com.gae.aspectj.test;  
 import java.io.IOException;  
   
 import javax.servlet.ServletException;  
 import javax.servlet.http.*;  
   
 @SuppressWarnings("serial")  
 public class GAE_AspectJServlet extends HttpServlet {  
      public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{  
           resp.setContentType("text/plain");  
           resp.getWriter().println("Hello, world");  
      }  
 }  
   

Add one more class file to same folder of above servlet.

Sample code is given below. See the class definition, its not a class but aspect. 

 package com.gae.aspectj.test;  
 import java.io.IOException;  
   
 import javax.servlet.ServletException;  
 import javax.servlet.http.HttpServletRequest;  
 import javax.servlet.http.HttpServletResponse;  
 import com.gae.aspectj.test.GAE_AspectJServlet;  
 public aspect aspectj {  
        
      pointcut call_Process(HttpServletRequest req, HttpServletResponse resp)  :   
           (execution (void GAE_AspectJServlet.doGet(HttpServletRequest, HttpServletResponse)) && args(req,resp));  
      void around(HttpServletRequest req, HttpServletResponse resp)   
                throws ServletException,IOException :call_Process(req, resp)  
      {  
           resp.getWriter().println("Hello, world from aspectJ");  
           proceed(req,resp);  
           resp.getWriter().println("Hello, world from aspectJ");  
      }  
 }  

It may give errors while you write this aspect code. 

So, right click file and select Open With>AspectJ/Java Editor.

d). Run the program using Google App Engine.

The output will be as shown below.


Here around advice is used. In output you can see that hello world from aspectj comes first.

Since it is around advice, it will not call actual class until aspect writes / executes proceed function with appropriate arguments.

Because of that, the aspectJ output came first and last. Between that actual code runs.

The following line is important in aspect, since it captures doGet method of target servlet.
You can also use wildcards to apply aspect to multiple servlet files.

 (execution (void GAE_AspectJServlet.doGet(HttpServletRequest, HttpServletResponse)) && args(req,resp));   

For any queries please leave a comment.




Saturday, March 9, 2013

How to download Citrix XenApp 6 for free


Citrix XenApp Fundamentals is an easy-to-set-up, on-demand apps solution designed for small and medium-sized businesses. Businesses can take advantage of the wizard-driven, out-of-the-box functionality of XenApp Fundamentals to virtualize any Windows application and give workers secure access to their applications and documents from anywhere on any device. All users need is an Internet connection to experience seamless, high-performance access to corporate apps whether in the office, out in the field, at home or on the road.


1. Go to Citrix Fundamental home page. Click on try it button.



 2. Select full featured trial version option and click 'try free'.


3. The page will show you to register or login. Register yourself and click button 'try now'. Dont forget to accept terms and conditions.



4. After going forward to some page citrix will give you user information and trial information.
Check those information (especially email id) is correct or not. Then click on submit.


5. Next page will show you download link and serial key. Download it. Serial key and details also will be send to your mail id.

I recommends windows server 2008 R2 version.



6. After downloading and installing, it will ask for licence. The licence details and how to get it is described in 
Citrix Eva Guide on page number 8.

Leave comments for any clarification.