Learning Spring Faces, Security, Testing and Grail

Done with the four day training, finally! It’s pretty exhausting given that I had to get up two hours earlier to match the Central time schedule.

Spring Faces

Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.

I talked about JavaScript and AJAX two days ago. They are all good to some extent, but seemingly disconnected from the server. You have to think and manage the Web app as two pieces, bad for the productivity.

JavaServer Faces (JSF) technology was created to solve this problem. It a server-side framework, which provides GUI components, manages their states from the server side, handles events, and etc. You can then develop a web app more like the standalone application in some sense. Because JSF manages the state from the server side, it uses more resources and less performant than it’s JS/AJAX equivalent.

Spring Faces is not a replacement for JSF, but complements in the “Spring” way. It facilitates deeper JSF and Web Flow integration, manages JSF components’ states, and provides more lightweight JSF components. Therefore, you can get leaner web application than using pure JSF.

Debugging

Several tools can be handy for your debugging:

  1. Firebug. An add-on to the Firefox shown as below.
  2. YSlow. An add-on to Firebug
  3. Web Developer Firefox Add-on.
  4. Fiddler for IE
  5. IE Developer Toolbar
  6. Web Accessibility Toolbar for IE
  7. HTTP Monitor for Eclipse

I am sure there are many more useful tools. Which to use all depends on personal preferences and the maturity of the tools.

The above tools help to debug the Web application in a “black-box” way. If the Web app doesn’t even respond, you then have to go “white-box” way with tracing code with breakpoints and logs. No magic there, but a good understanding of the framework helps a lot.

Web Testing

There are many types of testing you can do with a Web app: unit testing, integration testing, end-to-end testing, performance/stress testing, and etc.

Again, many tools/frameworks can help here. The lab covers two of them:

  • Selenium. It’s a great tool with three pieces: IDE, Core, and Remote Control. The IDE is essentially an add-on to Firefox. Once installed, it can record your clicks, types in the browser to test cases which can be saved with the Core. You can then type the URL to the TestRunner and get everything done in a browser as follows:

 

  • Apache JMeter. It’s used for performance testing. Like Selenium, it also records your interaction with your Web app. To do that, you have to set up a proxy server in JMeter, and use the proxy from your browser.

Note: The URL pattern should be .* to include, and .*.css, .*.js, .*.png, .*.gif to exclude. Somehow the manual diagram missed the . and it just didn’t record anything.

 

Too much already, here is one more!

Groovy and Grail

Groovy is a script language built on top of JVM. It was invented by James Strachan and Bob McWhirter. BTW, as I read an article before, to become a famous software engineer, the number one shortcut is to invent a new programming language. :-) After SpringSource merged G2One, it becomes the major driving force behind it.

Groovy has nice features like Closures, which has been tried but not added to Java yet. In my opinion, it’s a nice to have because you can achieve the similar with inner classes. It’s not worthwhile to increase the complexity of Java language with adding it. According to Joshua Bloch, Java as of 1.5 has used its budget of complexity.

Grail is a framework for building Web apps in Groovy. Why do you need yet another framework? Well, Grail is positioned as a RAPID framework and supposedly simplifies the Web app development. This simplification can well be the reason for you to jump into Grail camp.

For simplicity, there is a new alternative if you want to stick with Java. As I saw a demo last year at SpringOne 2GX, you can easily build full Java applications in minutes with the help of Roo.

Wait, is it something like Microsoft Visual Studio New Wizard that makes it super easy for creating simple projects but hard to modify when you need advanced features later on? Honestly, I haven’t tried it by myself yet so no opinion. You can try it out here.

This entry was posted in Software Development and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.