Forum OpenACS Q&A: Response to nsjava staus

Collapse
78: Response to nsjava staus (response to 1)
Posted by Jun Yamog on
Hi,

I think we have some negative feelings about Java due to aD switching from Tcl to Java.  I hope this gets reduced.

On my personal experience I believe that my learning curve to CCM was made even harder due to the negative feedback on this community about it.  I am not defending CCM, all I am saying is that its not as bad as the posts that I have seen on OpenACS.

I will post some nice stuff that I have found about CCM.  In case you think its not good for you then its not.  I am posting it here because I think it was good for me and someone might see that its good for them too.  Of course CCM is still less productive for me than OpenACS.  But there are the nice things about it.

- Given the fact that I started to really learn CCM on my own and had nobody to turn to (no bboards) I was able to learn it more or less.  Since Java had some tools and I was able to pick up one.  Which is eclipse and I was able to look at the whole code base with help from an IDE.  I think I got more mileage from an IDE than if I just used emacs and grep.  So as a newbie I had more tools and help from other non CCM based but Java based resources.

- Since CCM is in Java there are some tools that helped me like the debugger.  It sure helped me see what is really happening to the code.  In fact I recently downloaded tclpro just to see if I can make it run and use a debugger.  Ofcourse since tcl is so simple ns_log and printf debugging is something that is good enough.  But for some reason I miss having a debugger.  I guess its been a long time for me since I used a debugger in C, C++ and Java.

- Even though CCM is thicker than OpenACS since its very hard to access the database directly (there is no db api aside from using jdbc).  But its actually closer to the data model of ACS.  For example when you get a new User and save it it will actually insert rows on acs_objects and users table.  Its because the java class User inherits from acs_objects java class.  So the Java classes in CCM is closely mapped to the data model.  So if I inherit User into FooUser in java.  I then create a foo table on the db.  Making a new instance of FooUser will put rows in foo, users and acs_objects table.  Also by getting FooUser(object_id) it selects that user from the database.  Changing the attribute of FooUser.name actually corresponds to the column in the db.  You can also define methods that needs custom sql queries like foo.getAll for performance reasons.

- Since things are more rigid and less flexible there is a more uniform way of doing things.  I guess its because you are more retricted.  Being a beginner that is a big plus for me because after a while there is a pattern that develops.  Of course once you are an expert it might hinder you... I don't know since I still consider myself a beginner in CCM.

- Since the java classes closely models the data model and have a meta data associated to it.  The create, delete, insert, etc. done the same way.  There is always a retrieve and save method.  Much like what OpenACS have in create and delete plsql.  But this is done on the super class Data Object class.  So Users, etc. does not need to implement this stuff unless they need to.  Since things are more or less uniform there is already a move to use the metadata to create the tables.  So porting to a new database may become trivial in the future.

- its nice to see that CCM uses a lot of java libs for their xml, crypto and authentication.

On some extent the restart of server everytime may not be true.  Since this was always been posted on the bboards I did not do to much work on it.  But recently I tried to use hot swapping and class reloading.  So while in the debugger I was able to change my code without a restart.  Of course big changes of code needs a restart.  But I think more advance webapps like Websphere is able to handle this.  I guess this is the one of the things you pay for to IBM.  But I am not sure about this as this info pertains to other Java code.

To summarize, CCM has still a lot more problems but its not as bad as what most people think of.  Of course OpenACS still have the general advantage.  Please let us try to look at CCM in a better light.  Also it may not be the failure of aD has a lot to do with their decision to use Java.  The same way that it is not true that if aD was successful a lot of it will attributed to Java. Of course the marketing heads will screw a lot of the truth.

I hope I did not move the discussion to any side my intention is to put it more in the middle ground.