Analytics


Google

Monday, August 24, 2015

Java Web Tier Framework Comparison

I found this old reference in my collection, not sure how much of this is still valid but thought of posting it here so it will not get loss.



FrameworkDescriptionProsConsReference InfoLicensing
GWTGoogle Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications easy for developers who don't speak browser quirks as a second language.
You write your front end in the Java programming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML
No JavaScript syntax errors
- Use a reliable, strongly-typed language (Java) for development and debugging
- No JavaScript programming at all!
Can use complex Java on the client
- Turned into JavaScript, but you still use String, array, Math class, ArrayList, HashMap, custom classes, etc.
- Full IDE-based Java support for development/debugging (GWT builds Eclipse or MyEclipse projects automatically)
Can send complex Java types to and from the server
- Data gets serialized across network
Standalone test environment
- Can test within MyEclipse without installing a server
Support by major company
- From the company that helped to popularize Ajax in the first place. But project is free, open-source, and in no way tied to Google products or services.
- Company won't go away like perhaps with AjaxTags
Big learning curve
- Java developers can deploy with AjaxTags (or other JSP tag libraries that wrap Ajax functionality) in just a few minutes, whereas it takes much longer to get anything running with GWT.
Cumbersome deployment
- Clumsy and poorly documented process to deploy on a regular Java-based Web server.
Nonstandard approach to integrate JavaScript
- You never put direct JavaScript in your HTML. Instead, you use JSNI to wrap JavaScript in Java. Very powerful in the long run, but hard to get used to at first.
Only for Java developers
- Most Ajax environments do JavaScript on the client and have a choice for the server. GWT is based entirely around Java.
Unusual approach
- Fundamentally different strategy than all other Ajax environments makes evaluation and management buyoff harder
Lack of Java 5 Support in current version GWT 1.4
It’s hard to attach GWT on top of existing code
http://code.google.com/webtoolkit/Freeware
Struts 2Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time.Simple architecture - easy to extend
Tag Library is easy to customize with
FreeMarker or Velocity
Controller-based or page-based navigation
Documentation is poorly organized
No feedback for missing properties or invalid
OGNL expressions
Googling results in Struts 1.x documentation
http://struts.apache.org/2.x/Freeware
JSFJavaServer Faces technology simplifies building user interfaces for JavaServer applications. Developers of various skill levels can quickly build web applications by: assembling reusable UI components in a page; connecting these components to an application data source; and wiring client-generated events to server-side event handlers.Java EE Standard - lots of demand and jobs
Fast and easy to develop with initially
Lots of component libraries
Tag soup for JSPs
Doesn't play well with REST or Security
No single source for implementation
http://java.sun.com/javaee/javaserverfaces/Freeware
Spring MVCThis framework is highly configurable via strategy interfaces, and accommodates multiple view technologies like JSP, Velocity, Tiles, iText, and POI. Note that a Spring middle tier can easily be combined with a web tier based on any other web MVC framework, like Struts, WebWork, or Tapestry.Lifecyle for overriding binding, validation, etc.
Integrates with many view options seamlessly:
JSP/JSTL, Tiles, Velocity, FreeMarker, Excel, PDF
Inversion of Control makes it easy to test
Configuration intensive - lots of XML
Almost too flexible - no common parent
Controller
No built-in Ajax support
http://www.springframework.org/Freeware
StripesStripes is a presentation framework for building web applications using the latest Java technologies. The main driver behind Stripes is that web application development in Java is just too much work!No XML - Convention over Configuration
Good documentation (easy to learn)
Enthusiastic community
Small Community
Not as actively developed as other projects
Hard-coded URLs in ActionBeans
http://www.stripesframework.org/display/stripes/HomeFreeware
TapestryTapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server.Very productive once you learn it
Templates are HTML - great for designers
Lots of innovation between releases
Documentation very conceptual, rather than
pragmatic
Steep learning curve
Long release cycles - major upgrades every year
http://tapestry.apache.org/Freeware
FlexFlex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems.Produces Flash UI
Funded by Adobe
Has a “poster child” in Picnik
Not Search Engine Friendly
Doesn’t render HTML content well
Doesn’t print well by default
http://flex.org/java/Freeware
GrailsIt's an open-source web application framework that leverages the Groovy language and complements Java Web development. You can use Grails as a standalone development environment that hides all configuration details or integrate your Java business logic. Grails aims to make development as simple as possible and hence should appeal to a wide range of developers not just those from the Java community. Less LOC => awesome productivity
Groovy is easy to learn for Java Developers
Using Spring and Hibernate at its foundation
Not as performant as using the raw frameworks
Can be hard to sell to stakeholders who like Java
Virtually unknown outside of blogs
http://grails.org/Freeware
SeamJBoss Seam is a powerful new application framework for building next generation Web 2.0 applications by unifying and integrating technologies such as Asynchronous JavaScript and XML (AJAX), Java Server Faces (JSF), Enterprise Java Beans (EJB3), Java Portlets and Business Process Management (BPM). Full-Stack framework with CRUD Generation
Conversations with jBPM
Heavily Funded by JBoss/Red Hat
Works best on JBoss Application Server
Designed for EJB 3
http://www.jboss.com/products/seamFreeware
WicketWith proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML.Great for Java developers, not web developers
Tight binding between pages and views
Active community - support from the creators
HTML templates live next to Java code
Need to have a good grasp of OO
The Wicket Way - everything done in Java
http://wicket.apache.org/Freeware
IT Mill Toolkit
IT Mill Toolkit enables developers to build high quality browser user interfaces with Java on server. It provides a library of ready to use high-quality user interface components and defines clean framework for creating your own components.The toolkit has been used in production since year 2001 and it is shown to be suitable for building demanding business applications.Ease of use, re-usability, extensibility and meeting requirements of large enterprise application.
http://www.itmill.com/developers/Community Edition available for free download and other featured versions include pricing.
Refer : http://www.itmill.com/itmill-toolkit/licensing-and-pricing.htm

Friday, July 31, 2015

Forward Mails Based on Search Criteria

Have you ever wanted to forward all mails that matching a search expression? That option is not available through the Gmail interface but it is relatively easy to do that with a script.

An example of the script is as follow:

function forwardMail() {
  var threads = GmailApp.search("before:2009/07/01 after:2009/06/30"); // second search string.
 
  for (var i in threads) {
    var lastMsg = threads[i].getMessageCount(); //get last message
    var messages = threads[i].getMessages();
   
    var message = messages[0]; //first mail in the thread
    //var message = messages[lastMsg-1]; // last mail in the thread
    message.forward("strovek@seagate.com");
   
  }
}







Notes:

In the example above, you can use messages[0] to select the first message in a thread or messages[lastMsg-1] for the last message in a thread.  The last message will usually contains most of the replies of the threads if the participants are the same throughout the thread conversations.



To make sure you get the mails you want to forward, test the search expression in Gmail first.

Wednesday, July 15, 2015

Using MailApp.SendMail

I thought that you could only MailApp.SendMail api in Google Script with standard parameter for example:

MailApp.sendEmail(recipient, subject,body)

However, I just realize that you just need to use braces to use other advance parameters. For example to add cc, you can do the following.

function sendTestMail() 
 {
   var toList = "strovek@gmail.com"; 

   var ccList = "strovek2@outlook.com" 
   var subj = "Testing sendmail api"; 
   var bodyContent = "If you receive this mail, then the test is successful"
      + "<br><br>This is a second line"; 

    MailApp.sendEmail({to: toList, cc: ccList, subject: subj, htmlBody: bodyContent});