Tag Archives: opensource

Apache Wicket [In Action]: A Review and How It Relates to the Java World

Java is a great tool for creating software. It is well designed, modular, has a wide array of platforms that it can run on, performs well, it’s very extendable, and it has a large community with lots of support. However, it’s support for websites and related services is severely lacking. It’s bad enough that frameworks that extend the existing infrastructure have massive pitfalls that you later discover.

For the most part Apache Wicket solves many of the web related issues that J2EE (JSP) has. If you are to follow the prescribed way of doing things, it can actually be quite pleasant. However, there are a few thorny patches with Wicket. I will get to those later.

Wicket In Action like a marriage. During the honeymoon, everything is great. Everyone is happy, and then later discontent grows and things go up and down. However, unlike a marriage, you don’t really get an ending. This is a rather good way to end things, but some of the lesser parts of the book were rather disappointing. One of the big selling points of Wicket is that it is a framework that assumes that the developer has already prototyped the pages in HTML prior to starting with Wicket [The pages are adapted into Wicket-ized and previewable pages]. This upside was enough to ignore the placement of the HTML files, in the class path rather than the web resources section.

I jumped into this book with lots of enthusiasm after reading the introduction. I even bore through some of the non-stated setup issues in the book. The book starts off by creating a project, from scratch, however I went the Maven route (which I discovered is the better way to go). The book mentions maven, but it doesn’t mention how to build your application or to generate a project. I believe that I went the correct way because Maven helped to setup all of the application servers and the folder structures. The book started by having the user to jump in, examine a few code segments, and then to start on a sample (full featured) e-commerces application. The store was oddly pleasant; the goal was to sell cheeses online. The application started from a few sample view pages, it went on to creating a reusable shopping cart, and finally on to a membership mechanism. This is a very straightforward and to-the point way of starting a new framework. It’s already addressing the needs of the majority of its audience.

Another nice thing to point out about the introduction is that it did not try to cover all of the material at once. It would frequently describe what you were doing, but would mention the chapter where the concepts were explained in depth later on. Something that pleased me was that the code listings did not include a listing number. They were place in the correct location of the text. After you’re done with the sample application, you should be quite proud of yourself. This is similar to your first website.

However, the book got a little disappointing when describing the more detailed interworkings of Wicket: sessions, bookmarkable pages, and layering/rendering. The book improves when it gets to the Ajax functionality and a brief mention of dependency injection and Wicket. The book gets a little rough in the Spring through Hibernate sections and then better in the testing section. The book ends in a rather low note on SEO, production configuration, and JMX. If I had known more about JMX, I would have probably had a better opinion of the ending.

Overall I am not sure if I can say that the less than stellar sections of the book were entirely the authors’ or the book’s fault. It quite possibly may be the technology’s fault.  I would strongly recommend the book if you are new to Wicket.

Lastly, here are some direct tips that I had to discover on my own that helped out a lot:

 

Features I’d like to see Added in Wikis

For the last decade, wikis have not changed very much. Even minor features such as AJAX support are still uncommon items. The following is a list of features I’d like to see added. A few of these items are available as plugins, however I am referring to having these features baked into the actual product.

Live Collaborative Editing

If you use Google Documents with others you will notice this: live collaborative editing. Usually the first time that someone notices this it either freaks him out, or just blows his mind. Multiple users can edit the same document at the same time, whilst receiving the changes in real-time. Having this support on a wiki would make the page lock / change conflict problem go away.

Importing Data Framework

It would be immensely helpful to have some sort of feature within a wiki to import data from other sources: images, RSS feeds, CSV feeds, etc. With a uniform way of bringing-in data, plugins could become a bit more generic and support the transformation. For example: let’s say that you have a build system, and it produces a build log file. Wouldn’t it be helpful for having that file be placed on the wiki [within a certain section] where it could be commented on? With a data framework, there could even be a plugin that could grep the output and only show the important sections.

Graphing Support

Charts are important for simple visualizations of data. Why this requires selecting and learning how to use a new plugin is beyond me.

Drawing

Wikis seem to be text based only. I have only found a small handful of plugins that support the editing of pictures. Even fewer use SVG. I’d like to see the ability to edit an SVG picture built into the wiki software.

OpenID

