I'm working on the comment system. I rewrote the database code and compiled it into a Data access object. I really like this model on the data tier.
Basically I'm creating a class (object) that has four methods...
add()
update()
delete()
view()
Each task is broken up into data access objects that i can reuse. For example, on JJ i have an EntryDAO, CommentDao, EmoticonDao. On kards.com, i started using this model for the new control panel in .NET.
Then to make them easy to write, i have all my database access code in its own class. In .NET i compile the password in and in java its part of the app container. I have a connection pool on JJ.
Normally when i write a function, i pass it each field as an argument.. for example addComment( String subject, String Body, int eid). Instead of that mess, i use Data Transfer Objects.. which are really just classes for each item i want to represent. They have public methods to get and set properties and private variables. I also do input checking at that level.
Well I'm done explaining the background, here's the kewl part.
I'm almost done adding edit comments, spell check comments, delete comments, etc.
My only problem is what they call the "view". Basically a view is what the users sees.. an HTML page (or RSS, XML, WAP) that displays the information in a web applicaition. In java, most people do views in one of two ways... jsp pages OR some proprietary template language. JSP is very limiting in one sense because you can't write a lot of code like in ASP/ASPX. JSP forces you to half render the crap in java classes BEFORE you get to JSP making it shitty for web designers. They get no control. The template languages each have their own pros and cons.. each involves learned multiple languages. Irritiating.
Now i have been using JSP in java and in .NET a combination of HTML, VB and XML/XSLT. I used to use XSLT exclusively on foolishgames.com toward the end of my Win NT run. I hate include files now.
So my problem is that i want to use XSLT to render data tables and what not but also want a simple, good template for jj/foolishgames/kards. How do i fix this?
Every solution means a road block. the new JSP 2.0 spec fixes about half of my bitches about JSP but i have to upgrade tomcat and learn all the new stuff. Using a framework like struts is out because that only solves back end problems. Tapestry is neat but a big learning curve with outdated documentation. I don't like velocity that much.
Basically java lets me have more freedom on the backend but sucks at the presentation level compared to .NET or even ASP.
i've already developed work arounds in .NET like using dll's for DAO and TO objects.. making web services, and other such stuff. Java requires innovation. Its 2 years ahead and 2 years behind at the same time. I'd just use Microsoft stuff if win 2k was SECURE and VIRUS FREE. Its also so expensive to run microsoft stuff. The TCO is more than development in Java costs me.
Basically the speed i get in .NET is lost in price of windows, servers, and SQL licenses. If i ever had to do a project super fast and price was no object microsoft would be the way to go.
My own language got started in XML/XSLT template stuff but i stopped work after hitting limitations on it. I need to run code from it. Some people have used javascript inteperation for this problem. I may resort to that. (server side)
Apple webobjects uses HTML tags like cold fusion and the html is 3.2.. EWWW. If they'd upgrade to XHTML i'd go that route. Their web service stuff looks as nice as microsoft's.