So, turns out my experiment with Spark + StringTemplate is not going so well. The combination of the two projects is nice but not for what I need. The templates I’m trying to design are a little too complex and require too much Java code to manage and build the views. I’m going to rewrite everything I have so far in GWT, which is a framework I know quite a bit better than both Spark and StringTemplate. What I have converted so far can only be run in DevMode from within Eclipse. I’ll update later when the project is runnable. Code is at my GitHub.
I had some time to work on uPaste quite a bit today. I converted the entire view system to a composite pattern. I was having trouble using StringTemplate for multi-level views. i.e. the parent templates had to know about the child views’ parameters; this was not work for me. I need completely modular templates.
Below is a screen-shot of a new view along with some new styles…
I really don’t like where the "Home | Browse | About" is located. That’s going to change.
Development should go much faster now that I’ve redone the view system. It was really the only thing delaying me before.
I’ve been working on a little project again. My goals this time are:
- learn more about Tomcat
- learn Spark, a Java webapp micro-framework
- learn String Template (which is awesome! )
- continue learning about JPA, this time I’m using the EclipseLink implementation
- create a website similar to PasteBin, but with a feature that allows anyone to download a single file that is executable. That file hosts the exact same pasting website but on their LAN. This is very useful for developers in a corporate environment that don’t want to share code on a publicly visible website.
- my final and usual goal is to have some fun
Check out the project over at my GitHub. At this point it’s usable but lacking some important features like browsing all pasted items, pasting images, and overriding the syntax highlighter (right now it’s just automatic). Its also pretty ugly right now.
This little snippet of code is useful when you’re trying to use pagination with a Hibernate Criteria query. Basically, you pass this method your history of Projection[s] and ResultTransformer because these must be overwritten in order to get the total row count of a query.
The original Projection will be overwritten with the rowCount Projection. The ResultTransformer will be implicitly overwritten when setting the Projection.
Sometimes at work I’ll be chatting with someone using our messenger service and I’ll tell them that I’ll come see them (in person) in 10 minutes. Usually because I have to finish up a block of code or something. Every one in a while, I’ll be pretty busy or really into my work and I’ll forget to actually go see them.
I made this quick reminder website last night to make quick reminders. I usually don’t want to take the time to create a Google Calendar event and I haven’t found a simple reminder program to run on my desktop. They’re all just too complex.