Why wiki software continues to roll their own authentication system by default is beyond me. This item seems like a no brainer. Create an OpenID authentication mechanism that uses the top providers [Yahoo, Google, Facebook]. If need be, revert to a local authentication method if there is a lack of internet access – or if the wiki is being deployed exclusively internally.

APIs for Dealing with Content On The Wiki

Lastly but not the least important, create and promote a uniform wiki API. This would allow for other systems to automatically push content onto the wiki, or pull it. This would be great for a monitoring system to:

  • create a new page on the wiki
  • post configuration details and current state
  • maybe even show statistics

Also with the API, the same monitoring system could grab a wiki page and check for changes in the configuration details. Granted, there are potential issues with the configuration details changing on a wiki, however at the moment this is more of an idea rather than a real world implementation.

Another example: WordPress could use wiki support to have multiple editors collaborate over a post within a wiki Page. WordPress could also, with an API, pull the wiki page to make it a blog post.

Interesting finds of the Week [Week of the 20January 2013]

Here is yet another installment of things I found interesting/learned this week.

  • Typically, when you group disks together there are two options for this: RAID and LVM. This only works if you have similarly sized disks. However, if you don’t have then you can group them together by using “JBOD” related services. JBOD = Just a bunch of disks. At the moment, the technology I’m learning is Greyhole. It looks really awesome for small home server setups.
  • Auditing your code base for dead/unused code can make a world of difference to your productivity and size of your executable. I do not have actual figures, but I can only assume that it would make class loading and loading of your executable faster.
  • Obvious statement: Math and comparisons with doubles is extremely aggravating. Two numbers can be displayed the same, but unequal when compared. Google’s Guava collection handles this in DoubleMath. The class was introduced in version 13.
  • Need a list of locale-friendly holidays for your Java application? There’s an open source library for that: JollyDay
  • BoardingArea found that it is to pull your basic marketing profile from Delta. This didn’t work for me, I can only assume that the data end point has been fixed.

 

Init.d Script for codeBeamer MR

codeBeamer ManagedRepositories is a free web interface for Subversion, GIT, and Mercurial from Intland. The product contains a standalone web application with their distributed version of Tomcat. However, the Linux version does not include the init.d scripts to start/stop the service on boot or on demand. I’ve written a script that can do this. It can be found on my GitHub page. The instructions can be found in the README.md. At the time of writing, I cannot endorse or recommend against this product as that I haven’t used it yet. However, a review may be coming up in a future post.

To bring down the script, and the read me file [assuming that git is installed], create a new directory and run the following command within it:

git clone https://github.com/monksy/cmr-init

My first attempt at open source: PageRecommender

For personal/private [non-work related] projects, I tend to shy away from creating/working on open source projects. Typically open source projects tend to resemble the same work I do during the day, working and dealing with others. That’s no fun when you just want to build something you need. However, I am trying something new. I’m releasing one of the personal projects into the world of open source. It is the component that is used on this website for making recommendations for projects. [Example: see the bottom of the Financial Strategy Simulator page] A project page that contains more technical information about this project can be found under /a/Projects.

To find this source pull it [using git] from: https://github.com/monksy/PageRecommender

What is this project about? This project is designed to analyze Apache request logs, and attempt to piece together sessions, and then to create an Amazon/Newegg-like statistical recommendation. The desired output is XML representing a parent/child relationship of a page and the next connecting page.  The output comes from standard out. The component is designed to be used as a quiet utility.

What this project isn’t: This project isn’t a completely generic solution that’ll fit your site. It is designed within the context of my current website, and the format of the standard Apache log files. Want to have it look for pages that don’t fall under the /p/{Name} syntax? Change up the Apache log file format? Well this project won’t work for you without modification. Also, there is no such warranty provided by this code. It’s open source, it’s free as in speech but not as in beer.

What could be improved: I realize that this project isn’t perfect. I could have designed it to be slightly easier to read. It could be documented much, much better. However, this is an internal project. Want to improve it? Github should allow you to make such changes. [I’m rather new to Github, so don’t hold me to that statement] The XStream dependency could be removed. But for right now it works.

What do I recommend?

Grab the source! Add more tests, and send me input on how you think it could be improved.

Related Posts Plugin for WordPress, Blogger...
Better Tag Cloud