On 2013-09-24 14:07, John O'Hanley wrote:
>
> The largest pain-point for me is not being able to collaborate and have discussions around the source code.
> The current approach where you are the omnipotent owner of the code and doesn't let anyone have an option
> on the actual code that is in the making until you release a source package is increasingly uncommon
> in the open source domain. And for good reasons too.
>
> >>This forum allows for discussion at any time. I send out the email before I start a new release just to prompt
> suggestions. I think that's a good idea, and I'll continue to do so.
> The web4j code base isn't excessively complex, so informal methods seem to work fine in this case.
> Yes, I'm the sole committer and omnipotent god-emperor of web4j ;) It's seems to have worked fairly well so far.
It works well for you. I have sincere doubt it works well if the objective is to build a thriving community around the
code base. The amount of activity on this group can serve as good evidence that my suspicion is well founded.
>
> 1.
> The ability to add dynamic sql statements. It's needed to support safe ways of building
> queries based on user input since that in turn controls the number of parameters and sometimes
> also sort order of the SQL selects in many of the use-cases that I've had to deal with.
> Being limited to static statements created a huge number of permutations to a point where
> it was no longer feasible.
>
> >>Are you not using the DynamicCriteria class for this?:
>
http://www.web4j.com/UserGuide.jsp#SearchAndSortOperations
> If not, why?
>
Because the DynamicCriteria was far too limited for what we were doing. In many cases we don't have a "static" and
"dynamic" part. For instance, we're building unions of queries. Each select included in the union needs the same
predicates. The predicates vary depending on user input, both in number and in what they filter.
Another example is when you have varying number of predicates in predicates that in themselves are sub selects.
We also have selects that will select different column for a specific column alias depending on user input (the
application is used for accessing old legacy databases and a few of them have really bad design).
Our solution for this is to have SQL that is assembled by named fragments. The actual assembly happens in runtime since
there's no way we can predict all combinations on beforehand.
> >>Where's the pain of the current system? I'm not in pain. If there's no pain, I won't be working on it.
> I want to work on actual pain points. The current impl is rather simple, and rather elegant.
> You just write code, with little or no explicit config at all.
>
The largest pain point is the mix of languages. I'm writing an application in Java. Why should I need to declare classes
in an XML file? I want my app to be tight and fit together with near 100% direct impact analysis from the IDE if I
misspell something.
> Why not use annotations rather than relying on global public fields of specific classes?
> Seems to me, that would be both safer and offer more flexibility.
>
> >>Where's the pain? Show me the pain of the current system.
>
An annotation makes a statement about the thing that it annotates. You don't intuitively see that the fields are used by
web4j. Also, turning it around, it's a bit cumbersome to see what things that I can add to an action and how it will be
recognized by web4j. A well documented set of annotations would make that much clearer. Now it's just "magic" that
happens under the cover.
> A proper build system should be set up (perhaps using Travic-CI or Maven)?
>
> >>Yes, the source distribution is way too bare bones.
> I will add an Ant build.xml and a README, and perhaps all of the jars I'm compiling against.
> But that's all. Maven gives me feelings of existential nausea. Sorry, not going there.
>
We all have our preferences. The advantages with Maven is probably more in distribution and ease of consumption than in
the actual build (which, in this case would be incredible simple). You can do everything with ant of course, it's just
ten times more lines of XML.
- thomas